diff --git a/source/.dockerignore b/source/.dockerignore deleted file mode 100644 index 63ce98d..0000000 --- a/source/.dockerignore +++ /dev/null @@ -1,39 +0,0 @@ -# Django project -/media/ -/static/ -*.sqlite3 - -# Python and others -__pycache__ -*.pyc -.DS_Store -*.swp -/venv/ -/tmp/ -/.vagrant/ -/Vagrantfile.local -node_modules/ -/npm-debug.log -/.idea/ -.vscode -coverage -.python-version - -# Distribution / packaging -.Python -env/ -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -*.egg-info/ -.installed.cfg -*.egg diff --git a/source/.github/FUNDING.yml b/source/.github/FUNDING.yml deleted file mode 100644 index e84f52b..0000000 --- a/source/.github/FUNDING.yml +++ /dev/null @@ -1,8 +0,0 @@ -# These are supported funding model platforms - -github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] -patreon: # Replace with a single Patreon username -open_collective: grav -ko_fi: # Replace with a single Ko-fi username -tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel -custom: # Replace with a single custom sponsorship URL diff --git a/source/.htaccess b/source/.htaccess deleted file mode 100644 index 83063ae..0000000 --- a/source/.htaccess +++ /dev/null @@ -1,78 +0,0 @@ - - -RewriteEngine On - -## Begin RewriteBase -# If you are getting 500 or 404 errors on subpages, you may have to uncomment the RewriteBase entry -# You should change the '/' to your appropriate subfolder. For example if you have -# your Grav install at the root of your site '/' should work, else it might be something -# along the lines of: RewriteBase / -## - -# RewriteBase / - -## End - RewriteBase - -## Begin - X-Forwarded-Proto -# In some hosted or load balanced environments, SSL negotiation happens upstream. -# In order for Grav to recognize the connection as secure, you need to uncomment -# the following lines. -# -# RewriteCond %{HTTP:X-Forwarded-Proto} https -# RewriteRule .* - [E=HTTPS:on] -# -## End - X-Forwarded-Proto - -## Begin - Exploits -# If you experience problems on your site block out the operations listed below -# This attempts to block the most common type of exploit `attempts` to Grav -# -# Block out any script trying to use twig tags in URL. -RewriteCond %{REQUEST_URI} ({{|}}|{%|%}) [OR] -RewriteCond %{QUERY_STRING} ({{|}}|{%25|%25}) [OR] -# Block out any script trying to base64_encode data within the URL. -RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR] -# Block out any script that includes a + +
+ +
+
+
404
+
+ + + + + + + + + + + + + + diff --git a/source/public/assets/css/stylesheet.min.5e2b4101351c21e906f398ae96901791830f58d430f96f2659dab7eaef7b3cb7.css b/source/public/assets/css/stylesheet.min.5e2b4101351c21e906f398ae96901791830f58d430f96f2659dab7eaef7b3cb7.css new file mode 100644 index 0000000..87d894c --- /dev/null +++ b/source/public/assets/css/stylesheet.min.5e2b4101351c21e906f398ae96901791830f58d430f96f2659dab7eaef7b3cb7.css @@ -0,0 +1 @@ +:root{--gap:24px;--content-gap:20px;--nav-width:1024px;--main-width:720px;--header-height:60px;--footer-height:60px;--radius:8px;--theme:rgb(255, 255, 255);--entry:rgb(255, 255, 255);--primary:rgb(30, 30, 30);--secondary:rgb(108, 108, 108);--tertiary:rgb(214, 214, 214);--content:rgb(31, 31, 31);--hljs-bg:rgb(28, 29, 33);--code-bg:rgb(245, 245, 245);--border:rgb(238, 238, 238)}.dark{--theme:rgb(29, 30, 32);--entry:rgb(46, 46, 51);--primary:rgb(218, 218, 219);--secondary:rgb(155, 156, 157);--tertiary:rgb(65, 66, 68);--content:rgb(196, 196, 197);--hljs-bg:rgb(46, 46, 51);--code-bg:rgb(55, 56, 62);--border:rgb(51, 51, 51)}.list{background:var(--code-bg)}.dark.list{background:var(--theme)}*,::after,::before{box-sizing:border-box}html{-webkit-tap-highlight-color:transparent;overflow-y:scroll}a,button,body,h1,h2,h3,h4,h5,h6{color:var(--primary)}body{font-family:-apple-system,BlinkMacSystemFont,segoe ui,Roboto,Oxygen,Ubuntu,Cantarell,open sans,helvetica neue,sans-serif;font-size:18px;line-height:1.6;word-break:break-word;background:var(--theme)}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section,table{display:block}h1,h2,h3,h4,h5,h6{line-height:1.2}h1,h2,h3,h4,h5,h6,p{margin-top:0;margin-bottom:0}ul{padding:0}a{text-decoration:none}body,figure,ul{margin:0}table{width:100%;border-collapse:collapse;border-spacing:0;overflow-x:auto;word-break:keep-all}button,input,textarea{padding:0;font:inherit;background:0 0;border:0}input,textarea{outline:0}button,input[type=button],input[type=submit]{cursor:pointer}input:-webkit-autofill,textarea:-webkit-autofill{box-shadow:0 0 0 50px var(--theme)inset}img{display:block;max-width:100%}::-webkit-scrollbar-track{background:0 0}.list:not(.dark)::-webkit-scrollbar-track{background:var(--code-bg)}::-webkit-scrollbar-thumb{background:var(--tertiary);border:5px solid var(--theme);border-radius:var(--radius)}.list:not(.dark)::-webkit-scrollbar-thumb{border:5px solid var(--code-bg)}::-webkit-scrollbar-thumb:hover{background:var(--secondary)}.not-found{position:absolute;left:0;right:0;display:flex;align-items:center;justify-content:center;height:80%;font-size:160px;font-weight:700}.archive-posts{width:100%;font-size:16px}.archive-year{margin-top:40px}.archive-year:not(:last-of-type){border-bottom:2px solid var(--border)}.archive-month{display:flex;align-items:flex-start;padding:10px 0}.archive-month-header{margin:25px 0;width:200px}.archive-month:not(:last-of-type){border-bottom:1px solid var(--border)}.archive-entry{position:relative;padding:5px;margin:10px 0}.archive-entry-title{margin:5px 0;font-weight:400}.archive-count,.archive-meta{color:var(--secondary);font-size:14px}.footer,.top-link{font-size:12px;color:var(--secondary)}.footer{max-width:calc(var(--main-width) + var(--gap) * 2);margin:auto;padding:calc((var(--footer-height) - var(--gap))/2)var(--gap);text-align:center;line-height:24px}.footer span{margin-inline-start:1px;margin-inline-end:1px}.footer span:last-child{white-space:nowrap}.footer a{color:inherit;border-bottom:1px solid var(--secondary)}.footer a:hover{border-bottom:1px solid var(--primary)}.top-link{visibility:hidden;position:fixed;bottom:60px;right:30px;z-index:99;background:var(--tertiary);width:42px;height:42px;padding:12px;border-radius:64px;transition:visibility .5s,opacity .8s linear}.top-link,.top-link svg{filter:drop-shadow(0 0 0 var(--theme))}.footer a:hover,.top-link:hover{color:var(--primary)}.top-link:focus,#theme-toggle:focus{outline:0}.nav{display:flex;flex-wrap:wrap;justify-content:space-between;max-width:calc(var(--nav-width) + var(--gap) * 2);margin-inline-start:auto;margin-inline-end:auto;line-height:var(--header-height)}.nav a{display:block}.logo,#menu{display:flex;margin:auto var(--gap)}.logo{flex-wrap:inherit}.logo a{font-size:24px;font-weight:700}.logo a img{display:inline;vertical-align:middle;pointer-events:none;transform:translate(0,-10%);border-radius:6px;margin-inline-end:8px}#theme-toggle svg{height:18px}button#theme-toggle{font-size:26px;margin:auto 4px}body.dark #moon{vertical-align:middle;display:none}body:not(.dark) #sun{display:none}#menu{list-style:none;word-break:keep-all;overflow-x:auto;white-space:nowrap}#menu li+li{margin-inline-start:var(--gap)}#menu a{font-size:16px}#menu .active{font-weight:500;border-bottom:2px solid}.lang-switch li,.lang-switch ul,.logo-switches{display:inline-flex;margin:auto 4px}.lang-switch{display:flex;flex-wrap:inherit}.lang-switch a{margin:auto 3px;font-size:16px;font-weight:500}.logo-switches{flex-wrap:inherit}.main{position:relative;min-height:calc(100vh - var(--header-height) - var(--footer-height));max-width:calc(var(--main-width) + var(--gap) * 2);margin:auto;padding:var(--gap)}.page-header h1{font-size:40px}.pagination{display:flex}.pagination a{color:var(--theme);font-size:13px;line-height:36px;background:var(--primary);border-radius:calc(36px/2);padding:0 16px}.pagination .next{margin-inline-start:auto}.social-icons{padding:12px 0}.social-icons a:not(:last-of-type){margin-inline-end:12px}.social-icons a svg{height:26px;width:26px}code{direction:ltr}div.highlight,pre{position:relative}.copy-code{display:none;position:absolute;top:4px;right:4px;color:rgba(255,255,255,.8);background:rgba(78,78,78,.8);border-radius:var(--radius);padding:0 5px;font-size:14px}div.highlight:hover .copy-code,pre:hover .copy-code{display:block}.first-entry{position:relative;display:flex;flex-direction:column;justify-content:center;min-height:320px;margin:var(--gap)0 calc(var(--gap) * 2)}.first-entry .entry-header{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}.first-entry .entry-header h1{font-size:34px;line-height:1.3}.first-entry .entry-content{margin:14px 0;font-size:16px;-webkit-line-clamp:3}.first-entry .entry-footer{font-size:14px}.home-info .entry-content{-webkit-line-clamp:unset}.post-entry{position:relative;margin-bottom:var(--gap);padding:var(--gap);background:var(--entry);border-radius:var(--radius);transition:transform .1s;border:1px solid var(--border)}.post-entry:active{transform:scale(.96)}.tag-entry .entry-cover{display:none}.entry-header h2{font-size:24px;line-height:1.3}.entry-content{margin:8px 0;color:var(--secondary);font-size:14px;line-height:1.6;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.entry-footer{color:var(--secondary);font-size:13px}.entry-link{position:absolute;left:0;right:0;top:0;bottom:0}.entry-cover,.entry-isdraft{font-size:14px;color:var(--secondary)}.entry-cover{margin-bottom:var(--gap);text-align:center}.entry-cover img{border-radius:var(--radius);pointer-events:none;width:100%;height:auto}.entry-cover a{color:var(--secondary);box-shadow:0 1px 0 var(--primary)}.page-header,.post-header{margin:24px auto var(--content-gap)}.post-title{margin-bottom:2px;font-size:40px}.post-description{margin-top:10px;margin-bottom:5px}.post-meta,.breadcrumbs{color:var(--secondary);font-size:14px;display:flex;flex-wrap:wrap}.post-meta .i18n_list li{display:inline-flex;list-style:none;margin:auto 3px;box-shadow:0 1px 0 var(--secondary)}.breadcrumbs a{font-size:16px}.post-content{color:var(--content)}.post-content h3,.post-content h4,.post-content h5,.post-content h6{margin:24px 0 16px}.post-content h1{margin:40px auto 32px;font-size:40px}.post-content h2{margin:32px auto 24px;font-size:32px}.post-content h3{font-size:24px}.post-content h4{font-size:16px}.post-content h5{font-size:14px}.post-content h6{font-size:12px}.post-content a,.toc a:hover{box-shadow:0 1px}.post-content a code{margin:auto 0;border-radius:0;box-shadow:0 -1px 0 var(--primary)inset}.post-content del{text-decoration:none;background:linear-gradient(to right,var(--primary) 100%,transparent 0)0/1px 1px repeat-x}.post-content dl,.post-content ol,.post-content p,.post-content figure,.post-content ul{margin-bottom:var(--content-gap)}.post-content ol,.post-content ul{padding-inline-start:20px}.post-content li{margin-top:5px}.post-content li p{margin-bottom:0}.post-content dl{display:flex;flex-wrap:wrap;margin:0}.post-content dt{width:25%;font-weight:700}.post-content dd{width:75%;margin-inline-start:0;padding-inline-start:10px}.post-content dd~dd,.post-content dt~dt{margin-top:10px}.post-content table{margin-bottom:32px}.post-content table th,.post-content table:not(.highlighttable,.highlight table,.gist .highlight) td{min-width:80px;padding:12px 8px;line-height:1.5;border-bottom:1px solid var(--border)}.post-content table th{font-size:14px;text-align:start}.post-content table:not(.highlighttable) td code:only-child{margin:auto 0}.post-content .highlight table{border-radius:var(--radius)}.post-content .highlight:not(table),.post-content pre{margin:10px auto;background:var(--hljs-bg)!important;border-radius:var(--radius)}.post-content li>.highlight{margin-inline-end:0}.post-content ul pre{margin-inline-start:calc(var(--gap) * -2)}.post-content .highlight pre{margin:0}.post-content .highlighttable{table-layout:fixed}.post-content .highlighttable td:first-child{width:40px}.post-content .highlighttable td .linenodiv{padding-inline-end:0!important}.post-content .highlighttable td .highlight,.post-content .highlighttable td .linenodiv pre{margin-bottom:0}.post-content .highlighttable td .highlight pre code::-webkit-scrollbar{display:none}.post-content .highlight span{background:0 0!important}.post-content code{margin:auto 4px;padding:4px 6px;font-size:.78em;line-height:1.5;background:var(--code-bg);border-radius:2px}.post-content pre code{display:block;margin:auto 0;padding:10px;color:#d5d5d6;background:0 0;border-radius:0;overflow-x:auto;word-break:break-all}.post-content blockquote{margin:20px 0;padding:0 14px;border-inline-start:3px solid var(--primary)}.post-content hr{margin:30px 0;height:2px;background:var(--tertiary);border-top:0;border-bottom:0}.post-content iframe{max-width:100%}.post-content img{border-radius:4px;margin:1rem 0}.post-content img[src*="#center"]{margin:1rem auto}.post-content figure.align-center{text-align:center}.post-content figure>figcaption{color:var(--primary);font-size:16px;font-weight:700;margin:8px 0 16px}.post-content figure>figcaption>p{color:var(--secondary);font-size:14px;font-weight:400}.toc{margin:0 2px 40px;border:1px solid var(--border);background:var(--code-bg);border-radius:var(--radius);padding:.4em}.dark .toc{background:var(--entry)}.toc details summary{cursor:zoom-in;margin-inline-start:20px}.toc details[open] summary{cursor:zoom-out}.toc .details{display:inline;font-weight:500}.toc .inner{margin:0 20px;padding:10px 20px}.toc li ul{margin-inline-start:var(--gap)}.toc summary:focus{outline:0}.post-footer{margin-top:56px}.post-tags li{display:inline-block;margin-inline-end:3px;margin-bottom:5px}.post-tags a,.share-buttons,.paginav{border-radius:var(--radius);background:var(--code-bg);border:1px solid var(--border)}.post-tags a{display:block;padding-inline-start:14px;padding-inline-end:14px;color:var(--secondary);font-size:14px;line-height:34px;background:var(--code-bg)}.post-tags a:hover,.paginav a:hover{background:var(--border)}.share-buttons{margin:14px 0;padding-inline-start:var(--radius);display:flex;justify-content:center;overflow-x:auto}.share-buttons a{margin-top:10px}.share-buttons a:not(:last-of-type){margin-inline-end:12px}.share-buttons a svg{height:30px;width:30px;fill:currentColor;transition:transform .1s}.share-buttons svg:active{transform:scale(.96)}h1:hover .anchor,h2:hover .anchor,h3:hover .anchor,h4:hover .anchor,h5:hover .anchor,h6:hover .anchor{display:inline-flex;color:var(--secondary);margin-inline-start:8px;font-weight:500}.post-content :not(table) ::-webkit-scrollbar-thumb{border:2px solid var(--hljs-bg);background:#717175}.post-content :not(table) ::-webkit-scrollbar-thumb:hover{background:#a3a3a5}.gist table::-webkit-scrollbar-thumb{border:2px solid #fff;background:#adadad}.gist table::-webkit-scrollbar-thumb:hover{background:#707070}.post-content table::-webkit-scrollbar-thumb{border-width:2px}.paginav{margin:10px 0;display:flex;line-height:30px;border-radius:var(--radius)}.paginav a{padding-inline-start:14px;padding-inline-end:14px;border-radius:var(--radius)}.paginav .title{letter-spacing:1px;text-transform:uppercase;font-size:small;color:var(--secondary)}.paginav .prev,.paginav .next{width:50%}.paginav span:hover:not(.title){box-shadow:0 1px}.paginav .next{margin-inline-start:auto;text-align:right}[dir=rtl] .paginav .next{text-align:left}.buttons,.main .profile{display:flex;justify-content:center}.main .profile{align-items:center;min-height:calc(100vh - var(--header-height) - var(--footer-height) - (var(--gap) * 2));text-align:center}.profile .profile_inner h1{padding:12px 0}.profile img{display:inline-table;border-radius:50%;pointer-events:none}.buttons{flex-wrap:wrap;max-width:400px;margin:0 auto}.button{background:var(--tertiary);border-radius:var(--radius);margin:8px;padding:6px;transition:transform .1s}.button-inner{padding:0 8px}.button:active{transform:scale(.96)}#searchbox input{padding:4px 10px;width:100%;color:var(--primary);font-weight:700;border:2px solid var(--tertiary);border-radius:var(--radius)}#searchbox input:focus{border-color:var(--secondary)}#searchResults li{list-style:none;border-radius:var(--radius);padding:10px;margin:10px 0;position:relative;font-weight:500}#searchResults{margin:10px 0;width:100%}#searchResults li:active{transition:transform .1s;transform:scale(.98)}#searchResults a{position:absolute;width:100%;height:100%;top:0;left:0;outline:none}#searchResults .focus{transform:scale(.98);border:2px solid var(--tertiary)}.terms-tags li{display:inline-block;margin:10px;font-weight:500}.terms-tags a{display:block;padding:3px 10px;background:var(--tertiary);border-radius:6px;transition:transform .1s}.terms-tags a:active{background:var(--tertiary);transform:scale(.96)}.hljs-comment,.hljs-quote{color:#b6b18b}.hljs-deletion,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#eb3c54}.hljs-built_in,.hljs-builtin-name,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#e7ce56}.hljs-attribute{color:#ee7c2b}.hljs-addition,.hljs-bullet,.hljs-string,.hljs-symbol{color:#4fb4d7}.hljs-section,.hljs-title{color:#78bb65}.hljs-keyword,.hljs-selector-tag{color:#b45ea4}.hljs{display:block;overflow-x:auto;background:#1c1d21;color:#c0c5ce;padding:.5em}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}@media screen and (max-width:768px){:root{--gap:14px}.profile img{transform:scale(.85)}.first-entry{min-height:260px}.archive-month{flex-direction:column}.archive-year{margin-top:20px}.footer{padding:calc((var(--footer-height) - var(--gap) - 10px)/2)var(--gap)}}@media screen and (min-width:768px){::-webkit-scrollbar{width:19px;height:11px}}@media screen and (max-width:900px){.list .top-link{transform:translateY(-5rem)}}@media(prefers-reduced-motion){.terms-tags a:active,.button:active,.share-buttons svg:active,.post-entry:active,.top-link,#searchResults .focus,#searchResults li:active{transform:none}} \ No newline at end of file diff --git a/source/public/assets/js/highlight.min.7680afc38aa6b15ddf158a4f3780b7b1f7dde7e91d26f073e6229bb7a0793c92.js b/source/public/assets/js/highlight.min.7680afc38aa6b15ddf158a4f3780b7b1f7dde7e91d26f073e6229bb7a0793c92.js new file mode 100644 index 0000000..4d48c6a --- /dev/null +++ b/source/public/assets/js/highlight.min.7680afc38aa6b15ddf158a4f3780b7b1f7dde7e91d26f073e6229bb7a0793c92.js @@ -0,0 +1 @@ +var hljs=function(){"use strict";var l,c,o;function p(a){Object.freeze(a);var b="function"==typeof a;return Object.getOwnPropertyNames(a).forEach(function(c){!Object.hasOwnProperty.call(a,c)||null===a[c]||"object"!=typeof a[c]&&"function"!=typeof a[c]||b&&("caller"===c||"callee"===c||"arguments"===c)||Object.isFrozen(a[c])||p(a[c])}),a}class n{constructor(a){void 0===a.data&&(a.data={}),this.data=a.data}ignoreMatch(){this.ignore=!0}}function b(a){return a.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function a(b,...c){var a={};for(const c in b)a[c]=b[c];return c.forEach(function(b){for(const c in b)a[c]=b[c]}),a}function h(a){return a.nodeName.toLowerCase()}l=Object.freeze({__proto__:null,escapeHTML:b,inherit:a,nodeStream:function(b){var a=[];return function d(e,c){for(var b=e.firstChild;b;b=b.nextSibling)3===b.nodeType?c+=b.nodeValue.length:1===b.nodeType&&(a.push({event:"start",offset:c,node:b}),c=d(b,c),h(b).match(/br|hr|img|input/)||a.push({event:"stop",offset:c,node:b}));return c}(b,0),a},mergeStreams:function(c,d,i){var e=0,g="",f=[],a;function j(){return c.length&&d.length?c[0].offset!==d[0].offset?c[0].offset"}function l(a){g+=""}function m(a){("start"===a.event?k:l)(a.node)}for(;c.length||d.length;)if(a=j(),g+=b(i.substring(e,a[0].offset)),e=a[0].offset,a===c){f.reverse().forEach(l);do m(a.splice(0,1)[0]),a=j();while(a===c&&a.length&&a[0].offset===e)f.reverse().forEach(k)}else"start"===a[0].event?f.push(a[0].node):f.pop(),m(a.splice(0,1)[0]);return g+b(i.substr(e))}});const C="",j=a=>!!a.kind;class B{constructor(a,b){this.buffer="",this.classPrefix=b.classPrefix,a.walk(this)}addText(a){this.buffer+=b(a)}openNode(a){if(!j(a))return;let b=a.kind;a.sublanguage||(b=`${this.classPrefix}${b}`),this.span(b)}closeNode(a){j(a)&&(this.buffer+=C)}value(){return this.buffer}span(a){this.buffer+=``}}class r{constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(a){this.top.children.push(a)}openNode(b){const a={kind:b,children:[]};this.add(a),this.stack.push(a)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(a){return this.constructor._walk(a,this.rootNode)}static _walk(b,a){return"string"==typeof a?b.addText(a):a.children&&(b.openNode(a),a.children.forEach(a=>this._walk(b,a)),b.closeNode(a)),b}static _collapse(a){"string"!=typeof a&&a.children&&(a.children.every(a=>"string"==typeof a)?a.children=[a.children.join("")]:a.children.forEach(a=>{r._collapse(a)}))}}class A extends r{constructor(a){super(),this.options=a}addKeyword(a,b){""!==a&&(this.openNode(b),this.addText(a),this.closeNode())}addText(a){""!==a&&this.add(a)}addSublanguage(b,c){const a=b.root;a.kind=c,a.sublanguage=!0,this.add(a)}toHTML(){return new B(this,this.options).value()}finalize(){return!0}}function e(a){return a?"string"==typeof a?a:a.source:null}const m="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",d={begin:"\\\\[\\s\\S]",relevance:0},w={className:"string",begin:"'",end:"'",illegal:"\\n",contains:[d]},E={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[d]},q={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},f=function(c,d,e={}){var b=a({className:"comment",begin:c,end:d,contains:[]},e);return b.contains.push(q),b.contains.push({className:"doctag",begin:"(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):",relevance:0}),b},v=f("//","$"),t=f("/\\*","\\*/"),u=f("#","$");c=Object.freeze({__proto__:null,IDENT_RE:"[a-zA-Z]\\w*",UNDERSCORE_IDENT_RE:"[a-zA-Z_]\\w*",NUMBER_RE:"\\b\\d+(\\.\\d+)?",C_NUMBER_RE:m,BINARY_NUMBER_RE:"\\b(0b[01]+)",RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(b={})=>{const c=/^#![ ]*\//;return b.binary&&(b.begin=function(...a){return a.map(a=>e(a)).join("")}(c,/.*\b/,b.binary,/\b.*/)),a({className:"meta",begin:c,end:/$/,relevance:0,"on:begin":(a,b)=>{0!==a.index&&b.ignoreMatch()}},b)},BACKSLASH_ESCAPE:d,APOS_STRING_MODE:w,QUOTE_STRING_MODE:E,PHRASAL_WORDS_MODE:q,COMMENT:f,C_LINE_COMMENT_MODE:v,C_BLOCK_COMMENT_MODE:t,HASH_COMMENT_MODE:u,NUMBER_MODE:{className:"number",begin:"\\b\\d+(\\.\\d+)?",relevance:0},C_NUMBER_MODE:{className:"number",begin:m,relevance:0},BINARY_NUMBER_MODE:{className:"number",begin:"\\b(0b[01]+)",relevance:0},CSS_NUMBER_MODE:{className:"number",begin:"\\b\\d+(\\.\\d+)?(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},REGEXP_MODE:{begin:/(?=\/[^/\n]*\/)/,contains:[{className:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[d,{begin:/\[/,end:/\]/,relevance:0,contains:[d]}]}]},TITLE_MODE:{className:"title",begin:"[a-zA-Z]\\w*",relevance:0},UNDERSCORE_TITLE_MODE:{className:"title",begin:"[a-zA-Z_]\\w*",relevance:0},METHOD_GUARD:{begin:"\\.\\s*[a-zA-Z_]\\w*",relevance:0},END_SAME_AS_BEGIN:function(a){return Object.assign(a,{"on:begin":(a,b)=>{b.data._beginMatch=a[1]},"on:end":(b,a)=>{a.data._beginMatch!==b[1]&&a.ignoreMatch()}})}}),o="of and for in not or if then".split(" ");function x(b,a){return a?+a:function(a){return o.includes(a.toLowerCase())}(b)?0:1}const y={props:["language","code","autodetect"],data:function(){return{detectedLanguage:"",unknownLanguage:!1}},computed:{className(){return this.unknownLanguage?"":"hljs "+this.detectedLanguage},highlighted(){if(!this.autoDetect&&!hljs.getLanguage(this.language))return console.warn(`The language "${this.language}" you specified could not be found.`),this.unknownLanguage=!0,b(this.code);let a;return this.autoDetect?(a=hljs.highlightAuto(this.code),this.detectedLanguage=a.language):(a=hljs.highlight(this.language,this.code,this.ignoreIllegals),this.detectectLanguage=this.language),a.value},autoDetect(){return!(this.language&&(a=this.autodetect,!a&&""!==a));var a},ignoreIllegals:()=>!0},render(a){return a("pre",{},[a("code",{class:this.className,domProps:{innerHTML:this.highlighted}})])}},z={install(a){a.component("highlightjs",y)}},g=b,k=a,{nodeStream:i,mergeStreams:D}=l,s=Symbol("nomatch");return function(d){var G=[],h=Object.create(null),q=Object.create(null),v=[],j=!0,H=/(^(<[^>]+>|\t|)+|\n)/gm,t="Could not find the language '{}', did you forget to load/include a language module?",b;const C={disableAutodetect:!0,name:"Plain text",contains:[]};b={noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:null,__emitter:A};function F(a){return b.noHighlightRe.test(a)}function u(c,d,e,f){var a={code:d,language:c},b;return m("before:highlight",a),b=a.result?a.result:o(a.language,a.code,e,f),b.code=a.code,m("after:highlight",b),b}function o(m,G,F,E){var k=G,q,u,H,y,c,C,i,d,p,l,w,v;function D(a,b){var c=u.case_insensitive?b[0].toLowerCase():b[0];return Object.prototype.hasOwnProperty.call(a.keywords,c)&&a.keywords[c]}function z(){null!=c.subLanguage?function(){if(""!==d){var a=null;if("string"==typeof c.subLanguage){if(!h[c.subLanguage])return void i.addText(d);a=o(c.subLanguage,d,!0,C[c.subLanguage]),C[c.subLanguage]=a.top}else a=r(d,c.subLanguage.length?c.subLanguage:null);c.relevance>0&&(p+=a.relevance),i.addSublanguage(a.emitter,a.language)}}():function(){if(!c.keywords)return void i.addText(d);let e=0;c.keywordPatternRe.lastIndex=0;let a=c.keywordPatternRe.exec(d),b="";for(;a;){b+=d.substring(e,a.index);const f=D(c,a);if(f){const[c,d]=f;i.addText(b),b="",p+=d,i.addKeyword(a[0],c)}else b+=a[0];e=c.keywordPatternRe.lastIndex,a=c.keywordPatternRe.exec(d)}b+=d.substr(e),i.addText(b)}(),d=""}function B(a){return a.className&&i.openNode(a.className),c=Object.create(a,{parent:{value:c}})}function I(a){return 0===c.matcher.regexIndex?(d+=a[0],1):(v=!0,0)}q={};function A(f,a){var b=a&&a[0],e;if(d+=f,null==b)return z(),0;if("begin"===q.type&&"end"===a.type&&q.index===a.index&&""===b){if(d+=k.slice(a.index,a.index+1),!j){const a=Error("0 width match regex");throw a.languageName=m,a.badRule=q.rule,a}return 1}if(q=a,"begin"===a.type)return function(c){var b=c[0],a=c.rule;const e=new n(a),f=[a.__beforeBegin,a["on:begin"]];for(const a of f)if(a&&(a(c,e),e.ignore))return I(b);return a&&a.endSameAsBegin&&(a.endRe=RegExp(b.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"m")),a.skip?d+=b:(a.excludeBegin&&(d+=b),z(),a.returnBegin||a.excludeBegin||(d=b)),B(a),a.returnBegin?0:b.length}(a);if("illegal"===a.type&&!F){const a=Error('Illegal lexeme "'+b+'" for mode "'+(c.className||"")+'"');throw a.mode=c,a}if("end"===a.type)if(e=function(f){var e=f[0],g=k.substr(f.index),a=function e(a,c,d){let b=function(a,c){var b=a&&a.exec(c);return b&&0===b.index}(a.endRe,d);if(b){if(a["on:end"]){const d=new n(a);a["on:end"](c,d),d.ignore&&(b=!1)}if(b){for(;a.endsParent&&a.parent;)a=a.parent;return a}}if(a.endsWithParent)return e(a.parent,c,d)}(c,f,g),b;if(!a)return s;b=c,b.skip?d+=e:(b.returnEnd||b.excludeEnd||(d+=e),z(),b.excludeEnd&&(d=e));do c.className&&i.closeNode(),c.skip||c.subLanguage||(p+=c.relevance),c=c.parent;while(c!==a.parent)return a.starts&&(a.endSameAsBegin&&(a.starts.endRe=a.endRe),B(a.starts)),b.returnEnd?0:e.length}(a),e!==s)return e;if("illegal"===a.type&&""===b)return 1;if(w>1e5&&w>3*a.index)throw Error("potential infinite loop, way more iterations than matches");return d+=b,b.length}if(u=f(m),!u)throw console.error(t.replace("{}",m)),Error('Unknown language: "'+m+'"');H=function(b){function c(a,c){return RegExp(e(a),"m"+(b.case_insensitive?"i":"")+(c?"g":""))}class d{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(b,a){a.position=this.position++,this.matchIndexes[this.matchAt]=a,this.regexes.push([a,b]),this.matchAt+=function(a){return RegExp(a.toString()+"|").exec("").length-1}(b)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const a=this.regexes.map(a=>a[1]);this.matcherRe=c(function(f,i="|"){for(var j=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./,g=0,b="",d=0,h,c,a;d0&&(b+=i),b+="(";c.length>0;){if(a=j.exec(c),null==a){b+=c;break}b+=c.substring(0,a.index),c=c.substring(a.index+a[0].length),"\\"===a[0][0]&&a[1]?b+="\\"+(+a[1]+h):(b+=a[0],"("===a[0]&&g++)}b+=")"}return b}(a),!0),this.lastIndex=0}exec(c){this.matcherRe.lastIndex=this.lastIndex;const a=this.matcherRe.exec(c);if(!a)return null;const b=a.findIndex((a,b)=>b>0&&void 0!==a),d=this.matchIndexes[b];return a.splice(0,b),Object.assign(a,d)}}class f{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(a){if(this.multiRegexes[a])return this.multiRegexes[a];const b=new d;return this.rules.slice(a).forEach(([a,c])=>b.addRule(a,c)),b.compile(),this.multiRegexes[a]=b,b}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(b,a){this.rules.push([b,a]),"begin"===a.type&&this.count++}exec(b){const c=this.getMatcher(this.regexIndex);c.lastIndex=this.lastIndex;let a=c.exec(b);if(this.resumingScanAtSamePosition())if(a&&a.index===this.lastIndex);else{const c=this.getMatcher(0);c.lastIndex=this.lastIndex+1,a=c.exec(b)}return a&&(this.regexIndex+=a.position+1,this.regexIndex===this.count&&this.considerAll()),a}}function g(a,b){const c=a.input[a.index-1],d=a.input[a.index+a[0].length];"."!==c&&"."!==d||b.ignoreMatch()}if(b.contains&&b.contains.includes("self"))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return function k(d,i){const h=d;if(d.compiled)return h;d.compiled=!0,d.__beforeBegin=null,d.keywords=d.keywords||d.beginKeywords;let j=null;if("object"==typeof d.keywords&&(j=d.keywords.$pattern,delete d.keywords.$pattern),d.keywords&&(d.keywords=function(a,d){var b={};return"string"==typeof a?c("keyword",a):Object.keys(a).forEach(function(b){c(b,a[b])}),b;function c(c,a){d&&(a=a.toLowerCase()),a.split(" ").forEach(function(d){var a=d.split("|");b[a[0]]=[c,x(a[0],a[1])]})}}(d.keywords,b.case_insensitive)),d.lexemes&&j)throw Error("ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) ");return h.keywordPatternRe=c(d.lexemes||j||/\w+/,!0),i&&(d.beginKeywords&&(d.begin="\\b("+d.beginKeywords.split(" ").join("|")+")(?=\\b|\\s)",d.__beforeBegin=g),d.begin||(d.begin=/\B|\b/),h.beginRe=c(d.begin),d.endSameAsBegin&&(d.end=d.begin),d.end||d.endsWithParent||(d.end=/\B|\b/),d.end&&(h.endRe=c(d.end)),h.terminator_end=e(d.end)||"",d.endsWithParent&&i.terminator_end&&(h.terminator_end+=(d.end?"|":"")+i.terminator_end)),d.illegal&&(h.illegalRe=c(d.illegal)),void 0===d.relevance&&(d.relevance=1),d.contains||(d.contains=[]),d.contains=[].concat(...d.contains.map(function(b){return function(b){return b.variants&&!b.cached_variants&&(b.cached_variants=b.variants.map(function(c){return a(b,{variants:null},c)})),b.cached_variants?b.cached_variants:function b(a){return!!a&&(a.endsWithParent||b(a.starts))}(b)?a(b,{starts:b.starts?a(b.starts):null}):Object.isFrozen(b)?a(b):b}("self"===b?d:b)})),d.contains.forEach(function(a){k(a,h)}),d.starts&&k(d.starts,i),h.matcher=function(a){const b=new f;return a.contains.forEach(a=>b.addRule(a.begin,{rule:a,type:"begin"})),a.terminator_end&&b.addRule(a.terminator_end,{type:"end"}),a.illegal&&b.addRule(a.illegal,{type:"illegal"}),b}(h),h}(b)}(u),y="",c=E||H,C={},i=new b.__emitter(b),!function(){for(var b=[],a=c;a!==u;a=a.parent)a.className&&b.unshift(a.className);b.forEach(a=>i.openNode(a))}(),d="",p=0,l=0,w=0,v=!1;try{for(c.matcher.considerAll();;){w++,v?v=!1:c.matcher.considerAll(),c.matcher.lastIndex=l;const a=c.matcher.exec(k);if(!a)break;const b=A(k.substring(l,a.index),a);l=a.index+b}return A(k.substr(l)),i.closeAllNodes(),i.finalize(),y=i.toHTML(),{relevance:p,value:y,language:m,illegal:!1,emitter:i,top:c}}catch(a){if(a.message&&a.message.includes("Illegal"))return{illegal:!0,illegalBy:{msg:a.message,context:k.slice(l-100,l+100),mode:a.mode},sofar:y,relevance:0,value:g(k),emitter:i};if(j)return{illegal:!1,relevance:0,value:g(k),emitter:i,language:m,top:c,errorRaised:a};throw a}}function r(e,d){d=d||b.languages||Object.keys(h);var a=function(a){const c={relevance:0,emitter:new b.__emitter(b),value:g(a),illegal:!1,top:C};return c.emitter.addText(a),c}(e),c=a;return d.filter(f).filter(w).forEach(function(d){var b=o(d,e,!1);b.language=d,b.relevance>c.relevance&&(c=b),b.relevance>a.relevance&&(c=a,a=b)}),c.language&&(a.second_best=c),a}function y(a){return b.tabReplace||b.useBR?a.replace(H,a=>"\n"===a?b.useBR?"
":a:b.tabReplace?a.replace(/\t/g,b.tabReplace):a):a}function B(c){let e=null;const d=function(a){var d=a.className+" ",e;d+=a.parentNode?a.parentNode.className:"";const c=b.languageDetectRe.exec(d);return c?(e=f(c[1]),e||(console.warn(t.replace("{}",c[1])),console.warn("Falling back to no-highlight mode for this block.",a)),e?c[1]:"no-highlight"):d.split(/\s+/).find(a=>F(a)||f(a))}(c);if(F(d))return;m("before:highlightBlock",{block:c,language:d}),b.useBR?(e=document.createElement("div")).innerHTML=c.innerHTML.replace(/\n/g,"").replace(//g,"\n"):e=c;const g=e.textContent,a=d?u(d,g,!0):r(g),h=i(e);if(h.length){const b=document.createElement("div");b.innerHTML=a.value,a.value=D(h,i(b),g)}a.value=y(a.value),m("after:highlightBlock",{block:c,result:a}),c.innerHTML=a.value,c.className=function(a,c,e){var d=c?q[c]:e,b=[a.trim()];return a.match(/\bhljs\b/)||b.push("hljs"),a.includes(d)||b.push(d),b.join(" ").trim()}(c.className,d,a.language),c.result={language:a.language,re:a.relevance,relavance:a.relevance},a.second_best&&(c.second_best={language:a.second_best.language,re:a.second_best.relevance,relavance:a.second_best.relevance})}const l=()=>{if(!l.called){l.called=!0;var a=document.querySelectorAll("pre code");G.forEach.call(a,B)}};function f(a){return a=(a||"").toLowerCase(),h[a]||h[q[a]]}function E(a,{languageName:b}){"string"==typeof a&&(a=[a]),a.forEach(a=>{q[a]=b})}function w(b){var a=f(b);return a&&!a.disableAutodetect}function m(b,c){var a=b;v.forEach(function(b){b[a]&&b[a](c)})}Object.assign(d,{highlight:u,highlightAuto:r,fixMarkup:function(a){return console.warn("fixMarkup is deprecated and will be removed entirely in v11.0"),console.warn("Please see https://github.com/highlightjs/highlight.js/issues/2534"),y(a)},highlightBlock:B,configure:function(a){b=k(b,a)},initHighlighting:l,initHighlightingOnLoad:function(){window.addEventListener("DOMContentLoaded",l,!1)},registerLanguage:function(b,c){var a=null;try{a=c(d)}catch(c){if(console.error("Language definition for '{}' could not be registered.".replace("{}",b)),!j)throw c;console.error(c),a=C}a.name||(a.name=b),h[b]=a,a.rawDefinition=c.bind(null,d),a.aliases&&E(a.aliases,{languageName:b})},listLanguages:function(){return Object.keys(h)},getLanguage:f,registerAliases:E,requireLanguage:function(a){var b=f(a);if(b)return b;throw Error("The '{}' language is required, but not loaded.".replace("{}",a))},autoDetection:w,inherit:k,addPlugin:function(a){v.push(a)},vuePlugin:z}),d.debugMode=function(){j=!1},d.safeMode=function(){j=!0},d.versionString="10.2.1";for(const a in c)"object"==typeof c[a]&&p(c[a]);return Object.assign(d,c),d}({})}();"object"==typeof exports&&"undefined"!=typeof module&&(module.exports=hljs),hljs.registerLanguage("apache",function(){"use strict";return function(a){var b={className:"number",begin:"\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?"};return{name:"Apache config",aliases:["apacheconf"],case_insensitive:!0,contains:[a.HASH_COMMENT_MODE,{className:"section",begin:"",contains:[b,{className:"number",begin:":\\d{1,5}"},a.inherit(a.QUOTE_STRING_MODE,{relevance:0})]},{className:"attribute",begin:/\w+/,relevance:0,keywords:{nomarkup:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"},starts:{end:/$/,relevance:0,keywords:{literal:"on off all deny allow"},contains:[{className:"meta",begin:"\\s\\[",end:"\\]$"},{className:"variable",begin:"[\\$%]\\{",end:"\\}",contains:["self",{className:"number",begin:"[\\$%]\\d+"}]},b,{className:"number",begin:"\\d+"},a.QUOTE_STRING_MODE]}}],illegal:/\S/}}}()),hljs.registerLanguage("bash",function(){"use strict";return function(a){const b={};Object.assign(b,{className:"variable",variants:[{begin:/\$[\w\d#@][\w\d_]*/},{begin:/\$\{/,end:/\}/,contains:[{begin:/:-/,contains:[b]}]}]});const c={className:"subst",begin:/\$\(/,end:/\)/,contains:[a.BACKSLASH_ESCAPE]},d={className:"string",begin:/"/,end:/"/,contains:[a.BACKSLASH_ESCAPE,b,c]};c.contains.push(d);const e={begin:/\$\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},a.NUMBER_MODE,b]},f=a.SHEBANG({binary:"(fish|bash|zsh|sh|csh|ksh|tcsh|dash|scsh)",relevance:10}),g={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[a.inherit(a.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0};return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b-?[a-z\._-]+\b/,keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp",_:"-ne -eq -lt -gt -f -d -e -s -l -a"},contains:[f,a.SHEBANG(),g,e,a.HASH_COMMENT_MODE,d,{className:"",begin:/\\"/},{className:"string",begin:/'/,end:/'/},b]}}}()),hljs.registerLanguage("c-like",function(){"use strict";return function(a){function e(a){return"(?:"+a+")?"}var k="(decltype\\(auto\\)|"+e("[a-zA-Z_]\\w*::")+"[a-zA-Z_]\\w*"+e("<.*?>")+")",c={className:"keyword",begin:"\\b[a-z\\d_]*_t\\b"},d={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[a.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},a.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},g={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},h={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{"meta-keyword":"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},a.inherit(d,{className:"meta-string"}),{className:"meta-string",begin:/<.*?>/,end:/$/,illegal:"\\n"},a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]},j={className:"title",begin:e("[a-zA-Z_]\\w*::")+a.IDENT_RE,relevance:0},i=e("[a-zA-Z_]\\w*::")+a.IDENT_RE+"\\s*\\(",b={keyword:"int float while private char char8_t char16_t char32_t catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using asm case typeid wchar_t short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignas alignof constexpr consteval constinit decltype concept co_await co_return co_yield requires noexcept static_assert thread_local restrict final override atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr _Bool complex _Complex imaginary _Imaginary",literal:"true false nullptr NULL"},f=[c,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,g,d],l={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:b,contains:f.concat([{begin:/\(/,end:/\)/,keywords:b,contains:f.concat(["self"]),relevance:0}]),relevance:0},m={className:"function",begin:"("+k+"[\\*&\\s]+)+"+i,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:b,illegal:/[^\w\s\*&:<>]/,contains:[{begin:"decltype\\(auto\\)",keywords:b,relevance:0},{begin:i,returnBegin:!0,contains:[j],relevance:0},{className:"params",begin:/\(/,end:/\)/,keywords:b,relevance:0,contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,d,g,c,{begin:/\(/,end:/\)/,keywords:b,relevance:0,contains:["self",a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,d,g,c]}]},c,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,h]};return{aliases:["c","cc","h","c++","h++","hpp","hh","hxx","cxx"],keywords:b,disableAutodetect:!0,illegal:"",keywords:b,contains:["self",c]},{begin:a.IDENT_RE+"::",keywords:b},{className:"class",beginKeywords:"class struct",end:/[{;:]/,contains:[{begin://,contains:["self"]},a.TITLE_MODE]}]),exports:{preprocessor:h,strings:d,keywords:b}}}}()),hljs.registerLanguage("c",function(){"use strict";return function(b){var a=b.requireLanguage("c-like").rawDefinition();return a.name="C",a.aliases=["c","h"],a}}()),hljs.registerLanguage("coffeescript",function(){"use strict";const a=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],b=["true","false","null","undefined","NaN","Infinity"],c=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]);return function(d){var g={keyword:a.concat(["then","unless","until","loop","by","when","and","or","is","isnt","not"]).filter((a=>b=>!a.includes(b))(["var","const","let","function","static"])).join(" "),literal:b.concat(["yes","no","on","off"]).join(" "),built_in:c.concat(["npm","print"]).join(" ")},e="[A-Za-z$_][0-9A-Za-z$_]*",f={className:"subst",begin:/#\{/,end:/}/,keywords:g},h=[d.BINARY_NUMBER_MODE,d.inherit(d.C_NUMBER_MODE,{starts:{end:"(\\s*/)?",relevance:0}}),{className:"string",variants:[{begin:/'''/,end:/'''/,contains:[d.BACKSLASH_ESCAPE]},{begin:/'/,end:/'/,contains:[d.BACKSLASH_ESCAPE]},{begin:/"""/,end:/"""/,contains:[d.BACKSLASH_ESCAPE,f]},{begin:/"/,end:/"/,contains:[d.BACKSLASH_ESCAPE,f]}]},{className:"regexp",variants:[{begin:"///",end:"///",contains:[f,d.HASH_COMMENT_MODE]},{begin:"//[gim]{0,3}(?=\\W)",relevance:0},{begin:/\/(?![ *]).*?(?![\\]).\/[gim]{0,3}(?=\W)/}]},{begin:"@"+e},{subLanguage:"javascript",excludeBegin:!0,excludeEnd:!0,variants:[{begin:"```",end:"```"},{begin:"`",end:"`"}]}],i,j;return f.contains=h,i=d.inherit(d.TITLE_MODE,{begin:e}),j={className:"params",begin:"\\([^\\(]",returnBegin:!0,contains:[{begin:/\(/,end:/\)/,keywords:g,contains:["self"].concat(h)}]},{name:"CoffeeScript",aliases:["coffee","cson","iced"],keywords:g,illegal:/\/\*/,contains:h.concat([d.COMMENT("###","###"),d.HASH_COMMENT_MODE,{className:"function",begin:"^\\s*"+e+"\\s*=\\s*(\\(.*\\))?\\s*\\B[-=]>",end:"[-=]>",returnBegin:!0,contains:[i,j]},{begin:/[:\(,=]\s*/,relevance:0,contains:[{className:"function",begin:"(\\(.*\\))?\\s*\\B[-=]>",end:"[-=]>",returnBegin:!0,contains:[j]}]},{className:"class",beginKeywords:"class",end:"$",illegal:/[:="\[\]]/,contains:[{beginKeywords:"extends",endsWithParent:!0,illegal:/[:="\[\]]/,contains:[i]},i]},{begin:e+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}])}}}()),hljs.registerLanguage("cpp",function(){"use strict";return function(b){var a=b.requireLanguage("c-like").rawDefinition();return a.disableAutodetect=!1,a.name="C++",a.aliases=["cc","c++","h++","hpp","hh","hxx","cxx"],a}}()),hljs.registerLanguage("csharp",function(){"use strict";return function(a){var d={keyword:"abstract as base bool break byte case catch char checked const continue decimal default delegate do double enum event explicit extern finally fixed float for foreach goto if implicit in init int interface internal is lock long object operator out override params private protected public readonly ref sbyte sealed short sizeof stackalloc static string struct switch this try typeof uint ulong unchecked unsafe ushort using virtual void volatile while add alias ascending async await by descending dynamic equals from get global group into join let nameof on orderby partial remove select set value var when where yield",literal:"null false true"},b=a.inherit(a.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),c={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},f={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},m=a.inherit(f,{illegal:/\n/}),h={className:"subst",begin:"{",end:"}",keywords:d},j=a.inherit(h,{illegal:/\n/}),i={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:"{{"},{begin:"}}"},a.BACKSLASH_ESCAPE,j]},e={className:"string",begin:/\$@"/,end:'"',contains:[{begin:"{{"},{begin:"}}"},{begin:'""'},h]},l=a.inherit(e,{illegal:/\n/,contains:[{begin:"{{"},{begin:"}}"},{begin:'""'},j]}),k,g,n,o;return h.contains=[e,i,f,a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,c,a.C_BLOCK_COMMENT_MODE],j.contains=[l,i,m,a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,c,a.inherit(a.C_BLOCK_COMMENT_MODE,{illegal:/\n/})],k={variants:[e,i,f,a.APOS_STRING_MODE,a.QUOTE_STRING_MODE]},g={begin:"<",end:">",contains:[{beginKeywords:"in out"},b]},n=a.IDENT_RE+"(<"+a.IDENT_RE+"(\\s*,\\s*"+a.IDENT_RE+")*>)?(\\[\\])?",o={begin:"@"+a.IDENT_RE,relevance:0},{name:"C#",aliases:["cs","c#"],keywords:d,illegal:/::/,contains:[a.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:""},{begin:""}]}]}),a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{"meta-keyword":"if else elif endif define undef warning error line region endregion pragma checksum"}},k,c,{beginKeywords:"class interface",end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},b,g,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",end:/[{;=]/,illegal:/[^\s:]/,contains:[b,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",end:/[{;=]/,illegal:/[^\s:]/,contains:[b,g,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"meta-string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+n+"\\s+)+"+a.IDENT_RE+"\\s*(\\<.+\\>)?\\s*\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:d,contains:[{begin:a.IDENT_RE+"\\s*(\\<.+\\>)?\\s*\\(",returnBegin:!0,contains:[a.TITLE_MODE,g],relevance:0},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:d,relevance:0,contains:[k,c,a.C_BLOCK_COMMENT_MODE]},a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]},o]}}}()),hljs.registerLanguage("css",function(){"use strict";return function(a){var b={begin:/(?:[A-Z\_\.\-]+|--[a-zA-Z0-9_-]+)\s*:/,returnBegin:!0,end:";",endsWithParent:!0,contains:[{className:"attribute",begin:/\S/,end:":",excludeEnd:!0,starts:{endsWithParent:!0,excludeEnd:!0,contains:[{begin:/[\w-]+\(/,returnBegin:!0,contains:[{className:"built_in",begin:/[\w-]+/},{begin:/\(/,end:/\)/,contains:[a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.CSS_NUMBER_MODE]}]},a.CSS_NUMBER_MODE,a.QUOTE_STRING_MODE,a.APOS_STRING_MODE,a.C_BLOCK_COMMENT_MODE,{className:"number",begin:"#[0-9A-Fa-f]+"},{className:"meta",begin:"!important"}]}}]};return{name:"CSS",case_insensitive:!0,illegal:/[=\/|'\$]/,contains:[a.C_BLOCK_COMMENT_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/},{className:"selector-class",begin:/\.[A-Za-z0-9_-]+/},{className:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[a.APOS_STRING_MODE,a.QUOTE_STRING_MODE]},{className:"selector-pseudo",begin:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{begin:"@(page|font-face)",lexemes:"@[a-z-]+",keywords:"@page @font-face"},{begin:"@",end:"[{;]",illegal:/:/,returnBegin:!0,contains:[{className:"keyword",begin:/@\-?\w[\w]*(\-\w+)*/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:"and or not only",contains:[{begin:/[a-z-]+:/,className:"attribute"},a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"[a-zA-Z-][a-zA-Z0-9_-]*",relevance:0},{begin:"{",end:"}",illegal:/\S/,contains:[a.C_BLOCK_COMMENT_MODE,b]}]}}}()),hljs.registerLanguage("diff",function(){"use strict";return function(a){return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,variants:[{begin:/^@@ +\-\d+,\d+ +\+\d+,\d+ +@@$/},{begin:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{begin:/^\-\-\- +\d+,\d+ +\-\-\-\-$/}]},{className:"comment",variants:[{begin:/Index: /,end:/$/},{begin:/={3,}/,end:/$/},{begin:/^\-{3}/,end:/$/},{begin:/^\*{3} /,end:/$/},{begin:/^\+{3}/,end:/$/},{begin:/^\*{15}$/}]},{className:"addition",begin:"^\\+",end:"$"},{className:"deletion",begin:"^\\-",end:"$"},{className:"addition",begin:"^\\!",end:"$"}]}}}()),hljs.registerLanguage("go",function(){"use strict";return function(a){var b={keyword:"break default func interface select case map struct chan else goto package switch const fallthrough if range type continue for import return var go defer bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 uint16 uint32 uint64 int uint uintptr rune",literal:"true false iota nil",built_in:"append cap close complex copy imag len make new panic print println real recover delete"};return{name:"Go",aliases:["golang"],keywords:b,illegal:"a(b)).join("")}return function(d){var e={className:"number",relevance:0,variants:[{begin:/([\+\-]+)?[\d]+_[\d_]+/},{begin:d.NUMBER_RE}]},c=d.COMMENT(),f,g,h,j,i;return c.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}],f={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)}/}]},g={className:"literal",begin:/\bon|off|true|false|yes|no\b/},h={className:"string",contains:[d.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},j={begin:/\[/,end:/\]/,contains:[c,g,f,h,e,"self"],relevance:0},i="("+[/[A-Za-z0-9_-]+/,/"(\\"|[^"])*"/,/'[^']*'/].map(b=>a(b)).join("|")+")",{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[c,{className:"section",begin:/\[+/,end:/\]+/},{begin:b(i,"(\\s*\\.\\s*",i,")*",b("(?=",/\s*=\s*[^#\s]/,")")),className:"attr",starts:{end:/$/,contains:[c,j,g,f,h,e]}}]}}}()),hljs.registerLanguage("java",function(){"use strict";function b(a){return a?"string"==typeof a?a:a.source:null}function c(b){return a("(",b,")?")}function a(...a){return a.map(a=>b(a)).join("")}function d(...a){return"("+a.map(a=>b(a)).join("|")+")"}return function(b){var f="false synchronized int abstract float private char boolean var static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private module requires exports do",g={className:"meta",begin:"@[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},e=b=>a("[",b,"]+([",b,"_]*[",b,"]+)?"),h={className:"number",variants:[{begin:`\\b(0[bB]${e("01")})[lL]?`},{begin:`\\b(0${e("0-7")})[dDfFlL]?`},{begin:a(/\b0[xX]/,d(a(e("a-fA-F0-9"),/\./,e("a-fA-F0-9")),a(e("a-fA-F0-9"),/\.?/),a(/\./,e("a-fA-F0-9"))),/([pP][+-]?(\d+))?/,/[fFdDlL]?/)},{begin:a(/\b/,d(a(/\d*\./,e("\\d")),e("\\d")),/[eE][+-]?[\d]+[dDfF]?/)},{begin:a(/\b/,e(/\d/),c(/\.?/),c(e(/\d/)),/[dDfFlL]?/)}],relevance:0};return{name:"Java",aliases:["jsp"],keywords:f,illegal:/<\/|#/,contains:[b.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),b.C_LINE_COMMENT_MODE,b.C_BLOCK_COMMENT_MODE,b.APOS_STRING_MODE,b.QUOTE_STRING_MODE,{className:"class",beginKeywords:"class interface enum",end:/[{;=]/,excludeEnd:!0,keywords:"class interface enum",illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends implements"},b.UNDERSCORE_TITLE_MODE]},{beginKeywords:"new throw return else",relevance:0},{className:"function",begin:"([À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*(<[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*(\\s*,\\s*[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*)*>)?\\s+)+"+b.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:f,contains:[{begin:b.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[b.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/,keywords:f,relevance:0,contains:[g,b.APOS_STRING_MODE,b.QUOTE_STRING_MODE,b.C_NUMBER_MODE,b.C_BLOCK_COMMENT_MODE]},b.C_LINE_COMMENT_MODE,b.C_BLOCK_COMMENT_MODE]},h,g]}}}()),hljs.registerLanguage("javascript",function(){"use strict";const c=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],d=["true","false","null","undefined","NaN","Infinity"],e=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]);function b(b){return a("(?=",b,")")}function a(...a){return a.map(a=>function(a){return a?"string"==typeof a?a:a.source:null}(a)).join("")}return function(f){var g="[A-Za-z$_][0-9A-Za-z$_]*",i={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/},j={$pattern:"[A-Za-z$_][0-9A-Za-z$_]*",keyword:c.join(" "),literal:d.join(" "),built_in:e.join(" ")},k={className:"number",variants:[{begin:"\\b(0[bB][01]+)n?"},{begin:"\\b(0[oO][0-7]+)n?"},{begin:f.C_NUMBER_RE+"n?"}],relevance:0},h={className:"subst",begin:"\\$\\{",end:"\\}",keywords:j,contains:[]},l={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[f.BACKSLASH_ESCAPE,h],subLanguage:"xml"}},m={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[f.BACKSLASH_ESCAPE,h],subLanguage:"css"}},n={className:"string",begin:"`",end:"`",contains:[f.BACKSLASH_ESCAPE,h]},o,p;return h.contains=[f.APOS_STRING_MODE,f.QUOTE_STRING_MODE,l,m,n,k,f.REGEXP_MODE],o=h.contains.concat([{begin:/\(/,end:/\)/,contains:["self"].concat(h.contains,[f.C_BLOCK_COMMENT_MODE,f.C_LINE_COMMENT_MODE])},f.C_BLOCK_COMMENT_MODE,f.C_LINE_COMMENT_MODE]),p={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:o},{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:j,contains:[f.SHEBANG({binary:"node",relevance:5}),{className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},f.APOS_STRING_MODE,f.QUOTE_STRING_MODE,l,m,n,f.C_LINE_COMMENT_MODE,f.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+",contains:[{className:"type",begin:"\\{",end:"\\}",relevance:0},{className:"variable",begin:g+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),f.C_BLOCK_COMMENT_MODE,k,{begin:a(/[{,\n]\s*/,b(a(/(((\/\/.*$)|(\/\*(.|\n)*\*\/))\s*)*/,g+"\\s*:"))),relevance:0,contains:[{className:"attr",begin:g+b("\\s*:"),relevance:0}]},{begin:"("+f.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[f.C_LINE_COMMENT_MODE,f.C_BLOCK_COMMENT_MODE,f.REGEXP_MODE,{className:"function",begin:"(\\([^(]*(\\([^(]*(\\([^(]*\\))?\\))?\\)|"+f.UNDERSCORE_IDENT_RE+")\\s*=>",returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:f.UNDERSCORE_IDENT_RE},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:j,contains:o}]}]},{begin:/,/,relevance:0},{className:"",begin:/\s/,end:/\s*/,skip:!0},{variants:[{begin:"<>",end:""},{begin:i.begin,end:i.end}],subLanguage:"xml",contains:[{begin:i.begin,end:i.end,skip:!0,contains:["self"]}]}],relevance:0},{className:"function",beginKeywords:"function",end:/\{/,excludeEnd:!0,contains:[f.inherit(f.TITLE_MODE,{begin:g}),p],illegal:/\[|%/},{begin:/\$[(.]/},f.METHOD_GUARD,{className:"class",beginKeywords:"class",end:/[{;=]/,excludeEnd:!0,illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends"},f.UNDERSCORE_TITLE_MODE]},{beginKeywords:"constructor",end:/\{/,excludeEnd:!0},{begin:"(get|set)\\s+(?="+g+"\\()",end:/{/,keywords:"get set",contains:[f.inherit(f.TITLE_MODE,{begin:g}),{begin:/\(\)/},p]}],illegal:/#(?!!)/}}}()),hljs.registerLanguage("json",function(){"use strict";return function(a){var c={literal:"true false null"},d=[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE],b=[a.QUOTE_STRING_MODE,a.C_NUMBER_MODE],e={end:",",endsWithParent:!0,excludeEnd:!0,contains:b,keywords:c},f={begin:"{",end:"}",contains:[{className:"attr",begin:/"/,end:/"/,contains:[a.BACKSLASH_ESCAPE],illegal:"\\n"},a.inherit(e,{begin:/:/})].concat(d),illegal:"\\S"},g={begin:"\\[",end:"\\]",contains:[a.inherit(e)],illegal:"\\S"};return b.push(f,g),d.forEach(function(a){b.push(a)}),{name:"JSON",contains:b,keywords:c,illegal:"\\S"}}}()),hljs.registerLanguage("kotlin",function(){"use strict";return function(a){var e={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},k={className:"symbol",begin:a.UNDERSCORE_IDENT_RE+"@"},h={className:"subst",begin:"\\${",end:"}",contains:[a.C_NUMBER_MODE]},i={className:"variable",begin:"\\$"+a.UNDERSCORE_IDENT_RE},d={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[i,h]},{begin:"'",end:"'",illegal:/\n/,contains:[a.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[a.BACKSLASH_ESCAPE,i,h]}]},f,g,b,c,j;return h.contains.push(d),f={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+a.UNDERSCORE_IDENT_RE+")?"},g={className:"meta",begin:"@"+a.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[a.inherit(d,{className:"meta-string"})]}]},b=a.COMMENT("/\\*","\\*/",{contains:[a.C_BLOCK_COMMENT_MODE]}),c={variants:[{className:"type",begin:a.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},j=c,j.variants[1].contains=[c],c.variants[1].contains=[j],{name:"Kotlin",aliases:["kt"],keywords:e,contains:[a.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),a.C_LINE_COMMENT_MODE,b,{className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},k,f,g,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:e,illegal:/fun\s+(<.*>)?[^\s\(]+(\s+[^\s\(]+)\s*=/,relevance:5,contains:[{begin:a.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[a.UNDERSCORE_TITLE_MODE]},{className:"type",begin://,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:e,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[c,a.C_LINE_COMMENT_MODE,b],relevance:0},a.C_LINE_COMMENT_MODE,b,f,g,d,a.C_NUMBER_MODE]},b]},{className:"class",beginKeywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},a.UNDERSCORE_TITLE_MODE,{className:"type",begin://,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,]|$/,excludeBegin:!0,returnEnd:!0},f,g]},d,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:"\n"},{className:"number",begin:"\\b(0[bB]([01]+[01_]+[01]+|[01]+)|0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)|(([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?|\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))([eE][-+]?\\d+)?)[lLfF]?",relevance:0}]}}}()),hljs.registerLanguage("less",function(){"use strict";return function(b){var c="([\\w-]+|@{[\\w-]+})",e=[],d=[],f=function(a){return{className:"string",begin:"~?"+a+".*?"+a}},a=function(a,b,c){return{className:a,begin:b,relevance:c}},h={begin:"\\(",end:"\\)",contains:d,relevance:0},g,i,j,k,l,m;return d.push(b.C_LINE_COMMENT_MODE,b.C_BLOCK_COMMENT_MODE,f("'"),f('"'),b.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},a("number","#[0-9A-Fa-f]+\\b"),h,a("variable","@@?[\\w-]+",10),a("variable","@{[\\w-]+}"),a("built_in","~?`[^`]*?`"),{className:"attribute",begin:"[\\w-]+\\s*:",end:":",returnBegin:!0,excludeEnd:!0},{className:"meta",begin:"!important"}),g=d.concat({begin:"{",end:"}",contains:e}),i={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(d)},j={begin:c+"\\s*:",returnBegin:!0,end:"[;}]",relevance:0,contains:[{className:"attribute",begin:c,end:":",excludeEnd:!0,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:d}}]},k={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",returnEnd:!0,contains:d,relevance:0}},l={className:"variable",variants:[{begin:"@[\\w-]+\\s*:",relevance:15},{begin:"@[\\w-]+"}],starts:{end:"[;}]",returnEnd:!0,contains:g}},m={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:c,end:"{"}],returnBegin:!0,returnEnd:!0,illegal:"[<='$\"]",relevance:0,contains:[b.C_LINE_COMMENT_MODE,b.C_BLOCK_COMMENT_MODE,i,a("keyword","all\\b"),a("variable","@{[\\w-]+}"),a("selector-tag",c+"%?",0),a("selector-id","#"+c),a("selector-class","\\."+c,0),a("selector-tag","&",0),{className:"selector-attr",begin:"\\[",end:"\\]"},{className:"selector-pseudo",begin:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{begin:"\\(",end:"\\)",contains:g},{begin:"!important"}]},e.push(b.C_LINE_COMMENT_MODE,b.C_BLOCK_COMMENT_MODE,k,l,j,m),{name:"Less",case_insensitive:!0,illegal:"[=>'/<($\"]",contains:e}}}()),hljs.registerLanguage("lua",function(){"use strict";return function(a){var c={begin:"\\[=*\\[",end:"\\]=*\\]",contains:["self"]},b=[a.COMMENT("--(?!\\[=*\\[)","$"),a.COMMENT("--\\[=*\\[","\\]=*\\]",{contains:[c],relevance:10})];return{name:"Lua",keywords:{$pattern:a.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:b.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[a.inherit(a.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:b}].concat(b)},a.C_NUMBER_MODE,a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,{className:"string",begin:"\\[=*\\[",end:"\\]=*\\]",contains:[c],relevance:5}])}}}()),hljs.registerLanguage("makefile",function(){"use strict";return function(a){var b={className:"variable",variants:[{begin:"\\$\\("+a.UNDERSCORE_IDENT_RE+"\\)",contains:[a.BACKSLASH_ESCAPE]},{begin:/\$[@%`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,contains:[{className:"meta",begin:"",relevance:10,contains:[c,g,f,e,{begin:"\\[",end:"\\]",contains:[{className:"meta",begin:"",contains:[c,e,g,f]}]}]},a.COMMENT("",{relevance:10}),{begin:"<\\!\\[CDATA\\[",end:"\\]\\]>",relevance:10},b,{className:"meta",begin:/<\?xml/,end:/\?>/,relevance:10},{className:"tag",begin:")",end:">",keywords:{name:"style"},contains:[d],starts:{end:"",returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:")",end:">",keywords:{name:"script"},contains:[d],starts:{end:"<\/script>",returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:"",contains:[{className:"name",begin:/[^\/><\s]+/,relevance:0},d]}]}}}()),hljs.registerLanguage("markdown",function(){"use strict";return function(f){const d={begin:"<",end:">",subLanguage:"xml",relevance:0},e={begin:"\\[.+?\\][\\(\\[].*?[\\)\\]]",returnBegin:!0,contains:[{className:"string",begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0,relevance:0},{className:"link",begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}],relevance:10},a={className:"strong",contains:[],variants:[{begin:/_{2}/,end:/_{2}/},{begin:/\*{2}/,end:/\*{2}/}]},b={className:"emphasis",contains:[],variants:[{begin:/\*(?!\*)/,end:/\*/},{begin:/_(?!_)/,end:/_/,relevance:0}]};a.contains.push(b),b.contains.push(a);var c=[d,e];return a.contains=a.contains.concat(c),b.contains=b.contains.concat(c),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:c=c.concat(a,b)},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:c}]}]},d,{className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},a,b,{className:"quote",begin:"^>\\s+",contains:c,end:"$"},{className:"code",variants:[{begin:"(`{3,})(.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})(.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},{begin:"^[-\\*]{3,}",end:"$"},e,{begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]}]}}}()),hljs.registerLanguage("nginx",function(){"use strict";return function(a){var b={className:"variable",variants:[{begin:/\$\d+/},{begin:/\$\{/,end:/}/},{begin:"[\\$\\@]"+a.UNDERSCORE_IDENT_RE}]},c={endsWithParent:!0,keywords:{$pattern:"[a-z/_]+",literal:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll"},relevance:0,illegal:"=>",contains:[a.HASH_COMMENT_MODE,{className:"string",contains:[a.BACKSLASH_ESCAPE,b],variants:[{begin:/"/,end:/"/},{begin:/'/,end:/'/}]},{begin:"([a-z]+):/",end:"\\s",endsWithParent:!0,excludeEnd:!0,contains:[b]},{className:"regexp",contains:[a.BACKSLASH_ESCAPE,b],variants:[{begin:"\\s\\^",end:"\\s|{|;",returnEnd:!0},{begin:"~\\*?\\s+",end:"\\s|{|;",returnEnd:!0},{begin:"\\*(\\.[a-z\\-]+)+"},{begin:"([a-z\\-]+\\.)+\\*"}]},{className:"number",begin:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{className:"number",begin:"\\b\\d+[kKmMgGdshdwy]*\\b",relevance:0},b]};return{name:"Nginx config",aliases:["nginxconf"],contains:[a.HASH_COMMENT_MODE,{begin:a.UNDERSCORE_IDENT_RE+"\\s+{",returnBegin:!0,end:"{",contains:[{className:"section",begin:a.UNDERSCORE_IDENT_RE}],relevance:0},{begin:a.UNDERSCORE_IDENT_RE+"\\s",end:";|{",returnBegin:!0,contains:[{className:"attribute",begin:a.UNDERSCORE_IDENT_RE,starts:c}],relevance:0}],illegal:"[^\\s\\}]"}}}()),hljs.registerLanguage("objectivec",function(){"use strict";return function(a){var b=/[a-zA-Z@][a-zA-Z0-9_]*/,c={$pattern:b,keyword:"@interface @class @protocol @implementation"};return{name:"Objective-C",aliases:["mm","objc","obj-c"],keywords:{$pattern:b,keyword:"int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required @encode @package @import @defs @compatibility_alias __bridge __bridge_transfer __bridge_retained __bridge_retain __covariant __contravariant __kindof _Nonnull _Nullable _Null_unspecified __FUNCTION__ __PRETTY_FUNCTION__ __attribute__ getter setter retain unsafe_unretained nonnull nullable null_unspecified null_resettable class instancetype NS_DESIGNATED_INITIALIZER NS_UNAVAILABLE NS_REQUIRES_SUPER NS_RETURNS_INNER_POINTER NS_INLINE NS_AVAILABLE NS_DEPRECATED NS_ENUM NS_OPTIONS NS_SWIFT_UNAVAILABLE NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_REFINED_FOR_SWIFT NS_SWIFT_NAME NS_SWIFT_NOTHROW NS_DURING NS_HANDLER NS_ENDHANDLER NS_VALUERETURN NS_VOIDRETURN",literal:"false true FALSE TRUE nil YES NO NULL",built_in:"BOOL dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once"},illegal:"/,end:/$/,illegal:"\\n"},a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+c.keyword.split(" ").join("|")+")\\b",end:"({|$)",excludeEnd:!0,keywords:c,contains:[a.UNDERSCORE_TITLE_MODE]},{begin:"\\."+a.UNDERSCORE_IDENT_RE,relevance:0}]}}}()),hljs.registerLanguage("perl",function(){"use strict";return function(a){var c={$pattern:/[\w.]+/,keyword:"getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qq fileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmget sub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedir ioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when"},d={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:c},e={begin:"->{",end:"}"},f={variants:[{begin:/\$\d/},{begin:/[\$%@](\^\w\b|#\w+(::\w+)*|{\w+}|\w+(::\w*)*)/},{begin:/[\$%@][^\s\w{]/,relevance:0}]},g=[a.BACKSLASH_ESCAPE,d,f],b=[f,a.HASH_COMMENT_MODE,a.COMMENT("^\\=\\w","\\=cut",{endsWithParent:!0}),e,{className:"string",contains:g,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*\\<",end:"\\>",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[a.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[a.BACKSLASH_ESCAPE]},{begin:"{\\w+}",contains:[],relevance:0},{begin:"-?\\w+\\s*\\=\\>",contains:[],relevance:0}]},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{begin:"(\\/\\/|"+a.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[a.HASH_COMMENT_MODE,{className:"regexp",begin:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",relevance:10},{className:"regexp",begin:"(m|qr)?/",end:"/[a-z]*",contains:[a.BACKSLASH_ESCAPE],relevance:0}]},{className:"function",beginKeywords:"sub",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[a.TITLE_MODE]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return d.contains=b,e.contains=b,{name:"Perl",aliases:["pl","pm"],keywords:c,contains:b}}}()),hljs.registerLanguage("php",function(){"use strict";return function(a){var c={begin:"\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*"},b={className:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?[=]?/},{begin:/\?>/}]},d={className:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},e=a.inherit(a.APOS_STRING_MODE,{illegal:null}),f=a.inherit(a.QUOTE_STRING_MODE,{illegal:null,contains:a.QUOTE_STRING_MODE.contains.concat(d)}),j=a.END_SAME_AS_BEGIN({begin:/<<<[ \t]*(\w+)\n/,end:/[ \t]*(\w+)\b/,contains:a.QUOTE_STRING_MODE.contains.concat(d)}),g={className:"string",contains:[a.BACKSLASH_ESCAPE,b],variants:[a.inherit(e,{begin:"b'",end:"'"}),a.inherit(f,{begin:'b"',end:'"'}),f,e,j]},h={variants:[a.BINARY_NUMBER_MODE,a.C_NUMBER_MODE]},i={keyword:"__CLASS__ __DIR__ __FILE__ __FUNCTION__ __LINE__ __METHOD__ __NAMESPACE__ __TRAIT__ die echo exit include include_once print require require_once array abstract and as binary bool boolean break callable case catch class clone const continue declare default do double else elseif empty enddeclare endfor endforeach endif endswitch endwhile eval extends final finally float for foreach from global goto if implements instanceof insteadof int integer interface isset iterable list new object or private protected public real return string switch throw trait try unset use var void while xor yield",literal:"false null true",built_in:"Error|0 AppendIterator ArgumentCountError ArithmeticError ArrayIterator ArrayObject AssertionError BadFunctionCallException BadMethodCallException CachingIterator CallbackFilterIterator CompileError Countable DirectoryIterator DivisionByZeroError DomainException EmptyIterator ErrorException Exception FilesystemIterator FilterIterator GlobIterator InfiniteIterator InvalidArgumentException IteratorIterator LengthException LimitIterator LogicException MultipleIterator NoRewindIterator OutOfBoundsException OutOfRangeException OuterIterator OverflowException ParentIterator ParseError RangeException RecursiveArrayIterator RecursiveCachingIterator RecursiveCallbackFilterIterator RecursiveDirectoryIterator RecursiveFilterIterator RecursiveIterator RecursiveIteratorIterator RecursiveRegexIterator RecursiveTreeIterator RegexIterator RuntimeException SeekableIterator SplDoublyLinkedList SplFileInfo SplFileObject SplFixedArray SplHeap SplMaxHeap SplMinHeap SplObjectStorage SplObserver SplObserver SplPriorityQueue SplQueue SplStack SplSubject SplSubject SplTempFileObject TypeError UnderflowException UnexpectedValueException ArrayAccess Closure Generator Iterator IteratorAggregate Serializable Throwable Traversable WeakReference Directory __PHP_Incomplete_Class parent php_user_filter self static stdClass"};return{aliases:["php","php3","php4","php5","php6","php7"],case_insensitive:!0,keywords:i,contains:[a.HASH_COMMENT_MODE,a.COMMENT("//","$",{contains:[b]}),a.COMMENT("/\\*","\\*/",{contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),a.COMMENT("__halt_compiler.+?;",!1,{endsWithParent:!0,keywords:"__halt_compiler"}),b,{className:"keyword",begin:/\$this\b/},c,{begin:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{className:"function",beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[a.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:i,contains:["self",c,a.C_BLOCK_COMMENT_MODE,g,h]}]},{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,illegal:/[:\(\$"]/,contains:[{beginKeywords:"extends implements"},a.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",end:";",illegal:/[\.']/,contains:[a.UNDERSCORE_TITLE_MODE]},{beginKeywords:"use",end:";",contains:[a.UNDERSCORE_TITLE_MODE]},{begin:"=>"},g,h]}}}()),hljs.registerLanguage("php-template",function(){"use strict";return function(a){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},a.inherit(a.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),a.inherit(a.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}}()),hljs.registerLanguage("plaintext",function(){"use strict";return function(a){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}}()),hljs.registerLanguage("properties",function(){"use strict";return function(e){var a="[ \\t\\f]*",b="("+a+"[:=]"+a+"|[ \\t\\f]+)",c="([^\\\\:= \\t\\f\\n]|\\\\.)+",d={end:b,relevance:0,starts:{className:"string",end:/$/,relevance:0,contains:[{begin:"\\\\\\n"}]}};return{name:".properties",case_insensitive:!0,illegal:/\S/,contains:[e.COMMENT("^\\s*[!#]","$"),{begin:"([^\\\\\\W:= \\t\\f\\n]|\\\\.)+"+b,returnBegin:!0,contains:[{className:"attr",begin:"([^\\\\\\W:= \\t\\f\\n]|\\\\.)+",endsParent:!0,relevance:0}],starts:d},{begin:c+b,returnBegin:!0,relevance:0,contains:[{className:"meta",begin:c,endsParent:!0,relevance:0}],starts:d},{className:"attr",relevance:0,begin:c+a+"$"}]}}}()),hljs.registerLanguage("python",function(){"use strict";return function(a){var g={keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda async await nonlocal|10",built_in:"Ellipsis NotImplemented",literal:"False None True"},b={className:"meta",begin:/^(>>>|\.\.\.) /},c={className:"subst",begin:/\{/,end:/\}/,keywords:g,illegal:/#/},d={begin:/\{\{/,relevance:0},e={className:"string",contains:[a.BACKSLASH_ESCAPE],variants:[{begin:/(u|b)?r?'''/,end:/'''/,contains:[a.BACKSLASH_ESCAPE,b],relevance:10},{begin:/(u|b)?r?"""/,end:/"""/,contains:[a.BACKSLASH_ESCAPE,b],relevance:10},{begin:/(fr|rf|f)'''/,end:/'''/,contains:[a.BACKSLASH_ESCAPE,b,d,c]},{begin:/(fr|rf|f)"""/,end:/"""/,contains:[a.BACKSLASH_ESCAPE,b,d,c]},{begin:/(u|r|ur)'/,end:/'/,relevance:10},{begin:/(u|r|ur)"/,end:/"/,relevance:10},{begin:/(b|br)'/,end:/'/},{begin:/(b|br)"/,end:/"/},{begin:/(fr|rf|f)'/,end:/'/,contains:[a.BACKSLASH_ESCAPE,d,c]},{begin:/(fr|rf|f)"/,end:/"/,contains:[a.BACKSLASH_ESCAPE,d,c]},a.APOS_STRING_MODE,a.QUOTE_STRING_MODE]},f={className:"number",relevance:0,variants:[{begin:a.BINARY_NUMBER_RE+"[lLjJ]?"},{begin:"\\b(0o[0-7]+)[lLjJ]?"},{begin:a.C_NUMBER_RE+"[lLjJ]?"}]},h={className:"params",variants:[{begin:/\(\s*\)/,skip:!0,className:null},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:["self",b,f,e,a.HASH_COMMENT_MODE]}]};return c.contains=[e,f,b],{name:"Python",aliases:["py","gyp","ipython"],keywords:g,illegal:/(<\/|->|\?)|=>/,contains:[b,f,{beginKeywords:"if",relevance:0},e,a.HASH_COMMENT_MODE,{variants:[{className:"function",beginKeywords:"def"},{className:"class",beginKeywords:"class"}],end:/:/,illegal:/[${=;\n,]/,contains:[a.UNDERSCORE_TITLE_MODE,h,{begin:/->/,endsWithParent:!0,keywords:"None"}]},{className:"meta",begin:/^[\t ]*@/,end:/$/},{begin:/\b(print|exec)\(/}]}}}()),hljs.registerLanguage("python-repl",function(){"use strict";return function(a){return{aliases:["pycon"],contains:[{className:"meta",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}}()),hljs.registerLanguage("ruby",function(){"use strict";return function(a){var f="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",d={keyword:"and then defined module in return redo if BEGIN retry end for self when next until do begin unless END rescue else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor",literal:"true false nil"},j={className:"doctag",begin:"@[A-Za-z]+"},g={begin:"#<",end:">"},c=[a.COMMENT("#","$",{contains:[j]}),a.COMMENT("^\\=begin","^\\=end",{contains:[j],relevance:10}),a.COMMENT("^__END__","\\n$")],e={className:"subst",begin:"#\\{",end:"}",keywords:d},h={className:"string",contains:[a.BACKSLASH_ESCAPE,e],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:"%[qQwWx]?\\(",end:"\\)"},{begin:"%[qQwWx]?\\[",end:"\\]"},{begin:"%[qQwWx]?{",end:"}"},{begin:"%[qQwWx]?<",end:">"},{begin:"%[qQwWx]?/",end:"/"},{begin:"%[qQwWx]?%",end:"%"},{begin:"%[qQwWx]?-",end:"-"},{begin:"%[qQwWx]?\\|",end:"\\|"},{begin:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/},{begin:/<<[-~]?'?(\w+)(?:.|\n)*?\n\s*\1\b/,returnBegin:!0,contains:[{begin:/<<[-~]?'?/},a.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[a.BACKSLASH_ESCAPE,e]})]}]},i={className:"params",begin:"\\(",end:"\\)",endsParent:!0,keywords:d},b=[h,g,{className:"class",beginKeywords:"class module",end:"$|;",illegal:/=/,contains:[a.inherit(a.TITLE_MODE,{begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{begin:"<\\s*",contains:[{begin:"("+a.IDENT_RE+"::)?"+a.IDENT_RE}]}].concat(c)},{className:"function",beginKeywords:"def",end:"$|;",contains:[a.inherit(a.TITLE_MODE,{begin:f}),i].concat(c)},{begin:a.IDENT_RE+"::"},{className:"symbol",begin:a.UNDERSCORE_IDENT_RE+"(\\!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[h,{begin:f}],relevance:0},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{begin:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{className:"params",begin:/\|/,end:/\|/,keywords:d},{begin:"("+a.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[g,{className:"regexp",contains:[a.BACKSLASH_ESCAPE,e],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:"%r{",end:"}[a-z]*"},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(c),relevance:0}].concat(c),k;return e.contains=b,i.contains=b,k=[{begin:/^\s*=>/,starts:{end:"$",contains:b}},{className:"meta",begin:"^([>?]>|[\\w#]+\\(\\w+\\):\\d+:\\d+>|(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>)",starts:{end:"$",contains:b}}],{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:d,illegal:/\/\*/,contains:c.concat(k).concat(b)}}}()),hljs.registerLanguage("rust",function(){"use strict";return function(a){var b="([ui](8|16|32|64|128|size)|f(32|64))?",c="drop i8 i16 i32 i64 i128 isize u8 u16 u32 u64 u128 usize f32 f64 str char bool Box Option Result String Vec Copy Send Sized Sync Drop Fn FnMut FnOnce ToOwned Clone Debug PartialEq PartialOrd Eq Ord AsRef AsMut Into From Default Iterator Extend IntoIterator DoubleEndedIterator ExactSizeIterator SliceConcatExt ToString assert! assert_eq! bitflags! bytes! cfg! col! concat! concat_idents! debug_assert! debug_assert_eq! env! panic! file! format! format_args! include_bin! include_str! line! local_data_key! module_path! option_env! print! println! select! stringify! try! unimplemented! unreachable! vec! write! writeln! macro_rules! assert_ne! debug_assert_ne!";return{name:"Rust",aliases:["rs"],keywords:{$pattern:a.IDENT_RE+"!?",keyword:"abstract as async await become box break const continue crate do dyn else enum extern false final fn for if impl in let loop macro match mod move mut override priv pub ref return self Self static struct super trait true try type typeof unsafe unsized use virtual where while yield",literal:"true false Some None Ok Err",built_in:c},illegal:""}]}}}()),hljs.registerLanguage("scss",function(){"use strict";return function(a){var b={className:"variable",begin:"(\\$[a-zA-Z-][a-zA-Z0-9_-]*)\\b"},c={className:"number",begin:"#[0-9A-Fa-f]+"};return a.CSS_NUMBER_MODE,a.QUOTE_STRING_MODE,a.APOS_STRING_MODE,a.C_BLOCK_COMMENT_MODE,{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,{className:"selector-id",begin:"\\#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},{className:"selector-attr",begin:"\\[",end:"\\]",illegal:"$"},{className:"selector-tag",begin:"\\b(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|div|dl|dt|em|embed|fieldset|figcaption|figure|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|map|mark|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|samp|script|section|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)\\b",relevance:0},{className:"selector-pseudo",begin:":(visited|valid|root|right|required|read-write|read-only|out-range|optional|only-of-type|only-child|nth-of-type|nth-last-of-type|nth-last-child|nth-child|not|link|left|last-of-type|last-child|lang|invalid|indeterminate|in-range|hover|focus|first-of-type|first-line|first-letter|first-child|first|enabled|empty|disabled|default|checked|before|after|active)"},{className:"selector-pseudo",begin:"::(after|before|choices|first-letter|first-line|repeat-index|repeat-item|selection|value)"},b,{className:"attribute",begin:"\\b(src|z-index|word-wrap|word-spacing|word-break|width|widows|white-space|visibility|vertical-align|unicode-bidi|transition-timing-function|transition-property|transition-duration|transition-delay|transition|transform-style|transform-origin|transform|top|text-underline-position|text-transform|text-shadow|text-rendering|text-overflow|text-indent|text-decoration-style|text-decoration-line|text-decoration-color|text-decoration|text-align-last|text-align|tab-size|table-layout|right|resize|quotes|position|pointer-events|perspective-origin|perspective|page-break-inside|page-break-before|page-break-after|padding-top|padding-right|padding-left|padding-bottom|padding|overflow-y|overflow-x|overflow-wrap|overflow|outline-width|outline-style|outline-offset|outline-color|outline|orphans|order|opacity|object-position|object-fit|normal|none|nav-up|nav-right|nav-left|nav-index|nav-down|min-width|min-height|max-width|max-height|mask|marks|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|letter-spacing|left|justify-content|initial|inherit|ime-mode|image-orientation|image-resolution|image-rendering|icon|hyphens|height|font-weight|font-variant-ligatures|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-language-override|font-kerning|font-feature-settings|font-family|font|float|flex-wrap|flex-shrink|flex-grow|flex-flow|flex-direction|flex-basis|flex|filter|empty-cells|display|direction|cursor|counter-reset|counter-increment|content|column-width|column-span|column-rule-width|column-rule-style|column-rule-color|column-rule|column-gap|column-fill|column-count|columns|color|clip-path|clip|clear|caption-side|break-inside|break-before|break-after|box-sizing|box-shadow|box-decoration-break|bottom|border-width|border-top-width|border-top-style|border-top-right-radius|border-top-left-radius|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-radius|border-left-width|border-left-style|border-left-color|border-left|border-image-width|border-image-source|border-image-slice|border-image-repeat|border-image-outset|border-image|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-right-radius|border-bottom-left-radius|border-bottom-color|border-bottom|border|background-size|background-repeat|background-position|background-origin|background-image|background-color|background-clip|background-attachment|background-blend-mode|background|backface-visibility|auto|animation-timing-function|animation-play-state|animation-name|animation-iteration-count|animation-fill-mode|animation-duration|animation-direction|animation-delay|animation|align-self|align-items|align-content)\\b",illegal:"[^\\s]"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:":",end:";",contains:[b,c,a.CSS_NUMBER_MODE,a.QUOTE_STRING_MODE,a.APOS_STRING_MODE,{className:"meta",begin:"!important"}]},{begin:"@(page|font-face)",lexemes:"@[a-z-]+",keywords:"@page @font-face"},{begin:"@",end:"[{;]",returnBegin:!0,keywords:"and or not only",contains:[{begin:"@[a-z-]+",className:"keyword"},b,a.QUOTE_STRING_MODE,a.APOS_STRING_MODE,c,a.CSS_NUMBER_MODE]}]}}}()),hljs.registerLanguage("shell",function(){"use strict";return function(a){return{name:"Shell Session",aliases:["console"],contains:[{className:"meta",begin:"^\\s{0,3}[/\\w\\d\\[\\]()@-]*[>%$#]",starts:{end:"$",subLanguage:"bash"}}]}}}()),hljs.registerLanguage("sql",function(){"use strict";return function(a){var b=a.COMMENT("--","$");return{name:"SQL",case_insensitive:!0,illegal:/[<>{}*]/,contains:[{beginKeywords:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup revoke comment values with",end:/;/,endsWithParent:!0,keywords:{$pattern:/[\w\.]+/,keyword:"as abort abs absolute acc acce accep accept access accessed accessible account acos action activate add addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias all allocate allow alter always analyze ancillary and anti any anydata anydataset anyschema anytype apply archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound bucket buffer_cache buffer_pool build bulk by byte byteordermark bytes cache caching call calling cancel capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base char_length character_length characters characterset charindex charset charsetform charsetid check checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation collect colu colum column column_value columns columns_updated comment commit compact compatibility compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection consider consistent constant constraint constraints constructor container content contents context contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime customdatum cycle data database databases datafile datafiles datalength date_add date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor deterministic diagnostics difference dimension direct_load directory disable disable_all disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div do document domain dotnet double downgrade drop dumpfile duplicate duration each edition editionable editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding execu execut execute exempt exists exit exp expire explain explode export export_set extended extent external external_1 external_2 externally extract failed failed_login_attempts failover failure far fast feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final finish first first_value fixed flash_cache flashback floor flush following follows for forall force foreign form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ftp full function general generated get get_format get_lock getdate getutcdate global global_name globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex hierarchy high high_priority hosts hour hours http id ident_current ident_incr ident_seed identified identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile initial initialized initially initrans inmemory inner innodb input insert install instance instantiable instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists keep keep_duplicates key keys kill language large last last_day last_insert_id last_value lateral lax lcase lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit lines link list listagg little ln load load_file lob lobs local localtime localtimestamp locate locator lock locked log log10 log2 logfile logfiles logging logical logical_reads_per_call logoff logon logs long loop low low_priority lower lpad lrtrim ltrim main make_set makedate maketime managed management manual map mapping mask master master_pos_wait match matched materialized max maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans md5 measures median medium member memcompress memory merge microsecond mid migration min minextents minimum mining minus minute minutes minvalue missing mod mode model modification modify module monitoring month months mount move movement multiset mutex name name_const names nan national native natural nav nchar nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck noswitch not nothing notice notnull notrim novalidate now nowait nth_value nullif nulls num numb numbe nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary out outer outfile outline output over overflow overriding package pad parallel parallel_enable parameters parent parse partial partition partitions pascal passing password password_grace_time password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction prediction_cost prediction_details prediction_probability prediction_set prepare present preserve prior priority private private_sga privileges procedural procedure procedure_analyze processlist profiles project prompt protection public publishingservername purge quarter query quick quiesce quota quotename radians raise rand range rank raw read reads readsize rebuild record records recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy reject rekey relational relative relaylog release release_lock relies_on relocate rely rem remainder rename repair repeat replace replicate replication required reset resetlogs resize resource respect restore restricted result result_cache resumable resume retention return returning returns reuse reverse revoke right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll sdo_georaster sdo_topo_geometry search sec_to_time second seconds section securefile security seed segment select self semi sequence sequential serializable server servererror session session_user sessions_per_user set sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone standby start starting startup statement static statistics stats_binomial_test stats_crosstab stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime table tables tablespace tablesample tan tdo template temporary terminated tertiary_weights test than then thread through tier ties time time_format time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unnest unpivot unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear wellformed when whene whenev wheneve whenever where while whitespace window with within without work wrapped xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek",literal:"true false null unknown",built_in:"array bigint binary bit blob bool boolean char character date dec decimal float int int8 integer interval number numeric real record serial serial8 smallint text time timestamp tinyint varchar varchar2 varying void"},contains:[{className:"string",begin:"'",end:"'",contains:[{begin:"''"}]},{className:"string",begin:'"',end:'"',contains:[{begin:'""'}]},{className:"string",begin:"`",end:"`"},a.C_NUMBER_MODE,a.C_BLOCK_COMMENT_MODE,b,a.HASH_COMMENT_MODE]},a.C_BLOCK_COMMENT_MODE,b,a.HASH_COMMENT_MODE]}}}()),hljs.registerLanguage("swift",function(){"use strict";return function(a){var b={keyword:"#available #colorLiteral #column #else #elseif #endif #file #fileLiteral #function #if #imageLiteral #line #selector #sourceLocation _ __COLUMN__ __FILE__ __FUNCTION__ __LINE__ Any as as! as? associatedtype associativity break case catch class continue convenience default defer deinit didSet do dynamic dynamicType else enum extension fallthrough false fileprivate final for func get guard if import in indirect infix init inout internal is lazy left let mutating nil none nonmutating open operator optional override postfix precedence prefix private protocol Protocol public repeat required rethrows return right self Self set static struct subscript super switch throw throws true try try! try? Type typealias unowned var weak where while willSet",literal:"true false nil",built_in:"abs advance alignof alignofValue anyGenerator assert assertionFailure bridgeFromObjectiveC bridgeFromObjectiveCUnconditional bridgeToObjectiveC bridgeToObjectiveCUnconditional c compactMap contains count countElements countLeadingZeros debugPrint debugPrintln distance dropFirst dropLast dump encodeBitsAsWords enumerate equal fatalError filter find getBridgedObjectiveCType getVaList indices insertionSort isBridgedToObjectiveC isBridgedVerbatimToObjectiveC isUniquelyReferenced isUniquelyReferencedNonObjC join lazy lexicographicalCompare map max maxElement min minElement numericCast overlaps partition posix precondition preconditionFailure print println quickSort readLine reduce reflect reinterpretCast reverse roundUpToAlignment sizeof sizeofValue sort split startsWith stride strideof strideofValue swap toString transcode underestimateCount unsafeAddressOf unsafeBitCast unsafeDowncast unsafeUnwrap unsafeReflect withExtendedLifetime withObjectAtPlusZero withUnsafePointer withUnsafePointerToObject withUnsafeMutablePointer withUnsafeMutablePointers withUnsafePointer withUnsafePointers withVaList zip"},d=a.COMMENT("/\\*","\\*/",{contains:["self"]}),e={className:"subst",begin:/\\\(/,end:"\\)",keywords:b,contains:[]},f={className:"string",contains:[a.BACKSLASH_ESCAPE,e],variants:[{begin:/"""/,end:/"""/},{begin:/"/,end:/"/}]},c={className:"number",begin:"\\b([\\d_]+(\\.[\\deE_]+)?|0x[a-fA-F0-9_]+(\\.[a-fA-F0-9p_]+)?|0b[01_]+|0o[0-7_]+)\\b",relevance:0};return e.contains=[c],{name:"Swift",keywords:b,contains:[f,a.C_LINE_COMMENT_MODE,d,{className:"type",begin:"\\b[A-Z][\\wÀ-ʸ']*[!?]"},{className:"type",begin:"\\b[A-Z][\\wÀ-ʸ']*",relevance:0},c,{className:"function",beginKeywords:"func",end:"{",excludeEnd:!0,contains:[a.inherit(a.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/}),{begin://},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:b,contains:["self",c,f,a.C_BLOCK_COMMENT_MODE,{begin:":"}],illegal:/["']/}],illegal:/\[|%/},{className:"class",beginKeywords:"struct protocol class extension enum",keywords:b,end:"\\{",excludeEnd:!0,contains:[a.inherit(a.TITLE_MODE,{begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/})]},{className:"meta",begin:"(@discardableResult|@warn_unused_result|@exported|@lazy|@noescape|@NSCopying|@NSManaged|@objc|@objcMembers|@convention|@required|@noreturn|@IBAction|@IBDesignable|@IBInspectable|@IBOutlet|@infix|@prefix|@postfix|@autoclosure|@testable|@available|@nonobjc|@NSApplicationMain|@UIApplicationMain|@dynamicMemberLookup|@propertyWrapper)\\b"},{beginKeywords:"import",end:/$/,contains:[a.C_LINE_COMMENT_MODE,d]}]}}}()),hljs.registerLanguage("typescript",function(){"use strict";const a=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],b=["true","false","null","undefined","NaN","Infinity"],c=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]);return function(d){var e={$pattern:"[A-Za-z$_][0-9A-Za-z$_]*",keyword:a.concat(["type","namespace","typedef","interface","public","private","protected","implements","declare","abstract","readonly"]).join(" "),literal:b.join(" "),built_in:c.concat(["any","void","number","boolean","string","object","never","enum"]).join(" ")},l={className:"meta",begin:"@[A-Za-z$_][0-9A-Za-z$_]*"},h={className:"number",variants:[{begin:"\\b(0[bB][01]+)n?"},{begin:"\\b(0[oO][0-7]+)n?"},{begin:d.C_NUMBER_RE+"n?"}],relevance:0},f={className:"subst",begin:"\\$\\{",end:"\\}",keywords:e,contains:[]},i={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[d.BACKSLASH_ESCAPE,f],subLanguage:"xml"}},j={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[d.BACKSLASH_ESCAPE,f],subLanguage:"css"}},k={className:"string",begin:"`",end:"`",contains:[d.BACKSLASH_ESCAPE,f]},g,m;return f.contains=[d.APOS_STRING_MODE,d.QUOTE_STRING_MODE,i,j,k,h,d.REGEXP_MODE],g={begin:"\\(",end:/\)/,keywords:e,contains:["self",d.QUOTE_STRING_MODE,d.APOS_STRING_MODE,d.NUMBER_MODE]},m={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:e,contains:[d.C_LINE_COMMENT_MODE,d.C_BLOCK_COMMENT_MODE,l,g]},{name:"TypeScript",aliases:["ts"],keywords:e,contains:[d.SHEBANG(),{className:"meta",begin:/^\s*['"]use strict['"]/},d.APOS_STRING_MODE,d.QUOTE_STRING_MODE,i,j,k,d.C_LINE_COMMENT_MODE,d.C_BLOCK_COMMENT_MODE,h,{begin:"("+d.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[d.C_LINE_COMMENT_MODE,d.C_BLOCK_COMMENT_MODE,d.REGEXP_MODE,{className:"function",begin:"(\\([^(]*(\\([^(]*(\\([^(]*\\))?\\))?\\)|"+d.UNDERSCORE_IDENT_RE+")\\s*=>",returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:d.UNDERSCORE_IDENT_RE},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:e,contains:g.contains}]}]}],relevance:0},{className:"function",beginKeywords:"function",end:/[\{;]/,excludeEnd:!0,keywords:e,contains:["self",d.inherit(d.TITLE_MODE,{begin:"[A-Za-z$_][0-9A-Za-z$_]*"}),m],illegal:/%/,relevance:0},{beginKeywords:"constructor",end:/[\{;]/,excludeEnd:!0,contains:["self",m]},{begin:/module\./,keywords:{built_in:"module"},relevance:0},{beginKeywords:"module",end:/\{/,excludeEnd:!0},{beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:"interface extends"},{begin:/\$[(.]/},{begin:"\\."+d.IDENT_RE,relevance:0},l,g]}}}()),hljs.registerLanguage("yaml",function(){"use strict";return function(a){var c="true false yes no null",b="[\\w#;/?:@&=+$,.~*\\'()[\\]]+",g={className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/\S+/}],contains:[a.BACKSLASH_ESCAPE,{className:"template-variable",variants:[{begin:"{{",end:"}}"},{begin:"%{",end:"}"}]}]},h=a.inherit(g,{variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),e={end:",",endsWithParent:!0,excludeEnd:!0,contains:[],keywords:c,relevance:0},i={begin:"{",end:"}",contains:[e],illegal:"\\n",relevance:0},j={begin:"\\[",end:"\\]",contains:[e],illegal:"\\n",relevance:0},f=[{className:"attr",variants:[{begin:"\\w[\\w :\\/.-]*:(?=[ ]|$)"},{begin:'"\\w[\\w :\\/.-]*":(?=[ ]|$)'},{begin:"'\\w[\\w :\\/.-]*':(?=[ ]|$)"}]},{className:"meta",begin:"^---s*$",relevance:10},{className:"string",begin:"[\\|>]([0-9]?[+-])?[ ]*\\n( *)[\\S ]+\\n(\\2[\\S ]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+b},{className:"type",begin:"!<"+b+">"},{className:"type",begin:"!"+b},{className:"type",begin:"!!"+b},{className:"meta",begin:"&"+a.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+a.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"\\-(?=[ ]|$)",relevance:0},a.HASH_COMMENT_MODE,{beginKeywords:c,keywords:{literal:c}},{className:"number",begin:"\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b"},{className:"number",begin:a.C_NUMBER_RE+"\\b"},i,j,g],d=[...f];return d.pop(),d.push(h),e.contains=d,{name:"YAML",case_insensitive:!0,aliases:["yml","YAML"],contains:f}}}()) \ No newline at end of file diff --git a/source/public/categories/index.html b/source/public/categories/index.html new file mode 100644 index 0000000..6bf394d --- /dev/null +++ b/source/public/categories/index.html @@ -0,0 +1,202 @@ + + + + + + + +Categories | Empresa Libre + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ + +
    +
+
+ + + + + + + + + + + + + + diff --git a/source/public/categories/index.xml b/source/public/categories/index.xml new file mode 100644 index 0000000..336a86a --- /dev/null +++ b/source/public/categories/index.xml @@ -0,0 +1,14 @@ + + + + Categories on Empresa Libre + https://empresalibre.net/categories/ + Recent content in Categories on Empresa Libre + + https://empresalibre.net/papermod-cover.png + https://empresalibre.net/papermod-cover.png + + Hugo -- gohugo.io + es + + diff --git a/source/public/contacto/index.html b/source/public/contacto/index.html new file mode 100644 index 0000000..72c79b8 --- /dev/null +++ b/source/public/contacto/index.html @@ -0,0 +1,317 @@ + + + + + + + +Contacto | Empresa Libre + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ +
+
+ +

+ Contacto +

+ +
+ +

Nuestro horario de oficina es de Lunes a Viernes de 10:00 a 15:00 hr.

+
    +
  • Teléfono: (55) 5810-8088
  • +
  • Correo electrónico: contacto arroba empresalibre punto net
  • +
+ + +
+ +
+ +
+
+
+ + + + + + + + + + + + + + + diff --git a/source/public/index.html b/source/public/index.html new file mode 100644 index 0000000..06faa31 --- /dev/null +++ b/source/public/index.html @@ -0,0 +1,231 @@ + + + + + + + +Empresa Libre + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+
+
+

Empresa Libre

+
+
+

En cada relación comercial existe una relación humana.

+

+
+ +
+
+ + + + + + + + + + + + + + diff --git a/source/public/index.xml b/source/public/index.xml new file mode 100644 index 0000000..c639de0 --- /dev/null +++ b/source/public/index.xml @@ -0,0 +1,33 @@ + + + + Empresa Libre + https://empresalibre.net/ + Recent content on Empresa Libre + + https://empresalibre.net/papermod-cover.png + https://empresalibre.net/papermod-cover.png + + Hugo -- gohugo.io + es + + Contacto + https://empresalibre.net/contacto/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://empresalibre.net/contacto/ + Nuestro horario de oficina es de Lunes a Viernes de 10:00 a 15:00 hr. + Teléfono: (55) 5810-8088 Correo electrónico: contacto arroba empresalibre punto net + + + + Servicios + https://empresalibre.net/servicios/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://empresalibre.net/servicios/ + Facturación Electrónica Dominio y hospedaje web Servidores Virtuales (VPS) Soporte Técnico + + + + diff --git a/source/public/page/1/index.html b/source/public/page/1/index.html new file mode 100644 index 0000000..e7472f2 --- /dev/null +++ b/source/public/page/1/index.html @@ -0,0 +1 @@ +https://empresalibre.net/ \ No newline at end of file diff --git a/source/public/servicios/index.html b/source/public/servicios/index.html new file mode 100644 index 0000000..333c4b6 --- /dev/null +++ b/source/public/servicios/index.html @@ -0,0 +1,315 @@ + + + + + + + +Servicios | Empresa Libre + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ +
+
+ +

+ Servicios +

+ +
+ +
    +
  • Facturación Electrónica
  • +
  • Dominio y hospedaje web
  • +
  • Servidores Virtuales (VPS)
  • +
  • Soporte Técnico
  • +
+ + +
+ +
+ +
+
+
+ + + + + + + + + + + + + + + diff --git a/source/public/sitemap.xml b/source/public/sitemap.xml new file mode 100644 index 0000000..fc5441c --- /dev/null +++ b/source/public/sitemap.xml @@ -0,0 +1,15 @@ + + + + https://empresalibre.net/categories/ + + https://empresalibre.net/contacto/ + + https://empresalibre.net/ + + https://empresalibre.net/servicios/ + + https://empresalibre.net/tags/ + + diff --git a/source/public/tags/index.html b/source/public/tags/index.html new file mode 100644 index 0000000..9c2c4b6 --- /dev/null +++ b/source/public/tags/index.html @@ -0,0 +1,202 @@ + + + + + + + +Tags | Empresa Libre + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ + +
    +
+
+ + + + + + + + + + + + + + diff --git a/source/public/tags/index.xml b/source/public/tags/index.xml new file mode 100644 index 0000000..45a3022 --- /dev/null +++ b/source/public/tags/index.xml @@ -0,0 +1,14 @@ + + + + Tags on Empresa Libre + https://empresalibre.net/tags/ + Recent content in Tags on Empresa Libre + + https://empresalibre.net/papermod-cover.png + https://empresalibre.net/papermod-cover.png + + Hugo -- gohugo.io + es + + diff --git a/source/robots.txt b/source/robots.txt deleted file mode 100644 index 1d41d40..0000000 --- a/source/robots.txt +++ /dev/null @@ -1,16 +0,0 @@ -User-agent: * -Disallow: /backup/ -Disallow: /bin/ -Disallow: /cache/ -Disallow: /grav/ -Disallow: /logs/ -Disallow: /system/ -Disallow: /vendor/ -Disallow: /user/ -Allow: /user/pages/ -Allow: /user/themes/ -Allow: /user/images/ -Allow: / -Allow: *.css$ -Allow: *.js$ -Allow: /system/*.js$ \ No newline at end of file diff --git a/source/system/assets/debugger/clockwork.css b/source/system/assets/debugger/clockwork.css deleted file mode 100644 index e26dab1..0000000 --- a/source/system/assets/debugger/clockwork.css +++ /dev/null @@ -1,2 +0,0 @@ -/** Clockwork Debugger CSS **/ -.clockwork-badge{position:fixed;z-index:10;bottom:0;left:0;padding:2px 4px;background-color:#eee;border:1px solid #ccc;border-bottom:0;border-left:0;display:flex;align-items:center}.clockwork-badge:hover{width:auto}.clockwork-badge:hover:after{content:'Grav Clockwork debugger enabled. Install Clockwork Browser extension (Chrome or Firefox), open your Developer tools and then select the Clockwork tab.'}.clockwork-badge:after{margin-left:10px;font-family:Monaco,Consolas,"Lucida Console",monospace;font-size:12px;line-height:1.5;color:#666}.clockwork-badge i{display:block;float:left;height:22px;width:22px;min-width:22px;background-size:contain;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAA/1BMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAeHh4AAAD///8EBAT7+/sLCwv29vYVFRUvLy/t7e3m5ubCwsKxsbE/Pz+mpqZMTEwcHBzy8vLp6emfn5+AgIA2Njbi4uLf39+rq6tzc3NWVlYhISHa2trW1tbS0tLMzMy7u7uZmZmUlJSMjIxvb29kZGRHR0c7Ozt5eXkqKiq1tbWQkJBqampbW1tSUlLHx8eHh4ckJCRDQ0M3wD42AAAAI3RSTlMA/PibTbQ0x76TVAlw4LhZLOuEYCAN9Hjx0a2ppGZEGYw97djhXHwAAATZSURBVFjDlVcHW+MwDO1eFCjj2McNOzvdpXTTXVbL/P+/5SQ7QSSX5Di1X1onfi/Sk+Q4sTDbKqWK+YuznZ2zi3wxVdqK/Zf92M1nT9gnO8rmd398GX6Z3xaoOFoiAQcx3E5efgmeSuN8F6Xg1x3G06l/wjNpMR1B0uif4EhnIuFb+0diIoFXk3IVfokisR+h52GO4JKgyjmfaMhAFNlSaPR7DpwI+lzn/E4QKIqmKIJirxCMP4izBPPZPXhgXwMBYgULw0nfg/BF5scDbslb7QeJ08yqqTEmGYoB95d4H8ETL8+n9wBqrLu6ao3bBsMwAnxISf/9BHcqxNB8Y7cWl3Zz7TAUfPrvAT6AoNEFFXvsjutL01yOuMrtBxnFXsmT/1wQHmdWAFNnI3uI48Yj0FUcHbKf62GfUfr8eeQt7Uk3mQZpZNoVRPEui5vtEz5zFEpgWnyqVBZMc6oaGNriH2hGVZ0OxEvInPeMaZWJBA7vmPbCr5jjws5HBnAUxvDMH40aCIf4G5BjRQSs8E8HFFYf8bGxgDvD55bzGhwWkoBcuIyHR/AMdaCagxXDhtL6tSqoWpd4BMnlIR+Or+rYTK/a3EAGcc6e4AWHISnWv20iCCojsHoVlQdjrMexFF2C7UMg2A2WEGWbQhXN6l3eXC6XGp4b9qxbuEB2EBGBwtocrK90cVG5mbRXm6vmx/0phq1sIAGKDgLOBiN1MrO5a9aDl+D0W6x0Ar9BCTRuIIANa90Y7LrLVRXzwVtDInCqMRWcf2bUOEAsa4wJqFowQALL9EiAtVRk8QC4OW+1pOM9jIaVASwYagyNXDj+W0NcfuZNzjtXOiL0Zzg30Llj+ptfxQs4+vBPNiL5PawFCBkgXpUaVtqGl+A8dgZHL34BcBUQrwPptToW+o37Ku+UH9eYByJIx3YkAeFnMFuGO7S5gEp7YhXxa5OOAM39RXDPXb0qmpROsswZe+twXdU55oUIZAiEv3bD1UFwIYKkmGqytPCDCwKFQCKK0yL7qtSAPX54UAbtsLuBHkb9zyLmPQSNjsSgmQwKUOIfEY8F8t4B34DvndJY9BA8tNBJq1Nev9axmaStFcQLhgYoCTo0salkIaW8OUDdWjMTR2sHPhrAFZqx6cqcKE4pl2BJJ4K6hfwvqNgAnXfKX/HU6X3Zrhnu0k7tLNZtTBRv1hkwTDBY1NzFU6doDYjJbWdQkQhWwuU7/LvhTh3SDoco4ECL4i5dwURbc8NdDZz2IwKicE8d0KIqWetLE3+lL4hvUuGSeRfVWNLfj/gpOw4smBJBkKQHCzlHGwvAj4woB1gq5NGGLSXtORBPnUQPV5/MPVkDMxbpwG7w4x0xL6Ltxka0A/4NBvV09UVk4DoSn/jl2+JQS9q9KYawisAD4CfhsZ4TH3htylsdEHARIQBusqCKyUpymycgbbkkXEXjT3z7/oKQFTFVuZD2FMJHZIDsO5x2d4aAr2jR+GLwZhtAb028/0yJ9J8dE87jQyKObcjtTXT8dH+fDuKF4/eiPwzH44wTf/yUi6wrpRIOZ9lM1EtXAifFI+CJn9+iX/t2xMQwOMth/UZbASi8btAwR9FHWSpJr75g9Oqbin3VDg+SpwlP6k6TB4ex/7JvmcJx8jydy6XPk8eFTKhyfwCgX71MSvaBHgAAAABJRU5ErkJggg==)} diff --git a/source/system/assets/debugger/clockwork.js b/source/system/assets/debugger/clockwork.js deleted file mode 100644 index bb1b69d..0000000 --- a/source/system/assets/debugger/clockwork.js +++ /dev/null @@ -1,3 +0,0 @@ -/** Clockwork Debugger JS **/ -document.addEventListener("DOMContentLoaded",function () { - var e=document.createElement("div");e.appendChild(document.createElement("i")),e.className="clockwork-badge",document.body.appendChild(e)}); diff --git a/source/system/assets/debugger/phpdebugbar.css b/source/system/assets/debugger/phpdebugbar.css deleted file mode 100644 index 93e2d2c..0000000 --- a/source/system/assets/debugger/phpdebugbar.css +++ /dev/null @@ -1,70 +0,0 @@ -div.phpdebugbar { - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; -} - -.phpdebugbar pre { - padding: 1rem; -} - -.phpdebugbar div.phpdebugbar-header > div > * { - padding: 5px 15px; -} - -.phpdebugbar div.phpdebugbar-header > div.phpdebugbar-header-right > * { - padding: 5px 8px; -} - -.phpdebugbar div.phpdebugbar-header, .phpdebugbar a.phpdebugbar-restore-btn { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAA/1BMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAeHh4AAAD///8EBAT7+/sLCwv29vYVFRUvLy/t7e3m5ubCwsKxsbE/Pz+mpqZMTEwcHBzy8vLp6emfn5+AgIA2Njbi4uLf39+rq6tzc3NWVlYhISHa2trW1tbS0tLMzMy7u7uZmZmUlJSMjIxvb29kZGRHR0c7Ozt5eXkqKiq1tbWQkJBqampbW1tSUlLHx8eHh4ckJCRDQ0M3wD42AAAAI3RSTlMA/PibTbQ0x76TVAlw4LhZLOuEYCAN9Hjx0a2ppGZEGYw97djhXHwAAATZSURBVFjDlVcHW+MwDO1eFCjj2McNOzvdpXTTXVbL/P+/5SQ7QSSX5Di1X1onfi/Sk+Q4sTDbKqWK+YuznZ2zi3wxVdqK/Zf92M1nT9gnO8rmd398GX6Z3xaoOFoiAQcx3E5efgmeSuN8F6Xg1x3G06l/wjNpMR1B0uif4EhnIuFb+0diIoFXk3IVfokisR+h52GO4JKgyjmfaMhAFNlSaPR7DpwI+lzn/E4QKIqmKIJirxCMP4izBPPZPXhgXwMBYgULw0nfg/BF5scDbslb7QeJ08yqqTEmGYoB95d4H8ETL8+n9wBqrLu6ao3bBsMwAnxISf/9BHcqxNB8Y7cWl3Zz7TAUfPrvAT6AoNEFFXvsjutL01yOuMrtBxnFXsmT/1wQHmdWAFNnI3uI48Yj0FUcHbKf62GfUfr8eeQt7Uk3mQZpZNoVRPEui5vtEz5zFEpgWnyqVBZMc6oaGNriH2hGVZ0OxEvInPeMaZWJBA7vmPbCr5jjws5HBnAUxvDMH40aCIf4G5BjRQSs8E8HFFYf8bGxgDvD55bzGhwWkoBcuIyHR/AMdaCagxXDhtL6tSqoWpd4BMnlIR+Or+rYTK/a3EAGcc6e4AWHISnWv20iCCojsHoVlQdjrMexFF2C7UMg2A2WEGWbQhXN6l3eXC6XGp4b9qxbuEB2EBGBwtocrK90cVG5mbRXm6vmx/0phq1sIAGKDgLOBiN1MrO5a9aDl+D0W6x0Ar9BCTRuIIANa90Y7LrLVRXzwVtDInCqMRWcf2bUOEAsa4wJqFowQALL9EiAtVRk8QC4OW+1pOM9jIaVASwYagyNXDj+W0NcfuZNzjtXOiL0Zzg30Llj+ptfxQs4+vBPNiL5PawFCBkgXpUaVtqGl+A8dgZHL34BcBUQrwPptToW+o37Ku+UH9eYByJIx3YkAeFnMFuGO7S5gEp7YhXxa5OOAM39RXDPXb0qmpROsswZe+twXdU55oUIZAiEv3bD1UFwIYKkmGqytPCDCwKFQCKK0yL7qtSAPX54UAbtsLuBHkb9zyLmPQSNjsSgmQwKUOIfEY8F8t4B34DvndJY9BA8tNBJq1Nev9axmaStFcQLhgYoCTo0salkIaW8OUDdWjMTR2sHPhrAFZqx6cqcKE4pl2BJJ4K6hfwvqNgAnXfKX/HU6X3Zrhnu0k7tLNZtTBRv1hkwTDBY1NzFU6doDYjJbWdQkQhWwuU7/LvhTh3SDoco4ECL4i5dwURbc8NdDZz2IwKicE8d0KIqWetLE3+lL4hvUuGSeRfVWNLfj/gpOw4smBJBkKQHCzlHGwvAj4woB1gq5NGGLSXtORBPnUQPV5/MPVkDMxbpwG7w4x0xL6Ltxka0A/4NBvV09UVk4DoSn/jl2+JQS9q9KYawisAD4CfhsZ4TH3htylsdEHARIQBusqCKyUpymycgbbkkXEXjT3z7/oKQFTFVuZD2FMJHZIDsO5x2d4aAr2jR+GLwZhtAb028/0yJ9J8dE87jQyKObcjtTXT8dH+fDuKF4/eiPwzH44wTf/yUi6wrpRIOZ9lM1EtXAifFI+CJn9+iX/t2xMQwOMth/UZbASi8btAwR9FHWSpJr75g9Oqbin3VDg+SpwlP6k6TB4ex/7JvmcJx8jydy6XPk8eFTKhyfwCgX71MSvaBHgAAAABJRU5ErkJggg==); -} - -.phpdebugbar a.phpdebugbar-restore-btn { - width: 13px; -} - -.phpdebugbar a.phpdebugbar-tab.phpdebugbar-active { - background: #3DB9EC; - color: #fff; - margin-top: -1px; - padding-top: 6px; -} - -.phpdebugbar .phpdebugbar-widgets-toolbar { - border-top: 1px solid #ddd; - padding-left: 5px; - padding-right: 2px; - padding-top: 2px; - background-color: #fafafa !important; - width: auto !important; - left: 0; - right: 0; -} - -.phpdebugbar .phpdebugbar-widgets-toolbar input { - background: transparent !important; -} - -.phpdebugbar .phpdebugbar-widgets-toolbar .phpdebugbar-widgets-filter { - -} - - -.phpdebugbar input[type=text] { - padding: 0; - display: inline; -} - -.phpdebugbar dl.phpdebugbar-widgets-varlist, ul.phpdebugbar-widgets-timeline li span.phpdebugbar-widgets-label { - font-family: "DejaVu Sans Mono", Menlo, Monaco, Consolas, Courier, monospace; - font-size: 12px; -} - -ul.phpdebugbar-widgets-timeline li span.phpdebugbar-widgets-label { - text-shadow: -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff; - top: 0; -} - -.phpdebugbar pre, .phpdebugbar code { - margin: 0; - font-size: 14px; -} diff --git a/source/system/assets/grav.png b/source/system/assets/grav.png deleted file mode 100644 index 67a98b9..0000000 Binary files a/source/system/assets/grav.png and /dev/null differ diff --git a/source/system/assets/jquery/jquery-2.1.4.min.js b/source/system/assets/jquery/jquery-2.1.4.min.js deleted file mode 100644 index 49990d6..0000000 --- a/source/system/assets/jquery/jquery-2.1.4.min.js +++ /dev/null @@ -1,4 +0,0 @@ -/*! jQuery v2.1.4 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */ -!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.4",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)+1>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b="length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,aa=/[+~]/,ba=/'|\\/g,ca=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),da=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ea=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fa){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(ba,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+ra(o[l]);w=aa.test(a)&&pa(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",ea,!1):e.attachEvent&&e.attachEvent("onunload",ea)),p=!f(g),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?la(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ca,da),a[3]=(a[3]||a[4]||a[5]||"").replace(ca,da),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ca,da).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(ca,da),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return W.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(ca,da).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:oa(function(){return[0]}),last:oa(function(a,b){return[b-1]}),eq:oa(function(a,b,c){return[0>c?c+b:c]}),even:oa(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:oa(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:oa(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:oa(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function sa(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function ta(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ua(a,b,c){for(var d=0,e=b.length;e>d;d++)ga(a,b[d],c);return c}function va(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wa(a,b,c,d,e,f){return d&&!d[u]&&(d=wa(d)),e&&!e[u]&&(e=wa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ua(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:va(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=va(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=va(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sa(function(a){return a===b},h,!0),l=sa(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sa(ta(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wa(i>1&&ta(m),i>1&&ra(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xa(a.slice(i,e)),f>e&&xa(a=a.slice(e)),f>e&&ra(a))}m.push(c)}return ta(m)}function ya(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=va(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&ga.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,ya(e,d)),f.selector=a}return f},i=ga.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ca,da),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ca,da),aa.test(j[0].type)&&pa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&ra(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,aa.test(a)&&pa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ja(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+K.uid++}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){ -return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthx",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h]*)\/>/gi,ba=/<([\w:]+)/,ca=/<|&#?\w+;/,da=/<(?:script|style|link)/i,ea=/checked\s*(?:[^=]|=\s*.checked.)/i,fa=/^$|\/(?:java|ecma)script/i,ga=/^true\/(.*)/,ha=/^\s*\s*$/g,ia={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};ia.optgroup=ia.option,ia.tbody=ia.tfoot=ia.colgroup=ia.caption=ia.thead,ia.th=ia.td;function ja(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function ka(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function la(a){var b=ga.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function ma(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function na(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function oa(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pa(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=oa(h),f=oa(a),d=0,e=f.length;e>d;d++)pa(f[d],g[d]);if(b)if(c)for(f=f||oa(a),g=g||oa(h),d=0,e=f.length;e>d;d++)na(f[d],g[d]);else na(a,h);return g=oa(h,"script"),g.length>0&&ma(g,!i&&oa(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(ca.test(e)){f=f||k.appendChild(b.createElement("div")),g=(ba.exec(e)||["",""])[1].toLowerCase(),h=ia[g]||ia._default,f.innerHTML=h[1]+e.replace(aa,"<$1>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=oa(k.appendChild(e),"script"),i&&ma(f),c)){j=0;while(e=f[j++])fa.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=ja(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=ja(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(oa(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&ma(oa(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(oa(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!da.test(a)&&!ia[(ba.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(aa,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(oa(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(oa(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&ea.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(oa(c,"script"),ka),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,oa(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,la),j=0;g>j;j++)h=f[j],fa.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(ha,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qa,ra={};function sa(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function ta(a){var b=l,c=ra[a];return c||(c=sa(a,b),"none"!==c&&c||(qa=(qa||n(" - - -{% else %} - {{ parent() }} -{% endif %} -{% endblock content_wrapper %} - -{% block content %} - {% do page.modifyHeader('http_response_code', 404) %} -
-

{{ 'PLUGIN_ADMIN.ERROR'|tu }} 404

-
-

- {{ 'PLUGIN_FLEX_OBJECTS.ERROR.PAGE_NOT_EXIST'|tu }} -

-
-
-{% endblock content %} \ No newline at end of file diff --git a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/default/titlebar/configure.html.twig b/source/user/plugins/flex-objects/admin/templates/flex-objects/types/default/titlebar/configure.html.twig deleted file mode 100644 index 08d6f86..0000000 --- a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/default/titlebar/configure.html.twig +++ /dev/null @@ -1,32 +0,0 @@ -{% block titlebar %} - {% block titlebar_button_bar %} -
- {# BACK #} - {% block back_button %} - {% include ['flex-objects/types/' ~ target ~ '/buttons/back.html.twig', 'flex-objects/types/default/buttons/back.html.twig'] %} - {% endblock back_button %} - - {% block extra_buttons %}{% endblock extra_buttons %} - - {# SAVE #} - {% if can_save %} - {% block save_button %} - {% include ['flex-objects/types/' ~ target ~ '/buttons/save.html.twig', 'flex-objects/types/default/buttons/save.html.twig'] with {task: 'configure'} %} - {% endblock save_button %} - {% endif %} -
- {% endblock titlebar_button_bar %} - - {% block titlebar_title %} -

- {% if allowed %} - - {{ title }} - {% else %} - - {{ 'PLUGIN_ADMIN.ERROR'|tu }} -   {% endif %} -

- {% endblock titlebar_title %} - -{% endblock %} diff --git a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/default/titlebar/edit.html.twig b/source/user/plugins/flex-objects/admin/templates/flex-objects/types/default/titlebar/edit.html.twig deleted file mode 100644 index c0b0de6..0000000 --- a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/default/titlebar/edit.html.twig +++ /dev/null @@ -1,46 +0,0 @@ -{% block titlebar %} - {% block titlebar_button_bar %} -
- {# BACK #} - {% block back_button %} - {% include ['flex-objects/types/' ~ target ~ '/buttons/back.html.twig', 'flex-objects/types/default/buttons/back.html.twig'] %} - {% endblock back_button %} - - {# PREVIEW #} - {% if can_preview %} - {% block preview_button %} - {% include ['flex-objects/types/' ~ target ~ '/buttons/preview.html.twig', 'flex-objects/types/default/buttons/preview.html.twig'] %} - {% endblock preview_button %} - {% endif %} - - {# DELETE #} - {% if can_delete %} - {% block delete_button %} - {% include ['flex-objects/types/' ~ target ~ '/buttons/delete.html.twig', 'flex-objects/types/default/buttons/delete.html.twig'] %} - {% endblock delete_button %} - {% endif %} - - {% block extra_buttons %}{% endblock extra_buttons %} - - {# SAVE #} - {% if allowed and can_save %} - {% block save_button %} - {% include ['flex-objects/types/' ~ target ~ '/buttons/save.html.twig', 'flex-objects/types/default/buttons/save.html.twig'] with {task: 'save'} %} - {% endblock save_button %} - {% endif %} -
- {% endblock titlebar_button_bar %} - - {% block titlebar_title %} -

- {% if allowed %} - - {{ not object.exists ? '[NEW]' }} {{ title }} - {% else %} - - {{ 'PLUGIN_ADMIN.ERROR'|tu }} - {% endif %} -

- {% endblock titlebar_title %} - -{% endblock %} diff --git a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/default/titlebar/list.html.twig b/source/user/plugins/flex-objects/admin/templates/flex-objects/types/default/titlebar/list.html.twig deleted file mode 100644 index 03a0188..0000000 --- a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/default/titlebar/list.html.twig +++ /dev/null @@ -1,48 +0,0 @@ -{% block titlebar %} - {% block titlebar_button_bar %} -
- {# BACK #} - {% block back_button %} - {% include ['flex-objects/types/' ~ target ~ '/buttons/back.html.twig', 'flex-objects/types/default/buttons/back.html.twig'] %} - {% endblock back_button %} - - {# EXPORT #} - {% if can_export %} - {% block export_button %} - {% include ['flex-objects/types/' ~ target ~ '/buttons/export.html.twig', 'flex-objects/types/default/buttons/export.html.twig'] with {export: directory.config('admin.views.export') ?? directory.config('admin.export') ?? []} %} - {% endblock export_button %} - {% endif %} - - {# CREATE #} - {% if can_create %} - {% block create_button %} - {% include ['flex-objects/types/' ~ target ~ '/buttons/add.html.twig', 'flex-objects/types/default/buttons/add.html.twig'] %} - {% endblock create_button %} - {% endif %} - - {# LANGUAGES #} - {% if can_translate %} - {% block languages_button %} - {% include ['flex-objects/types/' ~ target ~ '/buttons/languages.html.twig', 'flex-objects/types/default/buttons/languages.html.twig'] %} - {% endblock languages_button %} - {% endif %} - - {# CONFIGURE #} - {% block configure %} - {% include 'flex-objects/types/default/buttons/configuration.html.twig' %} - {% endblock configure %} -
- {% endblock titlebar_button_bar %} - - {% block titlebar_title %} -

- {% if allowed %} - - {{ directory ? title|tu : 'Error' }} - {% else %} - - {{ 'PLUGIN_ADMIN.ERROR'|tu }} -  {% endif %} -

- {% endblock titlebar_title %} -{% endblock %} diff --git a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/default/titlebar/preview.html.twig b/source/user/plugins/flex-objects/admin/templates/flex-objects/types/default/titlebar/preview.html.twig deleted file mode 100644 index d50cbe7..0000000 --- a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/default/titlebar/preview.html.twig +++ /dev/null @@ -1,30 +0,0 @@ -{% block titlebar %} - {% block titlebar_button_bar %} -
- {# BACK #} - {% block back_button %} - {% include ['flex-objects/types/' ~ target ~ '/buttons/back.html.twig', 'flex-objects/types/default/buttons/back.html.twig'] %} - {% endblock back_button %} - - {# PREVIEW #} - {% if can_preview %} - {% block preview_button %} - {% include ['flex-objects/types/' ~ target ~ '/buttons/preview-open.html.twig', 'flex-objects/types/default/buttons/preview-open.html.twig'] %} - {% endblock preview_button %} - {% endif %} -
- {% endblock titlebar_button_bar %} - - {% block titlebar_title %} -

- {% if allowed %} - - {{ "PLUGIN_ADMIN.PREVIEW"|tu }}: {{ not object.exists ? '[NEW]' }} {{ title }} - {% else %} - - {{ 'PLUGIN_ADMIN.ERROR'|tu }} - {% endif %} -

- {% endblock titlebar_title %} - -{% endblock %} diff --git a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/default/titlebar/types.html.twig b/source/user/plugins/flex-objects/admin/templates/flex-objects/types/default/titlebar/types.html.twig deleted file mode 100644 index 97789de..0000000 --- a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/default/titlebar/types.html.twig +++ /dev/null @@ -1,22 +0,0 @@ -{% block titlebar %} - {% block titlebar_button_bar %} -
- {# BACK #} - {% block back_button %} - {% include 'flex-objects/types/default/buttons/back.html.twig' %} - {% endblock back_button %} - - {# CONFIGURE #} - {% block configure %} - {% include 'flex-objects/types/default/buttons/configuration.html.twig' %} - {% endblock configure %} -
- {% endblock titlebar_button_bar %} - - {% block titlebar_title %} -

- - {{ "PLUGIN_FLEX_OBJECTS.TITLE"|tu }} -

- {% endblock titlebar_title %} -{% endblock %} diff --git a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/default/types.html.twig b/source/user/plugins/flex-objects/admin/templates/flex-objects/types/default/types.html.twig deleted file mode 100644 index 88b1ab2..0000000 --- a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/default/types.html.twig +++ /dev/null @@ -1,46 +0,0 @@ -{% extends 'partials/base.html.twig' %} -{% use 'flex-objects/types/default/titlebar/types.html.twig' %} - -{% set flex = grav['flex_objects'] %} - -{# These variables can be overridden from the main template file #} -{% set back_route = back_route ?? ('/' ~ route.getRoute(1, -1)) %} -{% set configure_route = '/plugins/flex-objects' %} - -{% block body %} - {% set back_url = admin_route(back_route) %} - {% set configure_url = configure_route ? admin_route(configure_route) : null %} - - {{ parent() }} -{% endblock body %} - -{% block content %} - -

{{ 'PLUGIN_FLEX_OBJECTS.TYPES_TITLE'|tu }}

- -
- {% for name,directory in flex.directories if directory.enabled and directory.config('admin.hidden', false) is not same as(true) and not directory.config('admin.menu') %} - {% try %} - {% set collection = directory.collection %} - {% if flex.adminRoute(collection) %} -
- -

{{ directory.title|tu }} {{ collection.isAuthorized('list', 'admin', user).count }}

-

- {{ directory.description }} -

-
- {% endif %} - {% catch %} -
-

{{ 'PLUGIN_FLEX_OBJECTS.ERROR.BAD_DIRECTORY'|tu }} '{{ name }}'

-

- {{ e.message }} -

-
- {% endcatch %} - {% endfor %} - -
- -{% endblock %} \ No newline at end of file diff --git a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/pages/buttons/add.html.twig b/source/user/plugins/flex-objects/admin/templates/flex-objects/types/pages/buttons/add.html.twig deleted file mode 100644 index 74242aa..0000000 --- a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/pages/buttons/add.html.twig +++ /dev/null @@ -1,20 +0,0 @@ -
- - - -
diff --git a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/pages/buttons/back.html.twig b/source/user/plugins/flex-objects/admin/templates/flex-objects/types/pages/buttons/back.html.twig deleted file mode 100644 index df0761a..0000000 --- a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/pages/buttons/back.html.twig +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/pages/buttons/copy.html.twig b/source/user/plugins/flex-objects/admin/templates/flex-objects/types/pages/buttons/copy.html.twig deleted file mode 100644 index 47ec501..0000000 --- a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/pages/buttons/copy.html.twig +++ /dev/null @@ -1,4 +0,0 @@ -{# href="{{ uri.addNonce(route.withoutParams().withGravParam('task', 'copy').getUri(), 'admin-form', 'admin-nonce') }}" #} - - {{ "PLUGIN_ADMIN.COPY"|tu }} - diff --git a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/pages/buttons/delete.html.twig b/source/user/plugins/flex-objects/admin/templates/flex-objects/types/pages/buttons/delete.html.twig deleted file mode 100644 index 859b38b..0000000 --- a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/pages/buttons/delete.html.twig +++ /dev/null @@ -1,3 +0,0 @@ - - {{ "PLUGIN_ADMIN.DELETE"|tu }} - diff --git a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/pages/buttons/move.html.twig b/source/user/plugins/flex-objects/admin/templates/flex-objects/types/pages/buttons/move.html.twig deleted file mode 100644 index 17f607c..0000000 --- a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/pages/buttons/move.html.twig +++ /dev/null @@ -1,6 +0,0 @@ - - {{ "PLUGIN_ADMIN.MOVE"|tu }} - -
- {% include 'partials/page-move.html.twig' with { blueprints: admin.blueprints('admin/pages/move'), data: context } %} -
\ No newline at end of file diff --git a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/pages/buttons/nav-child.html.twig b/source/user/plugins/flex-objects/admin/templates/flex-objects/types/pages/buttons/nav-child.html.twig deleted file mode 100644 index 778ccac..0000000 --- a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/pages/buttons/nav-child.html.twig +++ /dev/null @@ -1,9 +0,0 @@ -{% if child_url %} - - - -{% else %} - - - -{% endif %} diff --git a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/pages/buttons/nav-next.html.twig b/source/user/plugins/flex-objects/admin/templates/flex-objects/types/pages/buttons/nav-next.html.twig deleted file mode 100644 index c38113a..0000000 --- a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/pages/buttons/nav-next.html.twig +++ /dev/null @@ -1,9 +0,0 @@ -{% if next_url %} - - - -{% else %} - - - -{% endif %} diff --git a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/pages/buttons/nav-parent.html.twig b/source/user/plugins/flex-objects/admin/templates/flex-objects/types/pages/buttons/nav-parent.html.twig deleted file mode 100644 index b57f851..0000000 --- a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/pages/buttons/nav-parent.html.twig +++ /dev/null @@ -1,9 +0,0 @@ -{% if parent_url %} - - - -{% else %} - - - -{% endif %} diff --git a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/pages/buttons/nav-prev.html.twig b/source/user/plugins/flex-objects/admin/templates/flex-objects/types/pages/buttons/nav-prev.html.twig deleted file mode 100644 index 141e9b2..0000000 --- a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/pages/buttons/nav-prev.html.twig +++ /dev/null @@ -1,9 +0,0 @@ -{% if prev_url %} - - - -{% else %} - - - -{% endif %} \ No newline at end of file diff --git a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/pages/buttons/preview.html.twig b/source/user/plugins/flex-objects/admin/templates/flex-objects/types/pages/buttons/preview.html.twig deleted file mode 100644 index 7445322..0000000 --- a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/pages/buttons/preview.html.twig +++ /dev/null @@ -1,5 +0,0 @@ -{% if object.routable and object.published %} - - - -{% endif %} diff --git a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/pages/buttons/save.html.twig b/source/user/plugins/flex-objects/admin/templates/flex-objects/types/pages/buttons/save.html.twig deleted file mode 100644 index fd401bc..0000000 --- a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/pages/buttons/save.html.twig +++ /dev/null @@ -1,23 +0,0 @@ -{% set task = task ?? 'save' %} -
- - {% if can_translate %} - {% set untranslated = admin_languages|array_diff(object_languages|merge([language])) %} - {% if count(untranslated) %} - - - {% endif %} - {% endif %} -
diff --git a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/pages/edit.html.twig b/source/user/plugins/flex-objects/admin/templates/flex-objects/types/pages/edit.html.twig deleted file mode 100644 index baf5c87..0000000 --- a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/pages/edit.html.twig +++ /dev/null @@ -1,236 +0,0 @@ -{% extends 'flex-objects/types/default/edit.html.twig' %} - -{# Avoid defining form and object twice: object should always come from the form! #} -{% set expert = user.authorize('admin.super') and admin.session.expert != '0' %} -{% if expert or form is not defined %} - {% set form = object.form(expert ? 'raw' : '') %} - {% set object = form.object %} -{% endif %} - -{% set title = title ?? form.getValue('header.title') ?? object.title ?? key %} -{% set parent = object.parent %} -{% set can_read = can_read ?? (object.exists ? object.isAuthorized('read', 'admin', user) : object.isAuthorized('create', 'admin', user))|bool %} -{% set can_copy = can_copy ?? (parent.exists and parent.isAuthorized('create', 'admin', user)) %} -{% set can_create = can_create ?? (object.exists and object.isAuthorized('create', 'admin', user)) %} -{% set can_save = can_save ?? (object.exists ? object.isAuthorized('update', 'admin', user) : object.isAuthorized('create', 'admin', user))|bool %} -{% set can_move = can_move ?? can_save and form.blueprint.schema.property('route').type is same as('parents') %} -{% set can_translate = can_translate ?? (admin.multilang and object.hasFlexFeature('page-translate') and not object.root()) %} - -{% macro spanToggle(input, length) %} - {{ (repeat('  ', (length - input|length) / 2) ~ input ~ repeat('  ', (length - input|length) / 2))|raw }} -{% endmacro %} -{% import _self as macro %} - -{% block body %} - {% set current_route = '/' ~ route.getRoute(1) %} - - {% if not object.root() %} - {% set child = object.children.first %} - {% set prev = object.prevSibling %} - {% set next = object.nextSibling %} - - {% set parent_url = parent and not parent.root ? admin_route(back_route) %} - {% set child_url = can_read and child ? admin_route(current_route ~ '/' ~ child.slug) %} - {% set prev_url = can_read and prev ? admin_route(back_route ~ '/' ~ prev.slug) %} - {% set next_url = can_read and next ? admin_route(back_route ~ '/' ~ next.slug) %} - {% endif %} - {% set back_url = back_url ?? admin_route(flex.adminRoute(directory.getFlexType())) %} - - {{ parent() }} -{% endblock body %} - -{% block back_button %} - {% include ['flex-objects/types/' ~ target ~ '/buttons/back.html.twig', 'flex-objects/types/pages/buttons/back.html.twig'] - with { back_url: back_url } %} - {% if not object.root() %} - {% include ['flex-objects/types/' ~ target ~ '/buttons/nav-prev.html.twig', 'flex-objects/types/pages/buttons/nav-prev.html.twig'] - with { prev_url: prev_url, title: prev.route } %} - {% include ['flex-objects/types/' ~ target ~ '/buttons/nav-parent.html.twig', 'flex-objects/types/pages/buttons/nav-parent.html.twig'] - with { parent_url: parent_url, title: parent.route } %} - {% include ['flex-objects/types/' ~ target ~ '/buttons/nav-child.html.twig', 'flex-objects/types/pages/buttons/nav-child.html.twig'] - with { child_url: child_url, title: child.route } %} - {% include ['flex-objects/types/' ~ target ~ '/buttons/nav-next.html.twig', 'flex-objects/types/pages/buttons/nav-next.html.twig'] - with { next_url: next_url, title: next.route } %} - {% endif %} -{% endblock back_button %} - -{% block preview_button %} - {% if object.exists and not object.root() %} - {% include ['flex-objects/types/' ~ target ~ '/buttons/preview.html.twig', 'flex-objects/types/pages/buttons/preview.html.twig'] %} - {% endif %} -{% endblock preview_button %} - -{% block delete_button %} - {# FIXME: add support for deleting root file only #} - {% if not object.root() %} - {% include ['flex-objects/types/' ~ target ~ '/buttons/delete.html.twig', 'flex-objects/types/pages/buttons/delete.html.twig'] %} - {% endif %} -{% endblock delete_button %} - -{% block extra_buttons %} - {% if object.exists and not object.root() %} - {% if can_create %} - {% include ['flex-objects/types/' ~ target ~ '/buttons/add.html.twig', 'flex-objects/types/pages/buttons/add.html.twig'] %} - {% endif %} - {% if can_copy %} - {% include ['flex-objects/types/' ~ target ~ '/buttons/copy.html.twig', 'flex-objects/types/pages/buttons/copy.html.twig'] %} - {% endif %} - {% if can_move %} - {% include ['flex-objects/types/' ~ target ~ '/buttons/move.html.twig', 'flex-objects/types/pages/buttons/move.html.twig'] %} - {% endif %} - {% endif %} -{% endblock extra_buttons %} - -{% block save_button %} - {% include ['flex-objects/types/' ~ target ~ '/buttons/save.html.twig', 'flex-objects/types/pages/buttons/save.html.twig'] %} -{% endblock save_button %} - -{% block content_top %} - {% if allowed and user.authorize('admin.super') %} -
- {% set save_location = object.getStorageFolder() ?: directory.getStorageFolder() %} - {{ "PLUGIN_ADMIN.SAVE_LOCATION"|tu }}: {{ url(save_location, false, true)|trim('/') }} {{ not object.exists ? '[NEW]' }} (type: {{ (form.getValue('name') ?: 'default') }}) -
- {% endif %} - {% if object.exists and form.flash.exists %} -
- {{ 'PLUGIN_FLEX_OBJECTS.STATE.EDITING_DRAFT'|tu }} -
- {% endif %} - {% if not object.exists %} -
- {{ 'PLUGIN_FLEX_OBJECTS.STATE.NOT_CREATED_YET'|tu }} -
- {% elseif can_translate %} - {% set is_default = language is same as(default_language) %} - {% if is_default and default_language in object_languages %} - {% if not translate_include_default and object.property('lang') %} - {# Handle default language extension #} -
- {% set overrideLanguage = all_languages[object_language] ?? object_language %} - {{ 'PLUGIN_FLEX_OBJECTS.LANGUAGE.USING_OVERRIDE'|tu(overrideLanguage, null)|raw }} - {{ object.hasTranslation('', false) ? 'PLUGIN_FLEX_OBJECTS.LANGUAGE.UNUSED_DEFAULT'|tu|raw }} -
- {% elseif translate_include_default %} - {% if not object.property('lang') %} -
- {{ 'PLUGIN_FLEX_OBJECTS.LANGUAGE.USING_DEFAULT'|tu|raw }} -
- {% elseif object.hasTranslation('', false) %} -
- {{ 'PLUGIN_FLEX_OBJECTS.LANGUAGE.UNUSED_DEFAULT'|tu|raw }} -
- {% endif %} - {% endif %} - {% elseif not has_translation %} -
- {% set overrideLanguage = all_languages[language] ?? object_language %} - {{ 'PLUGIN_FLEX_OBJECTS.LANGUAGE.NOT_TRANSLATED_YET'|tu(overrideLanguage, null)|raw }} - {% if language == object_language %} - {{ 'PLUGIN_FLEX_OBJECTS.LANGUAGE.NO_FALLBACK_FOUND'|tu|raw }} - {% else %} - {% set overrideLanguage = all_languages[object_language] ?? object_language %} - {{ 'PLUGIN_FLEX_OBJECTS.LANGUAGE.FALLING_BACK'|tu(overrideLanguage, null)|raw }} - {% endif %} -
- {% endif %} - {% endif %} -{% endblock content_top %} - -{% block topbar %} - {% if can_translate %} -
- - {% if count(object_languages) > (object_language in object_languages)|int %} - - - {% endif %} -
- {% endif %} - - {% if user.authorize('admin.super') %} -
- {% set normalText = 'PLUGIN_ADMIN.NORMAL'|tu %} - {% set expertText = 'PLUGIN_ADMIN.EXPERT'|tu %} - {% set maxLen = max([normalText|length, expertText|length]) %} - {% set normalText = macro.spanToggle(normalText, maxLen) %} - {% set expertText = macro.spanToggle(expertText, maxLen) %} - -
- - - - - -
-
- {% endif %} -{% endblock topbar %} - -{% block edit %} - {% include 'partials/blueprints.html.twig' with { context: object, data: object, blueprints: form.blueprint } %} -{% endblock edit %} - -{% block content %} - {{ parent() }} - - {% include 'partials/modal-changes-detected.html.twig' %} - - {% if object.exists %} - {% set modal_data = data({ - route: '/' ~ object.key, - name: object.header.child_type ?? object.blueprint.child_type ?? 'default' - }) %} - -
- {% include 'partials/blueprints-new.html.twig' with { form: null, blueprints: admin.blueprints('admin/pages/new'), data: modal_data, form_id: 'new-page' } %} -
- -
- {% include 'partials/blueprints-new-folder.html.twig' with { form: null, blueprints: admin.blueprints('admin/pages/new_folder'), data: modal_data, form_id: 'new-folder' } %} -
- -
- {% include 'partials/blueprints-new.html.twig' with { form: null, blueprints: admin.blueprints('admin/pages/modular_new'), data: modal_data, form_id: 'new-module' } %} -
- -
- {% include 'partials/blueprints-copy.html.twig' with { blueprints: admin.blueprints('admin/pages/copy'), data: data({ title: object.title ~ ' (Copy)', folder: object.slug ~ '-copy' }), form_id: 'copy' } %} -
- {% endif %} - - {# TODO: regular pages support extra modals from admin config #} - -
-
-

{{ 'PLUGIN_FLEX_OBJECTS.PARENTS'|tu }}

-
{{ 'PLUGIN_FLEX_OBJECTS.STATE.LOADING'|tu }}
-
- -
-
- -{% endblock content %} - -{% block bottom %} - {{ parent() }} - -{% endblock bottom %} diff --git a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/pages/list.html.twig b/source/user/plugins/flex-objects/admin/templates/flex-objects/types/pages/list.html.twig deleted file mode 100644 index e4ab2f5..0000000 --- a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/pages/list.html.twig +++ /dev/null @@ -1,29 +0,0 @@ -{% extends 'flex-objects/types/default/list.html.twig' %} - -{% set can_create = true %} - -{% block back_button %} - {% include ['flex-objects/types/' ~ target ~ '/buttons/back.html.twig', 'flex-objects/types/pages/buttons/back.html.twig'] %} -{% endblock back_button %} - -{% block create_button %} - {% for key, add_modal in config.plugins.admin.add_modals %} - {% if add_modal.show_in|default('bar') == 'bar' %} - {{ add_modal.label|tu }} - {% endif %} - {% endfor %} - - {% include ['flex-objects/types/' ~ target ~ '/buttons/add.html.twig', 'flex-objects/types/pages/buttons/add.html.twig'] %} -{% endblock %} - -{% block content_top %}{% endblock %} - -{% block content_list %} - {% set list_layout = grav.uri.param('layout', 'columns') %} - {% include [ - 'flex-objects/types/' ~ target ~ '/list/' ~ list_layout ~ '.html.twig', - 'flex-objects/types/pages/list/' ~ list_layout ~ '.html.twig', - 'flex-objects/types/' ~ target ~ '/list/list.html.twig', - 'flex-objects/types/pages/list/list.html.twig' - ] %} -{% endblock %} diff --git a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/pages/list/columns.html.twig b/source/user/plugins/flex-objects/admin/templates/flex-objects/types/pages/list/columns.html.twig deleted file mode 100644 index 082bb61..0000000 --- a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/pages/list/columns.html.twig +++ /dev/null @@ -1,155 +0,0 @@ -{% macro toggle(id, title, filters, name = null) %} - {% set name = id|fieldName %} - {% set filter = filters[name] ?? null %} - {% set value = filter is null ? 0 : (not filter)|int+1 %} - {% set classes = ['status-unchecked', 'status-checked', 'status-indeterminate'] %} - - - - - -{% endmacro %} - -{% import _self as macros %} - -{% block directory %} - {% set filters = grav.request.getCookieParams()['grav-admin-flexpages']|base64_decode|json_decode(true)['filters'] %} - {% set hidePanel = filters|length == 0 or (filters|length == 1 and filters['filters[search]']) %} -
-
-
- - -
-
- - {{ 'PLUGIN_FLEX_OBJECTS.FILTER.PAGE_ATTRIBUTES'|tu }} - - {{ macros.toggle('filters.routable', 'Routable', filters) }} - {{ macros.toggle('filters.module', 'Module', filters) }} - {{ macros.toggle('filters.visible', 'Visible', filters) }} - {{ macros.toggle('filters.published', 'Published', filters) }} - {{ macros.toggle('filters.translated', 'Translated', filters) }} - {{ macros.toggle('filters.folder', 'Empty Folder', filters) }} -
- - {% set selected = filters['filters[page_type]']|split(',') %} - {% set page_types = admin.types(null) %} {# directory.config('filters.ignore_page_types') #} -
- - {{ 'PLUGIN_FLEX_OBJECTS.FILTER.PAGE_TYPES'|tu }} - - {% for name,title in page_types %} - - - - - {% endfor %} -
- - {% set module_types = admin.modularTypes(null) %} {# directory.config('filters.ignore_module_types') #} - {% if module_types %} -
- - {{ 'PLUGIN_FLEX_OBJECTS.FILTER.MODULAR_TYPES'|tu }} - - {% for name,title in module_types %} - - - - - {% endfor %} -
- {% endif %} - - - {{ 'PLUGIN_FLEX_OBJECTS.ACTION.APPLY_FILTERS'|tu }} - - - {{ 'PLUGIN_FLEX_OBJECTS.ACTION.RESET_FILTERS'|tu }} - -
-
-
- -
-
{{ 'PLUGIN_FLEX_OBJECTS.STATE.LOADING'|tu }}
-
-
- -
- - {# Modals #} -
- {% include 'partials/blueprints-new.html.twig' with { blueprints: admin.blueprints('admin/pages/new'), data: obj_data, form_id: 'new-page' } %} -
- -
- {% include 'partials/blueprints-new-folder.html.twig' with { blueprints: admin.blueprints('admin/pages/new_folder'), data: obj_data, form_id: 'new-folder' } %} -
- -
- {% include 'partials/blueprints-new.html.twig' with { blueprints: admin.blueprints('admin/pages/modular_new'), data: obj_data, form_id: 'new-module' } %} -
- - {% for key, add_modal in config.plugins.admin.add_modals %} -
- {% include add_modal.template|defined('partials/blueprints-new.html.twig') with { - blueprints: admin.blueprints(add_modal.blueprint), - data: obj_data, - form_id: 'add-modal' - }|merge(add_modal.with|defined({})) %} -
- {% endfor %} - -
- {% include 'partials/blueprints-copy.html.twig' with { blueprints: admin.blueprints('admin/pages/copy'), data: obj_data, form_id: 'copy' } %} -
- -
-
-

Parents

-
-
{{ 'PLUGIN_FLEX_OBJECTS.STATE.LOADING'|tu }}
-
-
- -
-
- -
-
-

{{ "PLUGIN_ADMIN.MODAL_DELETE_PAGE_CONFIRMATION_REQUIRED_TITLE"|tu }}

-

- {% if context %} - {{ "PLUGIN_ADMIN.PAGE"|tu }}: {{ context.title }} - {% endif %} -

-

- {{ "PLUGIN_ADMIN.MODAL_DELETE_PAGE_CONFIRMATION_REQUIRED_DESC"|tu }} -

-
-
- - {{ "PLUGIN_ADMIN.CONTINUE"|tu }} -
-
-
-{% endblock %} diff --git a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/pages/list/list.html.twig b/source/user/plugins/flex-objects/admin/templates/flex-objects/types/pages/list/list.html.twig deleted file mode 100644 index 12ac6ad..0000000 --- a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/pages/list/list.html.twig +++ /dev/null @@ -1,41 +0,0 @@ -{% extends 'flex-objects/types/default/list/list.html.twig' %} - -{% block modals %} -
- {% include 'partials/blueprints-new.html.twig' with { blueprints: admin.blueprints('admin/pages/new'), data: obj_data, form_id: 'new-page' } %} -
- -
- {% include 'partials/blueprints-new-folder.html.twig' with { blueprints: admin.blueprints('admin/pages/new_folder'), data: obj_data, form_id: 'new-folder' } %} -
- -
- {% include 'partials/blueprints-new.html.twig' with { blueprints: admin.blueprints('admin/pages/modular_new'), data: obj_data, form_id: 'new-module' } %} -
- - {% for key, add_modal in config.plugins.admin.add_modals %} -
- {% include add_modal.template|defined('partials/blueprints-new.html.twig') with { - blueprints: admin.blueprints(add_modal.blueprint), - data: obj_data, - form_id: 'add-modal' - }|merge(add_modal.with|defined({})) %} -
- {% endfor %} - -
- {% include 'partials/blueprints-copy.html.twig' with { blueprints: admin.blueprints('admin/pages/copy'), data: obj_data, form_id: 'copy' } %} -
- -
-
-

Parents

-
{{ 'PLUGIN_FLEX_OBJECTS.STATE.LOADING'|tu }}
-
- -
-
-{% endblock %} diff --git a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/pages/preview.html.twig b/source/user/plugins/flex-objects/admin/templates/flex-objects/types/pages/preview.html.twig deleted file mode 100644 index 61499ee..0000000 --- a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/pages/preview.html.twig +++ /dev/null @@ -1,16 +0,0 @@ -{% extends 'flex-objects/types/default/preview.html.twig' %} - -{% set can_translate = can_translate ?? (admin.multilang and object.hasFlexFeature('page-translate')) %} - -{% block back_button %} - {% include ['flex-objects/types/' ~ target ~ '/buttons/back.html.twig', 'flex-objects/types/pages/buttons/back.html.twig'] - with { back_url: back_url } %} -{% endblock back_button %} - -{% block body %} - {% set parent = object.parent %} - - {% set preview_url = preview_url ?: (object.home ? '/' : '') %} - - {{ parent() }} -{% endblock body %} diff --git a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/user-accounts/configure.html.twig b/source/user/plugins/flex-objects/admin/templates/flex-objects/types/user-accounts/configure.html.twig deleted file mode 100644 index 2348417..0000000 --- a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/user-accounts/configure.html.twig +++ /dev/null @@ -1,9 +0,0 @@ -{% extends 'flex-objects/types/default/configure.html.twig' %} - -{% set back_route = back_route ?? ('/' ~ route.getRoute(1, -1)) %} - -{% block content_top %} - {% include 'flex-objects/layouts/accounts/partials/top.html.twig' %} - - {{ parent() }} -{% endblock %} diff --git a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/user-accounts/edit.html.twig b/source/user/plugins/flex-objects/admin/templates/flex-objects/types/user-accounts/edit.html.twig deleted file mode 100644 index 85fe5fd..0000000 --- a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/user-accounts/edit.html.twig +++ /dev/null @@ -1,9 +0,0 @@ -{% extends 'flex-objects/types/default/edit.html.twig' %} - -{% if not directory.isAuthorized('list', 'admin', user) %} - {% set back_route = '/' %} -{% endif %} - -{% if not object.exists %} - {% do object.onPrepareRegistration() %} -{% endif %} \ No newline at end of file diff --git a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/user-accounts/list.html.twig b/source/user/plugins/flex-objects/admin/templates/flex-objects/types/user-accounts/list.html.twig deleted file mode 100644 index 0cefbb8..0000000 --- a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/user-accounts/list.html.twig +++ /dev/null @@ -1,7 +0,0 @@ -{% extends 'flex-objects/types/default/list.html.twig' %} - -{% block content_top %} - {% include 'flex-objects/layouts/accounts/partials/top.html.twig' %} - - {{ parent() }} -{% endblock %} diff --git a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/user-groups/configure.html.twig b/source/user/plugins/flex-objects/admin/templates/flex-objects/types/user-groups/configure.html.twig deleted file mode 100644 index 2348417..0000000 --- a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/user-groups/configure.html.twig +++ /dev/null @@ -1,9 +0,0 @@ -{% extends 'flex-objects/types/default/configure.html.twig' %} - -{% set back_route = back_route ?? ('/' ~ route.getRoute(1, -1)) %} - -{% block content_top %} - {% include 'flex-objects/layouts/accounts/partials/top.html.twig' %} - - {{ parent() }} -{% endblock %} diff --git a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/user-groups/list.html.twig b/source/user/plugins/flex-objects/admin/templates/flex-objects/types/user-groups/list.html.twig deleted file mode 100644 index 0cefbb8..0000000 --- a/source/user/plugins/flex-objects/admin/templates/flex-objects/types/user-groups/list.html.twig +++ /dev/null @@ -1,7 +0,0 @@ -{% extends 'flex-objects/types/default/list.html.twig' %} - -{% block content_top %} - {% include 'flex-objects/layouts/accounts/partials/top.html.twig' %} - - {{ parent() }} -{% endblock %} diff --git a/source/user/plugins/flex-objects/admin/templates/forms/fields/flex-objects/flex-objects.html.twig b/source/user/plugins/flex-objects/admin/templates/forms/fields/flex-objects/flex-objects.html.twig deleted file mode 100644 index 92db6dc..0000000 --- a/source/user/plugins/flex-objects/admin/templates/forms/fields/flex-objects/flex-objects.html.twig +++ /dev/null @@ -1,69 +0,0 @@ -{% extends "forms/field.html.twig" %} - -{% macro spanToggle(input, length) %} - {% set space = repeat('  ', (length - input|length) / 2) %} - {{ (space ~ input ~ space)|raw }} -{% endmacro %} - -{% import _self as macro %} - -{% set value = (value is null ? field.default : value) %} - -{% block global_attributes %} - {{ parent() }} - data-grav-field-name="{{ (scope ~ field.name)|fieldName }}" -{% endblock %} - -{% block input %} - {% set flex = grav['flex_objects'] %} - {% set all = flex.blueprints %} - {% if all|count %} - {% set legacy = flex.getLegacyBlueprintMap() %} - {% for label, directory in all %} - {% set url = directory.blueprintFile %} - {% set found = url in value %} - {% if not found and legacy[url] is defined %} - {% set found = legacy[url] in value %} - {% endif %} - -
-
- {% set maxLen = 0 %} - {% for text in ['PLUGIN_ADMIN.ENABLED', 'PLUGIN_ADMIN.DISABLED'] %} - {% set translation = grav.twig.twig.filters['tu'] is defined ? text|tu : text|t %} - {% set maxLen = max(translation|length, maxLen) %} - {% endfor %} - - {% set id = "toggle_" ~ field.name ~ '_' ~ label %} - - - {% set text = 'PLUGIN_ADMIN.ENABLED' %} - {% set translation = (grav.twig.twig.filters['tu'] is defined ? text|tu : text|t)|trim %} - - - {% set text = 'PLUGIN_ADMIN.DISABLED' %} - {% set translation = (grav.twig.twig.filters['tu'] is defined ? text|tu : text|t)|trim %} - -
- {{ directory.title }} -
- {% endfor %} - {% else %} -
{{ 'PLUGIN_FLEX_OBJECTS.ERROR.NO_FLEX_DIRECTORIES'|tu }}
- {% endif %} -{% endblock %} \ No newline at end of file diff --git a/source/user/plugins/flex-objects/admin/templates/forms/fields/save-redirect/save-redirect.html.twig b/source/user/plugins/flex-objects/admin/templates/forms/fields/save-redirect/save-redirect.html.twig deleted file mode 100644 index 2541a3f..0000000 --- a/source/user/plugins/flex-objects/admin/templates/forms/fields/save-redirect/save-redirect.html.twig +++ /dev/null @@ -1,37 +0,0 @@ -{% extends "forms/field.html.twig" %} - -{% set originalValue = value %} -{% set value = (value is null ? field.default : value) %} -{% set isNew = key ? false : true %} -{% set savedOption = grav.session.post_entries_save|default('create-new') %} - -{% if isNew %} - {% set options = {'create-new':'PLUGIN_FLEX_OBJECTS.ACTION.CREATE_NEW', 'edit':'PLUGIN_FLEX_OBJECTS.ACTION.EDIT_ITEM', 'list':'PLUGIN_FLEX_OBJECTS.ACTION.LIST_ITEMS'} %} -{% else %} - {% set options = {'edit':'PLUGIN_FLEX_OBJECTS.ACTION.EDIT_ITEM', 'list':'PLUGIN_FLEX_OBJECTS.ACTION.LIST_ITEMS'} %} -{% endif %} - -{% block input %} - {% set savedOption = not isNew and savedOption == 'create-new' ? 'edit' : savedOption %} - {% for key, text in options %} - {% set id = field.id|default(field.name) ~ '-' ~ key %} - - {% if savedOption == key %} - {% set value = savedOption %} - {% endif %} - - - - - - - - {% endfor %} -{% endblock %} \ No newline at end of file diff --git a/source/user/plugins/flex-objects/app/columns/finder.js b/source/user/plugins/flex-objects/app/columns/finder.js deleted file mode 100644 index ac623b2..0000000 --- a/source/user/plugins/flex-objects/app/columns/finder.js +++ /dev/null @@ -1,425 +0,0 @@ -import $ from 'jquery'; -import Finder from '../utils/finder'; -import { getInitialRoute, getStore, setInitialRoute } from './index'; -// import getFilters from '../utils/get-filters'; - -let XHRUUID = 0; -const GRAV_CONFIG = typeof global.GravConfig !== 'undefined' ? global.GravConfig : global.GravAdmin.config; - -export const Instances = {}; - -const isInViewport = (elem) => { - const bounding = elem.getBoundingClientRect(); - const titlebar = document.querySelector('#titlebar'); - const offset = titlebar ? titlebar.getBoundingClientRect().height : 0; - return ( - bounding.top >= offset && - bounding.left >= 0 && - bounding.bottom <= (window.innerHeight || document.documentElement.clientHeight) && - bounding.right <= (window.innerWidth || document.documentElement.clientWidth) - ); -}; - -export class FlexPages { - constructor(container, data) { - this.container = $(container); - this.data = data; - const dataLoad = this.dataLoad; - - this.finder = new Finder( - this.container, - (parent, callback) => { - return dataLoad.call(this, parent, callback); - }, - { - labelKey: 'title', - defaultPath: getInitialRoute(), - itemTrigger: '[data-flexpages-expand]', - createItem: function(item) { - return FlexPages.createItem(this.config, item, this); - }, - createItemContent: function(item) { - return FlexPages.createItemContent(this.config, item, this); - } - } - ); - - this.finder.$emitter.on('leaf-selected', (item) => { - setInitialRoute({ - route: item.route.raw - }); - }); - - this.finder.$emitter.on('interior-selected', (item) => { - setInitialRoute({ - route: item.route.raw - }); - }); - - /* - this.finder.$emitter.on('leaf-selected', (item) => { - console.log('selected', item); - this.finder.emit('create-column', () => this.createSimpleColumn(item)); - }); - - this.finder.$emitter.on('item-selected', (selected) => { - console.log('selected', selected); - // for future use only - create column-card creation for file with details like in macOS finder - // this.finder.$emitter('create-column', () => this.createSimpleColumn(selected)); - }); */ - - this.finder.$emitter.on('column-created', () => { - this.container[0].scrollLeft = this.container[0].scrollWidth - this.container[0].clientWidth; - }); - } - - static createItem(config, item, finder) { - const listItem = $('
  • '); - const listItemClasses = [config.className.item]; - // const href = `${GRAV_CONFIG.current_url}/${item.route.raw}`.replace('//', '/'); - const link = $('
    '); - const createItemContent = config.createItemContent || finder.createItemContent; - const fragment = createItemContent.call(this, item); - link.append(fragment) - // .attr('href', href) - .attr('tabindex', -1); - - if (item.url) { - link.attr('href', item.url); - listItemClasses.push(item.className); - } - - if (item[config.childKey]) { - listItemClasses.push(config.className[config.childKey]); - } - - if (item.filters_hit) { - listItemClasses.push('filters-hit'); - } - - listItem.addClass(listItemClasses.join(' ')); - listItem.append(link) - .attr('data-fjs-item', item[config.itemKey]); - - listItem[0]._item = item; - - return listItem; - } - - static createItemContent(config, item) { - const frag = document.createDocumentFragment(); - const route = `${GRAV_CONFIG.current_url}/${item.route.raw}`.replace('//', '/'); - const title = $('
    '); - const link = $(``); - const icon = $(``); - - if (item.extras && item.extras.lang) { - let status = ''; - if (item.extras.translated) { - status = 'translated'; - } - - if (item.extras.lang === 'n/a') { - status = 'not-available'; - } - - const lang = $(`${item.extras.lang}`); - lang.appendTo(icon); - } - - if (item.extras && item.extras && (item.extras.published_date || item.extras.unpublished_date)) { - const clock = $(''); - clock.appendTo(icon); - } - - const info = $(`${item.title} ${item.route.display}`); - const actions = $(''); - - let dotdotdot = null; - if (item.extras) { - const LANG_URL = $('[data-lang-url]').data('langUrl'); - dotdotdot = $('
    '); - dotdotdot.on('click', (event) => { - if (!dotdotdot.find('.dropdown-menu').length) { - let tags = ''; - let langs = ''; - - item.extras.tags.forEach((tag) => { - tags += `${tag}`; - }); - - const translations = item.extras.langs || {}; - Object.keys(translations).forEach((lang) => { - const translated = translations[lang]; - langs += `
    ${lang ? lang : 'default'}`; - }); - - const canPreview = item.extras.actions.includes('preview') && (!(item.extras.tags.includes('non-routable') || item.extras.tags.includes('unpublished'))); - const canEdit = item.extras.actions.includes('edit'); - const canCopy = item.extras.actions.includes('copy'); - const canMove = false; // item.extras.actions.includes('move'); - const canDelete = item.extras.actions.includes('delete'); - const ul = $(``); - ul.appendTo(dotdotdot); - } - - return true; - }); - } - - if (item.child_count) { - const button = $(' - -
    -
    diff --git a/source/vendor/filp/whoops/src/Whoops/Resources/views/header_outer.html.php b/source/vendor/filp/whoops/src/Whoops/Resources/views/header_outer.html.php deleted file mode 100644 index f682cbb..0000000 --- a/source/vendor/filp/whoops/src/Whoops/Resources/views/header_outer.html.php +++ /dev/null @@ -1,3 +0,0 @@ -
    - render($header) ?> -
    diff --git a/source/vendor/filp/whoops/src/Whoops/Resources/views/layout.html.php b/source/vendor/filp/whoops/src/Whoops/Resources/views/layout.html.php deleted file mode 100644 index 7ad15ea..0000000 --- a/source/vendor/filp/whoops/src/Whoops/Resources/views/layout.html.php +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - <?php echo $tpl->escape($page_title) ?> - - - - - - -
    -
    - - render($panel_left_outer) ?> - - render($panel_details_outer) ?> - -
    -
    - - - - - - - diff --git a/source/vendor/filp/whoops/src/Whoops/Resources/views/panel_details.html.php b/source/vendor/filp/whoops/src/Whoops/Resources/views/panel_details.html.php deleted file mode 100644 index a85e451..0000000 --- a/source/vendor/filp/whoops/src/Whoops/Resources/views/panel_details.html.php +++ /dev/null @@ -1,2 +0,0 @@ -render($frame_code) ?> -render($env_details) ?> \ No newline at end of file diff --git a/source/vendor/filp/whoops/src/Whoops/Resources/views/panel_details_outer.html.php b/source/vendor/filp/whoops/src/Whoops/Resources/views/panel_details_outer.html.php deleted file mode 100644 index 8162d8c..0000000 --- a/source/vendor/filp/whoops/src/Whoops/Resources/views/panel_details_outer.html.php +++ /dev/null @@ -1,3 +0,0 @@ -
    - render($panel_details) ?> -
    \ No newline at end of file diff --git a/source/vendor/filp/whoops/src/Whoops/Resources/views/panel_left.html.php b/source/vendor/filp/whoops/src/Whoops/Resources/views/panel_left.html.php deleted file mode 100644 index 7e652e4..0000000 --- a/source/vendor/filp/whoops/src/Whoops/Resources/views/panel_left.html.php +++ /dev/null @@ -1,4 +0,0 @@ -render($header_outer); -$tpl->render($frames_description); -$tpl->render($frames_container); diff --git a/source/vendor/filp/whoops/src/Whoops/Resources/views/panel_left_outer.html.php b/source/vendor/filp/whoops/src/Whoops/Resources/views/panel_left_outer.html.php deleted file mode 100644 index 77b575c..0000000 --- a/source/vendor/filp/whoops/src/Whoops/Resources/views/panel_left_outer.html.php +++ /dev/null @@ -1,3 +0,0 @@ -
    - render($panel_left) ?> -
    \ No newline at end of file diff --git a/source/vendor/filp/whoops/src/Whoops/Run.php b/source/vendor/filp/whoops/src/Whoops/Run.php deleted file mode 100644 index 52486d0..0000000 --- a/source/vendor/filp/whoops/src/Whoops/Run.php +++ /dev/null @@ -1,545 +0,0 @@ - - */ - -namespace Whoops; - -use InvalidArgumentException; -use Throwable; -use Whoops\Exception\ErrorException; -use Whoops\Exception\Inspector; -use Whoops\Handler\CallbackHandler; -use Whoops\Handler\Handler; -use Whoops\Handler\HandlerInterface; -use Whoops\Util\Misc; -use Whoops\Util\SystemFacade; - -final class Run implements RunInterface -{ - /** - * @var bool - */ - private $isRegistered; - - /** - * @var bool - */ - private $allowQuit = true; - - /** - * @var bool - */ - private $sendOutput = true; - - /** - * @var integer|false - */ - private $sendHttpCode = 500; - - /** - * @var integer|false - */ - private $sendExitCode = 1; - - /** - * @var HandlerInterface[] - */ - private $handlerStack = []; - - /** - * @var array - * @psalm-var list - */ - private $silencedPatterns = []; - - /** - * @var SystemFacade - */ - private $system; - - /** - * In certain scenarios, like in shutdown handler, we can not throw exceptions. - * - * @var bool - */ - private $canThrowExceptions = true; - - public function __construct(SystemFacade $system = null) - { - $this->system = $system ?: new SystemFacade; - } - - /** - * Explicitly request your handler runs as the last of all currently registered handlers. - * - * @param callable|HandlerInterface $handler - * - * @return Run - */ - public function appendHandler($handler) - { - array_unshift($this->handlerStack, $this->resolveHandler($handler)); - return $this; - } - - /** - * Explicitly request your handler runs as the first of all currently registered handlers. - * - * @param callable|HandlerInterface $handler - * - * @return Run - */ - public function prependHandler($handler) - { - return $this->pushHandler($handler); - } - - /** - * Register your handler as the last of all currently registered handlers (to be executed first). - * Prefer using appendHandler and prependHandler for clarity. - * - * @param callable|HandlerInterface $handler - * - * @return Run - * - * @throws InvalidArgumentException If argument is not callable or instance of HandlerInterface. - */ - public function pushHandler($handler) - { - $this->handlerStack[] = $this->resolveHandler($handler); - return $this; - } - - /** - * Removes and returns the last handler pushed to the handler stack. - * - * @see Run::removeFirstHandler(), Run::removeLastHandler() - * - * @return HandlerInterface|null - */ - public function popHandler() - { - return array_pop($this->handlerStack); - } - - /** - * Removes the first handler. - * - * @return void - */ - public function removeFirstHandler() - { - array_pop($this->handlerStack); - } - - /** - * Removes the last handler. - * - * @return void - */ - public function removeLastHandler() - { - array_shift($this->handlerStack); - } - - /** - * Returns an array with all handlers, in the order they were added to the stack. - * - * @return array - */ - public function getHandlers() - { - return $this->handlerStack; - } - - /** - * Clears all handlers in the handlerStack, including the default PrettyPage handler. - * - * @return Run - */ - public function clearHandlers() - { - $this->handlerStack = []; - return $this; - } - - /** - * Registers this instance as an error handler. - * - * @return Run - */ - public function register() - { - if (!$this->isRegistered) { - // Workaround PHP bug 42098 - // https://bugs.php.net/bug.php?id=42098 - class_exists("\\Whoops\\Exception\\ErrorException"); - class_exists("\\Whoops\\Exception\\FrameCollection"); - class_exists("\\Whoops\\Exception\\Frame"); - class_exists("\\Whoops\\Exception\\Inspector"); - - $this->system->setErrorHandler([$this, self::ERROR_HANDLER]); - $this->system->setExceptionHandler([$this, self::EXCEPTION_HANDLER]); - $this->system->registerShutdownFunction([$this, self::SHUTDOWN_HANDLER]); - - $this->isRegistered = true; - } - - return $this; - } - - /** - * Unregisters all handlers registered by this Whoops\Run instance. - * - * @return Run - */ - public function unregister() - { - if ($this->isRegistered) { - $this->system->restoreExceptionHandler(); - $this->system->restoreErrorHandler(); - - $this->isRegistered = false; - } - - return $this; - } - - /** - * Should Whoops allow Handlers to force the script to quit? - * - * @param bool|int $exit - * - * @return bool - */ - public function allowQuit($exit = null) - { - if (func_num_args() == 0) { - return $this->allowQuit; - } - - return $this->allowQuit = (bool) $exit; - } - - /** - * Silence particular errors in particular files. - * - * @param array|string $patterns List or a single regex pattern to match. - * @param int $levels Defaults to E_STRICT | E_DEPRECATED. - * - * @return Run - */ - public function silenceErrorsInPaths($patterns, $levels = 10240) - { - $this->silencedPatterns = array_merge( - $this->silencedPatterns, - array_map( - function ($pattern) use ($levels) { - return [ - "pattern" => $pattern, - "levels" => $levels, - ]; - }, - (array) $patterns - ) - ); - - return $this; - } - - /** - * Returns an array with silent errors in path configuration. - * - * @return array - */ - public function getSilenceErrorsInPaths() - { - return $this->silencedPatterns; - } - - /** - * Should Whoops send HTTP error code to the browser if possible? - * Whoops will by default send HTTP code 500, but you may wish to - * use 502, 503, or another 5xx family code. - * - * @param bool|int $code - * - * @return int|false - * - * @throws InvalidArgumentException - */ - public function sendHttpCode($code = null) - { - if (func_num_args() == 0) { - return $this->sendHttpCode; - } - - if (!$code) { - return $this->sendHttpCode = false; - } - - if ($code === true) { - $code = 500; - } - - if ($code < 400 || 600 <= $code) { - throw new InvalidArgumentException( - "Invalid status code '$code', must be 4xx or 5xx" - ); - } - - return $this->sendHttpCode = $code; - } - - /** - * Should Whoops exit with a specific code on the CLI if possible? - * Whoops will exit with 1 by default, but you can specify something else. - * - * @param int $code - * - * @return int - * - * @throws InvalidArgumentException - */ - public function sendExitCode($code = null) - { - if (func_num_args() == 0) { - return $this->sendExitCode; - } - - if ($code < 0 || 255 <= $code) { - throw new InvalidArgumentException( - "Invalid status code '$code', must be between 0 and 254" - ); - } - - return $this->sendExitCode = (int) $code; - } - - /** - * Should Whoops push output directly to the client? - * If this is false, output will be returned by handleException. - * - * @param bool|int $send - * - * @return bool - */ - public function writeToOutput($send = null) - { - if (func_num_args() == 0) { - return $this->sendOutput; - } - - return $this->sendOutput = (bool) $send; - } - - /** - * Handles an exception, ultimately generating a Whoops error page. - * - * @param Throwable $exception - * - * @return string Output generated by handlers. - */ - public function handleException($exception) - { - // Walk the registered handlers in the reverse order - // they were registered, and pass off the exception - $inspector = $this->getInspector($exception); - - // Capture output produced while handling the exception, - // we might want to send it straight away to the client, - // or return it silently. - $this->system->startOutputBuffering(); - - // Just in case there are no handlers: - $handlerResponse = null; - $handlerContentType = null; - - try { - foreach (array_reverse($this->handlerStack) as $handler) { - $handler->setRun($this); - $handler->setInspector($inspector); - $handler->setException($exception); - - // The HandlerInterface does not require an Exception passed to handle() - // and neither of our bundled handlers use it. - // However, 3rd party handlers may have already relied on this parameter, - // and removing it would be possibly breaking for users. - $handlerResponse = $handler->handle($exception); - - // Collect the content type for possible sending in the headers. - $handlerContentType = method_exists($handler, 'contentType') ? $handler->contentType() : null; - - if (in_array($handlerResponse, [Handler::LAST_HANDLER, Handler::QUIT])) { - // The Handler has handled the exception in some way, and - // wishes to quit execution (Handler::QUIT), or skip any - // other handlers (Handler::LAST_HANDLER). If $this->allowQuit - // is false, Handler::QUIT behaves like Handler::LAST_HANDLER - break; - } - } - - $willQuit = $handlerResponse == Handler::QUIT && $this->allowQuit(); - } finally { - $output = $this->system->cleanOutputBuffer(); - } - - // If we're allowed to, send output generated by handlers directly - // to the output, otherwise, and if the script doesn't quit, return - // it so that it may be used by the caller - if ($this->writeToOutput()) { - // @todo Might be able to clean this up a bit better - if ($willQuit) { - // Cleanup all other output buffers before sending our output: - while ($this->system->getOutputBufferLevel() > 0) { - $this->system->endOutputBuffering(); - } - - // Send any headers if needed: - if (Misc::canSendHeaders() && $handlerContentType) { - header("Content-Type: {$handlerContentType}"); - } - } - - $this->writeToOutputNow($output); - } - - if ($willQuit) { - // HHVM fix for https://github.com/facebook/hhvm/issues/4055 - $this->system->flushOutputBuffer(); - - $this->system->stopExecution( - $this->sendExitCode() - ); - } - - return $output; - } - - /** - * Converts generic PHP errors to \ErrorException instances, before passing them off to be handled. - * - * This method MUST be compatible with set_error_handler. - * - * @param int $level - * @param string $message - * @param string|null $file - * @param int|null $line - * - * @return bool - * - * @throws ErrorException - */ - public function handleError($level, $message, $file = null, $line = null) - { - if ($level & $this->system->getErrorReportingLevel()) { - foreach ($this->silencedPatterns as $entry) { - $pathMatches = (bool) preg_match($entry["pattern"], $file); - $levelMatches = $level & $entry["levels"]; - if ($pathMatches && $levelMatches) { - // Ignore the error, abort handling - // See https://github.com/filp/whoops/issues/418 - return true; - } - } - - // XXX we pass $level for the "code" param only for BC reasons. - // see https://github.com/filp/whoops/issues/267 - $exception = new ErrorException($message, /*code*/ $level, /*severity*/ $level, $file, $line); - if ($this->canThrowExceptions) { - throw $exception; - } else { - $this->handleException($exception); - } - // Do not propagate errors which were already handled by Whoops. - return true; - } - - // Propagate error to the next handler, allows error_get_last() to - // work on silenced errors. - return false; - } - - /** - * Special case to deal with Fatal errors and the like. - * - * @return void - */ - public function handleShutdown() - { - // If we reached this step, we are in shutdown handler. - // An exception thrown in a shutdown handler will not be propagated - // to the exception handler. Pass that information along. - $this->canThrowExceptions = false; - - $error = $this->system->getLastError(); - if ($error && Misc::isLevelFatal($error['type'])) { - // If there was a fatal error, - // it was not handled in handleError yet. - $this->allowQuit = false; - $this->handleError( - $error['type'], - $error['message'], - $error['file'], - $error['line'] - ); - } - } - - /** - * @param Throwable $exception - * - * @return Inspector - */ - private function getInspector($exception) - { - return new Inspector($exception); - } - - /** - * Resolves the giving handler. - * - * @param callable|HandlerInterface $handler - * - * @return HandlerInterface - * - * @throws InvalidArgumentException - */ - private function resolveHandler($handler) - { - if (is_callable($handler)) { - $handler = new CallbackHandler($handler); - } - - if (!$handler instanceof HandlerInterface) { - throw new InvalidArgumentException( - "Handler must be a callable, or instance of " - . "Whoops\\Handler\\HandlerInterface" - ); - } - - return $handler; - } - - /** - * Echo something to the browser. - * - * @param string $output - * - * @return Run - */ - private function writeToOutputNow($output) - { - if ($this->sendHttpCode() && Misc::canSendHeaders()) { - $this->system->setHttpResponseCode( - $this->sendHttpCode() - ); - } - - echo $output; - - return $this; - } -} diff --git a/source/vendor/filp/whoops/src/Whoops/RunInterface.php b/source/vendor/filp/whoops/src/Whoops/RunInterface.php deleted file mode 100644 index 8162fe4..0000000 --- a/source/vendor/filp/whoops/src/Whoops/RunInterface.php +++ /dev/null @@ -1,140 +0,0 @@ - - */ - -namespace Whoops; - -use InvalidArgumentException; -use Whoops\Exception\ErrorException; -use Whoops\Handler\HandlerInterface; - -interface RunInterface -{ - const EXCEPTION_HANDLER = "handleException"; - const ERROR_HANDLER = "handleError"; - const SHUTDOWN_HANDLER = "handleShutdown"; - - /** - * Pushes a handler to the end of the stack - * - * @throws InvalidArgumentException If argument is not callable or instance of HandlerInterface - * @param Callable|HandlerInterface $handler - * @return Run - */ - public function pushHandler($handler); - - /** - * Removes the last handler in the stack and returns it. - * Returns null if there"s nothing else to pop. - * - * @return null|HandlerInterface - */ - public function popHandler(); - - /** - * Returns an array with all handlers, in the - * order they were added to the stack. - * - * @return array - */ - public function getHandlers(); - - /** - * Clears all handlers in the handlerStack, including - * the default PrettyPage handler. - * - * @return Run - */ - public function clearHandlers(); - - /** - * Registers this instance as an error handler. - * - * @return Run - */ - public function register(); - - /** - * Unregisters all handlers registered by this Whoops\Run instance - * - * @return Run - */ - public function unregister(); - - /** - * Should Whoops allow Handlers to force the script to quit? - * - * @param bool|int $exit - * @return bool - */ - public function allowQuit($exit = null); - - /** - * Silence particular errors in particular files - * - * @param array|string $patterns List or a single regex pattern to match - * @param int $levels Defaults to E_STRICT | E_DEPRECATED - * @return \Whoops\Run - */ - public function silenceErrorsInPaths($patterns, $levels = 10240); - - /** - * Should Whoops send HTTP error code to the browser if possible? - * Whoops will by default send HTTP code 500, but you may wish to - * use 502, 503, or another 5xx family code. - * - * @param bool|int $code - * @return int|false - */ - public function sendHttpCode($code = null); - - /** - * Should Whoops exit with a specific code on the CLI if possible? - * Whoops will exit with 1 by default, but you can specify something else. - * - * @param int $code - * @return int - */ - public function sendExitCode($code = null); - - /** - * Should Whoops push output directly to the client? - * If this is false, output will be returned by handleException - * - * @param bool|int $send - * @return bool - */ - public function writeToOutput($send = null); - - /** - * Handles an exception, ultimately generating a Whoops error - * page. - * - * @param \Throwable $exception - * @return string Output generated by handlers - */ - public function handleException($exception); - - /** - * Converts generic PHP errors to \ErrorException - * instances, before passing them off to be handled. - * - * This method MUST be compatible with set_error_handler. - * - * @param int $level - * @param string $message - * @param string $file - * @param int $line - * - * @return bool - * @throws ErrorException - */ - public function handleError($level, $message, $file = null, $line = null); - - /** - * Special case to deal with Fatal errors and the like. - */ - public function handleShutdown(); -} diff --git a/source/vendor/filp/whoops/src/Whoops/Util/HtmlDumperOutput.php b/source/vendor/filp/whoops/src/Whoops/Util/HtmlDumperOutput.php deleted file mode 100644 index 8c828fd..0000000 --- a/source/vendor/filp/whoops/src/Whoops/Util/HtmlDumperOutput.php +++ /dev/null @@ -1,36 +0,0 @@ - - */ - -namespace Whoops\Util; - -/** - * Used as output callable for Symfony\Component\VarDumper\Dumper\HtmlDumper::dump() - * - * @see TemplateHelper::dump() - */ -class HtmlDumperOutput -{ - private $output; - - public function __invoke($line, $depth) - { - // A negative depth means "end of dump" - if ($depth >= 0) { - // Adds a two spaces indentation to the line - $this->output .= str_repeat(' ', $depth) . $line . "\n"; - } - } - - public function getOutput() - { - return $this->output; - } - - public function clear() - { - $this->output = null; - } -} diff --git a/source/vendor/filp/whoops/src/Whoops/Util/Misc.php b/source/vendor/filp/whoops/src/Whoops/Util/Misc.php deleted file mode 100644 index 001a687..0000000 --- a/source/vendor/filp/whoops/src/Whoops/Util/Misc.php +++ /dev/null @@ -1,77 +0,0 @@ - - */ - -namespace Whoops\Util; - -class Misc -{ - /** - * Can we at this point in time send HTTP headers? - * - * Currently this checks if we are even serving an HTTP request, - * as opposed to running from a command line. - * - * If we are serving an HTTP request, we check if it's not too late. - * - * @return bool - */ - public static function canSendHeaders() - { - return isset($_SERVER["REQUEST_URI"]) && !headers_sent(); - } - - public static function isAjaxRequest() - { - return ( - !empty($_SERVER['HTTP_X_REQUESTED_WITH']) - && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest'); - } - - /** - * Check, if possible, that this execution was triggered by a command line. - * @return bool - */ - public static function isCommandLine() - { - return PHP_SAPI == 'cli'; - } - - /** - * Translate ErrorException code into the represented constant. - * - * @param int $error_code - * @return string - */ - public static function translateErrorCode($error_code) - { - $constants = get_defined_constants(true); - if (array_key_exists('Core', $constants)) { - foreach ($constants['Core'] as $constant => $value) { - if (substr($constant, 0, 2) == 'E_' && $value == $error_code) { - return $constant; - } - } - } - return "E_UNKNOWN"; - } - - /** - * Determine if an error level is fatal (halts execution) - * - * @param int $level - * @return bool - */ - public static function isLevelFatal($level) - { - $errors = E_ERROR; - $errors |= E_PARSE; - $errors |= E_CORE_ERROR; - $errors |= E_CORE_WARNING; - $errors |= E_COMPILE_ERROR; - $errors |= E_COMPILE_WARNING; - return ($level & $errors) > 0; - } -} diff --git a/source/vendor/filp/whoops/src/Whoops/Util/SystemFacade.php b/source/vendor/filp/whoops/src/Whoops/Util/SystemFacade.php deleted file mode 100644 index 9eb0acf..0000000 --- a/source/vendor/filp/whoops/src/Whoops/Util/SystemFacade.php +++ /dev/null @@ -1,144 +0,0 @@ - - */ - -namespace Whoops\Util; - -class SystemFacade -{ - /** - * Turns on output buffering. - * - * @return bool - */ - public function startOutputBuffering() - { - return ob_start(); - } - - /** - * @param callable $handler - * @param int $types - * - * @return callable|null - */ - public function setErrorHandler(callable $handler, $types = 'use-php-defaults') - { - // Since PHP 5.4 the constant E_ALL contains all errors (even E_STRICT) - if ($types === 'use-php-defaults') { - $types = E_ALL; - } - return set_error_handler($handler, $types); - } - - /** - * @param callable $handler - * - * @return callable|null - */ - public function setExceptionHandler(callable $handler) - { - return set_exception_handler($handler); - } - - /** - * @return void - */ - public function restoreExceptionHandler() - { - restore_exception_handler(); - } - - /** - * @return void - */ - public function restoreErrorHandler() - { - restore_error_handler(); - } - - /** - * @param callable $function - * - * @return void - */ - public function registerShutdownFunction(callable $function) - { - register_shutdown_function($function); - } - - /** - * @return string|false - */ - public function cleanOutputBuffer() - { - return ob_get_clean(); - } - - /** - * @return int - */ - public function getOutputBufferLevel() - { - return ob_get_level(); - } - - /** - * @return bool - */ - public function endOutputBuffering() - { - return ob_end_clean(); - } - - /** - * @return void - */ - public function flushOutputBuffer() - { - flush(); - } - - /** - * @return int - */ - public function getErrorReportingLevel() - { - return error_reporting(); - } - - /** - * @return array|null - */ - public function getLastError() - { - return error_get_last(); - } - - /** - * @param int $httpCode - * - * @return int - */ - public function setHttpResponseCode($httpCode) - { - if (!headers_sent()) { - // Ensure that no 'location' header is present as otherwise this - // will override the HTTP code being set here, and mask the - // expected error page. - header_remove('location'); - } - - return http_response_code($httpCode); - } - - /** - * @param int $exitStatus - */ - public function stopExecution($exitStatus) - { - exit($exitStatus); - } -} diff --git a/source/vendor/filp/whoops/src/Whoops/Util/TemplateHelper.php b/source/vendor/filp/whoops/src/Whoops/Util/TemplateHelper.php deleted file mode 100644 index 9c7cec2..0000000 --- a/source/vendor/filp/whoops/src/Whoops/Util/TemplateHelper.php +++ /dev/null @@ -1,352 +0,0 @@ - - */ - -namespace Whoops\Util; - -use Symfony\Component\VarDumper\Caster\Caster; -use Symfony\Component\VarDumper\Cloner\AbstractCloner; -use Symfony\Component\VarDumper\Cloner\VarCloner; -use Symfony\Component\VarDumper\Dumper\HtmlDumper; -use Whoops\Exception\Frame; - -/** - * Exposes useful tools for working with/in templates - */ -class TemplateHelper -{ - /** - * An array of variables to be passed to all templates - * @var array - */ - private $variables = []; - - /** - * @var HtmlDumper - */ - private $htmlDumper; - - /** - * @var HtmlDumperOutput - */ - private $htmlDumperOutput; - - /** - * @var AbstractCloner - */ - private $cloner; - - /** - * @var string - */ - private $applicationRootPath; - - public function __construct() - { - // root path for ordinary composer projects - $this->applicationRootPath = dirname(dirname(dirname(dirname(dirname(dirname(__DIR__)))))); - } - - /** - * Escapes a string for output in an HTML document - * - * @param string $raw - * @return string - */ - public function escape($raw) - { - $flags = ENT_QUOTES; - - // HHVM has all constants defined, but only ENT_IGNORE - // works at the moment - if (defined("ENT_SUBSTITUTE") && !defined("HHVM_VERSION")) { - $flags |= ENT_SUBSTITUTE; - } else { - // This is for 5.3. - // The documentation warns of a potential security issue, - // but it seems it does not apply in our case, because - // we do not blacklist anything anywhere. - $flags |= ENT_IGNORE; - } - - $raw = str_replace(chr(9), ' ', $raw); - - return htmlspecialchars($raw, $flags, "UTF-8"); - } - - /** - * Escapes a string for output in an HTML document, but preserves - * URIs within it, and converts them to clickable anchor elements. - * - * @param string $raw - * @return string - */ - public function escapeButPreserveUris($raw) - { - $escaped = $this->escape($raw); - return preg_replace( - "@([A-z]+?://([-\w\.]+[-\w])+(:\d+)?(/([\w/_\.#-]*(\?\S+)?[^\.\s])?)?)@", - "$1", - $escaped - ); - } - - /** - * Makes sure that the given string breaks on the delimiter. - * - * @param string $delimiter - * @param string $s - * @return string - */ - public function breakOnDelimiter($delimiter, $s) - { - $parts = explode($delimiter, $s); - foreach ($parts as &$part) { - $part = '' . $part . ''; - } - - return implode($delimiter, $parts); - } - - /** - * Replace the part of the path that all files have in common. - * - * @param string $path - * @return string - */ - public function shorten($path) - { - if ($this->applicationRootPath != "/") { - $path = str_replace($this->applicationRootPath, '…', $path); - } - - return $path; - } - - private function getDumper() - { - if (!$this->htmlDumper && class_exists('Symfony\Component\VarDumper\Cloner\VarCloner')) { - $this->htmlDumperOutput = new HtmlDumperOutput(); - // re-use the same var-dumper instance, so it won't re-render the global styles/scripts on each dump. - $this->htmlDumper = new HtmlDumper($this->htmlDumperOutput); - - $styles = [ - 'default' => 'color:#FFFFFF; line-height:normal; font:12px "Inconsolata", "Fira Mono", "Source Code Pro", Monaco, Consolas, "Lucida Console", monospace !important; word-wrap: break-word; white-space: pre-wrap; position:relative; z-index:99999; word-break: normal', - 'num' => 'color:#BCD42A', - 'const' => 'color: #4bb1b1;', - 'str' => 'color:#BCD42A', - 'note' => 'color:#ef7c61', - 'ref' => 'color:#A0A0A0', - 'public' => 'color:#FFFFFF', - 'protected' => 'color:#FFFFFF', - 'private' => 'color:#FFFFFF', - 'meta' => 'color:#FFFFFF', - 'key' => 'color:#BCD42A', - 'index' => 'color:#ef7c61', - ]; - $this->htmlDumper->setStyles($styles); - } - - return $this->htmlDumper; - } - - /** - * Format the given value into a human readable string. - * - * @param mixed $value - * @return string - */ - public function dump($value) - { - $dumper = $this->getDumper(); - - if ($dumper) { - // re-use the same DumpOutput instance, so it won't re-render the global styles/scripts on each dump. - // exclude verbose information (e.g. exception stack traces) - if (class_exists('Symfony\Component\VarDumper\Caster\Caster')) { - $cloneVar = $this->getCloner()->cloneVar($value, Caster::EXCLUDE_VERBOSE); - // Symfony VarDumper 2.6 Caster class dont exist. - } else { - $cloneVar = $this->getCloner()->cloneVar($value); - } - - $dumper->dump( - $cloneVar, - $this->htmlDumperOutput - ); - - $output = $this->htmlDumperOutput->getOutput(); - $this->htmlDumperOutput->clear(); - - return $output; - } - - return htmlspecialchars(print_r($value, true)); - } - - /** - * Format the args of the given Frame as a human readable html string - * - * @param Frame $frame - * @return string the rendered html - */ - public function dumpArgs(Frame $frame) - { - // we support frame args only when the optional dumper is available - if (!$this->getDumper()) { - return ''; - } - - $html = ''; - $numFrames = count($frame->getArgs()); - - if ($numFrames > 0) { - $html = '
      '; - foreach ($frame->getArgs() as $j => $frameArg) { - $html .= '
    1. '. $this->dump($frameArg) .'
    2. '; - } - $html .= '
    '; - } - - return $html; - } - - /** - * Convert a string to a slug version of itself - * - * @param string $original - * @return string - */ - public function slug($original) - { - $slug = str_replace(" ", "-", $original); - $slug = preg_replace('/[^\w\d\-\_]/i', '', $slug); - return strtolower($slug); - } - - /** - * Given a template path, render it within its own scope. This - * method also accepts an array of additional variables to be - * passed to the template. - * - * @param string $template - * @param array $additionalVariables - */ - public function render($template, array $additionalVariables = null) - { - $variables = $this->getVariables(); - - // Pass the helper to the template: - $variables["tpl"] = $this; - - if ($additionalVariables !== null) { - $variables = array_replace($variables, $additionalVariables); - } - - call_user_func(function () { - extract(func_get_arg(1)); - require func_get_arg(0); - }, $template, $variables); - } - - /** - * Sets the variables to be passed to all templates rendered - * by this template helper. - * - * @param array $variables - */ - public function setVariables(array $variables) - { - $this->variables = $variables; - } - - /** - * Sets a single template variable, by its name: - * - * @param string $variableName - * @param mixed $variableValue - */ - public function setVariable($variableName, $variableValue) - { - $this->variables[$variableName] = $variableValue; - } - - /** - * Gets a single template variable, by its name, or - * $defaultValue if the variable does not exist - * - * @param string $variableName - * @param mixed $defaultValue - * @return mixed - */ - public function getVariable($variableName, $defaultValue = null) - { - return isset($this->variables[$variableName]) ? - $this->variables[$variableName] : $defaultValue; - } - - /** - * Unsets a single template variable, by its name - * - * @param string $variableName - */ - public function delVariable($variableName) - { - unset($this->variables[$variableName]); - } - - /** - * Returns all variables for this helper - * - * @return array - */ - public function getVariables() - { - return $this->variables; - } - - /** - * Set the cloner used for dumping variables. - * - * @param AbstractCloner $cloner - */ - public function setCloner($cloner) - { - $this->cloner = $cloner; - } - - /** - * Get the cloner used for dumping variables. - * - * @return AbstractCloner - */ - public function getCloner() - { - if (!$this->cloner) { - $this->cloner = new VarCloner(); - } - return $this->cloner; - } - - /** - * Set the application root path. - * - * @param string $applicationRootPath - */ - public function setApplicationRootPath($applicationRootPath) - { - $this->applicationRootPath = $applicationRootPath; - } - - /** - * Return the application root path. - * - * @return string - */ - public function getApplicationRootPath() - { - return $this->applicationRootPath; - } -} diff --git a/source/vendor/getgrav/cache/Gregwar/Cache/Cache.php b/source/vendor/getgrav/cache/Gregwar/Cache/Cache.php deleted file mode 100755 index 556deb2..0000000 --- a/source/vendor/getgrav/cache/Gregwar/Cache/Cache.php +++ /dev/null @@ -1,366 +0,0 @@ - - */ -class Cache implements CacheInterface -{ - /** - * Cache directory - * @var string - */ - protected $cacheDirectory; - - /** - * Use a different directory as actual cache - * @var string|null - */ - protected $actualCacheDirectory; - - /** - * Prefix directories size - * - * For instance, if the file is helloworld.txt and the prefix size is - * 5, the cache file will be: h/e/l/l/o/helloworld.txt - * - * This is useful to avoid reaching a too large number of files into the - * cache system directories - * @var int - */ - protected $prefixSize = 5; - - /** - * Directory mode - * - * Allows setting of the access mode for the directories created. - * @var int - */ - protected $directoryMode = 0755; - - /** - * Constructs the cache system - * - * @param string $cacheDirectory the cache directory - */ - public function __construct($cacheDirectory = 'cache') - { - $this->cacheDirectory = $cacheDirectory; - } - - /** - * Sets the cache directory - * - * @param string $cacheDirectory the cache directory - * @return self - */ - public function setCacheDirectory($cacheDirectory) - { - $this->cacheDirectory = $cacheDirectory; - - return $this; - } - - /** - * Gets the cache directory - * - * @return string the cache directory - */ - public function getCacheDirectory() - { - return $this->cacheDirectory; - } - - /** - * Sets the actual cache directory - * - * @param string|null $actualCacheDirectory the actual cache directory - * @return self - */ - public function setActualCacheDirectory($actualCacheDirectory = null) - { - $this->actualCacheDirectory = $actualCacheDirectory; - - return $this; - } - - /** - * Returns the actual cache directory - */ - public function getActualCacheDirectory() - { - return $this->actualCacheDirectory ?: $this->cacheDirectory; - } - - /** - * Change the prefix size - * - * @param int $prefixSize the size of the prefix directories - * @return self - */ - public function setPrefixSize($prefixSize) - { - $this->prefixSize = $prefixSize; - - return $this; - } - - /** - * Change the directory mode - * - * @param int $directoryMode the directory mode to use - * @return self - */ - public function setDirectoryMode($directoryMode) - { - if (!$directoryMode) { - $directoryMode = 0755; - } - $this->directoryMode = $directoryMode; - - return $this; - } - - /** - * Creates a directory - * - * @param string $directory the target directory - */ - protected function mkdir($directory) - { - if (!is_dir($directory)) { - @mkdir($directory, $this->directoryMode, true); - } - } - - /** - * Gets the cache file name - * - * @param string $filename the name of the cache file - * @param bool $actual get the actual file or the public file - * @param bool $mkdir a boolean to enable/disable the construction of the - * cache file directory - * @return string - */ - public function getCacheFile($filename, $actual = false, $mkdir = false) - { - $path = array(); - - // Getting the length of the filename before the extension - $parts = explode('.', $filename); - $len = strlen($parts[0]); - - for ($i=0; $iprefixSize); $i++) { - $path[] = $filename[$i]; - - } - $path = implode('/', $path); - - if ($mkdir) { - $actualDir = $this->getActualCacheDirectory() . '/' . $path; - $this->mkdir($actualDir); - } - - $path .= '/' . $filename; - - if ($actual) { - return $this->getActualCacheDirectory() . '/' . $path; - } else { - return $this->getCacheDirectory() . '/' . $path; - } - } - - /** - * Checks that the cache conditions are respected - * - * @param string $cacheFile the cache file - * @param array $conditions an array of conditions to check - * @return bool - * @throws \Exception - */ - protected function checkConditions($cacheFile, array $conditions = array()) - { - // Implicit condition: the cache file should exist - if (!file_exists($cacheFile)) { - return false; - } - - foreach ($conditions as $type => $value) { - switch ($type) { - case 'maxage': - case 'max-age': - // Return false if the file is older than $value - $age = time() - filemtime($cacheFile); - if ($age > $value) { - return false; - } - break; - case 'younger-than': - case 'youngerthan': - // Return false if the file is older than the file $value, or the files $value - $check = function($filename) use ($cacheFile) { - return !file_exists($filename) || filemtime($cacheFile) < filemtime($filename); - }; - - if (!is_array($value)) { - if (!$this->isRemote($value) && $check($value)) { - return false; - } - } else { - foreach ($value as $file) { - if (!$this->isRemote($file) && $check($file)) { - return false; - } - } - } - break; - default: - throw new \Exception('Cache condition '.$type.' not supported'); - } - } - - return true; - } - - /** - * Checks if the target filename exists in the cache and if the conditions - * are respected - * - * @param string $filename the filename - * @param array $conditions the conditions to respect - * @return bool - */ - public function exists($filename, array $conditions = array()) - { - $cacheFile = $this->getCacheFile($filename, true); - - return $this->checkConditions($cacheFile, $conditions); - } - - /** - * Alias for exists - * - * @param string $filename the filename - * @param array $conditions the conditions to respect - * @return bool - */ - public function check($filename, array $conditions = array()) - { - return $this->exists($filename, $conditions); - } - - /** - * Write data in the cache - * - * @param string $filename the name of the cache file - * @param string $contents the contents to store - * @return self - */ - public function set($filename, $contents = '') - { - $cacheFile = $this->getCacheFile($filename, true, true); - - file_put_contents($cacheFile, $contents, \LOCK_EX); - - return $this; - } - - /** - * Alias for set() - * - * @param string $filename the name of the cache file - * @param string $contents the contents to store - * @return self - */ - public function write($filename, $contents = '') - { - return $this->set($filename, $contents); - } - - /** - * Get data from the cache - * - * @param string $filename the cache file name - * @param array $conditions - * @return null|string - */ - public function get($filename, array $conditions = array()) - { - if ($this->exists($filename, $conditions)) { - return file_get_contents($this->getCacheFile($filename, true)); - } else { - return null; - } - } - - /** - * Is this URL remote? - * - * @param string $file - * @return bool - */ - protected function isRemote($file) - { - if (preg_match('/^([a-z]+):\/\//', $file, $match)) { - return ($match[1] != 'file'); - } - - return false; - } - - /** - * Get or create the cache entry - * - * @param string $filename the cache file name - * @param array $conditions an array of conditions about expiration - * @param \Closure $function the closure to call if the file does not exist - * @param bool $file returns the cache file or the file contents - * @param bool $actual returns the actual cache file - * @return string - * @throws \InvalidArgumentException - */ - public function getOrCreate($filename, array $conditions, $function, $file = false, $actual = false) - { - if (!is_callable($function)) { - throw new \InvalidArgumentException('The argument $function should be callable'); - } - - $cacheFile = $this->getCacheFile($filename, true, true); - $data = null; - - if (!$this->check($filename, $conditions)) { - if(file_exists($cacheFile)) { - unlink($cacheFile); - } - - $data = call_user_func($function, $cacheFile); - - // Test if the closure wrote the file or if it returned the data - if (!file_exists($cacheFile)) { - $this->set($filename, $data); - } else { - $data = file_get_contents($cacheFile); - } - } - - return $file ? $this->getCacheFile($filename, $actual) : file_get_contents($cacheFile); - } - - /** - * Alias to getOrCreate with $file = true - * - * @param string $filename the cache file name - * @param array $conditions an array of conditions about expiration - * @param \Closure $function the closure to call if the file does not exist - * @param bool $actual returns the actual cache file - * @return string - * @throws \InvalidArgumentException - */ - public function getOrCreateFile($filename, array $conditions, $function, $actual = false) - { - return $this->getOrCreate($filename, $conditions, $function, true, $actual); - } -} diff --git a/source/vendor/getgrav/cache/Gregwar/Cache/CacheInterface.php b/source/vendor/getgrav/cache/Gregwar/Cache/CacheInterface.php deleted file mode 100644 index 009b7ba..0000000 --- a/source/vendor/getgrav/cache/Gregwar/Cache/CacheInterface.php +++ /dev/null @@ -1,131 +0,0 @@ - - */ -class GarbageCollect -{ - /** - * Drops old files of a directory - * - * @param string $directory the name of the target directory - * @param int $days the number of days to consider a file old - * @param bool $verbose enable verbose output - * - * @return bool true if all the files/directories of a directory was wiped - */ - public static function dropOldFiles($directory, $days = 30, $verbose = false) - { - $allDropped = true; - $now = time(); - - $dir = opendir($directory); - - if (!$dir) { - if ($verbose) { - echo "! Unable to open $directory\n"; - } - - return false; - } - - while ($file = readdir($dir)) { - if ($file == '.' || $file == '..') { - continue; - } - - $fullName = $directory.'/'.$file; - - $old = $now-filemtime($fullName); - - if (is_dir($fullName)) { - // Directories are recursively crawled - if (static::dropOldFiles($fullName, $days, $verbose)) { - self::drop($fullName, $verbose); - } else { - $allDropped = false; - } - } else { - if ($old > (24*60*60*$days)) { - self::drop($fullName, $verbose); - } else { - $allDropped = false; - } - } - } - - closedir($dir); - - return $allDropped; - } - - /** - * Drops a file or an empty directory - * - * @param string $file the file to be removed - * @param bool $verbose the verbosity - */ - public static function drop($file, $verbose = false) - { - if (is_dir($file)) { - @rmdir($file); - } else { - @unlink($file); - } - - if ($verbose) { - echo "> Dropping $file...\n"; - } - } - -} diff --git a/source/vendor/getgrav/cache/Gregwar/Cache/LICENSE b/source/vendor/getgrav/cache/Gregwar/Cache/LICENSE deleted file mode 100644 index 3f32e05..0000000 --- a/source/vendor/getgrav/cache/Gregwar/Cache/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) <2013> Grégoire Passault - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/source/vendor/getgrav/cache/Gregwar/Cache/README.md b/source/vendor/getgrav/cache/Gregwar/Cache/README.md deleted file mode 100644 index ab66801..0000000 --- a/source/vendor/getgrav/cache/Gregwar/Cache/README.md +++ /dev/null @@ -1,166 +0,0 @@ -Cache -===== - -![Build status](https://travis-ci.org/Gregwar/Cache.svg?branch=master) -[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YUXRLWHQSWS6L) - -This is a lightweight cache system based on file and directories. - -Usage -===== - -Step 1: Install it ------------------- - -Via composer: - -```json -{ - "require": { - "gregwar/cache": "1.0.*" - } -} -``` - -Or with a clone of the repository: - -```bash -git clone https://github.com/Gregwar/Cache.git -``` - -Or downloading it: - -* [Download .zip](https://github.com/Gregwar/Cache/archive/master.zip) -* [Download .tar.gz](https://github.com/Gregwar/Cache/archive/master.tar.gz) - -Step 2: Setup the rights ------------------------- - -You need your PHP script to have access to the cache directory, you can for instance -create a `cache` directory (be sure the web server can write it): - -``` -mkdir cache -``` - -Step 3: Access the cache ------------------------- - -To access the cache, you can do like this: - -```php -setCacheDirectory('cache'); // This is the default - -// If the cache exists, this will return it, else, the closure will be called -// to create this image -$data = $cache->getOrCreate('red-square.png', array(), function($filename) { - $i = imagecreatetruecolor(100, 100); - imagefill($i, 0, 0, 0xff0000); - imagepng($i, $filename); -}); - -header('Content-type: image/png'); -echo $data; -``` - -This will render a red square. If the cache file (which will look like `cache/r/e/d/-/s/red-square.png') -exists, it will be read, else, the closure will be called in order to create the cache file. - -API -=== - -You can use the following methods: - -* `setCacheDirectory($directory)`: sets the cache directory (see below). -* `setActualCacheDirectory($directory)`: sets the actual cache directory (see below). -* `exists($filename, $conditions = array())`: check that the $filename file exists in the cache, checking - the conditions (see below). -* `check($filename, $conditions = array())`: alias for `exists`. -* `getCacheFile($filename, $actual = false, $mkdir = false)`: gets the cache file. If the `$actual` flag - is true, the actual cache file name will be returned (see below), if the `$mkdir` flag is true, the - cache file directories tree will be created. -* `set($filename, $contents)`: write contents to `$filename` cache file. -* `write($filename, $contents)`: alias for `set()` -* `get($filename, $conditions = array())`: if the cache file for `$filename` exists, contents will be - returned, else, `NULL` will be returned. -* `setPrefixSize($prefixSize)`: sets the prefix size for directories, default is 5. For instance, the - cache file for `helloworld.txt`, will be `'h/e/l/l/o/helloworld.txt`. -* `setDirectoryMode($directoryMode)`: sets the directory mode when creating directories, default is `0755`. - Does not affect any directories previously created. -* `getOrCreate($filename, $conditions = array(), $function, $file = false)`: this will check if the `$filename` - cache file exists and verifies `$conditions` (see below). If the cache file is OK, it will return its - contents. Else, it will call the `$function`, passing it the target file, this function can write the - file given in parameter or just return data. Then, cache data will be returned. If `$file` flag is set, - the cache file name will be returned instead of file data. - -Note: consider using an hash for the `$filename` cache file, to avoid special characters. - -Conditions -========== - -You can use conditions to manage file expirations on the cache, there is two way of expiring: - -* Using `max-age`, in seconds, to set the maximum age of the file -* Using `younger-than`, by passing another file, this will compare the modification date - and regenerate the cache if the given file is younger. - -For instance, if you want to uppercase a file: - -```php -getOrCreate('uppercase.txt', - array( - 'younger-than' => 'original.txt' - ), - function() { - echo "Generating file...\n"; - return strtoupper(file_get_contents('original.txt')); -}); - -echo $data; -``` - -This will be create the `uppercase.txt` cache file by uppercasing the `original.txt` if the cache file -does not exists or if the `original.txt` file is more recent than the cache file. - -For instance: - -``` -php uppercase.php # Will generate the cache file -php uppercase.php # Will not generate the cache file -touch original.txt # Sets the last modification time to now -php uppercase.php # Will re-generate the cache file -``` - -Cache directory and actual cache directory -========================================== - -In some cases, you'll want to get the cache file name. For instance, if you're caching -images, you'll want to give a string like `cache/s/o/m/e/i/someimage.png` to put it into -an `` tag. This can be done by passing the `$file` argument to the `getOrCreate` to true, -or directly using `getCacheFile` method (see above). - -However, the visible `cache` directory of your users is not the same as the absolute path -you want to access. To do that, you can set both the cache directory and the actual cache directory. - -The cache directory is the prefix visible by the users (for instance: `cache/s/o/m/e/i/someimage.png`), -and the actual cache directory is the prefix to use to actually access to the image (for instance: -`/var/www/somesite/cache/s/o/m/e/i/someimage.png`). This way, the file will be accessed using absolute -path and the cache file returned will directly be usable for your user's browsers. - -License -======= - -This repository is under the MIT license, have a look at the `LICENCE` file. diff --git a/source/vendor/getgrav/cache/Gregwar/Cache/autoload.php b/source/vendor/getgrav/cache/Gregwar/Cache/autoload.php deleted file mode 100644 index b299c88..0000000 --- a/source/vendor/getgrav/cache/Gregwar/Cache/autoload.php +++ /dev/null @@ -1,16 +0,0 @@ -=5.3" - }, - "autoload": { - "psr-0": { - "Gregwar\\Cache": "" - } - } -} diff --git a/source/vendor/getgrav/cache/Gregwar/Cache/demo/garbage.php b/source/vendor/getgrav/cache/Gregwar/Cache/demo/garbage.php deleted file mode 100644 index 074dc5b..0000000 --- a/source/vendor/getgrav/cache/Gregwar/Cache/demo/garbage.php +++ /dev/null @@ -1,14 +0,0 @@ -getOrCreate('uppercase.txt', array('max-age' => 2), function() { - echo "First call: generating file...\n"; - return strtoupper(file_get_contents('original.txt')); -}); - -$data = $cache->getOrCreate('uppercase.txt', array('max-age' => 2), function() { - echo "Second call: generating file, this should not happen!...\n"; - return strtoupper(file_get_contents('original.txt')); -}); - -echo "Waiting 4s...\n"; -sleep(4); - -$data = $cache->getOrCreate('uppercase.txt', array('max-age' => 2), function() { - echo "Third call: generating cache file, because it expired...\n"; - return strtoupper(file_get_contents('original.txt')); -}); diff --git a/source/vendor/getgrav/cache/Gregwar/Cache/demo/original.txt b/source/vendor/getgrav/cache/Gregwar/Cache/demo/original.txt deleted file mode 100644 index 43cc478..0000000 --- a/source/vendor/getgrav/cache/Gregwar/Cache/demo/original.txt +++ /dev/null @@ -1,4 +0,0 @@ -There he goes. -One of God's own prototypes. -A high-powered mutant of some kind never even considered for mass production. -Too weird to live, and too rare to die. diff --git a/source/vendor/getgrav/cache/Gregwar/Cache/demo/red-file.php b/source/vendor/getgrav/cache/Gregwar/Cache/demo/red-file.php deleted file mode 100644 index 53654bd..0000000 --- a/source/vendor/getgrav/cache/Gregwar/Cache/demo/red-file.php +++ /dev/null @@ -1,20 +0,0 @@ -setCacheDirectory('cache'); // This is the default - -// If the cache exists, this will return it, else, the closure will be called -// to create this image -$file = $cache->getOrCreateFile('red-square.png', array(), function($filename) { - $i = imagecreatetruecolor(100, 100); - imagefill($i, 0, 0, 0xff0000); - file_put_contents($filename, 'abc'); - imagepng($i, 'a.png'); - imagepng($i, $filename); -}); - -echo $file, "\n"; diff --git a/source/vendor/getgrav/cache/Gregwar/Cache/demo/red.php b/source/vendor/getgrav/cache/Gregwar/Cache/demo/red.php deleted file mode 100644 index 2afafb9..0000000 --- a/source/vendor/getgrav/cache/Gregwar/Cache/demo/red.php +++ /dev/null @@ -1,20 +0,0 @@ -setCacheDirectory('cache'); // This is the default - -// If the cache exists, this will return it, else, the closure will be called -// to create this image -$data = $cache->getOrCreate('red-square.png', array(), function($filename) { - $i = imagecreatetruecolor(100, 100); - imagefill($i, 0, 0, 0xff0000); - file_put_contents($filename, 'abc'); - imagepng($i, $filename); -}); - -header('Content-type: image/png'); -echo $data; diff --git a/source/vendor/getgrav/cache/Gregwar/Cache/demo/uppercase.php b/source/vendor/getgrav/cache/Gregwar/Cache/demo/uppercase.php deleted file mode 100644 index 656a3b7..0000000 --- a/source/vendor/getgrav/cache/Gregwar/Cache/demo/uppercase.php +++ /dev/null @@ -1,14 +0,0 @@ -getOrCreate('uppercase.txt', array('younger-than' => 'original.txt'), function() { - echo "Generating file...\n"; - return strtoupper(file_get_contents('original.txt')); -}); - -echo $data; diff --git a/source/vendor/getgrav/cache/Gregwar/Cache/phpunit.xml b/source/vendor/getgrav/cache/Gregwar/Cache/phpunit.xml deleted file mode 100644 index 0fe7b80..0000000 --- a/source/vendor/getgrav/cache/Gregwar/Cache/phpunit.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - ./tests/CacheTests.php - - - - diff --git a/source/vendor/getgrav/cache/Gregwar/Cache/tests/CacheTests.php b/source/vendor/getgrav/cache/Gregwar/Cache/tests/CacheTests.php deleted file mode 100644 index c42529b..0000000 --- a/source/vendor/getgrav/cache/Gregwar/Cache/tests/CacheTests.php +++ /dev/null @@ -1,208 +0,0 @@ -getCache(); - $this->assertInstanceOf('Gregwar\Cache\CacheInterface', $cache); - } - - /** - * Testing that file names are good - */ - public function testFileName() - { - $cache = $this->getCache(); - - $cacheDir = $this->getCacheDirectory(); - $actualCacheDir = $this->getActualCacheDirectory(); - $cacheFile = $cache->getCacheFile('helloworld.txt'); - $actualCacheFile = $cache->getCacheFile('helloworld.txt', true); - $this->assertEquals($cacheDir . '/h/e/l/l/o/helloworld.txt', $cacheFile); - $this->assertEquals($actualCacheDir . '/h/e/l/l/o/helloworld.txt', $actualCacheFile); - - $cacheFile = $cache->getCacheFile('xy.txt'); - $actualCacheFile = $cache->getCacheFile('xy.txt', true); - $this->assertEquals($cacheDir . '/x/y/xy.txt', $cacheFile); - $this->assertEquals($actualCacheDir . '/x/y/xy.txt', $actualCacheFile); - } - - /** - * Testing caching a file - */ - public function testCaching() - { - $cache = $this->getCache(); - - $this->assertFalse($cache->exists('testing.txt')); - $cache->set('testing.txt', 'toto'); - $this->assertTrue($cache->exists('testing.txt')); - - $this->assertFalse($cache->exists('testing2.txt')); - $cache->write('testing2.txt', 'toto'); - $this->assertTrue($cache->exists('testing2.txt')); - - $this->assertFalse($cache->exists('testing.txt', array( - 'max-age' => -1 - ))); - $this->assertTrue($cache->exists('testing.txt', array( - 'max-age' => 2 - ))); - sleep(3); - $this->assertFalse($cache->exists('testing.txt', array( - 'max-age' => 2 - ))); - } - - /** - * Testing the getOrCreate function - */ - public function testGetOrCreate() - { - $cache = $this->getCache(); - - $this->assertFalse($cache->exists('testing.txt')); - - $data = $cache->getOrCreate('testing.txt', array(), function() { - return 'zebra'; - }); - - $this->assertTrue($cache->exists('testing.txt')); - $this->assertEquals('zebra', $data); - - $data = $cache->getOrCreate('testing.txt', array(), function() { - return 'elephant'; - }); - $this->assertEquals('zebra', $data); - } - - /** - * Testing the getOrCreate function with a callable - */ - public function testGetOrCreateWithCallable() - { - $cache = $this->getCache(); - - $this->assertFalse($cache->exists('testing.txt')); - - $data = $cache->getOrCreate('testing.txt', array(), array($this, 'getAnimal')); - - $this->assertTrue($cache->exists('testing.txt')); - $this->assertEquals('orangutan', $data); - } - - public function getAnimal() - { - return 'orangutan'; - } - - /** - * Testing the getOrCreate function with $file=true - */ - public function testGetOrCreateFile() - { - $dir = __DIR__; - $cache = $this->getCache(); - - $file = $dir.'/'.$cache->getOrCreateFile('file.txt', array(), function() { - return 'xyz'; - }); - $file2 = $dir.'/'.$cache->getOrCreate('file.txt', array(), function(){}, true); - - $this->assertEquals($file, $file2); - $this->assertTrue(file_exists($file)); - $this->assertEquals('xyz', file_get_contents($file)); - } - - /** - * Testing that the not existing younger file works - */ - public function testNotExistingYounger() - { - $cache = $this->getCache(); - - $data = $cache->getOrCreate('testing.txt', array('younger-than'=> 'i-dont-exist'), function() { - return 'some-data'; - }); - - $this->assertEquals('some-data', $data); - } - - /** - * Testing that directory mode works - */ - public function testDirectoryMode() - { - $dir = __DIR__; - $cache = $this->getCache(); - $cacheDir = $this->getCacheDirectory(); - - // default permissions are 0755 - $data = $cache->getOrCreate('aaa.txt', array(), function () { - return 'abc'; - }); - $this->assertTrue((fileperms("$dir/$cacheDir/a") & 0777) == 0755); - $this->assertTrue((fileperms("$dir/$cacheDir/a/a") & 0777) == 0755); - $this->assertTrue((fileperms("$dir/$cacheDir/a/a/a") & 0777) == 0755); - - // Change permissions to be more restrictive - $cache->setDirectoryMode(0700); - $data = $cache->getOrCreate('bbb.txt', array(), function () { - return 'abc'; - }); - $this->assertTrue((fileperms("$dir/$cacheDir/b") & 0777) == 0700); - $this->assertTrue((fileperms("$dir/$cacheDir/b/b") & 0777) == 0700); - $this->assertTrue((fileperms("$dir/$cacheDir/b/b/b") & 0777) == 0700); - } - - /** - * Testing that remotes does not cause cache regeneration - */ - public function testRemote() - { - $cache = $this->getCache(); - $cache->set('remote', 'original'); - - $data = $cache->getOrCreate('remote', array('younger-than' => 'http://google.com'), function() { - return 'modified'; - }); - $data = $cache->getOrCreate('remote', array('younger-than' => 'ftps://google.com'), function() { - return 'modified'; - }); - $this->assertEquals('original', $data); - } - - protected function getCache() - { - $cache = new Cache; - - return $cache - ->setPrefixSize(5) - ->setCacheDirectory($this->getCacheDirectory()) - ->setActualCacheDirectory($this->getActualCacheDirectory()) - ; - } - - protected function getActualCacheDirectory() - { - return __DIR__.'/'.$this->getCacheDirectory(); - } - - protected function getCacheDirectory() - { - return 'cache'; - } - - public function tearDown() - { - $cacheDirectory = $this->getActualCacheDirectory(); - `rm -rf $cacheDirectory`; - } -} diff --git a/source/vendor/getgrav/cache/Gregwar/Cache/tests/bootstrap.php b/source/vendor/getgrav/cache/Gregwar/Cache/tests/bootstrap.php deleted file mode 100644 index 4e07ef3..0000000 --- a/source/vendor/getgrav/cache/Gregwar/Cache/tests/bootstrap.php +++ /dev/null @@ -1,3 +0,0 @@ -setUsingCache(true) -; diff --git a/source/vendor/getgrav/image/Gregwar/Image/.styleci.yml b/source/vendor/getgrav/image/Gregwar/Image/.styleci.yml deleted file mode 100644 index 5aecfab..0000000 --- a/source/vendor/getgrav/image/Gregwar/Image/.styleci.yml +++ /dev/null @@ -1,13 +0,0 @@ -preset: symfony - -enabled: - - align_double_arrow - - newline_after_open_tag - - ordered_use - - long_array_syntax - - php_unit_construct - - php_unit_strict - -disabled: - - unalign_double_arrow - - unalign_equals diff --git a/source/vendor/getgrav/image/Gregwar/Image/Adapter/Adapter.php b/source/vendor/getgrav/image/Gregwar/Image/Adapter/Adapter.php deleted file mode 100644 index 7c386c1..0000000 --- a/source/vendor/getgrav/image/Gregwar/Image/Adapter/Adapter.php +++ /dev/null @@ -1,64 +0,0 @@ -source = $source; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function getResource() - { - return $this->resource; - } - - /** - * Does this adapter supports the given type ? - * - * @param string - * @return bool - */ - protected function supports($type) - { - return false; - } - - /** - * Converts the image to true color. - * - * @return void - */ - protected function convertToTrueColor() - { - } -} diff --git a/source/vendor/getgrav/image/Gregwar/Image/Adapter/AdapterInterface.php b/source/vendor/getgrav/image/Gregwar/Image/Adapter/AdapterInterface.php deleted file mode 100644 index 714b189..0000000 --- a/source/vendor/getgrav/image/Gregwar/Image/Adapter/AdapterInterface.php +++ /dev/null @@ -1,409 +0,0 @@ - - */ -interface AdapterInterface -{ - /** - * set the image source for the adapter. - * - * @param Source $source - * - * @return $this - */ - public function setSource(Source $source); - - /** - * get the raw resource. - * - * @return resource|null - */ - public function getResource(); - - /** - * Gets the name of the adapter. - * - * @return string - */ - public function getName(); - - /** - * Image width. - * - * @return int - */ - public function width(); - - /** - * Image height. - * - * @return int - */ - public function height(); - - /** - * Init the resource. - * - * @return $this - */ - public function init(); - - /** - * Unload the resource - * - * @return void - */ - public function deinit(); - - /** - * Save the image as a gif. - * - * @param string $file - * @return $this - */ - public function saveGif($file); - - /** - * Save the image as a png. - * - * @param string $file - * @return $this - */ - public function savePng($file); - - /** - * Save the image as a Webp. - * - * @param string $file - * @param int $quality - * - * @return $this - */ - public function saveWebp($file, $quality); - - /** - * Save the image as a jpeg. - * - * @param string $file - * @param int $quality - * - * @return $this - */ - public function saveJpeg($file, $quality); - - /** - * Works as resize() excepts that the layout will be cropped. - * - * @param int|null $width the width - * @param int|null $height the height - * @param string|int $background the background - * - * @return $this - */ - public function cropResize($width = null, $height = null, $background = 0xffffff); - - /** - * Resize the image preserving scale. Can enlarge it. - * - * @param int|null $width the width - * @param int|null $height the height - * @param string|int $background the background - * @param bool $crop - * - * @return $this - */ - public function scaleResize($width = null, $height = null, $background = 0xffffff, $crop = false); - - /** - * Resizes the image. It will never be enlarged. - * - * @param int|null $width the width - * @param int|null $height the height - * @param string|int $background the background - * @param bool $force - * @param bool $rescale - * @param bool $crop - * - * @return $this - */ - public function resize($width = null, $height = null, $background = 0xffffff, $force = false, $rescale = false, $crop = false); - - /** - * Crops the image. - * - * @param int $x the top-left x position of the crop box - * @param int $y the top-left y position of the crop box - * @param int $width the width of the crop box - * @param int $height the height of the crop box - * - * @return $this - */ - public function crop($x, $y, $width, $height); - - /** - * enable progressive image loading. - * - * @return $this - */ - public function enableProgressive(); - - /** - * Resizes the image forcing the destination to have exactly the - * given width and the height. - * - * @param int|null $width the width - * @param int|null $height the height - * @param string|int $background the background - * - * @return $this - */ - public function forceResize($width = null, $height = null, $background = 0xffffff); - - /** - * Perform a zoom crop of the image to desired width and height. - * - * @param int $width Desired width - * @param int $height Desired height - * @param string|int $background - * - * @return $this - */ - public function zoomCrop($width, $height, $background = 0xffffff); - - /** - * Fills the image background to $bg if the image is transparent. - * - * @param string|int $background background color - * - * @return $this - */ - public function fillBackground($background = 0xffffff); - - /** - * Negates the image. - * - * @return $this - */ - public function negate(); - - /** - * Changes the brightness of the image. - * - * @param int $brightness the brightness - * - * @return $this - */ - public function brightness($brightness); - - /** - * Contrasts the image. - * - * @param int $contrast the contrast [-100, 100] - * - * @return $this - */ - public function contrast($contrast); - - /** - * Apply a grayscale level effect on the image. - * - * @return $this - */ - public function grayscale(); - - /** - * Emboss the image. - * - * @return $this - */ - public function emboss(); - - /** - * Smooth the image. - * - * @param int $p value between [-10,10] - * - * @return $this - */ - public function smooth($p); - - /** - * Sharps the image. - * - * @return $this - */ - public function sharp(); - - /** - * Edges the image. - * - * @return $this - */ - public function edge(); - - /** - * Colorize the image. - * - * @param int $red value in range [-255, 255] - * @param int $green value in range [-255, 255] - * @param int $blue value in range [-255, 255] - * - * @return $this - */ - public function colorize($red, $green, $blue); - - /** - * apply sepia to the image. - * - * @return $this - */ - public function sepia(); - - /** - * Merge with another image. - * - * @param Image $other - * @param int $x - * @param int $y - * @param int|null $width - * @param int|null $height - * - * @return $this - */ - public function merge(Image $other, $x = 0, $y = 0, $width = null, $height = null); - - /** - * Rotate the image. - * - * @param float $angle - * @param string|int $background - * - * @return $this - */ - public function rotate($angle, $background = 0xffffff); - - /** - * Fills the image. - * - * @param int $color - * @param int $x - * @param int $y - * - * @return $this - */ - public function fill($color = 0xffffff, $x = 0, $y = 0); - - /** - * write text to the image. - * - * @param string $font - * @param string $text - * @param int $x - * @param int $y - * @param int $size - * @param int $angle - * @param int $color - * @param string $align - */ - public function write($font, $text, $x = 0, $y = 0, $size = 12, $angle = 0, $color = 0x000000, $align = 'left'); - - /** - * Draws a rectangle. - * - * @param int $x1 - * @param int $y1 - * @param int $x2 - * @param int $y2 - * @param int $color - * @param bool $filled - * - * @return $this - */ - public function rectangle($x1, $y1, $x2, $y2, $color, $filled = false); - - /** - * Draws a rounded rectangle. - * - * @param int $x1 - * @param int $y1 - * @param int $x2 - * @param int $y2 - * @param int $radius - * @param int $color - * @param bool $filled - * - * @return $this - */ - public function roundedRectangle($x1, $y1, $x2, $y2, $radius, $color, $filled = false); - - /** - * Draws a line. - * - * @param int $x1 - * @param int $y1 - * @param int $x2 - * @param int $y2 - * @param int $color - * - * @return $this - */ - public function line($x1, $y1, $x2, $y2, $color = 0x000000); - - /** - * Draws an ellipse. - * - * @param int $cx - * @param int $cy - * @param int $width - * @param int $height - * @param int $color - * @param bool $filled - * - * @return $this - */ - public function ellipse($cx, $cy, $width, $height, $color = 0x000000, $filled = false); - - /** - * Draws a circle. - * - * @param int $cx - * @param int $cy - * @param int $r - * @param int $color - * @param bool $filled - * - * @return $this - */ - public function circle($cx, $cy, $r, $color = 0x000000, $filled = false); - - /** - * Draws a polygon. - * - * @param array $points - * @param int $color - * @param bool $filled - * - * @return $this - */ - public function polygon(array $points, $color, $filled = false); - - /** - * Flips the image. - * - * @param int $flipVertical - * @param int $flipHorizontal - * - * @return $this - */ - public function flip($flipVertical, $flipHorizontal); -} diff --git a/source/vendor/getgrav/image/Gregwar/Image/Adapter/Common.php b/source/vendor/getgrav/image/Gregwar/Image/Adapter/Common.php deleted file mode 100644 index 9e1affe..0000000 --- a/source/vendor/getgrav/image/Gregwar/Image/Adapter/Common.php +++ /dev/null @@ -1,491 +0,0 @@ -width(); - $originalHeight = $this->height(); - - // Calculate the different ratios - $originalRatio = $originalWidth / $originalHeight; - $newRatio = $width / $height; - - // Compare ratios - if ($originalRatio > $newRatio) { - // Original image is wider - $newHeight = $height; - $newWidth = (int) $height * $originalRatio; - } else { - // Equal width or smaller - $newHeight = (int) $width / $originalRatio; - $newWidth = $width; - } - - // Perform resize - $this->resize($newWidth, $newHeight, $background, true); - - // Define x position - switch ($xPosLetter) { - case 'L': - case 'left': - $xPos = 0; - break; - case 'R': - case 'right': - $xPos = (int) $newWidth - $width; - break; - case 'center': - $xPos = (int) ($newWidth - $width) / 2; - break; - default: - $factorW = $newWidth / $originalWidth; - $xPos = $xPosLetter * $factorW; - - // If the desired cropping position goes beyond the width then - // set the crop to be within the correct bounds. - if ($xPos + $width > $newWidth) { - $xPos = (int) $newWidth - $width; - } - } - - // Define y position - switch ($yPosLetter) { - case 'T': - case 'top': - $yPos = 0; - break; - case 'B': - case 'bottom': - $yPos = (int) $newHeight - $height; - break; - case 'center': - $yPos = (int) ($newHeight - $height) / 2; - break; - default: - $factorH = $newHeight / $originalHeight; - $yPos = $yPosLetter * $factorH; - - // If the desired cropping position goes beyond the height then - // set the crop to be within the correct bounds. - if ($yPos + $height > $newHeight) { - $yPos = (int) $newHeight - $height; - } - } - - // Crop image to reach desired size - $this->crop($xPos, $yPos, $width, $height); - - return $this; - } - - /** - * Resizes the image forcing the destination to have exactly the - * given width and the height. - * - * @param int|null $width the width - * @param int|null $height the height - * @param string|int $background the background - */ - public function forceResize($width = null, $height = null, $background = 'transparent') - { - return $this->resize($width, $height, $background, true); - } - - /** - * {@inheritdoc} - */ - public function scaleResize($width = null, $height = null, $background = 'transparent', $crop = false) - { - return $this->resize($width, $height, $background, false, true, $crop); - } - - /** - * {@inheritdoc} - */ - public function cropResize($width = null, $height = null, $background = 'transparent') - { - return $this->resize($width, $height, $background, false, false, true); - } - - /** - * Read exif rotation from file and apply it. - * - * @return $this - */ - public function fixOrientation() - { - if (!extension_loaded('exif')) { - throw new \RuntimeException('You need to EXIF PHP Extension to use this function'); - } - - if (!in_array(exif_imagetype($this->source->getInfos()), array( - IMAGETYPE_JPEG, - IMAGETYPE_TIFF_II, - IMAGETYPE_TIFF_MM, - ))) { - return $this; - } - - $exif = @exif_read_data($this->source->getInfos()); - - if ($exif === false || !array_key_exists('Orientation', $exif)) { - return $this; - } - - return $this->applyExifOrientation($exif['Orientation']); - } - - /** - * Apply orientation using Exif orientation value. - * - * @param int $exif_orienation - * - * @return $this - */ - public function applyExifOrientation($exif_orienation) - { - switch ($exif_orienation) { - case 1: - break; - - case 2: - $this->flip(false, true); - break; - - case 3: // 180 rotate left - $this->rotate(180); - break; - - case 4: // vertical flip - $this->flip(true, false); - break; - - case 5: // vertical flip + 90 rotate right - $this->flip(true, false); - $this->rotate(-90); - break; - - case 6: // 90 rotate right - $this->rotate(-90); - break; - - case 7: // horizontal flip + 90 rotate right - $this->flip(false, true); - $this->rotate(-90); - break; - - case 8: // 90 rotate left - $this->rotate(90); - break; - } - - return $this; - } - - /** - * Opens gif image. - * - * @param string - * - * @return void - */ - abstract protected function openGif($file); - - /** - * Opens jpeg image. - * - * @param string - * - * @return void - */ - abstract protected function openJpeg($file); - - /** - * Opens png image. - * - * @param string - * - * @return void - */ - abstract protected function openPng($file); - - /** - * Opens webp image. - * - * @param string - * - * @return void - */ - abstract protected function openWebp($file); - - /** - * Creates an image. - * - * @param int $width - * @param int $height - * - * @return void - */ - abstract protected function createImage($width, $height); - - /** - * Creating an image using $data. - * - * @param string $data - * - * @return void - */ - abstract protected function createImageFromData($data); - - /** - * Loading image from $resource. - * - * @param resource - * - * @return void - */ - protected function loadResource($resource) - { - $this->resource = $resource; - } - - /** - * @param string $file - * @param string $type - * - * @return void - */ - protected function loadFile($file, $type) - { - if (!$this->supports($type)) { - throw new \RuntimeException('Type '.$type.' is not supported by GD'); - } - - if ($type === 'jpeg') { - $this->openJpeg($file); - } - - if ($type === 'gif') { - $this->openGif($file); - } - - if ($type === 'png') { - $this->openPng($file); - } - - if ($type === 'webp') { - $this->openWebp($file); - } - - if (false === $this->resource) { - throw new \UnexpectedValueException('Unable to open file ('.$file.')'); - } - - $this->convertToTrueColor(); - } - - /** - * {@inheritdoc} - */ - public function init() - { - $source = $this->source; - - if ($source instanceof File) { - $this->loadFile($source->getFile(), $source->guessType()); - } elseif ($source instanceof Create) { - $this->createImage($source->getWidth(), $source->getHeight()); - } elseif ($source instanceof Data) { - $this->createImageFromData($source->getData()); - } elseif ($source instanceof Resource) { - $this->loadResource($source->getResource()); - } else { - throw new \Exception('Unsupported image source type '.get_class($source)); - } - - return $this; - } - - /** - * {@inheritdoc} - */ - public function deinit() - { - $this->resource = null; - } - - /** - * {@inheritdoc} - */ - public function resize($width = null, $height = null, $background = 'transparent', $force = false, $rescale = false, $crop = false) - { - $current_width = $this->width(); - $current_height = $this->height(); - $new_width = 0; - $new_height = 0; - $scale = 1.0; - - if ($height === null && preg_match('#^(.+)%$#mUsi', $width, $matches)) { - $width = round($current_width * ((float) $matches[1] / 100.0)); - $height = round($current_height * ((float) $matches[1] / 100.0)); - } - - if (!$rescale && (!$force || $crop)) { - if ($width !== null && $current_width > $width) { - $scale = $current_width / $width; - } - - if ($height !== null && $current_height > $height) { - if ($current_height / $height > $scale) { - $scale = $current_height / $height; - } - } - } else { - if ($width !== null) { - $scale = $current_width / $width; - $new_width = $width; - } - - if ($height !== null) { - if ($width !== null && $rescale) { - $scale = max($scale, $current_height / $height); - } else { - $scale = $current_height / $height; - } - $new_height = $height; - } - } - - if (!$force || $width === null || $rescale) { - $new_width = round($current_width / $scale); - } - - if (!$force || $height === null || $rescale) { - $new_height = round($current_height / $scale); - } - - if ($width === null || $crop) { - $width = $new_width; - } - - if ($height === null || $crop) { - $height = $new_height; - } - - $this->doResize($background, $width, $height, $new_width, $new_height); - } - - /** - * Trim background color arround the image. - * - * @param string|int $background the background - * - * @return void - */ - protected function _trimColor($background = 'transparent') - { - $width = $this->width(); - $height = $this->height(); - - $b_top = 0; - $b_lft = 0; - $b_btm = $height - 1; - $b_rt = $width - 1; - - //top - for (; $b_top < $height; ++$b_top) { - for ($x = 0; $x < $width; ++$x) { - if ($this->getColor($x, $b_top) !== $background) { - break 2; - } - } - } - - // bottom - for (; $b_btm >= 0; --$b_btm) { - for ($x = 0; $x < $width; ++$x) { - if ($this->getColor($x, $b_btm) !== $background) { - break 2; - } - } - } - - // left - for (; $b_lft < $width; ++$b_lft) { - for ($y = $b_top; $y <= $b_btm; ++$y) { - if ($this->getColor($b_lft, $y) !== $background) { - break 2; - } - } - } - - // right - for (; $b_rt >= 0; --$b_rt) { - for ($y = $b_top; $y <= $b_btm; ++$y) { - if ($this->getColor($b_rt, $y) !== $background) { - break 2; - } - } - } - - ++$b_btm; - ++$b_rt; - - $this->crop($b_lft, $b_top, $b_rt - $b_lft, $b_btm - $b_top); - } - - /** - * Resizes the image to an image having size of $target_width, $target_height, using - * $new_width and $new_height and padding with $bg color. - * - * @param string|int $bg - * @param int $target_width - * @param int $target_height - * @param int $new_width - * @param int $new_height - * - * @return $this - */ - abstract protected function doResize($bg, $target_width, $target_height, $new_width, $new_height); - - /** - * Gets the color of the $x, $y pixel. - * - * @param int $x - * @param int $y - * - * @return int - */ - abstract protected function getColor($x, $y); - - /** - * {@inheritdoc} - */ - public function enableProgressive() - { - throw new \Exception('The Adapter '.$this->getName().' does not support Progressive Image loading'); - } - - /** - * This does nothing, but can be used to tag a ressource for instance (having a final image hash - * for the cache different depending on the tag) - * - * @param mixed $tag - * - * @return void - */ - public function tag($tag) - { - } -} diff --git a/source/vendor/getgrav/image/Gregwar/Image/Adapter/GD.php b/source/vendor/getgrav/image/Gregwar/Image/Adapter/GD.php deleted file mode 100644 index 231db23..0000000 --- a/source/vendor/getgrav/image/Gregwar/Image/Adapter/GD.php +++ /dev/null @@ -1,722 +0,0 @@ - \IMG_JPG, - 'gif' => \IMG_GIF, - 'png' => \IMG_PNG, - 'webp' => \IMG_WEBP - ); - - /** - * @param resource $resource - */ - protected function loadResource($resource) - { - parent::loadResource($resource); - - imagesavealpha($this->resource, true); - } - - /** - * Gets the width and the height for writing some text. - * - * @param string $font - * @param string $text - * @param int|float $size - * @param int|float $angle - * - * @return array - */ - public static function TTFBox($font, $text, $size, $angle = 0) - { - $box = imagettfbbox($size, $angle, $font, $text); - - return array( - 'width' => abs($box[2] - $box[0]), - 'height' => abs($box[3] - $box[5]), - ); - } - - public function __construct() - { - parent::__construct(); - - if (!(extension_loaded('gd') && function_exists('gd_info'))) { - throw new \RuntimeException('You need to install GD PHP Extension to use this library'); - } - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return 'GD'; - } - - /** - * {@inheritdoc} - */ - public function fillBackground($background = 0xffffff) - { - $w = $this->width(); - $h = $this->height(); - $n = imagecreatetruecolor($w, $h); - imagefill($n, 0, 0, ImageColor::gdAllocate($this->resource, $background)); - imagecopyresampled($n, $this->resource, 0, 0, 0, 0, $w, $h, $w, $h); - imagedestroy($this->resource); - $this->resource = $n; - - return $this; - } - - /** - * Do the image resize. - * - * @param int|string $bg - * @param int $target_width - * @param int $target_height - * @param int $new_width - * @param int $new_height - * - * @return $this - */ - protected function doResize($bg, $target_width, $target_height, $new_width, $new_height) - { - $width = $this->width(); - $height = $this->height(); - $n = imagecreatetruecolor($target_width, $target_height); - - if ($bg !== 'transparent') { - imagefill($n, 0, 0, ImageColor::gdAllocate($this->resource, $bg)); - } else { - imagealphablending($n, false); - $color = ImageColor::gdAllocate($this->resource, 'transparent'); - - imagefill($n, 0, 0, $color); - imagesavealpha($n, true); - } - - imagecopyresampled($n, $this->resource, ($target_width - $new_width) / 2, ($target_height - $new_height) / 2, 0, 0, $new_width, $new_height, $width, $height); - imagedestroy($this->resource); - - $this->resource = $n; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function crop($x, $y, $width, $height) - { - $destination = imagecreatetruecolor($width, $height); - imagealphablending($destination, false); - imagesavealpha($destination, true); - imagecopy($destination, $this->resource, 0, 0, $x, $y, $this->width(), $this->height()); - imagedestroy($this->resource); - $this->resource = $destination; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function negate() - { - imagefilter($this->resource, IMG_FILTER_NEGATE); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function brightness($brightness) - { - imagefilter($this->resource, IMG_FILTER_BRIGHTNESS, $brightness); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function contrast($contrast) - { - imagefilter($this->resource, IMG_FILTER_CONTRAST, $contrast); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function grayscale() - { - imagefilter($this->resource, IMG_FILTER_GRAYSCALE); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function emboss() - { - imagefilter($this->resource, IMG_FILTER_EMBOSS); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function smooth($p) - { - imagefilter($this->resource, IMG_FILTER_SMOOTH, $p); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function sharp() - { - imagefilter($this->resource, IMG_FILTER_MEAN_REMOVAL); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function edge() - { - imagefilter($this->resource, IMG_FILTER_EDGEDETECT); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function colorize($red, $green, $blue) - { - imagefilter($this->resource, IMG_FILTER_COLORIZE, $red, $green, $blue); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function sepia() - { - imagefilter($this->resource, IMG_FILTER_GRAYSCALE); - imagefilter($this->resource, IMG_FILTER_COLORIZE, 100, 50, 0); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function gaussianBlur($blurFactor = 1) - { - $blurFactor = round($blurFactor); // blurFactor has to be an integer - - $originalWidth = $this->width(); - $originalHeight = $this->height(); - - $smallestWidth = ceil($originalWidth * pow(0.5, $blurFactor)); - $smallestHeight = ceil($originalHeight * pow(0.5, $blurFactor)); - - // for the first run, the previous image is the original input - $prevImage = $this->resource; - $prevWidth = $originalWidth; - $prevHeight = $originalHeight; - - // scale way down and gradually scale back up, blurring all the way - for ($i = 0; $i < $blurFactor; ++$i) { - // determine dimensions of next image - $nextWidth = $smallestWidth * pow(2, $i); - $nextHeight = $smallestHeight * pow(2, $i); - - // resize previous image to next size - $nextImage = imagecreatetruecolor($nextWidth, $nextHeight); - imagecopyresized($nextImage, $prevImage, 0, 0, 0, 0, - $nextWidth, $nextHeight, $prevWidth, $prevHeight); - - // apply blur filter - imagefilter($nextImage, IMG_FILTER_GAUSSIAN_BLUR); - - // now the new image becomes the previous image for the next step - $prevImage = $nextImage; - $prevWidth = $nextWidth; - $prevHeight = $nextHeight; - } - - // scale back to original size and blur one more time - imagecopyresized($this->resource, $nextImage, - 0, 0, 0, 0, $originalWidth, $originalHeight, $nextWidth, $nextHeight); - imagefilter($this->resource, IMG_FILTER_GAUSSIAN_BLUR); - - // clean up - imagedestroy($prevImage); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function merge(Image $other, $x = 0, $y = 0, $width = null, $height = null) - { - $other = clone $other; - $other->init(); - $other->applyOperations(); - - imagealphablending($this->resource, true); - - if (null === $width) { - $width = $other->width(); - } - - if (null === $height) { - $height = $other->height(); - } - - imagecopyresampled($this->resource, $other->getAdapter()->getResource(), $x, $y, 0, 0, $width, $height, $width, $height); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function rotate($angle, $background = 0xffffff) - { - $this->resource = imagerotate($this->resource, $angle, ImageColor::gdAllocate($this->resource, $background)); - imagealphablending($this->resource, true); - imagesavealpha($this->resource, true); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function fill($color = 0xffffff, $x = 0, $y = 0) - { - imagealphablending($this->resource, false); - imagefill($this->resource, $x, $y, ImageColor::gdAllocate($this->resource, $color)); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function write($font, $text, $x = 0, $y = 0, $size = 12, $angle = 0, $color = 0x000000, $align = 'left') - { - imagealphablending($this->resource, true); - - if ($align !== 'left') { - $sim_size = self::TTFBox($font, $text, $size, $angle); - - if ($align === 'center') { - $x -= $sim_size['width'] / 2; - } - - if ($align === 'right') { - $x -= $sim_size['width']; - } - } - - imagettftext($this->resource, $size, $angle, $x, $y, ImageColor::gdAllocate($this->resource, $color), $font, $text); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function rectangle($x1, $y1, $x2, $y2, $color, $filled = false) - { - if ($filled) { - imagefilledrectangle($this->resource, $x1, $y1, $x2, $y2, ImageColor::gdAllocate($this->resource, $color)); - } else { - imagerectangle($this->resource, $x1, $y1, $x2, $y2, ImageColor::gdAllocate($this->resource, $color)); - } - - return $this; - } - - /** - * {@inheritdoc} - */ - public function roundedRectangle($x1, $y1, $x2, $y2, $radius, $color, $filled = false) - { - if ($color) { - $color = ImageColor::gdAllocate($this->resource, $color); - } - - if ($filled == true) { - imagefilledrectangle($this->resource, $x1 + $radius, $y1, $x2 - $radius, $y2, $color); - imagefilledrectangle($this->resource, $x1, $y1 + $radius, $x1 + $radius - 1, $y2 - $radius, $color); - imagefilledrectangle($this->resource, $x2 - $radius + 1, $y1 + $radius, $x2, $y2 - $radius, $color); - - imagefilledarc($this->resource, $x1 + $radius, $y1 + $radius, $radius * 2, $radius * 2, 180, 270, $color, IMG_ARC_PIE); - imagefilledarc($this->resource, $x2 - $radius, $y1 + $radius, $radius * 2, $radius * 2, 270, 360, $color, IMG_ARC_PIE); - imagefilledarc($this->resource, $x1 + $radius, $y2 - $radius, $radius * 2, $radius * 2, 90, 180, $color, IMG_ARC_PIE); - imagefilledarc($this->resource, $x2 - $radius, $y2 - $radius, $radius * 2, $radius * 2, 360, 90, $color, IMG_ARC_PIE); - } else { - imageline($this->resource, $x1 + $radius, $y1, $x2 - $radius, $y1, $color); - imageline($this->resource, $x1 + $radius, $y2, $x2 - $radius, $y2, $color); - imageline($this->resource, $x1, $y1 + $radius, $x1, $y2 - $radius, $color); - imageline($this->resource, $x2, $y1 + $radius, $x2, $y2 - $radius, $color); - - imagearc($this->resource, $x1 + $radius, $y1 + $radius, $radius * 2, $radius * 2, 180, 270, $color); - imagearc($this->resource, $x2 - $radius, $y1 + $radius, $radius * 2, $radius * 2, 270, 360, $color); - imagearc($this->resource, $x1 + $radius, $y2 - $radius, $radius * 2, $radius * 2, 90, 180, $color); - imagearc($this->resource, $x2 - $radius, $y2 - $radius, $radius * 2, $radius * 2, 360, 90, $color); - } - - return $this; - } - - /** - * {@inheritdoc} - */ - public function line($x1, $y1, $x2, $y2, $color = 0x000000) - { - imageline($this->resource, $x1, $y1, $x2, $y2, ImageColor::gdAllocate($this->resource, $color)); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function ellipse($cx, $cy, $width, $height, $color = 0x000000, $filled = false) - { - if ($filled) { - imagefilledellipse($this->resource, $cx, $cy, $width, $height, ImageColor::gdAllocate($this->resource, $color)); - } else { - imageellipse($this->resource, $cx, $cy, $width, $height, ImageColor::gdAllocate($this->resource, $color)); - } - - return $this; - } - - /** - * {@inheritdoc} - */ - public function circle($cx, $cy, $r, $color = 0x000000, $filled = false) - { - return $this->ellipse($cx, $cy, $r, $r, ImageColor::gdAllocate($this->resource, $color), $filled); - } - - /** - * {@inheritdoc} - */ - public function polygon(array $points, $color, $filled = false) - { - if ($filled) { - imagefilledpolygon($this->resource, $points, count($points) / 2, ImageColor::gdAllocate($this->resource, $color)); - } else { - imagepolygon($this->resource, $points, count($points) / 2, ImageColor::gdAllocate($this->resource, $color)); - } - - return $this; - } - - /** - * {@inheritdoc} - */ - public function flip($flipVertical, $flipHorizontal) - { - if (!$flipVertical && !$flipHorizontal) { - return $this; - } - - if (function_exists('imageflip')) { - if ($flipVertical && $flipHorizontal) { - $flipMode = \IMG_FLIP_BOTH; - } elseif ($flipVertical && !$flipHorizontal) { - $flipMode = \IMG_FLIP_VERTICAL; - } elseif (!$flipVertical && $flipHorizontal) { - $flipMode = \IMG_FLIP_HORIZONTAL; - } - - imageflip($this->resource, $flipMode); - } else { - $width = $this->width(); - $height = $this->height(); - - $src_x = 0; - $src_y = 0; - $src_width = $width; - $src_height = $height; - - if ($flipVertical) { - $src_y = $height - 1; - $src_height = -$height; - } - - if ($flipHorizontal) { - $src_x = $width - 1; - $src_width = -$width; - } - - $imgdest = imagecreatetruecolor($width, $height); - imagealphablending($imgdest, false); - imagesavealpha($imgdest, true); - - if (imagecopyresampled($imgdest, $this->resource, 0, 0, $src_x, $src_y, $width, $height, $src_width, $src_height)) { - imagedestroy($this->resource); - $this->resource = $imgdest; - } - } - - return $this; - } - - /** - * {@inheritdoc} - */ - public function width() - { - if (null === $this->resource) { - $this->init(); - } - - return imagesx($this->resource); - } - - /** - * {@inheritdoc} - */ - public function height() - { - if (null === $this->resource) { - $this->init(); - } - - return imagesy($this->resource); - } - - /** - * @param int $width - * @param int $height - * - * @return void - */ - protected function createImage($width, $height) - { - $this->resource = imagecreatetruecolor($width, $height); - } - - - /** - * @param string $data - * - * @return void - */ - protected function createImageFromData($data) - { - $this->resource = @imagecreatefromstring($data); - } - - /** - * Converts the image to true color. - * - * @return void - */ - protected function convertToTrueColor() - { - if (!imageistruecolor($this->resource)) { - if (function_exists('imagepalettetotruecolor')) { - // Available in PHP 5.5 - imagepalettetotruecolor($this->resource); - } else { - $transparentIndex = imagecolortransparent($this->resource); - - $w = $this->width(); - $h = $this->height(); - - $img = imagecreatetruecolor($w, $h); - imagecopy($img, $this->resource, 0, 0, 0, 0, $w, $h); - - if ($transparentIndex != -1) { - $width = $this->width(); - $height = $this->height(); - - imagealphablending($img, false); - imagesavealpha($img, true); - - for ($x = 0; $x < $width; ++$x) { - for ($y = 0; $y < $height; ++$y) { - if (imagecolorat($this->resource, $x, $y) == $transparentIndex) { - imagesetpixel($img, $x, $y, 127 << 24); - } - } - } - } - - $this->resource = $img; - } - } - - imagesavealpha($this->resource, true); - } - - /** - * {@inheritdoc} - */ - public function saveGif($file) - { - $transColor = imagecolorallocatealpha($this->resource, 255, 255, 255, 127); - imagecolortransparent($this->resource, $transColor); - imagegif($this->resource, $file); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function savePng($file) - { - imagepng($this->resource, $file); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function saveWebp($file, $quality) - { - imagewebp($this->resource, $file, $quality); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function saveJpeg($file, $quality) - { - imagejpeg($this->resource, $file, $quality); - - return $this; - } - - /** - * Try to open the file using jpeg. - * - * @param string $file - * - * @return void - */ - protected function openJpeg($file) - { - if (file_exists($file) && filesize($file)) { - $this->resource = @imagecreatefromjpeg($file); - } else { - $this->resource = false; - } - } - - /** - * Try to open the file using gif. - * - * @param string $file - * - * @return void - */ - protected function openGif($file) - { - if (file_exists($file) && filesize($file)) { - $this->resource = @imagecreatefromgif($file); - } else { - $this->resource = false; - } - } - - /** - * Try to open the file using PNG. - * - * @param string $file - * - * @return void - */ - protected function openPng($file) - { - if (file_exists($file) && filesize($file)) { - $this->resource = @imagecreatefrompng($file); - } else { - $this->resource = false; - } - } - - /** - * Try to open the file using WEBP. - * - * @param string $file - * - * @return void - */ - protected function openWebp($file) - { - if (file_exists($file) && filesize($file)) { - $this->resource = @imagecreatefromwebp($file); - } else { - $this->resource = false; - } - } - - /** - * Does this adapter supports type ? - * - * @param string $type - * - * @return bool - */ - protected function supports($type) - { - return imagetypes() & self::$gdTypes[$type]; - } - - /** - * @param int $x - * @param int $y - * - * @return int|false - */ - protected function getColor($x, $y) - { - return imagecolorat($this->resource, $x, $y); - } - - /** - * {@inheritdoc} - */ - public function enableProgressive() - { - imageinterlace($this->resource, 1); - - return $this; - } -} diff --git a/source/vendor/getgrav/image/Gregwar/Image/Adapter/Imagick.php b/source/vendor/getgrav/image/Gregwar/Image/Adapter/Imagick.php deleted file mode 100644 index f3e5117..0000000 --- a/source/vendor/getgrav/image/Gregwar/Image/Adapter/Imagick.php +++ /dev/null @@ -1,432 +0,0 @@ -newNewFile = $newNewFile; - } - - public function getNewFile() - { - return $this->newNewFile; - } -} diff --git a/source/vendor/getgrav/image/Gregwar/Image/GarbageCollect.php b/source/vendor/getgrav/image/Gregwar/Image/GarbageCollect.php deleted file mode 100644 index 448a26a..0000000 --- a/source/vendor/getgrav/image/Gregwar/Image/GarbageCollect.php +++ /dev/null @@ -1,87 +0,0 @@ - - */ -class GarbageCollect -{ - /** - * Drops old files of a directory. - * - * @param string $directory the name of the target directory - * @param int $days the number of days to consider a file old - * @param bool $verbose enable verbose output - * - * @return bool if all the files/directories of a directory was wiped - */ - public static function dropOldFiles($directory, $days = 30, $verbose = false) - { - $allDropped = true; - $now = time(); - - $dir = opendir($directory); - - if (!$dir) { - if ($verbose) { - echo "! Unable to open $directory\n"; - } - - return false; - } - - while ($file = readdir($dir)) { - if ($file === '.' || $file === '..') { - continue; - } - - $fullName = $directory.'/'.$file; - - $old = $now - filemtime($fullName); - - if (is_dir($fullName)) { - // Directories are recursively crawled - if (static::dropOldFiles($fullName, $days, $verbose)) { - self::drop($fullName, $verbose); - } else { - $allDropped = false; - } - } else { - if ($old > (24 * 60 * 60 * $days)) { - self::drop($fullName, $verbose); - } else { - $allDropped = false; - } - } - } - - closedir($dir); - - return $allDropped; - } - - /** - * Drops a file or an empty directory. - * - * @param string $file - * @param false $verbose - * - * @return void - */ - public static function drop($file, $verbose = false) - { - if (is_dir($file)) { - @rmdir($file); - } else { - @unlink($file); - } - - if ($verbose) { - echo "> Dropping $file...\n"; - } - } -} diff --git a/source/vendor/getgrav/image/Gregwar/Image/Image.php b/source/vendor/getgrav/image/Gregwar/Image/Image.php deleted file mode 100644 index a3dccc6..0000000 --- a/source/vendor/getgrav/image/Gregwar/Image/Image.php +++ /dev/null @@ -1,971 +0,0 @@ - - * - * @method Image saveGif($file) - * @method Image savePng($file) - * @method Image saveJpeg($file, $quality) - * @method Image resize($width = null, $height = null, $background = 'transparent', $force = false, $rescale = false, $crop = false) - * @method Image forceResize($width = null, $height = null, $background = 'transparent') - * @method Image scaleResize($width = null, $height = null, $background = 'transparent', $crop = false) - * @method Image cropResize($width = null, $height = null, $background=0xffffff) - * @method Image scale($width = null, $height = null, $background=0xffffff, $crop = false) - * @method Image ($width = null, $height = null, $background = 0xffffff, $force = false, $rescale = false, $crop = false) - * @method Image crop($x, $y, $width, $height) - * @method Image enableProgressive() - * @method Image force($width = null, $height = null, $background = 0xffffff) - * @method Image zoomCrop($width, $height, $background = 'transparent', $xPosLetter = 'center', $yPosLetter = 'center') - * @method Image fillBackground($background = 0xffffff) - * @method Image negate() - * @method Image brightness($brightness) - * @method Image contrast($contrast) - * @method Image grayscale() - * @method Image emboss() - * @method Image smooth($p) - * @method Image sharp() - * @method Image edge() - * @method Image colorize($red, $green, $blue) - * @method Image sepia() - * @method Image merge(Image $other, $x = 0, $y = 0, $width = null, $height = null) - * @method Image rotate($angle, $background = 0xffffff) - * @method Image fill($color = 0xffffff, $x = 0, $y = 0) - * @method Image write($font, $text, $x = 0, $y = 0, $size = 12, $angle = 0, $color = 0x000000, $align = 'left') - * @method Image rectangle($x1, $y1, $x2, $y2, $color, $filled = false) - * @method Image roundedRectangle($x1, $y1, $x2, $y2, $radius, $color, $filled = false) - * @method Image line($x1, $y1, $x2, $y2, $color = 0x000000) - * @method Image ellipse($cx, $cy, $width, $height, $color = 0x000000, $filled = false) - * @method Image circle($cx, $cy, $r, $color = 0x000000, $filled = false) - * @method Image polygon(array $points, $color, $filled = false) - * @method Image flip($flipVertical, $flipHorizontal) - */ -class Image -{ - /** - * Directory to use for file caching. - * @var string - */ - protected $cacheDir = 'cache/images'; - - /** - * Directory cache mode. Not used. - * @var null - */ - protected $cacheMode; - - /** - * Internal adapter. - * - * @var AdapterInterface|null - */ - protected $adapter; - - /** - * Pretty name for the image. - * @var string - */ - protected $prettyName = ''; - - /** @var bool */ - protected $prettyPrefix = false; - - /** - * Transformations hash. - * @var string|null - */ - protected $hash; - - /** - * The image source. - * @var Source|null - */ - protected $source; - - /** - * Force image caching, even if there is no operation applied. - * @var bool - */ - protected $forceCache = true; - - /** - * Supported types. - * @var array - */ - public static $types = array( - 'jpg' => 'jpeg', - 'jpeg' => 'jpeg', - 'webp' => 'webp', - 'png' => 'png', - 'gif' => 'gif', - ); - - /** - * Fallback image. - * @var string - */ - protected $fallback; - - /** - * Use fallback image. - * @var bool - */ - protected $useFallbackImage = true; - - /** - * Cache system. - * - * @var CacheInterface - */ - protected $cache; - - /** - * Get the cache system. - * - * @return CacheInterface - */ - public function getCacheSystem() - { - if (is_null($this->cache)) { - $this->cache = new Cache(); - $this->cache->setCacheDirectory($this->cacheDir); - } - - return $this->cache; - } - - /** - * Set the cache system. - * - * @param CacheInterface $cache - * - * @return void - */ - public function setCacheSystem(CacheInterface $cache) - { - $this->cache = $cache; - } - - /** - * Change the caching directory. - * - * @param string $cacheDir - * - * @return $this - */ - public function setCacheDir($cacheDir) - { - $this->getCacheSystem()->setCacheDirectory($cacheDir); - - return $this; - } - - /** - * @param int $dirMode - * - * @return void - */ - public function setCacheDirMode($dirMode) - { - $this->cache->setDirectoryMode($dirMode); - } - - /** - * Enable or disable to force cache even if the file is unchanged. - * - * @param bool $forceCache - * - * @return $this - */ - public function setForceCache($forceCache = true) - { - $this->forceCache = $forceCache; - - return $this; - } - - /** - * The actual cache dir. - * - * @param string|null $actualCacheDir - * - * @return $this - */ - public function setActualCacheDir($actualCacheDir) - { - $this->getCacheSystem()->setActualCacheDirectory($actualCacheDir); - - return $this; - } - - /** - * Sets the pretty name of the image. - * - * @param string $name - * @param bool $prefix - */ - public function setPrettyName($name, $prefix = true) - { - if (empty($name)) { - return $this; - } - - $this->prettyName = $this->urlize($name); - $this->prettyPrefix = $prefix; - - return $this; - } - - /** - * Urlizes the prettyName. - * - * @param string $name - * - * @return string - */ - protected function urlize($name) - { - $transliterator = '\Behat\Transliterator\Transliterator'; - - if (class_exists($transliterator)) { - $name = $transliterator::transliterate($name); - $name = $transliterator::urlize($name); - } else { - $name = strtolower($name); - $name = str_replace(' ', '-', $name); - $name = preg_replace('/([^a-z0-9\-]+)/m', '', $name); - } - - return $name; - } - - /** - * Operations array. - * @var array - */ - protected $operations = array(); - - /** - * Image constructor. - * - * @param string|null $originalFile - * @param int|null $width - * @param int|null $height - */ - public function __construct($originalFile = null, $width = null, $height = null) - { - $this->setFallback(null); - - if ($originalFile) { - $this->source = new File($originalFile); - } else { - $this->source = new Create($width, $height); - } - } - - /** - * Sets the image data. - * - * @param string $data - * - * @return void - */ - public function setData($data) - { - $this->source = new Data($data); - } - - /** - * Sets the resource. - * - * @param resource $resource - * - * @return void - */ - public function setResource($resource) - { - $this->source = new Resource($resource); - } - - /** - * Use the fallback image or not. - * - * @param bool $useFallbackImage - * - * @return $this - */ - public function useFallback($useFallbackImage = true) - { - $this->useFallbackImage = $useFallbackImage; - - return $this; - } - - /** - * Sets the fallback image to use. - * - * @param string|null $fallback - * - * @return $this - */ - public function setFallback($fallback = null) - { - if ($fallback === null) { - $this->fallback = __DIR__.'/images/error.jpg'; - } else { - $this->fallback = $fallback; - } - - return $this; - } - - /** - * Gets the fallback image path. - * - * @return string - */ - public function getFallback() - { - return $this->fallback; - } - - /** - * Gets the fallback into the cache dir. - * - * @return string - */ - public function getCacheFallback() - { - $fallback = $this->fallback; - - return $this->getCacheSystem()->getOrCreateFile('fallback.jpg', array(), function ($target) use ($fallback) { - copy($fallback, $target); - }); - } - - /** - * @return AdapterInterface - */ - public function getAdapter() - { - if (null === $this->adapter) { - // Defaults to GD - $this->setAdapter('gd'); - } - - return $this->adapter; - } - - /** - * @param AdapterInterface|string $adapter - * @throws \Exception - */ - public function setAdapter($adapter) - { - if ($adapter instanceof AdapterInterface) { - $this->adapter = $adapter; - } else { - if (is_string($adapter)) { - $adapter = strtolower($adapter); - - switch ($adapter) { - case 'gd': - $this->adapter = new GD(); - break; - case 'imagemagick': - case 'imagick': - $this->adapter = new Imagick(); - break; - default: - throw new \Exception('Unknown adapter: ' . $adapter); - } - } else { - throw new \Exception('Unable to load the given adapter (not string or Adapter)'); - } - } - - $this->adapter->setSource($this->source); - } - - /** - * Get the file path. - * - * @return string|null a string with the filename, null if the image does not depends on a file - */ - public function getFilePath() - { - if ($this->source instanceof File) { - return $this->source->getFile(); - } - - return null; - } - - /** - * Defines the file only after instantiation. - * - * @param string $originalFile the file path - * - * @return $this - */ - public function fromFile($originalFile) - { - $this->source = new File($originalFile); - - return $this; - } - - /** - * Tells if the image is correct. - * - * @return bool - */ - public function correct() - { - return $this->source->correct(); - } - - /** - * Guess the file type. - * - * @return string - */ - public function guessType() - { - return $this->source->guessType(); - } - - /** - * Adds an operation. - * - * @param string $method - * @param mixed $args - * - * @return void - */ - protected function addOperation($method, $args) - { - $this->operations[] = array($method, $args); - } - - /** - * Generic function. - * - * @param string $methodName - * @param array $args - * - * @return $this - */ - public function __call($methodName, $args) - { - $adapter = $this->getAdapter(); - $reflection = new \ReflectionClass(get_class($adapter)); - - if ($reflection->hasMethod($methodName)) { - $method = $reflection->getMethod($methodName); - - if ($method->getNumberOfRequiredParameters() > count($args)) { - throw new \InvalidArgumentException('Not enough arguments given for '.$methodName); - } - - $this->addOperation($methodName, $args); - - return $this; - } - - throw new \BadFunctionCallException('Invalid method: '.$methodName); - } - - /** - * Serialization of operations. - * - * @return string - */ - public function serializeOperations() - { - $datas = array(); - - foreach ($this->operations as $operation) { - $method = $operation[0]; - $args = $operation[1]; - - foreach ($args as &$arg) { - if ($arg instanceof self) { - $arg = $arg->getHash(); - } - } - unset($arg); - - $datas[] = array($method, $args); - } - - return serialize($datas); - } - - /** - * Generates the hash. - * - * @param string $type - * @param int $quality - * - * @return void - */ - public function generateHash($type = 'guess', $quality = 80) - { - $inputInfos = $this->source->getInfos(); - - $datas = array( - $inputInfos, - $this->serializeOperations(), - $type, - $quality, - ); - - $this->hash = sha1(serialize($datas)); - } - - /** - * Gets the hash. - * - * @param string $type - * @param int $quality - * - * @return string - */ - public function getHash($type = 'guess', $quality = 80) - { - if (null === $this->hash) { - $this->generateHash($type, $quality); - } - - return $this->hash; - } - - /** - * Gets the cache file name and generate it if it does not exists. - * Note that if it exists, all the image computation process will - * not be done. - * - * @param string $type the image type - * @param int $quality the quality (for JPEG) - * @param bool $actual - * - * @return string - */ - public function cacheFile($type = 'jpg', $quality = 80, $actual = false) - { - if ($type === 'guess') { - $type = $this->guessType(); - } - - if (!count($this->operations) && $type === $this->guessType() && !$this->forceCache) { - return $this->getFilename($this->getFilePath()); - } - - // Computes the hash - $this->hash = $this->getHash($type, $quality); - - // Generates the cache file - $cacheFile = ''; - - if (!$this->prettyName || $this->prettyPrefix) { - $cacheFile .= $this->hash; - } - - if ($this->prettyPrefix) { - $cacheFile .= '-'; - } - - if ($this->prettyName) { - $cacheFile .= $this->prettyName; - } - - $cacheFile .= '.'.$type; - - // If the files does not exists, save it - $image = $this; - - // Target file should be younger than all the current image - // dependencies - $conditions = array( - 'younger-than' => $this->getDependencies(), - ); - - // The generating function - $generate = function ($target) use ($image, $type, $quality) { - $result = $image->save($target, $type, $quality); - - if ($result != $target) { - throw new GenerationError($result); - } - }; - - // Asking the cache for the cacheFile - try { - $file = $this->getCacheSystem()->getOrCreateFile($cacheFile, $conditions, $generate, $actual); - } catch (GenerationError $e) { - $file = $e->getNewFile(); - } - - // Nulling the resource - $this->getAdapter()->setSource(new File($file)); - $this->getAdapter()->deinit(); - - if ($actual) { - return $file; - } - - return $this->getFilename($file); - } - - /** - * Get cache data (to render the image). - * - * @param string $type the image type - * @param int $quality the quality (for JPEG) - * - * @return string|false - */ - public function cacheData($type = 'jpg', $quality = 80) - { - return file_get_contents($this->cacheFile($type, $quality)); - } - - /** - * Hook to helps to extends and enhance this class. - * - * @param string $filename - * - * @return string - */ - protected function getFilename($filename) - { - return $filename; - } - - /** - * Generates and output a jpeg cached file. - * - * @param int $quality - * - * @return string - */ - public function jpeg($quality = 80) - { - return $this->cacheFile('jpg', $quality); - } - - /** - * Generates and output a gif cached file. - * - * @return string - */ - public function gif() - { - return $this->cacheFile('gif'); - } - - /** - * Generates and output a png cached file. - * - * @return string - */ - public function png() - { - return $this->cacheFile('png'); - } - - /** - * Generates and output a webp cached file. - * - * @param int $quality - * - * @return string - */ - public function webp($quality = 80) - { - return $this->cacheFile('webp', $quality); - } - - /** - * Generates and output an image using the same type as input. - * - * @param int $quality - * - * @return string - */ - public function guess($quality = 80) - { - return $this->cacheFile('guess', $quality); - } - - /** - * Get all the files that this image depends on. - * - * @return string[] this is an array of strings containing all the files that the - * current Image depends on - */ - public function getDependencies() - { - $dependencies = array(); - - $file = $this->getFilePath(); - if ($file) { - $dependencies[] = $file; - } - - foreach ($this->operations as $operation) { - foreach ($operation[1] as $argument) { - if ($argument instanceof self) { - $dependencies = array_merge($dependencies, $argument->getDependencies()); - } - } - } - - return $dependencies; - } - - /** - * Applies the operations. - * - * @return void - */ - public function applyOperations() - { - // Renders the effects - foreach ($this->operations as $operation) { - call_user_func_array(array($this->adapter, $operation[0]), $operation[1]); - } - } - - /** - * Initialize the adapter. - * - * @return void - */ - public function init() - { - $this->getAdapter()->init(); - } - - /** - * Save the file to a given output. - * - * @param string $file - * @param string|int $type - * @param int $quality - * @return string|false - * @throws \Exception - */ - public function save($file, $type = 'guess', $quality = 80) - { - if ($file) { - $directory = dirname($file); - - if (!is_dir($directory)) { - @mkdir($directory, 0777, true); - } - } - - if (is_int($type)) { - $quality = $type; - $type = 'jpeg'; - } - - if ($type === 'guess') { - $type = $this->guessType(); - } - - if (!isset(self::$types[$type])) { - throw new \InvalidArgumentException('Given type ('.$type.') is not valid'); - } - - $type = self::$types[$type]; - - try { - $this->init(); - $this->applyOperations(); - - $success = false; - - if (null === $file) { - ob_start(); - } - - if ($type === 'jpeg') { - $success = $this->getAdapter()->saveJpeg($file, $quality); - } - - if ($type === 'gif') { - $success = $this->getAdapter()->saveGif($file); - } - - if ($type === 'png') { - $success = $this->getAdapter()->savePng($file); - } - - if ($type === 'webp') { - $success = $this->getAdapter()->saveWebP($file, $quality); - } - - if (!$success) { - return false; - } - - return null === $file ? ob_get_clean() : $file; - } catch (\Exception $e) { - if ($this->useFallbackImage) { - return null === $file ? file_get_contents($this->fallback) : $this->getCacheFallback(); - } else { - throw $e; - } - } - } - - /** - * Get the contents of the image. - * - * @param string|int $type - * @param int $quality - * @return string|false - * @throws \Exception - */ - public function get($type = 'guess', $quality = 80) - { - return $this->save(null, $type, $quality); - } - - /* Image API */ - - /** - * Image width. - * - * @return int - */ - public function width() - { - return $this->getAdapter()->width(); - } - - /** - * Image height. - * - * @return int - */ - public function height() - { - return $this->getAdapter()->height(); - } - - /** - * Tostring defaults to jpeg. - * - * @return string - */ - public function __toString() - { - return $this->guess(); - } - - /** - * Returning basic html code for this image. - * - * @param string $title - * @param string $type - * @param int $quality - * - * @return string - */ - public function html($title = '', $type = 'jpg', $quality = 80) - { - return ''; - } - - /** - * Returns the Base64 inlineable representation. - * - * @param string $type - * @param int $quality - * - * @return string - */ - public function inline($type = 'jpg', $quality = 80) - { - $mime = $type; - if ($mime === 'jpg') { - $mime = 'jpeg'; - } - - return 'data:image/'.$mime.';base64,'.base64_encode(file_get_contents($this->cacheFile($type, $quality, true))); - } - - /** - * Creates an instance, useful for one-line chaining. - * - * @param string $file - * - * @return static - */ - public static function open($file = '') - { - return new static($file); - } - - /** - * Creates an instance of a new resource. - * - * @param int $width - * @param int $height - * - * @return static - */ - public static function create($width, $height) - { - return new static(null, $width, $height); - } - - /** - * Creates an instance of image from its data. - * - * @param string $data - * - * @return static - */ - public static function fromData($data) - { - $image = new static(); - $image->setData($data); - - return $image; - } - - /** - * Creates an instance of image from resource. - * - * @param resource $resource - * - * @return static - */ - public static function fromResource($resource) - { - $image = new static(); - $image->setResource($resource); - - return $image; - } -} diff --git a/source/vendor/getgrav/image/Gregwar/Image/ImageColor.php b/source/vendor/getgrav/image/Gregwar/Image/ImageColor.php deleted file mode 100644 index 4b7fa9f..0000000 --- a/source/vendor/getgrav/image/Gregwar/Image/ImageColor.php +++ /dev/null @@ -1,109 +0,0 @@ - 0x000000, - 'silver' => 0xc0c0c0, - 'gray' => 0x808080, - 'teal' => 0x008080, - 'aqua' => 0x00ffff, - 'blue' => 0x0000ff, - 'navy' => 0x000080, - 'green' => 0x008000, - 'lime' => 0x00ff00, - 'white' => 0xffffff, - 'fuschia' => 0xff00ff, - 'purple' => 0x800080, - 'olive' => 0x808000, - 'yellow' => 0xffff00, - 'orange' => 0xffA500, - 'red' => 0xff0000, - 'maroon' => 0x800000, - 'transparent' => 0x7fffffff, - ); - - /** - * @param resource $image - * @param string|int $color - * @return int|false - */ - public static function gdAllocate($image, $color) - { - $colorRGBA = self::parse($color); - - $b = ($colorRGBA) & 0xff; - $colorRGBA >>= 8; - $g = ($colorRGBA) & 0xff; - $colorRGBA >>= 8; - $r = ($colorRGBA) & 0xff; - $colorRGBA >>= 8; - $a = ($colorRGBA) & 0xff; - - $c = imagecolorallocatealpha($image, $r, $g, $b, $a); - - if ($color === 'transparent') { - imagecolortransparent($image, $c); - } - - return $c; - } - - /** - * @param string|int $color - * - * @return int - */ - public static function parse($color) - { - // Direct color representation (ex: 0xff0000) - if (!is_string($color) && is_numeric($color)) { - return $color; - } - - // Color name (ex: "red") - if (isset(self::$colors[$color])) { - return self::$colors[$color]; - } - - if (is_string($color)) { - $color_string = str_replace(' ', '', $color); - - // Color string (ex: "ff0000", "#ff0000" or "0xfff") - if (preg_match('/^(#|0x|)([0-9a-f]{3,6})/i', $color_string, $matches)) { - $col = $matches[2]; - - if (strlen($col) === 6) { - return hexdec($col); - } - - if (strlen($col) === 3) { - $r = ''; - for ($i = 0; $i < 3; ++$i) { - $r .= $col[$i].$col[$i]; - } - - return hexdec($r); - } - } - - // Colors like "rgb(255, 0, 0)" - if (preg_match('/^rgb\(([0-9]+),([0-9]+),([0-9]+)\)/i', $color_string, $matches)) { - $r = $matches[1]; - $g = $matches[2]; - $b = $matches[3]; - if ($r >= 0 && $r <= 0xff && $g >= 0 && $g <= 0xff && $b >= 0 && $b <= 0xff) { - return ($r << 16) | ($g << 8) | ($b); - } - } - } - - throw new \InvalidArgumentException('Invalid color: '.$color); - } -} diff --git a/source/vendor/getgrav/image/Gregwar/Image/LICENSE b/source/vendor/getgrav/image/Gregwar/Image/LICENSE deleted file mode 100644 index 62f991a..0000000 --- a/source/vendor/getgrav/image/Gregwar/Image/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) <2012-2017> Grégoire Passault - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/source/vendor/getgrav/image/Gregwar/Image/Makefile b/source/vendor/getgrav/image/Gregwar/Image/Makefile deleted file mode 100644 index 27f22c5..0000000 --- a/source/vendor/getgrav/image/Gregwar/Image/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -cs: - php-cs-fixer fix --verbose - -test: - phpunit -c phpunit.xml.dist diff --git a/source/vendor/getgrav/image/Gregwar/Image/README.md b/source/vendor/getgrav/image/Gregwar/Image/README.md deleted file mode 100644 index 7d2e477..0000000 --- a/source/vendor/getgrav/image/Gregwar/Image/README.md +++ /dev/null @@ -1,278 +0,0 @@ -# Gregwar's Image class - -[![Build status](https://travis-ci.org/Gregwar/Image.svg?branch=master)](https://travis-ci.org/Gregwar/Image) -[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YUXRLWHQSWS6L) - -The `Gregwar\Image` class purpose is to provide a simple object-oriented images handling and caching API. - -# Installation - -With composer : - -``` json -{ - ... - "require": { - "gregwar/image": "2.*" - } -} -``` - -# Usage - -## Basic handling - -Using methods chaining, you can open, transform and save a file in a single line: - -```php -resize(100, 100) - ->negate() - ->save('out.jpg'); -``` - -Here are the resize methods: - -* `resize($width, $height, $background)`: resizes the image, will preserve scale and never - enlarge it (background is `red` in order to understand what happens): - -![resize()](doc/resize.jpg) - -* `scaleResize($width, $height, $background)`: resizes the image, will preserve scale, can enlarge - it (background is `red` in order to understand what happens): - -![scaleResize()](doc/scaleResize.jpg) - -* `forceResize($width, $height, $background)`: resizes the image forcing it to - be exactly `$width` by `$height` - -![forceResize()](doc/forceResize.jpg) - -* `cropResize($width, $height, $background)`: resizes the image preserving scale (just like `resize()`) - and croping the whitespaces: - -![cropResize()](doc/cropResize.jpg) - -* `zoomCrop($width, $height, $background, $xPos, $yPos)`: resize and crop the image to fit to given dimensions: - -![zoomCrop()](doc/zoomCrop.jpg) - -* In `zoomCrop()`, You can change the position of the resized image using the `$xPos` (center, left or right) and `$yPos` (center, - top or bottom): - -![zoomCrop() with yPos=top](doc/zoomCropTop.jpg) - -The other methods available are: - -* `crop($x, $y, $w, $h)`: crops the image to a box located on coordinates $x,y and - which size is $w by $h - -* `negate()`: negates the image colors - -* `brighness($b)`: applies a brightness effect to the image (from -255 to +255) - -* `contrast($c)`: applies a contrast effect to the image (from -100 to +100) - -* `grayscale()`: converts the image to grayscale - -* `emboss()`: emboss the image - -* `smooth($p)`: smooth the image - -* `sharp()`: applies a mean removal filter on the image - -* `edge()`: applies an edge effect on the image - -* `colorize($red, $green, $blue)`: colorize the image (from -255 to +255 for each color) - -* `sepia()`: applies a sepia effect - -* `merge($image, $x, $y, $width, $height)`: merges two images - -* `fill($color, $x, $y)`: fills the image with the given color - -* `write($font, $text, $x, $y, $size, $angle, $color, $position)`: writes text over image, $position can be any of 'left', 'right', or 'center' - -* `rectangle($x1, $y1, $x2, $y2, $color, $filled=false)`: draws a rectangle - -* `rotate($angle, $background = 0xffffff)` : rotate the image to given angle - -* `roundedRectangle($x1, $y1, $x2, $y2, $radius, $color, $filled=false)`: draws a rounded rectangle ($radius can be anything from 0) - -* `line($x1, $y1, $x2, $y2, $color)`: draws a line - -* `ellipse($cx, $cy, $width, $height, $color, $filled=false)`: draws an ellipse - -* `circle($cx, $cy, $r, $color, $filled=false)`: draws a circle - -* `fillBackground($bg=0xffffff)`: fills the background of a transparent image to the 'bg' color - -* `fixOrientation()`: return the image rotated and flipped using image exif information - -* `applyExifOrientation(int $exif_rotation_value)`: return the image rotated and flipped using an exif rotation value - -* `html($title = '', $type = 'jpg')`: return the `` tag with the cache image - -* `flip($flipVertical, $flipHorizontal)`: flips the image in the given directions. Both params are boolean and at least one must be true. - -* `inline($type = 'jpg')`: returns the HTML inlinable base64 string (see `demo/inline.php`) - -You can also create image from scratch using: - -```php -save('output.jpg', 'jpg', 85); -``` - -You can also get the contents of the image using `get($type = 'jpg', $quality = 80)`, which will return the binary contents of the image - -## Using cache - -Each operation above is not actually applied on the opened image, but added in an operations -array. This operation array, the name, type and modification time of file are hashed using -`sha1()` and the hash is used to look up for a cache file. - -Once the cache directory configured, you can call the following methods: - -* `jpeg($quality = 80)`: lookup or create a jpeg cache file on-the-fly - -* `gif()`: lookup or create a gif cache file on-the-fly - -* `png()`: lookup or create a png cache file on-the-fly - -* `guess($quality = 80)`: guesses the type (use the same as input) and lookup or create a - cache file on-the-fly - -* `setPrettyName($prettyName, $prefix = true)`: sets a "pretty" name suffix for the file, if you want it to be more SEO-friendly. - for instance, if you call it "Fancy Image", the cache will look like something/something-fancy-image.jpg. - If `$prefix` is passed to `false` (default `true`), the pretty name won't have any hash prefix. - If you want to use non-latin1 pretty names, **behat/transliterator** package must be installed. - -For instance: - -```php -sepia() - ->jpeg(); - -//Outputs: cache/images/1/8/6/9/c/86e4532dbd9c073075ef08e9751fc9bc0f4.jpg -``` - -If the original file and operations do not change, the hashed value will be the same and the -cache will not be generated again. - -You can use this directly in an HTML document: - - -```php -resize(150, 150)->jpeg(); ?>" /> -// ... -``` - -This is powerful since if you change the original image or any of your code the cached hash -will change and the file will be regenerated. - -Writing image -------------- - -You can also create your own image on-the-fly using drawing functions: - - -```php -fill(0xffaaaa) // Filling with a light red - ->rectangle(0xff3333, 0, 100, 300, 200, true) // Drawing a red rectangle - // Writing "Hello $username !" on the picture using a custom TTF font file - ->write('./fonts/CaviarDreams.ttf', 'Hello '.$username.'!', 150, 150, 20, 0, 'white', 'center') - ->jpeg(); -?> - -``` - -## Using fallback image - -If the image file doesn't exists, you can configurate a fallback image that will be used -by the class (note that this require the cache directory to be available). - -A default "error" image which is used is in `images/error.jpg`, you can change it with: - -```php -setFallback('/path/to/my/fallback.jpg'); -``` - -## Garbage Collect - -To prevent the cache from growing forever, you can use the provided GarbageCollect class as below: - -```php -negate(); - $this->sepia(); - } -``` - -Which could be used on the Image - -```php -myFilter(); -``` - -You can also write your own adapter which could extend one of this repository and use it by calling `setAdapter()`: - -```php -setAdapter(new MyCustomAdapter); -``` - -# License - -`Gregwar\Image` is under MIT License, please read the LICENSE file for further details. -Do not hesitate to fork this repository and customize it ! diff --git a/source/vendor/getgrav/image/Gregwar/Image/Source/Create.php b/source/vendor/getgrav/image/Gregwar/Image/Source/Create.php deleted file mode 100644 index 1b1e26a..0000000 --- a/source/vendor/getgrav/image/Gregwar/Image/Source/Create.php +++ /dev/null @@ -1,57 +0,0 @@ -width = $width; - $this->height = $height; - } - - /** - * @return int - */ - public function getWidth() - { - return $this->width; - } - - /** - * @return int - */ - public function getHeight() - { - return $this->height; - } - - /** - * @return array|string|null - */ - public function getInfos() - { - return array($this->width, $this->height); - } - - /** - * @return bool - */ - public function correct() - { - return $this->width > 0 && $this->height > 0; - } -} diff --git a/source/vendor/getgrav/image/Gregwar/Image/Source/Data.php b/source/vendor/getgrav/image/Gregwar/Image/Source/Data.php deleted file mode 100644 index 77fb1ce..0000000 --- a/source/vendor/getgrav/image/Gregwar/Image/Source/Data.php +++ /dev/null @@ -1,38 +0,0 @@ -data = $data; - } - - /** - * @return string - */ - public function getData() - { - return $this->data; - } - - /** - * @return array|string|null - */ - public function getInfos() - { - return sha1($this->data); - } -} diff --git a/source/vendor/getgrav/image/Gregwar/Image/Source/File.php b/source/vendor/getgrav/image/Gregwar/Image/Source/File.php deleted file mode 100644 index 1ad263d..0000000 --- a/source/vendor/getgrav/image/Gregwar/Image/Source/File.php +++ /dev/null @@ -1,89 +0,0 @@ -file = $file; - } - - /** - * @return string - */ - public function getFile() - { - return $this->file; - } - - /** - * @return bool - */ - public function correct() - { - if (function_exists('exif_imagetype')) { - return false !== @exif_imagetype($this->file); - } - - return true; - } - - /** - * @return string - */ - public function guessType() - { - if (function_exists('exif_imagetype')) { - $type = @exif_imagetype($this->file); - - if (false !== $type) { - if ($type === IMAGETYPE_JPEG) { - return 'jpeg'; - } - - if ($type === IMAGETYPE_GIF) { - return 'gif'; - } - - if ($type === IMAGETYPE_PNG) { - return 'png'; - } - - if ($type === IMAGETYPE_WEBP) { - return 'webp'; - } - } - } - - $parts = explode('.', $this->file); - $ext = strtolower($parts[count($parts) - 1]); - - if (isset(Image::$types[$ext])) { - return Image::$types[$ext]; - } - - return 'jpeg'; - } - - /** - * @return array|string|null - */ - public function getInfos() - { - return $this->file; - } -} diff --git a/source/vendor/getgrav/image/Gregwar/Image/Source/Resource.php b/source/vendor/getgrav/image/Gregwar/Image/Source/Resource.php deleted file mode 100644 index 21a5628..0000000 --- a/source/vendor/getgrav/image/Gregwar/Image/Source/Resource.php +++ /dev/null @@ -1,30 +0,0 @@ -resource = $resource; - } - - /** - * @return Resource - */ - public function getResource() - { - return $this->resource; - } -} diff --git a/source/vendor/getgrav/image/Gregwar/Image/Source/Source.php b/source/vendor/getgrav/image/Gregwar/Image/Source/Source.php deleted file mode 100644 index 6239c46..0000000 --- a/source/vendor/getgrav/image/Gregwar/Image/Source/Source.php +++ /dev/null @@ -1,40 +0,0 @@ -resize(500, 500) - ->save('out.png', 'png'); diff --git a/source/vendor/getgrav/image/Gregwar/Image/demo/cache.php b/source/vendor/getgrav/image/Gregwar/Image/demo/cache.php deleted file mode 100644 index 9046494..0000000 --- a/source/vendor/getgrav/image/Gregwar/Image/demo/cache.php +++ /dev/null @@ -1,10 +0,0 @@ -sepia(); -echo "\n"; diff --git a/source/vendor/getgrav/image/Gregwar/Image/demo/cacheCreate.php b/source/vendor/getgrav/image/Gregwar/Image/demo/cacheCreate.php deleted file mode 100644 index 49694d6..0000000 --- a/source/vendor/getgrav/image/Gregwar/Image/demo/cacheCreate.php +++ /dev/null @@ -1,18 +0,0 @@ -fill('rgb(255, 150, 150)') - ->circle(150, 150, 200, 'red', true) - ->write('./fonts/CaviarDreams.ttf', 'Hello world!', 150, 150, 20, 0, 'white', 'center') - ->jpeg(); - -echo "\n"; diff --git a/source/vendor/getgrav/image/Gregwar/Image/demo/cacheName.php b/source/vendor/getgrav/image/Gregwar/Image/demo/cacheName.php deleted file mode 100644 index e82638a..0000000 --- a/source/vendor/getgrav/image/Gregwar/Image/demo/cacheName.php +++ /dev/null @@ -1,14 +0,0 @@ -sepia() - ->setPrettyName('Some FanCY TestING!') - ->jpeg(); - -echo "\n"; diff --git a/source/vendor/getgrav/image/Gregwar/Image/demo/crop.php b/source/vendor/getgrav/image/Gregwar/Image/demo/crop.php deleted file mode 100644 index 84899d0..0000000 --- a/source/vendor/getgrav/image/Gregwar/Image/demo/crop.php +++ /dev/null @@ -1,9 +0,0 @@ -cropResize(500, 150) - ->save('out.jpg'); diff --git a/source/vendor/getgrav/image/Gregwar/Image/demo/data.php b/source/vendor/getgrav/image/Gregwar/Image/demo/data.php deleted file mode 100644 index 6f12ce5..0000000 --- a/source/vendor/getgrav/image/Gregwar/Image/demo/data.php +++ /dev/null @@ -1,14 +0,0 @@ -save('out.jpg'); diff --git a/source/vendor/getgrav/image/Gregwar/Image/demo/fallback.php b/source/vendor/getgrav/image/Gregwar/Image/demo/fallback.php deleted file mode 100644 index a16f512..0000000 --- a/source/vendor/getgrav/image/Gregwar/Image/demo/fallback.php +++ /dev/null @@ -1,11 +0,0 @@ -resize(100, 0) - ->negate() - ->jpeg() - ; diff --git a/source/vendor/getgrav/image/Gregwar/Image/demo/fonts/CaviarDreams.ttf b/source/vendor/getgrav/image/Gregwar/Image/demo/fonts/CaviarDreams.ttf deleted file mode 100644 index 02f4f45..0000000 Binary files a/source/vendor/getgrav/image/Gregwar/Image/demo/fonts/CaviarDreams.ttf and /dev/null differ diff --git a/source/vendor/getgrav/image/Gregwar/Image/demo/gc.php b/source/vendor/getgrav/image/Gregwar/Image/demo/gc.php deleted file mode 100644 index 01a6bf1..0000000 --- a/source/vendor/getgrav/image/Gregwar/Image/demo/gc.php +++ /dev/null @@ -1,7 +0,0 @@ -resize(100, 100) - ->negate() - ->get('jpeg'); - -echo $image; diff --git a/source/vendor/getgrav/image/Gregwar/Image/demo/guess.php b/source/vendor/getgrav/image/Gregwar/Image/demo/guess.php deleted file mode 100644 index 9e2931f..0000000 --- a/source/vendor/getgrav/image/Gregwar/Image/demo/guess.php +++ /dev/null @@ -1,10 +0,0 @@ -resize(100, 100) - ->negate() - ->guess(55); diff --git a/source/vendor/getgrav/image/Gregwar/Image/demo/img/mona.jpg b/source/vendor/getgrav/image/Gregwar/Image/demo/img/mona.jpg deleted file mode 100644 index 5e7d996..0000000 Binary files a/source/vendor/getgrav/image/Gregwar/Image/demo/img/mona.jpg and /dev/null differ diff --git a/source/vendor/getgrav/image/Gregwar/Image/demo/img/test.png b/source/vendor/getgrav/image/Gregwar/Image/demo/img/test.png deleted file mode 100644 index 7db0236..0000000 Binary files a/source/vendor/getgrav/image/Gregwar/Image/demo/img/test.png and /dev/null differ diff --git a/source/vendor/getgrav/image/Gregwar/Image/demo/img/test2.jpg b/source/vendor/getgrav/image/Gregwar/Image/demo/img/test2.jpg deleted file mode 100644 index 3590a5a..0000000 Binary files a/source/vendor/getgrav/image/Gregwar/Image/demo/img/test2.jpg and /dev/null differ diff --git a/source/vendor/getgrav/image/Gregwar/Image/demo/img/vinci.png b/source/vendor/getgrav/image/Gregwar/Image/demo/img/vinci.png deleted file mode 100644 index 7cd3393..0000000 Binary files a/source/vendor/getgrav/image/Gregwar/Image/demo/img/vinci.png and /dev/null differ diff --git a/source/vendor/getgrav/image/Gregwar/Image/demo/inline.php b/source/vendor/getgrav/image/Gregwar/Image/demo/inline.php deleted file mode 100644 index 8edad37..0000000 --- a/source/vendor/getgrav/image/Gregwar/Image/demo/inline.php +++ /dev/null @@ -1,7 +0,0 @@ - - diff --git a/source/vendor/getgrav/image/Gregwar/Image/demo/merge.php b/source/vendor/getgrav/image/Gregwar/Image/demo/merge.php deleted file mode 100644 index 7458cbf..0000000 --- a/source/vendor/getgrav/image/Gregwar/Image/demo/merge.php +++ /dev/null @@ -1,9 +0,0 @@ -merge(Image::open('img/test2.jpg')->cropResize(100, 100)) - ->save('out.jpg', 'jpg'); diff --git a/source/vendor/getgrav/image/Gregwar/Image/demo/percent.php b/source/vendor/getgrav/image/Gregwar/Image/demo/percent.php deleted file mode 100644 index 1986482..0000000 --- a/source/vendor/getgrav/image/Gregwar/Image/demo/percent.php +++ /dev/null @@ -1,10 +0,0 @@ -resize('26%') - ->negate() - ->save('out.jpg', 'jpg'); diff --git a/source/vendor/getgrav/image/Gregwar/Image/demo/resource.php b/source/vendor/getgrav/image/Gregwar/Image/demo/resource.php deleted file mode 100644 index 4204b40..0000000 --- a/source/vendor/getgrav/image/Gregwar/Image/demo/resource.php +++ /dev/null @@ -1,16 +0,0 @@ -save('out.jpg'); diff --git a/source/vendor/getgrav/image/Gregwar/Image/demo/watermark.php b/source/vendor/getgrav/image/Gregwar/Image/demo/watermark.php deleted file mode 100644 index 3e7f241..0000000 --- a/source/vendor/getgrav/image/Gregwar/Image/demo/watermark.php +++ /dev/null @@ -1,16 +0,0 @@ -merge($watermark, $img->width()-$watermark->width(), - $img->height()-$watermark->height()) - ->save('out.jpg', 'jpg'); diff --git a/source/vendor/getgrav/image/Gregwar/Image/demo/write.php b/source/vendor/getgrav/image/Gregwar/Image/demo/write.php deleted file mode 100644 index 8aab688..0000000 --- a/source/vendor/getgrav/image/Gregwar/Image/demo/write.php +++ /dev/null @@ -1,11 +0,0 @@ -fill('rgb(255, 150, 150)') - ->circle(150, 150, 200, 'red', true) - ->write('./fonts/CaviarDreams.ttf', 'Hello world!', 150, 150, 20, 0, 'white', 'center') - ->save('out.jpg', 'jpeg', 95); diff --git a/source/vendor/getgrav/image/Gregwar/Image/doc/cropResize.jpg b/source/vendor/getgrav/image/Gregwar/Image/doc/cropResize.jpg deleted file mode 100644 index 9e3dd7c..0000000 Binary files a/source/vendor/getgrav/image/Gregwar/Image/doc/cropResize.jpg and /dev/null differ diff --git a/source/vendor/getgrav/image/Gregwar/Image/doc/forceResize.jpg b/source/vendor/getgrav/image/Gregwar/Image/doc/forceResize.jpg deleted file mode 100644 index 8e1ede5..0000000 Binary files a/source/vendor/getgrav/image/Gregwar/Image/doc/forceResize.jpg and /dev/null differ diff --git a/source/vendor/getgrav/image/Gregwar/Image/doc/generate.php b/source/vendor/getgrav/image/Gregwar/Image/doc/generate.php deleted file mode 100644 index 8740f8a..0000000 --- a/source/vendor/getgrav/image/Gregwar/Image/doc/generate.php +++ /dev/null @@ -1,38 +0,0 @@ -resize(250, 250, 'red') - ->save('resize.jpg'); - -// scaleResize() will also preserve the scale, but won't -// enlage the image -Image::open('mona.jpg') - ->scaleResize(250, 250, 'red') - ->save('scaleResize.jpg'); - -// forceResize() will resize matching the *exact* given size -Image::open('mona.jpg') - ->forceResize(250, 250) - ->save('forceResize.jpg'); - -// cropResize() preserves scale just like resize() but will -// trim the whitespace (if any) in the resulting image -Image::open('mona.jpg') - ->cropResize(250, 250) - ->save('cropResize.jpg'); - -// zoomCrop() resizes the image so that a part of it appear in -// the given area -Image::open('mona.jpg') - ->zoomCrop(200, 200) - ->save('zoomCrop.jpg'); - -// You can specify the position using the xPos and yPos arguments -Image::open('mona.jpg') - ->zoomCrop(200, 200, 'transparent', 'center', 'top') - ->save('zoomCropTop.jpg'); diff --git a/source/vendor/getgrav/image/Gregwar/Image/doc/mona.jpg b/source/vendor/getgrav/image/Gregwar/Image/doc/mona.jpg deleted file mode 100644 index 5e7d996..0000000 Binary files a/source/vendor/getgrav/image/Gregwar/Image/doc/mona.jpg and /dev/null differ diff --git a/source/vendor/getgrav/image/Gregwar/Image/doc/resize.jpg b/source/vendor/getgrav/image/Gregwar/Image/doc/resize.jpg deleted file mode 100644 index ddf0463..0000000 Binary files a/source/vendor/getgrav/image/Gregwar/Image/doc/resize.jpg and /dev/null differ diff --git a/source/vendor/getgrav/image/Gregwar/Image/doc/scaleResize.jpg b/source/vendor/getgrav/image/Gregwar/Image/doc/scaleResize.jpg deleted file mode 100644 index 50c1e16..0000000 Binary files a/source/vendor/getgrav/image/Gregwar/Image/doc/scaleResize.jpg and /dev/null differ diff --git a/source/vendor/getgrav/image/Gregwar/Image/doc/zoomCrop.jpg b/source/vendor/getgrav/image/Gregwar/Image/doc/zoomCrop.jpg deleted file mode 100644 index ee6da42..0000000 Binary files a/source/vendor/getgrav/image/Gregwar/Image/doc/zoomCrop.jpg and /dev/null differ diff --git a/source/vendor/getgrav/image/Gregwar/Image/doc/zoomCropTop.jpg b/source/vendor/getgrav/image/Gregwar/Image/doc/zoomCropTop.jpg deleted file mode 100644 index 9d43290..0000000 Binary files a/source/vendor/getgrav/image/Gregwar/Image/doc/zoomCropTop.jpg and /dev/null differ diff --git a/source/vendor/getgrav/image/Gregwar/Image/images/error.jpg b/source/vendor/getgrav/image/Gregwar/Image/images/error.jpg deleted file mode 100644 index f02468f..0000000 Binary files a/source/vendor/getgrav/image/Gregwar/Image/images/error.jpg and /dev/null differ diff --git a/source/vendor/getgrav/image/Gregwar/Image/phpunit.xml.dist b/source/vendor/getgrav/image/Gregwar/Image/phpunit.xml.dist deleted file mode 100644 index c66a5af..0000000 --- a/source/vendor/getgrav/image/Gregwar/Image/phpunit.xml.dist +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - ./tests/ImageTests.php - - - - diff --git a/source/vendor/getgrav/image/Gregwar/Image/tests/ImageTests.php b/source/vendor/getgrav/image/Gregwar/Image/tests/ImageTests.php deleted file mode 100755 index 2c0c5fc..0000000 --- a/source/vendor/getgrav/image/Gregwar/Image/tests/ImageTests.php +++ /dev/null @@ -1,486 +0,0 @@ -open('monalisa.jpg'); - - $this->assertSame($image->width(), 771); - $this->assertSame($image->height(), 961); - } - - /** - * Testing the resize. - */ - public function testResize() - { - $image = $this->open('monalisa.jpg'); - - $out = $this->output('monalisa_small.jpg'); - $image - ->resize(300, 200) - ->save($out) - ; - - $this->assertTrue(file_exists($out)); - - $i = imagecreatefromjpeg($out); - $this->assertSame(300, imagesx($i)); - $this->assertSame(200, imagesy($i)); - } - - /** - * Testing the resize %. - */ - public function testResizePercent() - { - $image = $this->open('monalisa.jpg'); - - $out = $this->output('monalisa_small.jpg'); - $image - ->resize('50%') - ->save($out) - ; - - $this->assertTrue(file_exists($out)); - - $i = imagecreatefromjpeg($out); - $this->assertSame(386, imagesx($i)); - $this->assertSame(481, imagesy($i)); - } - - /** - * Testing to create an image, jpeg, gif and png. - */ - public function testCreateImage() - { - $black = $this->output('black.jpg'); - - Image::create(150, 200) - ->fill('black') - ->save($black, 100); - - $i = imagecreatefromjpeg($black); - $this->assertTrue(file_exists($black)); - $this->assertSame(150, imagesx($i)); - $this->assertSame(200, imagesy($i)); - - $j = imagecolorat($i, 40, 40); - $this->assertSame(0, $j); - - $black = $this->output('black.png'); - Image::create(150, 200) - ->fill('black') - ->save($black, 'png'); - - $i = imagecreatefrompng($black); - $this->assertTrue(file_exists($black)); - $this->assertSame(150, imagesx($i)); - $this->assertSame(200, imagesy($i)); - - $black = $this->output('black.gif'); - Image::create(150, 200) - ->fill('black') - ->save($black, 'gif'); - - $i = imagecreatefromgif($black); - $this->assertTrue(file_exists($black)); - $this->assertSame(150, imagesx($i)); - $this->assertSame(200, imagesy($i)); - } - - /** - * Testing type guess. - */ - public function testGuess() - { - $image = $this->open('monalisa.jpg'); - $this->assertSame('jpeg', $image->guessType()); - $image = $this->open('monalisa.png'); - $this->assertSame('png', $image->guessType()); - $image = $this->open('monalisa.gif'); - $this->assertSame('gif', $image->guessType()); - } - - public function testDefaultCacheSystem() - { - $image = $this->open('monalisa.jpg'); - $this->assertInstanceOf('Gregwar\Cache\Cache', $image->getCacheSystem()); - } - - public function testCustomCacheSystem() - { - $image = $this->open('monalisa.jpg'); - $cache = new Cache(); - $image->setCacheSystem($cache); - $this->assertEquals($image->getCacheSystem(), $cache); - } - - /** - * Testing that caching an image without operations will result - * in the original image when force cache is disabled. - */ - public function testNoCache() - { - $monalisa = __DIR__.'/files/monalisa.jpg'; - $image = $this->open('monalisa.jpg')->setForceCache(false); - $this->assertSame($monalisa, $image->guess()); - $image = $this->open('monalisa.jpg'); - $this->assertNotSame($monalisa, $image->guess()); - $image = $this->open('monalisa.jpg')->setForceCache(true); - $this->assertNotSame($monalisa, $image->guess()); - } - - public function testActualCache() - { - $output = $this->open('monalisa.jpg') - ->setCacheDir('/magic/path/to/cache/') - ->resize(100, 50)->negate() - ->guess(); - - $this->assertStringContainsString('/magic/path/to/cache', $output); - $file = str_replace('/magic/path/to', __DIR__.'/output/', $output); - $this->assertTrue(file_exists($file)); - } - - public function testCacheData() - { - $output = $this->open('monalisa.jpg') - ->resize(300, 200) - ->cacheData(); - - $jpg = imagecreatefromstring($output); - $this->assertSame(300, imagesx($jpg)); - $this->assertSame(200, imagesy($jpg)); - } - - /** - * Testing using cache. - */ - public function testCache() - { - $output = $this->open('monalisa.jpg') - ->resize(100, 50)->negate() - ->guess(); - - $this->assertTrue(file_exists($output)); - $i = imagecreatefromjpeg($output); - $this->assertSame(100, imagesx($i)); - $this->assertSame(50, imagesy($i)); - - $output2 = $this->open('monalisa.jpg') - ->resize(100, 50)->negate() - ->guess(); - - $this->assertSame($output, $output2); - - $output3 = $this->open('monalisa.jpg') - ->resize(100, 50)->negate() - ->png(); - $this->assertTrue(file_exists($output)); - $i = imagecreatefrompng($output3); - $this->assertSame(100, imagesx($i)); - $this->assertSame(50, imagesy($i)); - - $output4 = $this->open('monalisa.jpg') - ->resize(100, 50)->negate() - ->gif(); - $this->assertTrue(file_exists($output)); - $i = imagecreatefromgif($output4); - $this->assertSame(100, imagesx($i)); - $this->assertSame(50, imagesy($i)); - } - - /** - * Testing Gaussian blur filter. - */ - public function testGaussianBlur() - { - $image = $this->open('monalisa.jpg') - ->gaussianBlur(); - $secondImage = $this->open('monalisa.jpg') - ->gaussianBlur(5); - - $this->assertTrue(file_exists($image)); - $this->assertTrue(file_exists($secondImage)); - } - - /** - * Testing creating image from data. - */ - public function testData() - { - $data = file_get_contents(__DIR__.'/files/monalisa.jpg'); - - $output = $this->output('mona.jpg'); - $image = Image::fromData($data); - $image->save($output); - - $this->assertTrue(file_exists($output)); - $i = imagecreatefromjpeg($output); - $this->assertSame(771, imagesx($i)); - $this->assertSame(961, imagesy($i)); - } - - /** - * Opening an image. - */ - protected function open($file) - { - $image = Image::open(__DIR__.'/files/'.$file); - $image->setCacheDir(__DIR__.'/output/cache/'); - $image->setActualCacheDir(__DIR__.'/output/cache/'); - - return $image; - } - - /** - * Testing transparent image. - */ - public function testTransparent() - { - $gif = $this->output('transparent.gif'); - $i = Image::create(200, 100) - ->fill('transparent') - ->save($gif, 'gif'); - - $this->assertTrue(file_exists($gif)); - $img = imagecreatefromgif($gif); - $this->assertSame(200, imagesx($img)); - $this->assertSame(100, imagesy($img)); - $index = imagecolorat($img, 2, 2); - $color = imagecolorsforindex($img, $index); - $this->assertSame(127, $color['alpha']); - } - - public function testNonExistingFile() - { - $jpg = $this->output('a.jpg'); - $img = $this->open('non_existing_file.jpg') - ->negate(); - $error = $img->save($jpg); - - $this->assertTrue(file_exists($error)); - } - - public function testNonExistingFileNoFallback() - { - $this->expectException(\UnexpectedValueException::class); - - Image::open('non_existing_file.jpg') - ->useFallback(false) - ->save($this->output('a.jpg')); - } - - /** - * Test that image::save returns the file name. - */ - public function testSaveReturn() - { - $red = $this->output('red.jpg'); - $result = Image::create(10, 10) - ->fill('red') - ->save($red); - - $this->assertSame($red, $result); - } - - /** - * Testing merge. - */ - public function testMerge() - { - $out = $this->output('merge.jpg'); - Image::create(100, 100) - ->fill('red') - ->merge(Image::create(50, 50) - ->fill('black') - ) - ->save($out); - - // Merge file exists - $this->assertTrue(file_exists($out)); - - // Test that the upper left zone contain a black pixel, and the lower - // down contains a red one - $img = imagecreatefromjpeg($out); - $this->assertColorEquals('black', imagecolorat($img, 5, 12)); - $this->assertColorEquals('red', imagecolorat($img, 55, 62)); - } - - /** - * Test that dependencies are well generated. - */ - public function testDependencies() - { - $this->assertSame(array(), Image::create(100, 100) - ->getDependencies()); - $this->assertSame(array(), Image::create(100, 100) - ->merge(Image::create(100, 50)) - ->getDependencies()); - - $this->assertSame(array('toto.jpg'), Image::open('toto.jpg') - ->merge(Image::create(100, 50)) - ->getDependencies()); - - $this->assertSame(array('toto.jpg', 'titi.jpg'), Image::open('toto.jpg') - ->merge(Image::open('titi.jpg')) - ->getDependencies()); - - $this->assertSame(array('toto.jpg', 'titi.jpg', 'tata.jpg'), Image::open('toto.jpg') - ->merge(Image::open('titi.jpg') - ->merge(Image::open('tata.jpg'))) - ->getDependencies()); - } - - /** - * Test that pretty name (for referencing) is well respected. - */ - public function testPrettyName() - { - $output = $this->open('monalisa.jpg') - ->resize(100, 50)->negate() - ->setPrettyName('davinci', false) - ->guess(); - - $this->assertStringContainsString('davinci', $output); - - $output2 = $this->open('monalisa.jpg') - ->resize(100, 55)->negate() - ->setPrettyName('davinci', false) - ->guess(); - - $this->assertSame($output, $output2); - - $prefix1 = $this->open('monalisa.jpg') - ->resize(100, 50)->negate() - ->setPrettyName('davinci') - ->guess(); - $prefix2 = $this->open('monalisa.jpg') - ->resize(100, 55)->negate() - ->setPrettyName('davinci') - ->guess(); - - $this->assertStringContainsString('davinci', $prefix1); - $this->assertStringContainsString('davinci', $prefix2); - $this->assertNotSame($prefix1, $prefix2); - - $transliterator = '\Behat\Transliterator\Transliterator'; - - if (class_exists($transliterator)) { - $nonLatinName1 = 'ダヴィンチ'; - $nonLatinOutput1 = $this->open('monalisa.jpg') - ->resize(100, 50)->negate() - ->setPrettyName($nonLatinName1, false) - ->guess(); - - $this->assertContains( - $transliterator::urlize($transliterator::transliterate($nonLatinName1)), - $nonLatinOutput1 - ); - - $nonLatinName2 = 'давинчи'; - $nonLatinOutput2 = $this->open('monalisa.jpg') - ->resize(100, 55)->negate() - ->setPrettyName($nonLatinName2) - ->guess(); - - $this->assertContains( - $transliterator::urlize($transliterator::transliterate($nonLatinName2)), - $nonLatinOutput2 - ); - } - } - - /** - * Testing inlining. - */ - public function testInline() - { - $output = $this->open('monalisa.jpg') - ->resize(20, 20) - ->inline(); - - $this->assertSame(0, strpos($output, 'data:image/jpeg;base64,')); - - $data = base64_decode(substr($output, 23)); - $image = imagecreatefromstring($data); - - $this->assertSame(20, imagesx($image)); - $this->assertSame(20, imagesy($image)); - } - - /** - * Testing that width() can be called after cache - */ - public function testWidthPostCache() - { - $this->open('monalisa.jpg') - ->resize(100, 50)->negate() - ->png(); - - $dummy2 = $this->open('monalisa.jpg') - ->resize(100, 50)->negate(); - $png = $dummy2->png(); - - $i = imagecreatefrompng($png); - $this->assertEquals(imagesx($i), $dummy2->width()); - } - - /** - * Asaserting that two colors are equals - * (JPG compression is not preserving colors for instance, so we - * need a non-strict way to compare it). - */ - protected function assertColorEquals($c1, $c2, $delta = 8) - { - $c1 = ImageColor::parse($c1); - $c2 = ImageColor::parse($c2); - list($r1, $g1, $b1) = $this->toRGB($c1); - list($r2, $g2, $b2) = $this->toRGB($c2); - - $this->assertLessThan($delta, abs($r1 - $r2)); - $this->assertLessThan($delta, abs($g1 - $g2)); - $this->assertLessThan($delta, abs($b1 - $b2)); - } - - protected function toRGB($color) - { - $b = $color & 0xff; - $g = ($color >> 8) & 0xff; - $r = ($color >> 16) & 0xff; - - return array($r, $g, $b); - } - - /** - * Outputing an image to a file. - */ - protected function output($file) - { - return __DIR__.'/output/'.$file; - } - - /** - * Reinitialize the output dir. - */ - public function setUp(): void - { - $dir = $this->output(''); - `rm -rf $dir`; - mkdir($dir); - mkdir($this->output('cache')); - } -} diff --git a/source/vendor/getgrav/image/Gregwar/Image/tests/bootstrap.php b/source/vendor/getgrav/image/Gregwar/Image/tests/bootstrap.php deleted file mode 100644 index a58ca82..0000000 --- a/source/vendor/getgrav/image/Gregwar/Image/tests/bootstrap.php +++ /dev/null @@ -1,9 +0,0 @@ -setRiskyAllowed(true) - ->setRules([ - '@PSR2' => true, - 'array_syntax' => ['syntax' => 'short'], - 'concat_space' => ['spacing' => 'one'], - 'declare_strict_types' => false, - 'final_static_access' => true, - 'fully_qualified_strict_types' => true, - 'header_comment' => false, - 'is_null' => ['use_yoda_style' => true], - 'list_syntax' => ['syntax' => 'long'], - 'lowercase_cast' => true, - 'magic_method_casing' => true, - 'modernize_types_casting' => true, - 'multiline_comment_opening_closing' => true, - 'no_alias_functions' => true, - 'no_alternative_syntax' => true, - 'no_blank_lines_after_phpdoc' => true, - 'no_empty_comment' => true, - 'no_empty_phpdoc' => true, - 'no_empty_statement' => true, - 'no_extra_blank_lines' => true, - 'no_leading_import_slash' => true, - 'no_trailing_comma_in_singleline_array' => true, - 'no_unset_cast' => true, - 'no_unused_imports' => true, - 'no_whitespace_in_blank_line' => true, - 'ordered_imports' => true, - 'php_unit_ordered_covers' => true, - 'php_unit_test_annotation' => ['style' => 'prefix'], - 'php_unit_test_case_static_method_calls' => ['call_type' => 'self'], - 'phpdoc_align' => ['align' => 'vertical'], - 'phpdoc_no_useless_inheritdoc' => true, - 'phpdoc_scalar' => true, - 'phpdoc_separation' => true, - 'phpdoc_single_line_var_spacing' => true, - 'phpdoc_trim' => true, - 'phpdoc_trim_consecutive_blank_line_separation' => true, - 'phpdoc_types' => true, - 'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'], - 'phpdoc_var_without_name' => true, - 'single_trait_insert_per_statement' => true, - 'standardize_not_equals' => true, - ]) - ->setFinder( - PhpCsFixer\Finder::create() - ->in(__DIR__.'/src') - ->in(__DIR__.'/tests') - ->name('*.php') - ) -; - -return $config; diff --git a/source/vendor/guzzlehttp/psr7/LICENSE b/source/vendor/guzzlehttp/psr7/LICENSE deleted file mode 100644 index 581d95f..0000000 --- a/source/vendor/guzzlehttp/psr7/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2015 Michael Dowling, https://github.com/mtdowling - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/source/vendor/guzzlehttp/psr7/README.md b/source/vendor/guzzlehttp/psr7/README.md deleted file mode 100644 index acfabfd..0000000 --- a/source/vendor/guzzlehttp/psr7/README.md +++ /dev/null @@ -1,809 +0,0 @@ -# PSR-7 Message Implementation - -This repository contains a full [PSR-7](http://www.php-fig.org/psr/psr-7/) -message implementation, several stream decorators, and some helpful -functionality like query string parsing. - - -[![Build Status](https://travis-ci.org/guzzle/psr7.svg?branch=master)](https://travis-ci.org/guzzle/psr7) - - -# Stream implementation - -This package comes with a number of stream implementations and stream -decorators. - - -## AppendStream - -`GuzzleHttp\Psr7\AppendStream` - -Reads from multiple streams, one after the other. - -```php -use GuzzleHttp\Psr7; - -$a = Psr7\Utils::streamFor('abc, '); -$b = Psr7\Utils::streamFor('123.'); -$composed = new Psr7\AppendStream([$a, $b]); - -$composed->addStream(Psr7\Utils::streamFor(' Above all listen to me')); - -echo $composed; // abc, 123. Above all listen to me. -``` - - -## BufferStream - -`GuzzleHttp\Psr7\BufferStream` - -Provides a buffer stream that can be written to fill a buffer, and read -from to remove bytes from the buffer. - -This stream returns a "hwm" metadata value that tells upstream consumers -what the configured high water mark of the stream is, or the maximum -preferred size of the buffer. - -```php -use GuzzleHttp\Psr7; - -// When more than 1024 bytes are in the buffer, it will begin returning -// false to writes. This is an indication that writers should slow down. -$buffer = new Psr7\BufferStream(1024); -``` - - -## CachingStream - -The CachingStream is used to allow seeking over previously read bytes on -non-seekable streams. This can be useful when transferring a non-seekable -entity body fails due to needing to rewind the stream (for example, resulting -from a redirect). Data that is read from the remote stream will be buffered in -a PHP temp stream so that previously read bytes are cached first in memory, -then on disk. - -```php -use GuzzleHttp\Psr7; - -$original = Psr7\Utils::streamFor(fopen('http://www.google.com', 'r')); -$stream = new Psr7\CachingStream($original); - -$stream->read(1024); -echo $stream->tell(); -// 1024 - -$stream->seek(0); -echo $stream->tell(); -// 0 -``` - - -## DroppingStream - -`GuzzleHttp\Psr7\DroppingStream` - -Stream decorator that begins dropping data once the size of the underlying -stream becomes too full. - -```php -use GuzzleHttp\Psr7; - -// Create an empty stream -$stream = Psr7\Utils::streamFor(); - -// Start dropping data when the stream has more than 10 bytes -$dropping = new Psr7\DroppingStream($stream, 10); - -$dropping->write('01234567890123456789'); -echo $stream; // 0123456789 -``` - - -## FnStream - -`GuzzleHttp\Psr7\FnStream` - -Compose stream implementations based on a hash of functions. - -Allows for easy testing and extension of a provided stream without needing -to create a concrete class for a simple extension point. - -```php - -use GuzzleHttp\Psr7; - -$stream = Psr7\Utils::streamFor('hi'); -$fnStream = Psr7\FnStream::decorate($stream, [ - 'rewind' => function () use ($stream) { - echo 'About to rewind - '; - $stream->rewind(); - echo 'rewound!'; - } -]); - -$fnStream->rewind(); -// Outputs: About to rewind - rewound! -``` - - -## InflateStream - -`GuzzleHttp\Psr7\InflateStream` - -Uses PHP's zlib.inflate filter to inflate deflate or gzipped content. - -This stream decorator skips the first 10 bytes of the given stream to remove -the gzip header, converts the provided stream to a PHP stream resource, -then appends the zlib.inflate filter. The stream is then converted back -to a Guzzle stream resource to be used as a Guzzle stream. - - -## LazyOpenStream - -`GuzzleHttp\Psr7\LazyOpenStream` - -Lazily reads or writes to a file that is opened only after an IO operation -take place on the stream. - -```php -use GuzzleHttp\Psr7; - -$stream = new Psr7\LazyOpenStream('/path/to/file', 'r'); -// The file has not yet been opened... - -echo $stream->read(10); -// The file is opened and read from only when needed. -``` - - -## LimitStream - -`GuzzleHttp\Psr7\LimitStream` - -LimitStream can be used to read a subset or slice of an existing stream object. -This can be useful for breaking a large file into smaller pieces to be sent in -chunks (e.g. Amazon S3's multipart upload API). - -```php -use GuzzleHttp\Psr7; - -$original = Psr7\Utils::streamFor(fopen('/tmp/test.txt', 'r+')); -echo $original->getSize(); -// >>> 1048576 - -// Limit the size of the body to 1024 bytes and start reading from byte 2048 -$stream = new Psr7\LimitStream($original, 1024, 2048); -echo $stream->getSize(); -// >>> 1024 -echo $stream->tell(); -// >>> 0 -``` - - -## MultipartStream - -`GuzzleHttp\Psr7\MultipartStream` - -Stream that when read returns bytes for a streaming multipart or -multipart/form-data stream. - - -## NoSeekStream - -`GuzzleHttp\Psr7\NoSeekStream` - -NoSeekStream wraps a stream and does not allow seeking. - -```php -use GuzzleHttp\Psr7; - -$original = Psr7\Utils::streamFor('foo'); -$noSeek = new Psr7\NoSeekStream($original); - -echo $noSeek->read(3); -// foo -var_export($noSeek->isSeekable()); -// false -$noSeek->seek(0); -var_export($noSeek->read(3)); -// NULL -``` - - -## PumpStream - -`GuzzleHttp\Psr7\PumpStream` - -Provides a read only stream that pumps data from a PHP callable. - -When invoking the provided callable, the PumpStream will pass the amount of -data requested to read to the callable. The callable can choose to ignore -this value and return fewer or more bytes than requested. Any extra data -returned by the provided callable is buffered internally until drained using -the read() function of the PumpStream. The provided callable MUST return -false when there is no more data to read. - - -## Implementing stream decorators - -Creating a stream decorator is very easy thanks to the -`GuzzleHttp\Psr7\StreamDecoratorTrait`. This trait provides methods that -implement `Psr\Http\Message\StreamInterface` by proxying to an underlying -stream. Just `use` the `StreamDecoratorTrait` and implement your custom -methods. - -For example, let's say we wanted to call a specific function each time the last -byte is read from a stream. This could be implemented by overriding the -`read()` method. - -```php -use Psr\Http\Message\StreamInterface; -use GuzzleHttp\Psr7\StreamDecoratorTrait; - -class EofCallbackStream implements StreamInterface -{ - use StreamDecoratorTrait; - - private $callback; - - public function __construct(StreamInterface $stream, callable $cb) - { - $this->stream = $stream; - $this->callback = $cb; - } - - public function read($length) - { - $result = $this->stream->read($length); - - // Invoke the callback when EOF is hit. - if ($this->eof()) { - call_user_func($this->callback); - } - - return $result; - } -} -``` - -This decorator could be added to any existing stream and used like so: - -```php -use GuzzleHttp\Psr7; - -$original = Psr7\Utils::streamFor('foo'); - -$eofStream = new EofCallbackStream($original, function () { - echo 'EOF!'; -}); - -$eofStream->read(2); -$eofStream->read(1); -// echoes "EOF!" -$eofStream->seek(0); -$eofStream->read(3); -// echoes "EOF!" -``` - - -## PHP StreamWrapper - -You can use the `GuzzleHttp\Psr7\StreamWrapper` class if you need to use a -PSR-7 stream as a PHP stream resource. - -Use the `GuzzleHttp\Psr7\StreamWrapper::getResource()` method to create a PHP -stream from a PSR-7 stream. - -```php -use GuzzleHttp\Psr7\StreamWrapper; - -$stream = GuzzleHttp\Psr7\Utils::streamFor('hello!'); -$resource = StreamWrapper::getResource($stream); -echo fread($resource, 6); // outputs hello! -``` - - -# Static API - -There are various static methods available under the `GuzzleHttp\Psr7` namespace. - - -## `GuzzleHttp\Psr7\Message::toString` - -`public static function toString(MessageInterface $message): string` - -Returns the string representation of an HTTP message. - -```php -$request = new GuzzleHttp\Psr7\Request('GET', 'http://example.com'); -echo GuzzleHttp\Psr7\Message::toString($request); -``` - - -## `GuzzleHttp\Psr7\Message::bodySummary` - -`public static function bodySummary(MessageInterface $message, int $truncateAt = 120): string|null` - -Get a short summary of the message body. - -Will return `null` if the response is not printable. - - -## `GuzzleHttp\Psr7\Message::rewindBody` - -`public static function rewindBody(MessageInterface $message): void` - -Attempts to rewind a message body and throws an exception on failure. - -The body of the message will only be rewound if a call to `tell()` -returns a value other than `0`. - - -## `GuzzleHttp\Psr7\Message::parseMessage` - -`public static function parseMessage(string $message): array` - -Parses an HTTP message into an associative array. - -The array contains the "start-line" key containing the start line of -the message, "headers" key containing an associative array of header -array values, and a "body" key containing the body of the message. - - -## `GuzzleHttp\Psr7\Message::parseRequestUri` - -`public static function parseRequestUri(string $path, array $headers): string` - -Constructs a URI for an HTTP request message. - - -## `GuzzleHttp\Psr7\Message::parseRequest` - -`public static function parseRequest(string $message): Request` - -Parses a request message string into a request object. - - -## `GuzzleHttp\Psr7\Message::parseResponse` - -`public static function parseResponse(string $message): Response` - -Parses a response message string into a response object. - - -## `GuzzleHttp\Psr7\Header::parse` - -`public static function parse(string|array $header): array` - -Parse an array of header values containing ";" separated data into an -array of associative arrays representing the header key value pair data -of the header. When a parameter does not contain a value, but just -contains a key, this function will inject a key with a '' string value. - - -## `GuzzleHttp\Psr7\Header::normalize` - -`public static function normalize(string|array $header): array` - -Converts an array of header values that may contain comma separated -headers into an array of headers with no comma separated values. - - -## `GuzzleHttp\Psr7\Query::parse` - -`public static function parse(string $str, int|bool $urlEncoding = true): array` - -Parse a query string into an associative array. - -If multiple values are found for the same key, the value of that key -value pair will become an array. This function does not parse nested -PHP style arrays into an associative array (e.g., `foo[a]=1&foo[b]=2` -will be parsed into `['foo[a]' => '1', 'foo[b]' => '2'])`. - - -## `GuzzleHttp\Psr7\Query::build` - -`public static function build(array $params, int|false $encoding = PHP_QUERY_RFC3986): string` - -Build a query string from an array of key value pairs. - -This function can use the return value of `parse()` to build a query -string. This function does not modify the provided keys when an array is -encountered (like `http_build_query()` would). - - -## `GuzzleHttp\Psr7\Utils::caselessRemove` - -`public static function caselessRemove(iterable $keys, $keys, array $data): array` - -Remove the items given by the keys, case insensitively from the data. - - -## `GuzzleHttp\Psr7\Utils::copyToStream` - -`public static function copyToStream(StreamInterface $source, StreamInterface $dest, int $maxLen = -1): void` - -Copy the contents of a stream into another stream until the given number -of bytes have been read. - - -## `GuzzleHttp\Psr7\Utils::copyToString` - -`public static function copyToString(StreamInterface $stream, int $maxLen = -1): string` - -Copy the contents of a stream into a string until the given number of -bytes have been read. - - -## `GuzzleHttp\Psr7\Utils::hash` - -`public static function hash(StreamInterface $stream, string $algo, bool $rawOutput = false): string` - -Calculate a hash of a stream. - -This method reads the entire stream to calculate a rolling hash, based on -PHP's `hash_init` functions. - - -## `GuzzleHttp\Psr7\Utils::modifyRequest` - -`public static function modifyRequest(RequestInterface $request, array $changes): RequestInterface` - -Clone and modify a request with the given changes. - -This method is useful for reducing the number of clones needed to mutate -a message. - -- method: (string) Changes the HTTP method. -- set_headers: (array) Sets the given headers. -- remove_headers: (array) Remove the given headers. -- body: (mixed) Sets the given body. -- uri: (UriInterface) Set the URI. -- query: (string) Set the query string value of the URI. -- version: (string) Set the protocol version. - - -## `GuzzleHttp\Psr7\Utils::readLine` - -`public static function readLine(StreamInterface $stream, int $maxLength = null): string` - -Read a line from the stream up to the maximum allowed buffer length. - - -## `GuzzleHttp\Psr7\Utils::streamFor` - -`public static function streamFor(resource|string|null|int|float|bool|StreamInterface|callable|\Iterator $resource = '', array $options = []): StreamInterface` - -Create a new stream based on the input type. - -Options is an associative array that can contain the following keys: - -- metadata: Array of custom metadata. -- size: Size of the stream. - -This method accepts the following `$resource` types: - -- `Psr\Http\Message\StreamInterface`: Returns the value as-is. -- `string`: Creates a stream object that uses the given string as the contents. -- `resource`: Creates a stream object that wraps the given PHP stream resource. -- `Iterator`: If the provided value implements `Iterator`, then a read-only - stream object will be created that wraps the given iterable. Each time the - stream is read from, data from the iterator will fill a buffer and will be - continuously called until the buffer is equal to the requested read size. - Subsequent read calls will first read from the buffer and then call `next` - on the underlying iterator until it is exhausted. -- `object` with `__toString()`: If the object has the `__toString()` method, - the object will be cast to a string and then a stream will be returned that - uses the string value. -- `NULL`: When `null` is passed, an empty stream object is returned. -- `callable` When a callable is passed, a read-only stream object will be - created that invokes the given callable. The callable is invoked with the - number of suggested bytes to read. The callable can return any number of - bytes, but MUST return `false` when there is no more data to return. The - stream object that wraps the callable will invoke the callable until the - number of requested bytes are available. Any additional bytes will be - buffered and used in subsequent reads. - -```php -$stream = GuzzleHttp\Psr7\Utils::streamFor('foo'); -$stream = GuzzleHttp\Psr7\Utils::streamFor(fopen('/path/to/file', 'r')); - -$generator = function ($bytes) { - for ($i = 0; $i < $bytes; $i++) { - yield ' '; - } -} - -$stream = GuzzleHttp\Psr7\Utils::streamFor($generator(100)); -``` - - -## `GuzzleHttp\Psr7\Utils::tryFopen` - -`public static function tryFopen(string $filename, string $mode): resource` - -Safely opens a PHP stream resource using a filename. - -When fopen fails, PHP normally raises a warning. This function adds an -error handler that checks for errors and throws an exception instead. - - -## `GuzzleHttp\Psr7\Utils::uriFor` - -`public static function uriFor(string|UriInterface $uri): UriInterface` - -Returns a UriInterface for the given value. - -This function accepts a string or UriInterface and returns a -UriInterface for the given value. If the value is already a -UriInterface, it is returned as-is. - - -## `GuzzleHttp\Psr7\MimeType::fromFilename` - -`public static function fromFilename(string $filename): string|null` - -Determines the mimetype of a file by looking at its extension. - - -## `GuzzleHttp\Psr7\MimeType::fromExtension` - -`public static function fromExtension(string $extension): string|null` - -Maps a file extensions to a mimetype. - - -## Upgrading from Function API - -The static API was first introduced in 1.7.0, in order to mitigate problems with functions conflicting between global and local copies of the package. The function API will be removed in 2.0.0. A migration table has been provided here for your convenience: - -| Original Function | Replacement Method | -|----------------|----------------| -| `str` | `Message::toString` | -| `uri_for` | `Utils::uriFor` | -| `stream_for` | `Utils::streamFor` | -| `parse_header` | `Header::parse` | -| `normalize_header` | `Header::normalize` | -| `modify_request` | `Utils::modifyRequest` | -| `rewind_body` | `Message::rewindBody` | -| `try_fopen` | `Utils::tryFopen` | -| `copy_to_string` | `Utils::copyToString` | -| `copy_to_stream` | `Utils::copyToStream` | -| `hash` | `Utils::hash` | -| `readline` | `Utils::readLine` | -| `parse_request` | `Message::parseRequest` | -| `parse_response` | `Message::parseResponse` | -| `parse_query` | `Query::parse` | -| `build_query` | `Query::build` | -| `mimetype_from_filename` | `MimeType::fromFilename` | -| `mimetype_from_extension` | `MimeType::fromExtension` | -| `_parse_message` | `Message::parseMessage` | -| `_parse_request_uri` | `Message::parseRequestUri` | -| `get_message_body_summary` | `Message::bodySummary` | -| `_caseless_remove` | `Utils::caselessRemove` | - - -# Additional URI Methods - -Aside from the standard `Psr\Http\Message\UriInterface` implementation in form of the `GuzzleHttp\Psr7\Uri` class, -this library also provides additional functionality when working with URIs as static methods. - -## URI Types - -An instance of `Psr\Http\Message\UriInterface` can either be an absolute URI or a relative reference. -An absolute URI has a scheme. A relative reference is used to express a URI relative to another URI, -the base URI. Relative references can be divided into several forms according to -[RFC 3986 Section 4.2](https://tools.ietf.org/html/rfc3986#section-4.2): - -- network-path references, e.g. `//example.com/path` -- absolute-path references, e.g. `/path` -- relative-path references, e.g. `subpath` - -The following methods can be used to identify the type of the URI. - -### `GuzzleHttp\Psr7\Uri::isAbsolute` - -`public static function isAbsolute(UriInterface $uri): bool` - -Whether the URI is absolute, i.e. it has a scheme. - -### `GuzzleHttp\Psr7\Uri::isNetworkPathReference` - -`public static function isNetworkPathReference(UriInterface $uri): bool` - -Whether the URI is a network-path reference. A relative reference that begins with two slash characters is -termed an network-path reference. - -### `GuzzleHttp\Psr7\Uri::isAbsolutePathReference` - -`public static function isAbsolutePathReference(UriInterface $uri): bool` - -Whether the URI is a absolute-path reference. A relative reference that begins with a single slash character is -termed an absolute-path reference. - -### `GuzzleHttp\Psr7\Uri::isRelativePathReference` - -`public static function isRelativePathReference(UriInterface $uri): bool` - -Whether the URI is a relative-path reference. A relative reference that does not begin with a slash character is -termed a relative-path reference. - -### `GuzzleHttp\Psr7\Uri::isSameDocumentReference` - -`public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null): bool` - -Whether the URI is a same-document reference. A same-document reference refers to a URI that is, aside from its -fragment component, identical to the base URI. When no base URI is given, only an empty URI reference -(apart from its fragment) is considered a same-document reference. - -## URI Components - -Additional methods to work with URI components. - -### `GuzzleHttp\Psr7\Uri::isDefaultPort` - -`public static function isDefaultPort(UriInterface $uri): bool` - -Whether the URI has the default port of the current scheme. `Psr\Http\Message\UriInterface::getPort` may return null -or the standard port. This method can be used independently of the implementation. - -### `GuzzleHttp\Psr7\Uri::composeComponents` - -`public static function composeComponents($scheme, $authority, $path, $query, $fragment): string` - -Composes a URI reference string from its various components according to -[RFC 3986 Section 5.3](https://tools.ietf.org/html/rfc3986#section-5.3). Usually this method does not need to be called -manually but instead is used indirectly via `Psr\Http\Message\UriInterface::__toString`. - -### `GuzzleHttp\Psr7\Uri::fromParts` - -`public static function fromParts(array $parts): UriInterface` - -Creates a URI from a hash of [`parse_url`](http://php.net/manual/en/function.parse-url.php) components. - - -### `GuzzleHttp\Psr7\Uri::withQueryValue` - -`public static function withQueryValue(UriInterface $uri, $key, $value): UriInterface` - -Creates a new URI with a specific query string value. Any existing query string values that exactly match the -provided key are removed and replaced with the given key value pair. A value of null will set the query string -key without a value, e.g. "key" instead of "key=value". - -### `GuzzleHttp\Psr7\Uri::withQueryValues` - -`public static function withQueryValues(UriInterface $uri, array $keyValueArray): UriInterface` - -Creates a new URI with multiple query string values. It has the same behavior as `withQueryValue()` but for an -associative array of key => value. - -### `GuzzleHttp\Psr7\Uri::withoutQueryValue` - -`public static function withoutQueryValue(UriInterface $uri, $key): UriInterface` - -Creates a new URI with a specific query string value removed. Any existing query string values that exactly match the -provided key are removed. - -## Reference Resolution - -`GuzzleHttp\Psr7\UriResolver` provides methods to resolve a URI reference in the context of a base URI according -to [RFC 3986 Section 5](https://tools.ietf.org/html/rfc3986#section-5). This is for example also what web browsers -do when resolving a link in a website based on the current request URI. - -### `GuzzleHttp\Psr7\UriResolver::resolve` - -`public static function resolve(UriInterface $base, UriInterface $rel): UriInterface` - -Converts the relative URI into a new URI that is resolved against the base URI. - -### `GuzzleHttp\Psr7\UriResolver::removeDotSegments` - -`public static function removeDotSegments(string $path): string` - -Removes dot segments from a path and returns the new path according to -[RFC 3986 Section 5.2.4](https://tools.ietf.org/html/rfc3986#section-5.2.4). - -### `GuzzleHttp\Psr7\UriResolver::relativize` - -`public static function relativize(UriInterface $base, UriInterface $target): UriInterface` - -Returns the target URI as a relative reference from the base URI. This method is the counterpart to resolve(): - -```php -(string) $target === (string) UriResolver::resolve($base, UriResolver::relativize($base, $target)) -``` - -One use-case is to use the current request URI as base URI and then generate relative links in your documents -to reduce the document size or offer self-contained downloadable document archives. - -```php -$base = new Uri('http://example.com/a/b/'); -echo UriResolver::relativize($base, new Uri('http://example.com/a/b/c')); // prints 'c'. -echo UriResolver::relativize($base, new Uri('http://example.com/a/x/y')); // prints '../x/y'. -echo UriResolver::relativize($base, new Uri('http://example.com/a/b/?q')); // prints '?q'. -echo UriResolver::relativize($base, new Uri('http://example.org/a/b/')); // prints '//example.org/a/b/'. -``` - -## Normalization and Comparison - -`GuzzleHttp\Psr7\UriNormalizer` provides methods to normalize and compare URIs according to -[RFC 3986 Section 6](https://tools.ietf.org/html/rfc3986#section-6). - -### `GuzzleHttp\Psr7\UriNormalizer::normalize` - -`public static function normalize(UriInterface $uri, $flags = self::PRESERVING_NORMALIZATIONS): UriInterface` - -Returns a normalized URI. The scheme and host component are already normalized to lowercase per PSR-7 UriInterface. -This methods adds additional normalizations that can be configured with the `$flags` parameter which is a bitmask -of normalizations to apply. The following normalizations are available: - -- `UriNormalizer::PRESERVING_NORMALIZATIONS` - - Default normalizations which only include the ones that preserve semantics. - -- `UriNormalizer::CAPITALIZE_PERCENT_ENCODING` - - All letters within a percent-encoding triplet (e.g., "%3A") are case-insensitive, and should be capitalized. - - Example: `http://example.org/a%c2%b1b` → `http://example.org/a%C2%B1b` - -- `UriNormalizer::DECODE_UNRESERVED_CHARACTERS` - - Decodes percent-encoded octets of unreserved characters. For consistency, percent-encoded octets in the ranges of - ALPHA (%41–%5A and %61–%7A), DIGIT (%30–%39), hyphen (%2D), period (%2E), underscore (%5F), or tilde (%7E) should - not be created by URI producers and, when found in a URI, should be decoded to their corresponding unreserved - characters by URI normalizers. - - Example: `http://example.org/%7Eusern%61me/` → `http://example.org/~username/` - -- `UriNormalizer::CONVERT_EMPTY_PATH` - - Converts the empty path to "/" for http and https URIs. - - Example: `http://example.org` → `http://example.org/` - -- `UriNormalizer::REMOVE_DEFAULT_HOST` - - Removes the default host of the given URI scheme from the URI. Only the "file" scheme defines the default host - "localhost". All of `file:/myfile`, `file:///myfile`, and `file://localhost/myfile` are equivalent according to - RFC 3986. - - Example: `file://localhost/myfile` → `file:///myfile` - -- `UriNormalizer::REMOVE_DEFAULT_PORT` - - Removes the default port of the given URI scheme from the URI. - - Example: `http://example.org:80/` → `http://example.org/` - -- `UriNormalizer::REMOVE_DOT_SEGMENTS` - - Removes unnecessary dot-segments. Dot-segments in relative-path references are not removed as it would - change the semantics of the URI reference. - - Example: `http://example.org/../a/b/../c/./d.html` → `http://example.org/a/c/d.html` - -- `UriNormalizer::REMOVE_DUPLICATE_SLASHES` - - Paths which include two or more adjacent slashes are converted to one. Webservers usually ignore duplicate slashes - and treat those URIs equivalent. But in theory those URIs do not need to be equivalent. So this normalization - may change the semantics. Encoded slashes (%2F) are not removed. - - Example: `http://example.org//foo///bar.html` → `http://example.org/foo/bar.html` - -- `UriNormalizer::SORT_QUERY_PARAMETERS` - - Sort query parameters with their values in alphabetical order. However, the order of parameters in a URI may be - significant (this is not defined by the standard). So this normalization is not safe and may change the semantics - of the URI. - - Example: `?lang=en&article=fred` → `?article=fred&lang=en` - -### `GuzzleHttp\Psr7\UriNormalizer::isEquivalent` - -`public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, $normalizations = self::PRESERVING_NORMALIZATIONS): bool` - -Whether two URIs can be considered equivalent. Both URIs are normalized automatically before comparison with the given -`$normalizations` bitmask. The method also accepts relative URI references and returns true when they are equivalent. -This of course assumes they will be resolved against the same base URI. If this is not the case, determination of -equivalence or difference of relative references does not mean anything. diff --git a/source/vendor/guzzlehttp/psr7/src/AppendStream.php b/source/vendor/guzzlehttp/psr7/src/AppendStream.php deleted file mode 100644 index fa9153d..0000000 --- a/source/vendor/guzzlehttp/psr7/src/AppendStream.php +++ /dev/null @@ -1,246 +0,0 @@ -addStream($stream); - } - } - - public function __toString() - { - try { - $this->rewind(); - return $this->getContents(); - } catch (\Exception $e) { - return ''; - } - } - - /** - * Add a stream to the AppendStream - * - * @param StreamInterface $stream Stream to append. Must be readable. - * - * @throws \InvalidArgumentException if the stream is not readable - */ - public function addStream(StreamInterface $stream) - { - if (!$stream->isReadable()) { - throw new \InvalidArgumentException('Each stream must be readable'); - } - - // The stream is only seekable if all streams are seekable - if (!$stream->isSeekable()) { - $this->seekable = false; - } - - $this->streams[] = $stream; - } - - public function getContents() - { - return Utils::copyToString($this); - } - - /** - * Closes each attached stream. - * - * {@inheritdoc} - */ - public function close() - { - $this->pos = $this->current = 0; - $this->seekable = true; - - foreach ($this->streams as $stream) { - $stream->close(); - } - - $this->streams = []; - } - - /** - * Detaches each attached stream. - * - * Returns null as it's not clear which underlying stream resource to return. - * - * {@inheritdoc} - */ - public function detach() - { - $this->pos = $this->current = 0; - $this->seekable = true; - - foreach ($this->streams as $stream) { - $stream->detach(); - } - - $this->streams = []; - - return null; - } - - public function tell() - { - return $this->pos; - } - - /** - * Tries to calculate the size by adding the size of each stream. - * - * If any of the streams do not return a valid number, then the size of the - * append stream cannot be determined and null is returned. - * - * {@inheritdoc} - */ - public function getSize() - { - $size = 0; - - foreach ($this->streams as $stream) { - $s = $stream->getSize(); - if ($s === null) { - return null; - } - $size += $s; - } - - return $size; - } - - public function eof() - { - return !$this->streams || - ($this->current >= count($this->streams) - 1 && - $this->streams[$this->current]->eof()); - } - - public function rewind() - { - $this->seek(0); - } - - /** - * Attempts to seek to the given position. Only supports SEEK_SET. - * - * {@inheritdoc} - */ - public function seek($offset, $whence = SEEK_SET) - { - if (!$this->seekable) { - throw new \RuntimeException('This AppendStream is not seekable'); - } elseif ($whence !== SEEK_SET) { - throw new \RuntimeException('The AppendStream can only seek with SEEK_SET'); - } - - $this->pos = $this->current = 0; - - // Rewind each stream - foreach ($this->streams as $i => $stream) { - try { - $stream->rewind(); - } catch (\Exception $e) { - throw new \RuntimeException('Unable to seek stream ' - . $i . ' of the AppendStream', 0, $e); - } - } - - // Seek to the actual position by reading from each stream - while ($this->pos < $offset && !$this->eof()) { - $result = $this->read(min(8096, $offset - $this->pos)); - if ($result === '') { - break; - } - } - } - - /** - * Reads from all of the appended streams until the length is met or EOF. - * - * {@inheritdoc} - */ - public function read($length) - { - $buffer = ''; - $total = count($this->streams) - 1; - $remaining = $length; - $progressToNext = false; - - while ($remaining > 0) { - - // Progress to the next stream if needed. - if ($progressToNext || $this->streams[$this->current]->eof()) { - $progressToNext = false; - if ($this->current === $total) { - break; - } - $this->current++; - } - - $result = $this->streams[$this->current]->read($remaining); - - // Using a loose comparison here to match on '', false, and null - if ($result == null) { - $progressToNext = true; - continue; - } - - $buffer .= $result; - $remaining = $length - strlen($buffer); - } - - $this->pos += strlen($buffer); - - return $buffer; - } - - public function isReadable() - { - return true; - } - - public function isWritable() - { - return false; - } - - public function isSeekable() - { - return $this->seekable; - } - - public function write($string) - { - throw new \RuntimeException('Cannot write to an AppendStream'); - } - - public function getMetadata($key = null) - { - return $key ? null : []; - } -} diff --git a/source/vendor/guzzlehttp/psr7/src/BufferStream.php b/source/vendor/guzzlehttp/psr7/src/BufferStream.php deleted file mode 100644 index 783859c..0000000 --- a/source/vendor/guzzlehttp/psr7/src/BufferStream.php +++ /dev/null @@ -1,142 +0,0 @@ -hwm = $hwm; - } - - public function __toString() - { - return $this->getContents(); - } - - public function getContents() - { - $buffer = $this->buffer; - $this->buffer = ''; - - return $buffer; - } - - public function close() - { - $this->buffer = ''; - } - - public function detach() - { - $this->close(); - - return null; - } - - public function getSize() - { - return strlen($this->buffer); - } - - public function isReadable() - { - return true; - } - - public function isWritable() - { - return true; - } - - public function isSeekable() - { - return false; - } - - public function rewind() - { - $this->seek(0); - } - - public function seek($offset, $whence = SEEK_SET) - { - throw new \RuntimeException('Cannot seek a BufferStream'); - } - - public function eof() - { - return strlen($this->buffer) === 0; - } - - public function tell() - { - throw new \RuntimeException('Cannot determine the position of a BufferStream'); - } - - /** - * Reads data from the buffer. - */ - public function read($length) - { - $currentLength = strlen($this->buffer); - - if ($length >= $currentLength) { - // No need to slice the buffer because we don't have enough data. - $result = $this->buffer; - $this->buffer = ''; - } else { - // Slice up the result to provide a subset of the buffer. - $result = substr($this->buffer, 0, $length); - $this->buffer = substr($this->buffer, $length); - } - - return $result; - } - - /** - * Writes data to the buffer. - */ - public function write($string) - { - $this->buffer .= $string; - - // TODO: What should happen here? - if (strlen($this->buffer) >= $this->hwm) { - return false; - } - - return strlen($string); - } - - public function getMetadata($key = null) - { - if ($key == 'hwm') { - return $this->hwm; - } - - return $key ? null : []; - } -} diff --git a/source/vendor/guzzlehttp/psr7/src/CachingStream.php b/source/vendor/guzzlehttp/psr7/src/CachingStream.php deleted file mode 100644 index fe749e9..0000000 --- a/source/vendor/guzzlehttp/psr7/src/CachingStream.php +++ /dev/null @@ -1,141 +0,0 @@ -remoteStream = $stream; - $this->stream = $target ?: new Stream(Utils::tryFopen('php://temp', 'r+')); - } - - public function getSize() - { - return max($this->stream->getSize(), $this->remoteStream->getSize()); - } - - public function rewind() - { - $this->seek(0); - } - - public function seek($offset, $whence = SEEK_SET) - { - if ($whence == SEEK_SET) { - $byte = $offset; - } elseif ($whence == SEEK_CUR) { - $byte = $offset + $this->tell(); - } elseif ($whence == SEEK_END) { - $size = $this->remoteStream->getSize(); - if ($size === null) { - $size = $this->cacheEntireStream(); - } - $byte = $size + $offset; - } else { - throw new \InvalidArgumentException('Invalid whence'); - } - - $diff = $byte - $this->stream->getSize(); - - if ($diff > 0) { - // Read the remoteStream until we have read in at least the amount - // of bytes requested, or we reach the end of the file. - while ($diff > 0 && !$this->remoteStream->eof()) { - $this->read($diff); - $diff = $byte - $this->stream->getSize(); - } - } else { - // We can just do a normal seek since we've already seen this byte. - $this->stream->seek($byte); - } - } - - public function read($length) - { - // Perform a regular read on any previously read data from the buffer - $data = $this->stream->read($length); - $remaining = $length - strlen($data); - - // More data was requested so read from the remote stream - if ($remaining) { - // If data was written to the buffer in a position that would have - // been filled from the remote stream, then we must skip bytes on - // the remote stream to emulate overwriting bytes from that - // position. This mimics the behavior of other PHP stream wrappers. - $remoteData = $this->remoteStream->read( - $remaining + $this->skipReadBytes - ); - - if ($this->skipReadBytes) { - $len = strlen($remoteData); - $remoteData = substr($remoteData, $this->skipReadBytes); - $this->skipReadBytes = max(0, $this->skipReadBytes - $len); - } - - $data .= $remoteData; - $this->stream->write($remoteData); - } - - return $data; - } - - public function write($string) - { - // When appending to the end of the currently read stream, you'll want - // to skip bytes from being read from the remote stream to emulate - // other stream wrappers. Basically replacing bytes of data of a fixed - // length. - $overflow = (strlen($string) + $this->tell()) - $this->remoteStream->tell(); - if ($overflow > 0) { - $this->skipReadBytes += $overflow; - } - - return $this->stream->write($string); - } - - public function eof() - { - return $this->stream->eof() && $this->remoteStream->eof(); - } - - /** - * Close both the remote stream and buffer stream - */ - public function close() - { - $this->remoteStream->close() && $this->stream->close(); - } - - private function cacheEntireStream() - { - $target = new FnStream(['write' => 'strlen']); - Utils::copyToStream($this, $target); - - return $this->tell(); - } -} diff --git a/source/vendor/guzzlehttp/psr7/src/DroppingStream.php b/source/vendor/guzzlehttp/psr7/src/DroppingStream.php deleted file mode 100644 index 9f7420c..0000000 --- a/source/vendor/guzzlehttp/psr7/src/DroppingStream.php +++ /dev/null @@ -1,45 +0,0 @@ -stream = $stream; - $this->maxLength = $maxLength; - } - - public function write($string) - { - $diff = $this->maxLength - $this->stream->getSize(); - - // Begin returning 0 when the underlying stream is too large. - if ($diff <= 0) { - return 0; - } - - // Write the stream or a subset of the stream if needed. - if (strlen($string) < $diff) { - return $this->stream->write($string); - } - - return $this->stream->write(substr($string, 0, $diff)); - } -} diff --git a/source/vendor/guzzlehttp/psr7/src/FnStream.php b/source/vendor/guzzlehttp/psr7/src/FnStream.php deleted file mode 100644 index 76a8cc7..0000000 --- a/source/vendor/guzzlehttp/psr7/src/FnStream.php +++ /dev/null @@ -1,163 +0,0 @@ -methods = $methods; - - // Create the functions on the class - foreach ($methods as $name => $fn) { - $this->{'_fn_' . $name} = $fn; - } - } - - /** - * Lazily determine which methods are not implemented. - * - * @throws \BadMethodCallException - */ - public function __get($name) - { - throw new \BadMethodCallException(str_replace('_fn_', '', $name) - . '() is not implemented in the FnStream'); - } - - /** - * The close method is called on the underlying stream only if possible. - */ - public function __destruct() - { - if (isset($this->_fn_close)) { - call_user_func($this->_fn_close); - } - } - - /** - * An unserialize would allow the __destruct to run when the unserialized value goes out of scope. - * - * @throws \LogicException - */ - public function __wakeup() - { - throw new \LogicException('FnStream should never be unserialized'); - } - - /** - * Adds custom functionality to an underlying stream by intercepting - * specific method calls. - * - * @param StreamInterface $stream Stream to decorate - * @param array $methods Hash of method name to a closure - * - * @return FnStream - */ - public static function decorate(StreamInterface $stream, array $methods) - { - // If any of the required methods were not provided, then simply - // proxy to the decorated stream. - foreach (array_diff(self::$slots, array_keys($methods)) as $diff) { - $methods[$diff] = [$stream, $diff]; - } - - return new self($methods); - } - - public function __toString() - { - return call_user_func($this->_fn___toString); - } - - public function close() - { - return call_user_func($this->_fn_close); - } - - public function detach() - { - return call_user_func($this->_fn_detach); - } - - public function getSize() - { - return call_user_func($this->_fn_getSize); - } - - public function tell() - { - return call_user_func($this->_fn_tell); - } - - public function eof() - { - return call_user_func($this->_fn_eof); - } - - public function isSeekable() - { - return call_user_func($this->_fn_isSeekable); - } - - public function rewind() - { - call_user_func($this->_fn_rewind); - } - - public function seek($offset, $whence = SEEK_SET) - { - call_user_func($this->_fn_seek, $offset, $whence); - } - - public function isWritable() - { - return call_user_func($this->_fn_isWritable); - } - - public function write($string) - { - return call_user_func($this->_fn_write, $string); - } - - public function isReadable() - { - return call_user_func($this->_fn_isReadable); - } - - public function read($length) - { - return call_user_func($this->_fn_read, $length); - } - - public function getContents() - { - return call_user_func($this->_fn_getContents); - } - - public function getMetadata($key = null) - { - return call_user_func($this->_fn_getMetadata, $key); - } -} diff --git a/source/vendor/guzzlehttp/psr7/src/Header.php b/source/vendor/guzzlehttp/psr7/src/Header.php deleted file mode 100644 index 865d742..0000000 --- a/source/vendor/guzzlehttp/psr7/src/Header.php +++ /dev/null @@ -1,71 +0,0 @@ -]+>|[^=]+/', $kvp, $matches)) { - $m = $matches[0]; - if (isset($m[1])) { - $part[trim($m[0], $trimmed)] = trim($m[1], $trimmed); - } else { - $part[] = trim($m[0], $trimmed); - } - } - } - if ($part) { - $params[] = $part; - } - } - - return $params; - } - - /** - * Converts an array of header values that may contain comma separated - * headers into an array of headers with no comma separated values. - * - * @param string|array $header Header to normalize. - * - * @return array Returns the normalized header field values. - */ - public static function normalize($header) - { - if (!is_array($header)) { - return array_map('trim', explode(',', $header)); - } - - $result = []; - foreach ($header as $value) { - foreach ((array) $value as $v) { - if (strpos($v, ',') === false) { - $result[] = $v; - continue; - } - foreach (preg_split('/,(?=([^"]*"[^"]*")*[^"]*$)/', $v) as $vv) { - $result[] = trim($vv); - } - } - } - - return $result; - } -} diff --git a/source/vendor/guzzlehttp/psr7/src/InflateStream.php b/source/vendor/guzzlehttp/psr7/src/InflateStream.php deleted file mode 100644 index 0cbd2cc..0000000 --- a/source/vendor/guzzlehttp/psr7/src/InflateStream.php +++ /dev/null @@ -1,56 +0,0 @@ -read(10); - $filenameHeaderLength = $this->getLengthOfPossibleFilenameHeader($stream, $header); - // Skip the header, that is 10 + length of filename + 1 (nil) bytes - $stream = new LimitStream($stream, -1, 10 + $filenameHeaderLength); - $resource = StreamWrapper::getResource($stream); - stream_filter_append($resource, 'zlib.inflate', STREAM_FILTER_READ); - $this->stream = $stream->isSeekable() ? new Stream($resource) : new NoSeekStream(new Stream($resource)); - } - - /** - * @param StreamInterface $stream - * @param $header - * - * @return int - */ - private function getLengthOfPossibleFilenameHeader(StreamInterface $stream, $header) - { - $filename_header_length = 0; - - if (substr(bin2hex($header), 6, 2) === '08') { - // we have a filename, read until nil - $filename_header_length = 1; - while ($stream->read(1) !== chr(0)) { - $filename_header_length++; - } - } - - return $filename_header_length; - } -} diff --git a/source/vendor/guzzlehttp/psr7/src/LazyOpenStream.php b/source/vendor/guzzlehttp/psr7/src/LazyOpenStream.php deleted file mode 100644 index 911e127..0000000 --- a/source/vendor/guzzlehttp/psr7/src/LazyOpenStream.php +++ /dev/null @@ -1,42 +0,0 @@ -filename = $filename; - $this->mode = $mode; - } - - /** - * Creates the underlying stream lazily when required. - * - * @return StreamInterface - */ - protected function createStream() - { - return Utils::streamFor(Utils::tryFopen($this->filename, $this->mode)); - } -} diff --git a/source/vendor/guzzlehttp/psr7/src/LimitStream.php b/source/vendor/guzzlehttp/psr7/src/LimitStream.php deleted file mode 100644 index 1173ec4..0000000 --- a/source/vendor/guzzlehttp/psr7/src/LimitStream.php +++ /dev/null @@ -1,157 +0,0 @@ -stream = $stream; - $this->setLimit($limit); - $this->setOffset($offset); - } - - public function eof() - { - // Always return true if the underlying stream is EOF - if ($this->stream->eof()) { - return true; - } - - // No limit and the underlying stream is not at EOF - if ($this->limit == -1) { - return false; - } - - return $this->stream->tell() >= $this->offset + $this->limit; - } - - /** - * Returns the size of the limited subset of data - * {@inheritdoc} - */ - public function getSize() - { - if (null === ($length = $this->stream->getSize())) { - return null; - } elseif ($this->limit == -1) { - return $length - $this->offset; - } else { - return min($this->limit, $length - $this->offset); - } - } - - /** - * Allow for a bounded seek on the read limited stream - * {@inheritdoc} - */ - public function seek($offset, $whence = SEEK_SET) - { - if ($whence !== SEEK_SET || $offset < 0) { - throw new \RuntimeException(sprintf( - 'Cannot seek to offset %s with whence %s', - $offset, - $whence - )); - } - - $offset += $this->offset; - - if ($this->limit !== -1) { - if ($offset > $this->offset + $this->limit) { - $offset = $this->offset + $this->limit; - } - } - - $this->stream->seek($offset); - } - - /** - * Give a relative tell() - * {@inheritdoc} - */ - public function tell() - { - return $this->stream->tell() - $this->offset; - } - - /** - * Set the offset to start limiting from - * - * @param int $offset Offset to seek to and begin byte limiting from - * - * @throws \RuntimeException if the stream cannot be seeked. - */ - public function setOffset($offset) - { - $current = $this->stream->tell(); - - if ($current !== $offset) { - // If the stream cannot seek to the offset position, then read to it - if ($this->stream->isSeekable()) { - $this->stream->seek($offset); - } elseif ($current > $offset) { - throw new \RuntimeException("Could not seek to stream offset $offset"); - } else { - $this->stream->read($offset - $current); - } - } - - $this->offset = $offset; - } - - /** - * Set the limit of bytes that the decorator allows to be read from the - * stream. - * - * @param int $limit Number of bytes to allow to be read from the stream. - * Use -1 for no limit. - */ - public function setLimit($limit) - { - $this->limit = $limit; - } - - public function read($length) - { - if ($this->limit == -1) { - return $this->stream->read($length); - } - - // Check if the current position is less than the total allowed - // bytes + original offset - $remaining = ($this->offset + $this->limit) - $this->stream->tell(); - if ($remaining > 0) { - // Only return the amount of requested data, ensuring that the byte - // limit is not exceeded - return $this->stream->read(min($remaining, $length)); - } - - return ''; - } -} diff --git a/source/vendor/guzzlehttp/psr7/src/Message.php b/source/vendor/guzzlehttp/psr7/src/Message.php deleted file mode 100644 index 516d1cb..0000000 --- a/source/vendor/guzzlehttp/psr7/src/Message.php +++ /dev/null @@ -1,252 +0,0 @@ -getMethod() . ' ' - . $message->getRequestTarget()) - . ' HTTP/' . $message->getProtocolVersion(); - if (!$message->hasHeader('host')) { - $msg .= "\r\nHost: " . $message->getUri()->getHost(); - } - } elseif ($message instanceof ResponseInterface) { - $msg = 'HTTP/' . $message->getProtocolVersion() . ' ' - . $message->getStatusCode() . ' ' - . $message->getReasonPhrase(); - } else { - throw new \InvalidArgumentException('Unknown message type'); - } - - foreach ($message->getHeaders() as $name => $values) { - if (strtolower($name) === 'set-cookie') { - foreach ($values as $value) { - $msg .= "\r\n{$name}: " . $value; - } - } else { - $msg .= "\r\n{$name}: " . implode(', ', $values); - } - } - - return "{$msg}\r\n\r\n" . $message->getBody(); - } - - /** - * Get a short summary of the message body. - * - * Will return `null` if the response is not printable. - * - * @param MessageInterface $message The message to get the body summary - * @param int $truncateAt The maximum allowed size of the summary - * - * @return string|null - */ - public static function bodySummary(MessageInterface $message, $truncateAt = 120) - { - $body = $message->getBody(); - - if (!$body->isSeekable() || !$body->isReadable()) { - return null; - } - - $size = $body->getSize(); - - if ($size === 0) { - return null; - } - - $summary = $body->read($truncateAt); - $body->rewind(); - - if ($size > $truncateAt) { - $summary .= ' (truncated...)'; - } - - // Matches any printable character, including unicode characters: - // letters, marks, numbers, punctuation, spacing, and separators. - if (preg_match('/[^\pL\pM\pN\pP\pS\pZ\n\r\t]/u', $summary)) { - return null; - } - - return $summary; - } - - /** - * Attempts to rewind a message body and throws an exception on failure. - * - * The body of the message will only be rewound if a call to `tell()` - * returns a value other than `0`. - * - * @param MessageInterface $message Message to rewind - * - * @throws \RuntimeException - */ - public static function rewindBody(MessageInterface $message) - { - $body = $message->getBody(); - - if ($body->tell()) { - $body->rewind(); - } - } - - /** - * Parses an HTTP message into an associative array. - * - * The array contains the "start-line" key containing the start line of - * the message, "headers" key containing an associative array of header - * array values, and a "body" key containing the body of the message. - * - * @param string $message HTTP request or response to parse. - * - * @return array - */ - public static function parseMessage($message) - { - if (!$message) { - throw new \InvalidArgumentException('Invalid message'); - } - - $message = ltrim($message, "\r\n"); - - $messageParts = preg_split("/\r?\n\r?\n/", $message, 2); - - if ($messageParts === false || count($messageParts) !== 2) { - throw new \InvalidArgumentException('Invalid message: Missing header delimiter'); - } - - list($rawHeaders, $body) = $messageParts; - $rawHeaders .= "\r\n"; // Put back the delimiter we split previously - $headerParts = preg_split("/\r?\n/", $rawHeaders, 2); - - if ($headerParts === false || count($headerParts) !== 2) { - throw new \InvalidArgumentException('Invalid message: Missing status line'); - } - - list($startLine, $rawHeaders) = $headerParts; - - if (preg_match("/(?:^HTTP\/|^[A-Z]+ \S+ HTTP\/)(\d+(?:\.\d+)?)/i", $startLine, $matches) && $matches[1] === '1.0') { - // Header folding is deprecated for HTTP/1.1, but allowed in HTTP/1.0 - $rawHeaders = preg_replace(Rfc7230::HEADER_FOLD_REGEX, ' ', $rawHeaders); - } - - /** @var array[] $headerLines */ - $count = preg_match_all(Rfc7230::HEADER_REGEX, $rawHeaders, $headerLines, PREG_SET_ORDER); - - // If these aren't the same, then one line didn't match and there's an invalid header. - if ($count !== substr_count($rawHeaders, "\n")) { - // Folding is deprecated, see https://tools.ietf.org/html/rfc7230#section-3.2.4 - if (preg_match(Rfc7230::HEADER_FOLD_REGEX, $rawHeaders)) { - throw new \InvalidArgumentException('Invalid header syntax: Obsolete line folding'); - } - - throw new \InvalidArgumentException('Invalid header syntax'); - } - - $headers = []; - - foreach ($headerLines as $headerLine) { - $headers[$headerLine[1]][] = $headerLine[2]; - } - - return [ - 'start-line' => $startLine, - 'headers' => $headers, - 'body' => $body, - ]; - } - - /** - * Constructs a URI for an HTTP request message. - * - * @param string $path Path from the start-line - * @param array $headers Array of headers (each value an array). - * - * @return string - */ - public static function parseRequestUri($path, array $headers) - { - $hostKey = array_filter(array_keys($headers), function ($k) { - return strtolower($k) === 'host'; - }); - - // If no host is found, then a full URI cannot be constructed. - if (!$hostKey) { - return $path; - } - - $host = $headers[reset($hostKey)][0]; - $scheme = substr($host, -4) === ':443' ? 'https' : 'http'; - - return $scheme . '://' . $host . '/' . ltrim($path, '/'); - } - - /** - * Parses a request message string into a request object. - * - * @param string $message Request message string. - * - * @return Request - */ - public static function parseRequest($message) - { - $data = self::parseMessage($message); - $matches = []; - if (!preg_match('/^[\S]+\s+([a-zA-Z]+:\/\/|\/).*/', $data['start-line'], $matches)) { - throw new \InvalidArgumentException('Invalid request string'); - } - $parts = explode(' ', $data['start-line'], 3); - $version = isset($parts[2]) ? explode('/', $parts[2])[1] : '1.1'; - - $request = new Request( - $parts[0], - $matches[1] === '/' ? self::parseRequestUri($parts[1], $data['headers']) : $parts[1], - $data['headers'], - $data['body'], - $version - ); - - return $matches[1] === '/' ? $request : $request->withRequestTarget($parts[1]); - } - - /** - * Parses a response message string into a response object. - * - * @param string $message Response message string. - * - * @return Response - */ - public static function parseResponse($message) - { - $data = self::parseMessage($message); - // According to https://tools.ietf.org/html/rfc7230#section-3.1.2 the space - // between status-code and reason-phrase is required. But browsers accept - // responses without space and reason as well. - if (!preg_match('/^HTTP\/.* [0-9]{3}( .*|$)/', $data['start-line'])) { - throw new \InvalidArgumentException('Invalid response string: ' . $data['start-line']); - } - $parts = explode(' ', $data['start-line'], 3); - - return new Response( - (int) $parts[1], - $data['headers'], - $data['body'], - explode('/', $parts[0])[1], - isset($parts[2]) ? $parts[2] : null - ); - } -} diff --git a/source/vendor/guzzlehttp/psr7/src/MessageTrait.php b/source/vendor/guzzlehttp/psr7/src/MessageTrait.php deleted file mode 100644 index 99203bb..0000000 --- a/source/vendor/guzzlehttp/psr7/src/MessageTrait.php +++ /dev/null @@ -1,214 +0,0 @@ - array of values */ - private $headers = []; - - /** @var array Map of lowercase header name => original name at registration */ - private $headerNames = []; - - /** @var string */ - private $protocol = '1.1'; - - /** @var StreamInterface|null */ - private $stream; - - public function getProtocolVersion() - { - return $this->protocol; - } - - public function withProtocolVersion($version) - { - if ($this->protocol === $version) { - return $this; - } - - $new = clone $this; - $new->protocol = $version; - return $new; - } - - public function getHeaders() - { - return $this->headers; - } - - public function hasHeader($header) - { - return isset($this->headerNames[strtolower($header)]); - } - - public function getHeader($header) - { - $header = strtolower($header); - - if (!isset($this->headerNames[$header])) { - return []; - } - - $header = $this->headerNames[$header]; - - return $this->headers[$header]; - } - - public function getHeaderLine($header) - { - return implode(', ', $this->getHeader($header)); - } - - public function withHeader($header, $value) - { - $this->assertHeader($header); - $value = $this->normalizeHeaderValue($value); - $normalized = strtolower($header); - - $new = clone $this; - if (isset($new->headerNames[$normalized])) { - unset($new->headers[$new->headerNames[$normalized]]); - } - $new->headerNames[$normalized] = $header; - $new->headers[$header] = $value; - - return $new; - } - - public function withAddedHeader($header, $value) - { - $this->assertHeader($header); - $value = $this->normalizeHeaderValue($value); - $normalized = strtolower($header); - - $new = clone $this; - if (isset($new->headerNames[$normalized])) { - $header = $this->headerNames[$normalized]; - $new->headers[$header] = array_merge($this->headers[$header], $value); - } else { - $new->headerNames[$normalized] = $header; - $new->headers[$header] = $value; - } - - return $new; - } - - public function withoutHeader($header) - { - $normalized = strtolower($header); - - if (!isset($this->headerNames[$normalized])) { - return $this; - } - - $header = $this->headerNames[$normalized]; - - $new = clone $this; - unset($new->headers[$header], $new->headerNames[$normalized]); - - return $new; - } - - public function getBody() - { - if (!$this->stream) { - $this->stream = Utils::streamFor(''); - } - - return $this->stream; - } - - public function withBody(StreamInterface $body) - { - if ($body === $this->stream) { - return $this; - } - - $new = clone $this; - $new->stream = $body; - return $new; - } - - private function setHeaders(array $headers) - { - $this->headerNames = $this->headers = []; - foreach ($headers as $header => $value) { - if (is_int($header)) { - // Numeric array keys are converted to int by PHP but having a header name '123' is not forbidden by the spec - // and also allowed in withHeader(). So we need to cast it to string again for the following assertion to pass. - $header = (string) $header; - } - $this->assertHeader($header); - $value = $this->normalizeHeaderValue($value); - $normalized = strtolower($header); - if (isset($this->headerNames[$normalized])) { - $header = $this->headerNames[$normalized]; - $this->headers[$header] = array_merge($this->headers[$header], $value); - } else { - $this->headerNames[$normalized] = $header; - $this->headers[$header] = $value; - } - } - } - - private function normalizeHeaderValue($value) - { - if (!is_array($value)) { - return $this->trimHeaderValues([$value]); - } - - if (count($value) === 0) { - throw new \InvalidArgumentException('Header value can not be an empty array.'); - } - - return $this->trimHeaderValues($value); - } - - /** - * Trims whitespace from the header values. - * - * Spaces and tabs ought to be excluded by parsers when extracting the field value from a header field. - * - * header-field = field-name ":" OWS field-value OWS - * OWS = *( SP / HTAB ) - * - * @param string[] $values Header values - * - * @return string[] Trimmed header values - * - * @see https://tools.ietf.org/html/rfc7230#section-3.2.4 - */ - private function trimHeaderValues(array $values) - { - return array_map(function ($value) { - if (!is_scalar($value) && null !== $value) { - throw new \InvalidArgumentException(sprintf( - 'Header value must be scalar or null but %s provided.', - is_object($value) ? get_class($value) : gettype($value) - )); - } - - return trim((string) $value, " \t"); - }, array_values($values)); - } - - private function assertHeader($header) - { - if (!is_string($header)) { - throw new \InvalidArgumentException(sprintf( - 'Header name must be a string but %s provided.', - is_object($header) ? get_class($header) : gettype($header) - )); - } - - if ($header === '') { - throw new \InvalidArgumentException('Header name can not be empty.'); - } - } -} diff --git a/source/vendor/guzzlehttp/psr7/src/MimeType.php b/source/vendor/guzzlehttp/psr7/src/MimeType.php deleted file mode 100644 index 205c7b1..0000000 --- a/source/vendor/guzzlehttp/psr7/src/MimeType.php +++ /dev/null @@ -1,140 +0,0 @@ - 'video/3gpp', - '7z' => 'application/x-7z-compressed', - 'aac' => 'audio/x-aac', - 'ai' => 'application/postscript', - 'aif' => 'audio/x-aiff', - 'asc' => 'text/plain', - 'asf' => 'video/x-ms-asf', - 'atom' => 'application/atom+xml', - 'avi' => 'video/x-msvideo', - 'bmp' => 'image/bmp', - 'bz2' => 'application/x-bzip2', - 'cer' => 'application/pkix-cert', - 'crl' => 'application/pkix-crl', - 'crt' => 'application/x-x509-ca-cert', - 'css' => 'text/css', - 'csv' => 'text/csv', - 'cu' => 'application/cu-seeme', - 'deb' => 'application/x-debian-package', - 'doc' => 'application/msword', - 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', - 'dvi' => 'application/x-dvi', - 'eot' => 'application/vnd.ms-fontobject', - 'eps' => 'application/postscript', - 'epub' => 'application/epub+zip', - 'etx' => 'text/x-setext', - 'flac' => 'audio/flac', - 'flv' => 'video/x-flv', - 'gif' => 'image/gif', - 'gz' => 'application/gzip', - 'htm' => 'text/html', - 'html' => 'text/html', - 'ico' => 'image/x-icon', - 'ics' => 'text/calendar', - 'ini' => 'text/plain', - 'iso' => 'application/x-iso9660-image', - 'jar' => 'application/java-archive', - 'jpe' => 'image/jpeg', - 'jpeg' => 'image/jpeg', - 'jpg' => 'image/jpeg', - 'js' => 'text/javascript', - 'json' => 'application/json', - 'latex' => 'application/x-latex', - 'log' => 'text/plain', - 'm4a' => 'audio/mp4', - 'm4v' => 'video/mp4', - 'mid' => 'audio/midi', - 'midi' => 'audio/midi', - 'mov' => 'video/quicktime', - 'mkv' => 'video/x-matroska', - 'mp3' => 'audio/mpeg', - 'mp4' => 'video/mp4', - 'mp4a' => 'audio/mp4', - 'mp4v' => 'video/mp4', - 'mpe' => 'video/mpeg', - 'mpeg' => 'video/mpeg', - 'mpg' => 'video/mpeg', - 'mpg4' => 'video/mp4', - 'oga' => 'audio/ogg', - 'ogg' => 'audio/ogg', - 'ogv' => 'video/ogg', - 'ogx' => 'application/ogg', - 'pbm' => 'image/x-portable-bitmap', - 'pdf' => 'application/pdf', - 'pgm' => 'image/x-portable-graymap', - 'png' => 'image/png', - 'pnm' => 'image/x-portable-anymap', - 'ppm' => 'image/x-portable-pixmap', - 'ppt' => 'application/vnd.ms-powerpoint', - 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', - 'ps' => 'application/postscript', - 'qt' => 'video/quicktime', - 'rar' => 'application/x-rar-compressed', - 'ras' => 'image/x-cmu-raster', - 'rss' => 'application/rss+xml', - 'rtf' => 'application/rtf', - 'sgm' => 'text/sgml', - 'sgml' => 'text/sgml', - 'svg' => 'image/svg+xml', - 'swf' => 'application/x-shockwave-flash', - 'tar' => 'application/x-tar', - 'tif' => 'image/tiff', - 'tiff' => 'image/tiff', - 'torrent' => 'application/x-bittorrent', - 'ttf' => 'application/x-font-ttf', - 'txt' => 'text/plain', - 'wav' => 'audio/x-wav', - 'webm' => 'video/webm', - 'webp' => 'image/webp', - 'wma' => 'audio/x-ms-wma', - 'wmv' => 'video/x-ms-wmv', - 'woff' => 'application/x-font-woff', - 'wsdl' => 'application/wsdl+xml', - 'xbm' => 'image/x-xbitmap', - 'xls' => 'application/vnd.ms-excel', - 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', - 'xml' => 'application/xml', - 'xpm' => 'image/x-xpixmap', - 'xwd' => 'image/x-xwindowdump', - 'yaml' => 'text/yaml', - 'yml' => 'text/yaml', - 'zip' => 'application/zip', - ]; - - $extension = strtolower($extension); - - return isset($mimetypes[$extension]) - ? $mimetypes[$extension] - : null; - } -} diff --git a/source/vendor/guzzlehttp/psr7/src/MultipartStream.php b/source/vendor/guzzlehttp/psr7/src/MultipartStream.php deleted file mode 100644 index 5a6079a..0000000 --- a/source/vendor/guzzlehttp/psr7/src/MultipartStream.php +++ /dev/null @@ -1,158 +0,0 @@ -boundary = $boundary ?: sha1(uniqid('', true)); - $this->stream = $this->createStream($elements); - } - - /** - * Get the boundary - * - * @return string - */ - public function getBoundary() - { - return $this->boundary; - } - - public function isWritable() - { - return false; - } - - /** - * Get the headers needed before transferring the content of a POST file - */ - private function getHeaders(array $headers) - { - $str = ''; - foreach ($headers as $key => $value) { - $str .= "{$key}: {$value}\r\n"; - } - - return "--{$this->boundary}\r\n" . trim($str) . "\r\n\r\n"; - } - - /** - * Create the aggregate stream that will be used to upload the POST data - */ - protected function createStream(array $elements) - { - $stream = new AppendStream(); - - foreach ($elements as $element) { - $this->addElement($stream, $element); - } - - // Add the trailing boundary with CRLF - $stream->addStream(Utils::streamFor("--{$this->boundary}--\r\n")); - - return $stream; - } - - private function addElement(AppendStream $stream, array $element) - { - foreach (['contents', 'name'] as $key) { - if (!array_key_exists($key, $element)) { - throw new \InvalidArgumentException("A '{$key}' key is required"); - } - } - - $element['contents'] = Utils::streamFor($element['contents']); - - if (empty($element['filename'])) { - $uri = $element['contents']->getMetadata('uri'); - if (substr($uri, 0, 6) !== 'php://') { - $element['filename'] = $uri; - } - } - - list($body, $headers) = $this->createElement( - $element['name'], - $element['contents'], - isset($element['filename']) ? $element['filename'] : null, - isset($element['headers']) ? $element['headers'] : [] - ); - - $stream->addStream(Utils::streamFor($this->getHeaders($headers))); - $stream->addStream($body); - $stream->addStream(Utils::streamFor("\r\n")); - } - - /** - * @return array - */ - private function createElement($name, StreamInterface $stream, $filename, array $headers) - { - // Set a default content-disposition header if one was no provided - $disposition = $this->getHeader($headers, 'content-disposition'); - if (!$disposition) { - $headers['Content-Disposition'] = ($filename === '0' || $filename) - ? sprintf( - 'form-data; name="%s"; filename="%s"', - $name, - basename($filename) - ) - : "form-data; name=\"{$name}\""; - } - - // Set a default content-length header if one was no provided - $length = $this->getHeader($headers, 'content-length'); - if (!$length) { - if ($length = $stream->getSize()) { - $headers['Content-Length'] = (string) $length; - } - } - - // Set a default Content-Type if one was not supplied - $type = $this->getHeader($headers, 'content-type'); - if (!$type && ($filename === '0' || $filename)) { - if ($type = MimeType::fromFilename($filename)) { - $headers['Content-Type'] = $type; - } - } - - return [$stream, $headers]; - } - - private function getHeader(array $headers, $key) - { - $lowercaseHeader = strtolower($key); - foreach ($headers as $k => $v) { - if (strtolower($k) === $lowercaseHeader) { - return $v; - } - } - - return null; - } -} diff --git a/source/vendor/guzzlehttp/psr7/src/NoSeekStream.php b/source/vendor/guzzlehttp/psr7/src/NoSeekStream.php deleted file mode 100644 index d66bdde..0000000 --- a/source/vendor/guzzlehttp/psr7/src/NoSeekStream.php +++ /dev/null @@ -1,25 +0,0 @@ -source = $source; - $this->size = isset($options['size']) ? $options['size'] : null; - $this->metadata = isset($options['metadata']) ? $options['metadata'] : []; - $this->buffer = new BufferStream(); - } - - public function __toString() - { - try { - return Utils::copyToString($this); - } catch (\Exception $e) { - return ''; - } - } - - public function close() - { - $this->detach(); - } - - public function detach() - { - $this->tellPos = false; - $this->source = null; - - return null; - } - - public function getSize() - { - return $this->size; - } - - public function tell() - { - return $this->tellPos; - } - - public function eof() - { - return !$this->source; - } - - public function isSeekable() - { - return false; - } - - public function rewind() - { - $this->seek(0); - } - - public function seek($offset, $whence = SEEK_SET) - { - throw new \RuntimeException('Cannot seek a PumpStream'); - } - - public function isWritable() - { - return false; - } - - public function write($string) - { - throw new \RuntimeException('Cannot write to a PumpStream'); - } - - public function isReadable() - { - return true; - } - - public function read($length) - { - $data = $this->buffer->read($length); - $readLen = strlen($data); - $this->tellPos += $readLen; - $remaining = $length - $readLen; - - if ($remaining) { - $this->pump($remaining); - $data .= $this->buffer->read($remaining); - $this->tellPos += strlen($data) - $readLen; - } - - return $data; - } - - public function getContents() - { - $result = ''; - while (!$this->eof()) { - $result .= $this->read(1000000); - } - - return $result; - } - - public function getMetadata($key = null) - { - if (!$key) { - return $this->metadata; - } - - return isset($this->metadata[$key]) ? $this->metadata[$key] : null; - } - - private function pump($length) - { - if ($this->source) { - do { - $data = call_user_func($this->source, $length); - if ($data === false || $data === null) { - $this->source = null; - return; - } - $this->buffer->write($data); - $length -= strlen($data); - } while ($length > 0); - } - } -} diff --git a/source/vendor/guzzlehttp/psr7/src/Query.php b/source/vendor/guzzlehttp/psr7/src/Query.php deleted file mode 100644 index 5a7cc03..0000000 --- a/source/vendor/guzzlehttp/psr7/src/Query.php +++ /dev/null @@ -1,113 +0,0 @@ - '1', 'foo[b]' => '2'])`. - * - * @param string $str Query string to parse - * @param int|bool $urlEncoding How the query string is encoded - * - * @return array - */ - public static function parse($str, $urlEncoding = true) - { - $result = []; - - if ($str === '') { - return $result; - } - - if ($urlEncoding === true) { - $decoder = function ($value) { - return rawurldecode(str_replace('+', ' ', $value)); - }; - } elseif ($urlEncoding === PHP_QUERY_RFC3986) { - $decoder = 'rawurldecode'; - } elseif ($urlEncoding === PHP_QUERY_RFC1738) { - $decoder = 'urldecode'; - } else { - $decoder = function ($str) { - return $str; - }; - } - - foreach (explode('&', $str) as $kvp) { - $parts = explode('=', $kvp, 2); - $key = $decoder($parts[0]); - $value = isset($parts[1]) ? $decoder($parts[1]) : null; - if (!isset($result[$key])) { - $result[$key] = $value; - } else { - if (!is_array($result[$key])) { - $result[$key] = [$result[$key]]; - } - $result[$key][] = $value; - } - } - - return $result; - } - - /** - * Build a query string from an array of key value pairs. - * - * This function can use the return value of `parse()` to build a query - * string. This function does not modify the provided keys when an array is - * encountered (like `http_build_query()` would). - * - * @param array $params Query string parameters. - * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986 - * to encode using RFC3986, or PHP_QUERY_RFC1738 - * to encode using RFC1738. - * - * @return string - */ - public static function build(array $params, $encoding = PHP_QUERY_RFC3986) - { - if (!$params) { - return ''; - } - - if ($encoding === false) { - $encoder = function ($str) { - return $str; - }; - } elseif ($encoding === PHP_QUERY_RFC3986) { - $encoder = 'rawurlencode'; - } elseif ($encoding === PHP_QUERY_RFC1738) { - $encoder = 'urlencode'; - } else { - throw new \InvalidArgumentException('Invalid type'); - } - - $qs = ''; - foreach ($params as $k => $v) { - $k = $encoder($k); - if (!is_array($v)) { - $qs .= $k; - if ($v !== null) { - $qs .= '=' . $encoder($v); - } - $qs .= '&'; - } else { - foreach ($v as $vv) { - $qs .= $k; - if ($vv !== null) { - $qs .= '=' . $encoder($vv); - } - $qs .= '&'; - } - } - } - - return $qs ? (string) substr($qs, 0, -1) : ''; - } -} diff --git a/source/vendor/guzzlehttp/psr7/src/Request.php b/source/vendor/guzzlehttp/psr7/src/Request.php deleted file mode 100644 index c1cdaeb..0000000 --- a/source/vendor/guzzlehttp/psr7/src/Request.php +++ /dev/null @@ -1,152 +0,0 @@ -assertMethod($method); - if (!($uri instanceof UriInterface)) { - $uri = new Uri($uri); - } - - $this->method = strtoupper($method); - $this->uri = $uri; - $this->setHeaders($headers); - $this->protocol = $version; - - if (!isset($this->headerNames['host'])) { - $this->updateHostFromUri(); - } - - if ($body !== '' && $body !== null) { - $this->stream = Utils::streamFor($body); - } - } - - public function getRequestTarget() - { - if ($this->requestTarget !== null) { - return $this->requestTarget; - } - - $target = $this->uri->getPath(); - if ($target == '') { - $target = '/'; - } - if ($this->uri->getQuery() != '') { - $target .= '?' . $this->uri->getQuery(); - } - - return $target; - } - - public function withRequestTarget($requestTarget) - { - if (preg_match('#\s#', $requestTarget)) { - throw new InvalidArgumentException( - 'Invalid request target provided; cannot contain whitespace' - ); - } - - $new = clone $this; - $new->requestTarget = $requestTarget; - return $new; - } - - public function getMethod() - { - return $this->method; - } - - public function withMethod($method) - { - $this->assertMethod($method); - $new = clone $this; - $new->method = strtoupper($method); - return $new; - } - - public function getUri() - { - return $this->uri; - } - - public function withUri(UriInterface $uri, $preserveHost = false) - { - if ($uri === $this->uri) { - return $this; - } - - $new = clone $this; - $new->uri = $uri; - - if (!$preserveHost || !isset($this->headerNames['host'])) { - $new->updateHostFromUri(); - } - - return $new; - } - - private function updateHostFromUri() - { - $host = $this->uri->getHost(); - - if ($host == '') { - return; - } - - if (($port = $this->uri->getPort()) !== null) { - $host .= ':' . $port; - } - - if (isset($this->headerNames['host'])) { - $header = $this->headerNames['host']; - } else { - $header = 'Host'; - $this->headerNames['host'] = 'Host'; - } - // Ensure Host is the first header. - // See: http://tools.ietf.org/html/rfc7230#section-5.4 - $this->headers = [$header => [$host]] + $this->headers; - } - - private function assertMethod($method) - { - if (!is_string($method) || $method === '') { - throw new \InvalidArgumentException('Method must be a non-empty string.'); - } - } -} diff --git a/source/vendor/guzzlehttp/psr7/src/Response.php b/source/vendor/guzzlehttp/psr7/src/Response.php deleted file mode 100644 index 8c01a0f..0000000 --- a/source/vendor/guzzlehttp/psr7/src/Response.php +++ /dev/null @@ -1,155 +0,0 @@ - 'Continue', - 101 => 'Switching Protocols', - 102 => 'Processing', - 200 => 'OK', - 201 => 'Created', - 202 => 'Accepted', - 203 => 'Non-Authoritative Information', - 204 => 'No Content', - 205 => 'Reset Content', - 206 => 'Partial Content', - 207 => 'Multi-status', - 208 => 'Already Reported', - 300 => 'Multiple Choices', - 301 => 'Moved Permanently', - 302 => 'Found', - 303 => 'See Other', - 304 => 'Not Modified', - 305 => 'Use Proxy', - 306 => 'Switch Proxy', - 307 => 'Temporary Redirect', - 400 => 'Bad Request', - 401 => 'Unauthorized', - 402 => 'Payment Required', - 403 => 'Forbidden', - 404 => 'Not Found', - 405 => 'Method Not Allowed', - 406 => 'Not Acceptable', - 407 => 'Proxy Authentication Required', - 408 => 'Request Time-out', - 409 => 'Conflict', - 410 => 'Gone', - 411 => 'Length Required', - 412 => 'Precondition Failed', - 413 => 'Request Entity Too Large', - 414 => 'Request-URI Too Large', - 415 => 'Unsupported Media Type', - 416 => 'Requested range not satisfiable', - 417 => 'Expectation Failed', - 418 => 'I\'m a teapot', - 422 => 'Unprocessable Entity', - 423 => 'Locked', - 424 => 'Failed Dependency', - 425 => 'Unordered Collection', - 426 => 'Upgrade Required', - 428 => 'Precondition Required', - 429 => 'Too Many Requests', - 431 => 'Request Header Fields Too Large', - 451 => 'Unavailable For Legal Reasons', - 500 => 'Internal Server Error', - 501 => 'Not Implemented', - 502 => 'Bad Gateway', - 503 => 'Service Unavailable', - 504 => 'Gateway Time-out', - 505 => 'HTTP Version not supported', - 506 => 'Variant Also Negotiates', - 507 => 'Insufficient Storage', - 508 => 'Loop Detected', - 511 => 'Network Authentication Required', - ]; - - /** @var string */ - private $reasonPhrase = ''; - - /** @var int */ - private $statusCode = 200; - - /** - * @param int $status Status code - * @param array $headers Response headers - * @param string|resource|StreamInterface|null $body Response body - * @param string $version Protocol version - * @param string|null $reason Reason phrase (when empty a default will be used based on the status code) - */ - public function __construct( - $status = 200, - array $headers = [], - $body = null, - $version = '1.1', - $reason = null - ) { - $this->assertStatusCodeIsInteger($status); - $status = (int) $status; - $this->assertStatusCodeRange($status); - - $this->statusCode = $status; - - if ($body !== '' && $body !== null) { - $this->stream = Utils::streamFor($body); - } - - $this->setHeaders($headers); - if ($reason == '' && isset(self::$phrases[$this->statusCode])) { - $this->reasonPhrase = self::$phrases[$this->statusCode]; - } else { - $this->reasonPhrase = (string) $reason; - } - - $this->protocol = $version; - } - - public function getStatusCode() - { - return $this->statusCode; - } - - public function getReasonPhrase() - { - return $this->reasonPhrase; - } - - public function withStatus($code, $reasonPhrase = '') - { - $this->assertStatusCodeIsInteger($code); - $code = (int) $code; - $this->assertStatusCodeRange($code); - - $new = clone $this; - $new->statusCode = $code; - if ($reasonPhrase == '' && isset(self::$phrases[$new->statusCode])) { - $reasonPhrase = self::$phrases[$new->statusCode]; - } - $new->reasonPhrase = (string) $reasonPhrase; - return $new; - } - - private function assertStatusCodeIsInteger($statusCode) - { - if (filter_var($statusCode, FILTER_VALIDATE_INT) === false) { - throw new \InvalidArgumentException('Status code must be an integer value.'); - } - } - - private function assertStatusCodeRange($statusCode) - { - if ($statusCode < 100 || $statusCode >= 600) { - throw new \InvalidArgumentException('Status code must be an integer value between 1xx and 5xx.'); - } - } -} diff --git a/source/vendor/guzzlehttp/psr7/src/Rfc7230.php b/source/vendor/guzzlehttp/psr7/src/Rfc7230.php deleted file mode 100644 index 51b571f..0000000 --- a/source/vendor/guzzlehttp/psr7/src/Rfc7230.php +++ /dev/null @@ -1,19 +0,0 @@ -@,;:\\\"/[\]?={}\x01-\x20\x7F]++):[ \t]*+((?:[ \t]*+[\x21-\x7E\x80-\xFF]++)*+)[ \t]*+\r?\n)m"; - const HEADER_FOLD_REGEX = "(\r?\n[ \t]++)"; -} diff --git a/source/vendor/guzzlehttp/psr7/src/ServerRequest.php b/source/vendor/guzzlehttp/psr7/src/ServerRequest.php deleted file mode 100644 index e6d26f5..0000000 --- a/source/vendor/guzzlehttp/psr7/src/ServerRequest.php +++ /dev/null @@ -1,379 +0,0 @@ -serverParams = $serverParams; - - parent::__construct($method, $uri, $headers, $body, $version); - } - - /** - * Return an UploadedFile instance array. - * - * @param array $files A array which respect $_FILES structure - * - * @return array - * - * @throws InvalidArgumentException for unrecognized values - */ - public static function normalizeFiles(array $files) - { - $normalized = []; - - foreach ($files as $key => $value) { - if ($value instanceof UploadedFileInterface) { - $normalized[$key] = $value; - } elseif (is_array($value) && isset($value['tmp_name'])) { - $normalized[$key] = self::createUploadedFileFromSpec($value); - } elseif (is_array($value)) { - $normalized[$key] = self::normalizeFiles($value); - continue; - } else { - throw new InvalidArgumentException('Invalid value in files specification'); - } - } - - return $normalized; - } - - /** - * Create and return an UploadedFile instance from a $_FILES specification. - * - * If the specification represents an array of values, this method will - * delegate to normalizeNestedFileSpec() and return that return value. - * - * @param array $value $_FILES struct - * - * @return array|UploadedFileInterface - */ - private static function createUploadedFileFromSpec(array $value) - { - if (is_array($value['tmp_name'])) { - return self::normalizeNestedFileSpec($value); - } - - return new UploadedFile( - $value['tmp_name'], - (int) $value['size'], - (int) $value['error'], - $value['name'], - $value['type'] - ); - } - - /** - * Normalize an array of file specifications. - * - * Loops through all nested files and returns a normalized array of - * UploadedFileInterface instances. - * - * @param array $files - * - * @return UploadedFileInterface[] - */ - private static function normalizeNestedFileSpec(array $files = []) - { - $normalizedFiles = []; - - foreach (array_keys($files['tmp_name']) as $key) { - $spec = [ - 'tmp_name' => $files['tmp_name'][$key], - 'size' => $files['size'][$key], - 'error' => $files['error'][$key], - 'name' => $files['name'][$key], - 'type' => $files['type'][$key], - ]; - $normalizedFiles[$key] = self::createUploadedFileFromSpec($spec); - } - - return $normalizedFiles; - } - - /** - * Return a ServerRequest populated with superglobals: - * $_GET - * $_POST - * $_COOKIE - * $_FILES - * $_SERVER - * - * @return ServerRequestInterface - */ - public static function fromGlobals() - { - $method = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : 'GET'; - $headers = getallheaders(); - $uri = self::getUriFromGlobals(); - $body = new CachingStream(new LazyOpenStream('php://input', 'r+')); - $protocol = isset($_SERVER['SERVER_PROTOCOL']) ? str_replace('HTTP/', '', $_SERVER['SERVER_PROTOCOL']) : '1.1'; - - $serverRequest = new ServerRequest($method, $uri, $headers, $body, $protocol, $_SERVER); - - return $serverRequest - ->withCookieParams($_COOKIE) - ->withQueryParams($_GET) - ->withParsedBody($_POST) - ->withUploadedFiles(self::normalizeFiles($_FILES)); - } - - private static function extractHostAndPortFromAuthority($authority) - { - $uri = 'http://' . $authority; - $parts = parse_url($uri); - if (false === $parts) { - return [null, null]; - } - - $host = isset($parts['host']) ? $parts['host'] : null; - $port = isset($parts['port']) ? $parts['port'] : null; - - return [$host, $port]; - } - - /** - * Get a Uri populated with values from $_SERVER. - * - * @return UriInterface - */ - public static function getUriFromGlobals() - { - $uri = new Uri(''); - - $uri = $uri->withScheme(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' ? 'https' : 'http'); - - $hasPort = false; - if (isset($_SERVER['HTTP_HOST'])) { - list($host, $port) = self::extractHostAndPortFromAuthority($_SERVER['HTTP_HOST']); - if ($host !== null) { - $uri = $uri->withHost($host); - } - - if ($port !== null) { - $hasPort = true; - $uri = $uri->withPort($port); - } - } elseif (isset($_SERVER['SERVER_NAME'])) { - $uri = $uri->withHost($_SERVER['SERVER_NAME']); - } elseif (isset($_SERVER['SERVER_ADDR'])) { - $uri = $uri->withHost($_SERVER['SERVER_ADDR']); - } - - if (!$hasPort && isset($_SERVER['SERVER_PORT'])) { - $uri = $uri->withPort($_SERVER['SERVER_PORT']); - } - - $hasQuery = false; - if (isset($_SERVER['REQUEST_URI'])) { - $requestUriParts = explode('?', $_SERVER['REQUEST_URI'], 2); - $uri = $uri->withPath($requestUriParts[0]); - if (isset($requestUriParts[1])) { - $hasQuery = true; - $uri = $uri->withQuery($requestUriParts[1]); - } - } - - if (!$hasQuery && isset($_SERVER['QUERY_STRING'])) { - $uri = $uri->withQuery($_SERVER['QUERY_STRING']); - } - - return $uri; - } - - /** - * {@inheritdoc} - */ - public function getServerParams() - { - return $this->serverParams; - } - - /** - * {@inheritdoc} - */ - public function getUploadedFiles() - { - return $this->uploadedFiles; - } - - /** - * {@inheritdoc} - */ - public function withUploadedFiles(array $uploadedFiles) - { - $new = clone $this; - $new->uploadedFiles = $uploadedFiles; - - return $new; - } - - /** - * {@inheritdoc} - */ - public function getCookieParams() - { - return $this->cookieParams; - } - - /** - * {@inheritdoc} - */ - public function withCookieParams(array $cookies) - { - $new = clone $this; - $new->cookieParams = $cookies; - - return $new; - } - - /** - * {@inheritdoc} - */ - public function getQueryParams() - { - return $this->queryParams; - } - - /** - * {@inheritdoc} - */ - public function withQueryParams(array $query) - { - $new = clone $this; - $new->queryParams = $query; - - return $new; - } - - /** - * {@inheritdoc} - */ - public function getParsedBody() - { - return $this->parsedBody; - } - - /** - * {@inheritdoc} - */ - public function withParsedBody($data) - { - $new = clone $this; - $new->parsedBody = $data; - - return $new; - } - - /** - * {@inheritdoc} - */ - public function getAttributes() - { - return $this->attributes; - } - - /** - * {@inheritdoc} - */ - public function getAttribute($attribute, $default = null) - { - if (false === array_key_exists($attribute, $this->attributes)) { - return $default; - } - - return $this->attributes[$attribute]; - } - - /** - * {@inheritdoc} - */ - public function withAttribute($attribute, $value) - { - $new = clone $this; - $new->attributes[$attribute] = $value; - - return $new; - } - - /** - * {@inheritdoc} - */ - public function withoutAttribute($attribute) - { - if (false === array_key_exists($attribute, $this->attributes)) { - return $this; - } - - $new = clone $this; - unset($new->attributes[$attribute]); - - return $new; - } -} diff --git a/source/vendor/guzzlehttp/psr7/src/Stream.php b/source/vendor/guzzlehttp/psr7/src/Stream.php deleted file mode 100644 index 3865d6d..0000000 --- a/source/vendor/guzzlehttp/psr7/src/Stream.php +++ /dev/null @@ -1,270 +0,0 @@ -size = $options['size']; - } - - $this->customMetadata = isset($options['metadata']) - ? $options['metadata'] - : []; - - $this->stream = $stream; - $meta = stream_get_meta_data($this->stream); - $this->seekable = $meta['seekable']; - $this->readable = (bool)preg_match(self::READABLE_MODES, $meta['mode']); - $this->writable = (bool)preg_match(self::WRITABLE_MODES, $meta['mode']); - $this->uri = $this->getMetadata('uri'); - } - - /** - * Closes the stream when the destructed - */ - public function __destruct() - { - $this->close(); - } - - public function __toString() - { - try { - if ($this->isSeekable()) { - $this->seek(0); - } - return $this->getContents(); - } catch (\Exception $e) { - return ''; - } - } - - public function getContents() - { - if (!isset($this->stream)) { - throw new \RuntimeException('Stream is detached'); - } - - $contents = stream_get_contents($this->stream); - - if ($contents === false) { - throw new \RuntimeException('Unable to read stream contents'); - } - - return $contents; - } - - public function close() - { - if (isset($this->stream)) { - if (is_resource($this->stream)) { - fclose($this->stream); - } - $this->detach(); - } - } - - public function detach() - { - if (!isset($this->stream)) { - return null; - } - - $result = $this->stream; - unset($this->stream); - $this->size = $this->uri = null; - $this->readable = $this->writable = $this->seekable = false; - - return $result; - } - - public function getSize() - { - if ($this->size !== null) { - return $this->size; - } - - if (!isset($this->stream)) { - return null; - } - - // Clear the stat cache if the stream has a URI - if ($this->uri) { - clearstatcache(true, $this->uri); - } - - $stats = fstat($this->stream); - if (isset($stats['size'])) { - $this->size = $stats['size']; - return $this->size; - } - - return null; - } - - public function isReadable() - { - return $this->readable; - } - - public function isWritable() - { - return $this->writable; - } - - public function isSeekable() - { - return $this->seekable; - } - - public function eof() - { - if (!isset($this->stream)) { - throw new \RuntimeException('Stream is detached'); - } - - return feof($this->stream); - } - - public function tell() - { - if (!isset($this->stream)) { - throw new \RuntimeException('Stream is detached'); - } - - $result = ftell($this->stream); - - if ($result === false) { - throw new \RuntimeException('Unable to determine stream position'); - } - - return $result; - } - - public function rewind() - { - $this->seek(0); - } - - public function seek($offset, $whence = SEEK_SET) - { - $whence = (int) $whence; - - if (!isset($this->stream)) { - throw new \RuntimeException('Stream is detached'); - } - if (!$this->seekable) { - throw new \RuntimeException('Stream is not seekable'); - } - if (fseek($this->stream, $offset, $whence) === -1) { - throw new \RuntimeException('Unable to seek to stream position ' - . $offset . ' with whence ' . var_export($whence, true)); - } - } - - public function read($length) - { - if (!isset($this->stream)) { - throw new \RuntimeException('Stream is detached'); - } - if (!$this->readable) { - throw new \RuntimeException('Cannot read from non-readable stream'); - } - if ($length < 0) { - throw new \RuntimeException('Length parameter cannot be negative'); - } - - if (0 === $length) { - return ''; - } - - $string = fread($this->stream, $length); - if (false === $string) { - throw new \RuntimeException('Unable to read from stream'); - } - - return $string; - } - - public function write($string) - { - if (!isset($this->stream)) { - throw new \RuntimeException('Stream is detached'); - } - if (!$this->writable) { - throw new \RuntimeException('Cannot write to a non-writable stream'); - } - - // We can't know the size after writing anything - $this->size = null; - $result = fwrite($this->stream, $string); - - if ($result === false) { - throw new \RuntimeException('Unable to write to stream'); - } - - return $result; - } - - public function getMetadata($key = null) - { - if (!isset($this->stream)) { - return $key ? null : []; - } elseif (!$key) { - return $this->customMetadata + stream_get_meta_data($this->stream); - } elseif (isset($this->customMetadata[$key])) { - return $this->customMetadata[$key]; - } - - $meta = stream_get_meta_data($this->stream); - - return isset($meta[$key]) ? $meta[$key] : null; - } -} diff --git a/source/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php b/source/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php deleted file mode 100644 index 5025dd6..0000000 --- a/source/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php +++ /dev/null @@ -1,152 +0,0 @@ -stream = $stream; - } - - /** - * Magic method used to create a new stream if streams are not added in - * the constructor of a decorator (e.g., LazyOpenStream). - * - * @param string $name Name of the property (allows "stream" only). - * - * @return StreamInterface - */ - public function __get($name) - { - if ($name == 'stream') { - $this->stream = $this->createStream(); - return $this->stream; - } - - throw new \UnexpectedValueException("$name not found on class"); - } - - public function __toString() - { - try { - if ($this->isSeekable()) { - $this->seek(0); - } - return $this->getContents(); - } catch (\Exception $e) { - // Really, PHP? https://bugs.php.net/bug.php?id=53648 - trigger_error('StreamDecorator::__toString exception: ' - . (string) $e, E_USER_ERROR); - return ''; - } - } - - public function getContents() - { - return Utils::copyToString($this); - } - - /** - * Allow decorators to implement custom methods - * - * @param string $method Missing method name - * @param array $args Method arguments - * - * @return mixed - */ - public function __call($method, array $args) - { - $result = call_user_func_array([$this->stream, $method], $args); - - // Always return the wrapped object if the result is a return $this - return $result === $this->stream ? $this : $result; - } - - public function close() - { - $this->stream->close(); - } - - public function getMetadata($key = null) - { - return $this->stream->getMetadata($key); - } - - public function detach() - { - return $this->stream->detach(); - } - - public function getSize() - { - return $this->stream->getSize(); - } - - public function eof() - { - return $this->stream->eof(); - } - - public function tell() - { - return $this->stream->tell(); - } - - public function isReadable() - { - return $this->stream->isReadable(); - } - - public function isWritable() - { - return $this->stream->isWritable(); - } - - public function isSeekable() - { - return $this->stream->isSeekable(); - } - - public function rewind() - { - $this->seek(0); - } - - public function seek($offset, $whence = SEEK_SET) - { - $this->stream->seek($offset, $whence); - } - - public function read($length) - { - return $this->stream->read($length); - } - - public function write($string) - { - return $this->stream->write($string); - } - - /** - * Implement in subclasses to dynamically create streams when requested. - * - * @return StreamInterface - * - * @throws \BadMethodCallException - */ - protected function createStream() - { - throw new \BadMethodCallException('Not implemented'); - } -} diff --git a/source/vendor/guzzlehttp/psr7/src/StreamWrapper.php b/source/vendor/guzzlehttp/psr7/src/StreamWrapper.php deleted file mode 100644 index fc7cb96..0000000 --- a/source/vendor/guzzlehttp/psr7/src/StreamWrapper.php +++ /dev/null @@ -1,165 +0,0 @@ -isReadable()) { - $mode = $stream->isWritable() ? 'r+' : 'r'; - } elseif ($stream->isWritable()) { - $mode = 'w'; - } else { - throw new \InvalidArgumentException('The stream must be readable, ' - . 'writable, or both.'); - } - - return fopen('guzzle://stream', $mode, null, self::createStreamContext($stream)); - } - - /** - * Creates a stream context that can be used to open a stream as a php stream resource. - * - * @param StreamInterface $stream - * - * @return resource - */ - public static function createStreamContext(StreamInterface $stream) - { - return stream_context_create([ - 'guzzle' => ['stream' => $stream] - ]); - } - - /** - * Registers the stream wrapper if needed - */ - public static function register() - { - if (!in_array('guzzle', stream_get_wrappers())) { - stream_wrapper_register('guzzle', __CLASS__); - } - } - - public function stream_open($path, $mode, $options, &$opened_path) - { - $options = stream_context_get_options($this->context); - - if (!isset($options['guzzle']['stream'])) { - return false; - } - - $this->mode = $mode; - $this->stream = $options['guzzle']['stream']; - - return true; - } - - public function stream_read($count) - { - return $this->stream->read($count); - } - - public function stream_write($data) - { - return (int) $this->stream->write($data); - } - - public function stream_tell() - { - return $this->stream->tell(); - } - - public function stream_eof() - { - return $this->stream->eof(); - } - - public function stream_seek($offset, $whence) - { - $this->stream->seek($offset, $whence); - - return true; - } - - public function stream_cast($cast_as) - { - $stream = clone($this->stream); - - return $stream->detach(); - } - - public function stream_stat() - { - static $modeMap = [ - 'r' => 33060, - 'rb' => 33060, - 'r+' => 33206, - 'w' => 33188, - 'wb' => 33188 - ]; - - return [ - 'dev' => 0, - 'ino' => 0, - 'mode' => $modeMap[$this->mode], - 'nlink' => 0, - 'uid' => 0, - 'gid' => 0, - 'rdev' => 0, - 'size' => $this->stream->getSize() ?: 0, - 'atime' => 0, - 'mtime' => 0, - 'ctime' => 0, - 'blksize' => 0, - 'blocks' => 0 - ]; - } - - public function url_stat($path, $flags) - { - return [ - 'dev' => 0, - 'ino' => 0, - 'mode' => 0, - 'nlink' => 0, - 'uid' => 0, - 'gid' => 0, - 'rdev' => 0, - 'size' => 0, - 'atime' => 0, - 'mtime' => 0, - 'ctime' => 0, - 'blksize' => 0, - 'blocks' => 0 - ]; - } -} diff --git a/source/vendor/guzzlehttp/psr7/src/UploadedFile.php b/source/vendor/guzzlehttp/psr7/src/UploadedFile.php deleted file mode 100644 index bf342c4..0000000 --- a/source/vendor/guzzlehttp/psr7/src/UploadedFile.php +++ /dev/null @@ -1,328 +0,0 @@ -setError($errorStatus); - $this->setSize($size); - $this->setClientFilename($clientFilename); - $this->setClientMediaType($clientMediaType); - - if ($this->isOk()) { - $this->setStreamOrFile($streamOrFile); - } - } - - /** - * Depending on the value set file or stream variable - * - * @param mixed $streamOrFile - * - * @throws InvalidArgumentException - */ - private function setStreamOrFile($streamOrFile) - { - if (is_string($streamOrFile)) { - $this->file = $streamOrFile; - } elseif (is_resource($streamOrFile)) { - $this->stream = new Stream($streamOrFile); - } elseif ($streamOrFile instanceof StreamInterface) { - $this->stream = $streamOrFile; - } else { - throw new InvalidArgumentException( - 'Invalid stream or file provided for UploadedFile' - ); - } - } - - /** - * @param int $error - * - * @throws InvalidArgumentException - */ - private function setError($error) - { - if (false === is_int($error)) { - throw new InvalidArgumentException( - 'Upload file error status must be an integer' - ); - } - - if (false === in_array($error, UploadedFile::$errors)) { - throw new InvalidArgumentException( - 'Invalid error status for UploadedFile' - ); - } - - $this->error = $error; - } - - /** - * @param int $size - * - * @throws InvalidArgumentException - */ - private function setSize($size) - { - if (false === is_int($size)) { - throw new InvalidArgumentException( - 'Upload file size must be an integer' - ); - } - - $this->size = $size; - } - - /** - * @param mixed $param - * - * @return bool - */ - private function isStringOrNull($param) - { - return in_array(gettype($param), ['string', 'NULL']); - } - - /** - * @param mixed $param - * - * @return bool - */ - private function isStringNotEmpty($param) - { - return is_string($param) && false === empty($param); - } - - /** - * @param string|null $clientFilename - * - * @throws InvalidArgumentException - */ - private function setClientFilename($clientFilename) - { - if (false === $this->isStringOrNull($clientFilename)) { - throw new InvalidArgumentException( - 'Upload file client filename must be a string or null' - ); - } - - $this->clientFilename = $clientFilename; - } - - /** - * @param string|null $clientMediaType - * - * @throws InvalidArgumentException - */ - private function setClientMediaType($clientMediaType) - { - if (false === $this->isStringOrNull($clientMediaType)) { - throw new InvalidArgumentException( - 'Upload file client media type must be a string or null' - ); - } - - $this->clientMediaType = $clientMediaType; - } - - /** - * Return true if there is no upload error - * - * @return bool - */ - private function isOk() - { - return $this->error === UPLOAD_ERR_OK; - } - - /** - * @return bool - */ - public function isMoved() - { - return $this->moved; - } - - /** - * @throws RuntimeException if is moved or not ok - */ - private function validateActive() - { - if (false === $this->isOk()) { - throw new RuntimeException('Cannot retrieve stream due to upload error'); - } - - if ($this->isMoved()) { - throw new RuntimeException('Cannot retrieve stream after it has already been moved'); - } - } - - /** - * {@inheritdoc} - * - * @throws RuntimeException if the upload was not successful. - */ - public function getStream() - { - $this->validateActive(); - - if ($this->stream instanceof StreamInterface) { - return $this->stream; - } - - return new LazyOpenStream($this->file, 'r+'); - } - - /** - * {@inheritdoc} - * - * @see http://php.net/is_uploaded_file - * @see http://php.net/move_uploaded_file - * - * @param string $targetPath Path to which to move the uploaded file. - * - * @throws RuntimeException if the upload was not successful. - * @throws InvalidArgumentException if the $path specified is invalid. - * @throws RuntimeException on any error during the move operation, or on - * the second or subsequent call to the method. - */ - public function moveTo($targetPath) - { - $this->validateActive(); - - if (false === $this->isStringNotEmpty($targetPath)) { - throw new InvalidArgumentException( - 'Invalid path provided for move operation; must be a non-empty string' - ); - } - - if ($this->file) { - $this->moved = php_sapi_name() == 'cli' - ? rename($this->file, $targetPath) - : move_uploaded_file($this->file, $targetPath); - } else { - Utils::copyToStream( - $this->getStream(), - new LazyOpenStream($targetPath, 'w') - ); - - $this->moved = true; - } - - if (false === $this->moved) { - throw new RuntimeException( - sprintf('Uploaded file could not be moved to %s', $targetPath) - ); - } - } - - /** - * {@inheritdoc} - * - * @return int|null The file size in bytes or null if unknown. - */ - public function getSize() - { - return $this->size; - } - - /** - * {@inheritdoc} - * - * @see http://php.net/manual/en/features.file-upload.errors.php - * - * @return int One of PHP's UPLOAD_ERR_XXX constants. - */ - public function getError() - { - return $this->error; - } - - /** - * {@inheritdoc} - * - * @return string|null The filename sent by the client or null if none - * was provided. - */ - public function getClientFilename() - { - return $this->clientFilename; - } - - /** - * {@inheritdoc} - */ - public function getClientMediaType() - { - return $this->clientMediaType; - } -} diff --git a/source/vendor/guzzlehttp/psr7/src/Uri.php b/source/vendor/guzzlehttp/psr7/src/Uri.php deleted file mode 100644 index 0f9f020..0000000 --- a/source/vendor/guzzlehttp/psr7/src/Uri.php +++ /dev/null @@ -1,810 +0,0 @@ - 80, - 'https' => 443, - 'ftp' => 21, - 'gopher' => 70, - 'nntp' => 119, - 'news' => 119, - 'telnet' => 23, - 'tn3270' => 23, - 'imap' => 143, - 'pop' => 110, - 'ldap' => 389, - ]; - - private static $charUnreserved = 'a-zA-Z0-9_\-\.~'; - private static $charSubDelims = '!\$&\'\(\)\*\+,;='; - private static $replaceQuery = ['=' => '%3D', '&' => '%26']; - - /** @var string Uri scheme. */ - private $scheme = ''; - - /** @var string Uri user info. */ - private $userInfo = ''; - - /** @var string Uri host. */ - private $host = ''; - - /** @var int|null Uri port. */ - private $port; - - /** @var string Uri path. */ - private $path = ''; - - /** @var string Uri query string. */ - private $query = ''; - - /** @var string Uri fragment. */ - private $fragment = ''; - - /** - * @param string $uri URI to parse - */ - public function __construct($uri = '') - { - // weak type check to also accept null until we can add scalar type hints - if ($uri != '') { - $parts = self::parse($uri); - if ($parts === false) { - throw new \InvalidArgumentException("Unable to parse URI: $uri"); - } - $this->applyParts($parts); - } - } - - /** - * UTF-8 aware \parse_url() replacement. - * - * The internal function produces broken output for non ASCII domain names - * (IDN) when used with locales other than "C". - * - * On the other hand, cURL understands IDN correctly only when UTF-8 locale - * is configured ("C.UTF-8", "en_US.UTF-8", etc.). - * - * @see https://bugs.php.net/bug.php?id=52923 - * @see https://www.php.net/manual/en/function.parse-url.php#114817 - * @see https://curl.haxx.se/libcurl/c/CURLOPT_URL.html#ENCODING - * - * @param string $url - * - * @return array|false - */ - private static function parse($url) - { - // If IPv6 - $prefix = ''; - if (preg_match('%^(.*://\[[0-9:a-f]+\])(.*?)$%', $url, $matches)) { - $prefix = $matches[1]; - $url = $matches[2]; - } - - $encodedUrl = preg_replace_callback( - '%[^:/@?&=#]+%usD', - static function ($matches) { - return urlencode($matches[0]); - }, - $url - ); - - $result = parse_url($prefix . $encodedUrl); - - if ($result === false) { - return false; - } - - return array_map('urldecode', $result); - } - - public function __toString() - { - return self::composeComponents( - $this->scheme, - $this->getAuthority(), - $this->path, - $this->query, - $this->fragment - ); - } - - /** - * Composes a URI reference string from its various components. - * - * Usually this method does not need to be called manually but instead is used indirectly via - * `Psr\Http\Message\UriInterface::__toString`. - * - * PSR-7 UriInterface treats an empty component the same as a missing component as - * getQuery(), getFragment() etc. always return a string. This explains the slight - * difference to RFC 3986 Section 5.3. - * - * Another adjustment is that the authority separator is added even when the authority is missing/empty - * for the "file" scheme. This is because PHP stream functions like `file_get_contents` only work with - * `file:///myfile` but not with `file:/myfile` although they are equivalent according to RFC 3986. But - * `file:///` is the more common syntax for the file scheme anyway (Chrome for example redirects to - * that format). - * - * @param string $scheme - * @param string $authority - * @param string $path - * @param string $query - * @param string $fragment - * - * @return string - * - * @link https://tools.ietf.org/html/rfc3986#section-5.3 - */ - public static function composeComponents($scheme, $authority, $path, $query, $fragment) - { - $uri = ''; - - // weak type checks to also accept null until we can add scalar type hints - if ($scheme != '') { - $uri .= $scheme . ':'; - } - - if ($authority != ''|| $scheme === 'file') { - $uri .= '//' . $authority; - } - - $uri .= $path; - - if ($query != '') { - $uri .= '?' . $query; - } - - if ($fragment != '') { - $uri .= '#' . $fragment; - } - - return $uri; - } - - /** - * Whether the URI has the default port of the current scheme. - * - * `Psr\Http\Message\UriInterface::getPort` may return null or the standard port. This method can be used - * independently of the implementation. - * - * @param UriInterface $uri - * - * @return bool - */ - public static function isDefaultPort(UriInterface $uri) - { - return $uri->getPort() === null - || (isset(self::$defaultPorts[$uri->getScheme()]) && $uri->getPort() === self::$defaultPorts[$uri->getScheme()]); - } - - /** - * Whether the URI is absolute, i.e. it has a scheme. - * - * An instance of UriInterface can either be an absolute URI or a relative reference. This method returns true - * if it is the former. An absolute URI has a scheme. A relative reference is used to express a URI relative - * to another URI, the base URI. Relative references can be divided into several forms: - * - network-path references, e.g. '//example.com/path' - * - absolute-path references, e.g. '/path' - * - relative-path references, e.g. 'subpath' - * - * @param UriInterface $uri - * - * @return bool - * - * @see Uri::isNetworkPathReference - * @see Uri::isAbsolutePathReference - * @see Uri::isRelativePathReference - * @link https://tools.ietf.org/html/rfc3986#section-4 - */ - public static function isAbsolute(UriInterface $uri) - { - return $uri->getScheme() !== ''; - } - - /** - * Whether the URI is a network-path reference. - * - * A relative reference that begins with two slash characters is termed an network-path reference. - * - * @param UriInterface $uri - * - * @return bool - * - * @link https://tools.ietf.org/html/rfc3986#section-4.2 - */ - public static function isNetworkPathReference(UriInterface $uri) - { - return $uri->getScheme() === '' && $uri->getAuthority() !== ''; - } - - /** - * Whether the URI is a absolute-path reference. - * - * A relative reference that begins with a single slash character is termed an absolute-path reference. - * - * @param UriInterface $uri - * - * @return bool - * - * @link https://tools.ietf.org/html/rfc3986#section-4.2 - */ - public static function isAbsolutePathReference(UriInterface $uri) - { - return $uri->getScheme() === '' - && $uri->getAuthority() === '' - && isset($uri->getPath()[0]) - && $uri->getPath()[0] === '/'; - } - - /** - * Whether the URI is a relative-path reference. - * - * A relative reference that does not begin with a slash character is termed a relative-path reference. - * - * @param UriInterface $uri - * - * @return bool - * - * @link https://tools.ietf.org/html/rfc3986#section-4.2 - */ - public static function isRelativePathReference(UriInterface $uri) - { - return $uri->getScheme() === '' - && $uri->getAuthority() === '' - && (!isset($uri->getPath()[0]) || $uri->getPath()[0] !== '/'); - } - - /** - * Whether the URI is a same-document reference. - * - * A same-document reference refers to a URI that is, aside from its fragment - * component, identical to the base URI. When no base URI is given, only an empty - * URI reference (apart from its fragment) is considered a same-document reference. - * - * @param UriInterface $uri The URI to check - * @param UriInterface|null $base An optional base URI to compare against - * - * @return bool - * - * @link https://tools.ietf.org/html/rfc3986#section-4.4 - */ - public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null) - { - if ($base !== null) { - $uri = UriResolver::resolve($base, $uri); - - return ($uri->getScheme() === $base->getScheme()) - && ($uri->getAuthority() === $base->getAuthority()) - && ($uri->getPath() === $base->getPath()) - && ($uri->getQuery() === $base->getQuery()); - } - - return $uri->getScheme() === '' && $uri->getAuthority() === '' && $uri->getPath() === '' && $uri->getQuery() === ''; - } - - /** - * Removes dot segments from a path and returns the new path. - * - * @param string $path - * - * @return string - * - * @deprecated since version 1.4. Use UriResolver::removeDotSegments instead. - * @see UriResolver::removeDotSegments - */ - public static function removeDotSegments($path) - { - return UriResolver::removeDotSegments($path); - } - - /** - * Converts the relative URI into a new URI that is resolved against the base URI. - * - * @param UriInterface $base Base URI - * @param string|UriInterface $rel Relative URI - * - * @return UriInterface - * - * @deprecated since version 1.4. Use UriResolver::resolve instead. - * @see UriResolver::resolve - */ - public static function resolve(UriInterface $base, $rel) - { - if (!($rel instanceof UriInterface)) { - $rel = new self($rel); - } - - return UriResolver::resolve($base, $rel); - } - - /** - * Creates a new URI with a specific query string value removed. - * - * Any existing query string values that exactly match the provided key are - * removed. - * - * @param UriInterface $uri URI to use as a base. - * @param string $key Query string key to remove. - * - * @return UriInterface - */ - public static function withoutQueryValue(UriInterface $uri, $key) - { - $result = self::getFilteredQueryString($uri, [$key]); - - return $uri->withQuery(implode('&', $result)); - } - - /** - * Creates a new URI with a specific query string value. - * - * Any existing query string values that exactly match the provided key are - * removed and replaced with the given key value pair. - * - * A value of null will set the query string key without a value, e.g. "key" - * instead of "key=value". - * - * @param UriInterface $uri URI to use as a base. - * @param string $key Key to set. - * @param string|null $value Value to set - * - * @return UriInterface - */ - public static function withQueryValue(UriInterface $uri, $key, $value) - { - $result = self::getFilteredQueryString($uri, [$key]); - - $result[] = self::generateQueryString($key, $value); - - return $uri->withQuery(implode('&', $result)); - } - - /** - * Creates a new URI with multiple specific query string values. - * - * It has the same behavior as withQueryValue() but for an associative array of key => value. - * - * @param UriInterface $uri URI to use as a base. - * @param array $keyValueArray Associative array of key and values - * - * @return UriInterface - */ - public static function withQueryValues(UriInterface $uri, array $keyValueArray) - { - $result = self::getFilteredQueryString($uri, array_keys($keyValueArray)); - - foreach ($keyValueArray as $key => $value) { - $result[] = self::generateQueryString($key, $value); - } - - return $uri->withQuery(implode('&', $result)); - } - - /** - * Creates a URI from a hash of `parse_url` components. - * - * @param array $parts - * - * @return UriInterface - * - * @link http://php.net/manual/en/function.parse-url.php - * - * @throws \InvalidArgumentException If the components do not form a valid URI. - */ - public static function fromParts(array $parts) - { - $uri = new self(); - $uri->applyParts($parts); - $uri->validateState(); - - return $uri; - } - - public function getScheme() - { - return $this->scheme; - } - - public function getAuthority() - { - $authority = $this->host; - if ($this->userInfo !== '') { - $authority = $this->userInfo . '@' . $authority; - } - - if ($this->port !== null) { - $authority .= ':' . $this->port; - } - - return $authority; - } - - public function getUserInfo() - { - return $this->userInfo; - } - - public function getHost() - { - return $this->host; - } - - public function getPort() - { - return $this->port; - } - - public function getPath() - { - return $this->path; - } - - public function getQuery() - { - return $this->query; - } - - public function getFragment() - { - return $this->fragment; - } - - public function withScheme($scheme) - { - $scheme = $this->filterScheme($scheme); - - if ($this->scheme === $scheme) { - return $this; - } - - $new = clone $this; - $new->scheme = $scheme; - $new->removeDefaultPort(); - $new->validateState(); - - return $new; - } - - public function withUserInfo($user, $password = null) - { - $info = $this->filterUserInfoComponent($user); - if ($password !== null) { - $info .= ':' . $this->filterUserInfoComponent($password); - } - - if ($this->userInfo === $info) { - return $this; - } - - $new = clone $this; - $new->userInfo = $info; - $new->validateState(); - - return $new; - } - - public function withHost($host) - { - $host = $this->filterHost($host); - - if ($this->host === $host) { - return $this; - } - - $new = clone $this; - $new->host = $host; - $new->validateState(); - - return $new; - } - - public function withPort($port) - { - $port = $this->filterPort($port); - - if ($this->port === $port) { - return $this; - } - - $new = clone $this; - $new->port = $port; - $new->removeDefaultPort(); - $new->validateState(); - - return $new; - } - - public function withPath($path) - { - $path = $this->filterPath($path); - - if ($this->path === $path) { - return $this; - } - - $new = clone $this; - $new->path = $path; - $new->validateState(); - - return $new; - } - - public function withQuery($query) - { - $query = $this->filterQueryAndFragment($query); - - if ($this->query === $query) { - return $this; - } - - $new = clone $this; - $new->query = $query; - - return $new; - } - - public function withFragment($fragment) - { - $fragment = $this->filterQueryAndFragment($fragment); - - if ($this->fragment === $fragment) { - return $this; - } - - $new = clone $this; - $new->fragment = $fragment; - - return $new; - } - - /** - * Apply parse_url parts to a URI. - * - * @param array $parts Array of parse_url parts to apply. - */ - private function applyParts(array $parts) - { - $this->scheme = isset($parts['scheme']) - ? $this->filterScheme($parts['scheme']) - : ''; - $this->userInfo = isset($parts['user']) - ? $this->filterUserInfoComponent($parts['user']) - : ''; - $this->host = isset($parts['host']) - ? $this->filterHost($parts['host']) - : ''; - $this->port = isset($parts['port']) - ? $this->filterPort($parts['port']) - : null; - $this->path = isset($parts['path']) - ? $this->filterPath($parts['path']) - : ''; - $this->query = isset($parts['query']) - ? $this->filterQueryAndFragment($parts['query']) - : ''; - $this->fragment = isset($parts['fragment']) - ? $this->filterQueryAndFragment($parts['fragment']) - : ''; - if (isset($parts['pass'])) { - $this->userInfo .= ':' . $this->filterUserInfoComponent($parts['pass']); - } - - $this->removeDefaultPort(); - } - - /** - * @param string $scheme - * - * @return string - * - * @throws \InvalidArgumentException If the scheme is invalid. - */ - private function filterScheme($scheme) - { - if (!is_string($scheme)) { - throw new \InvalidArgumentException('Scheme must be a string'); - } - - return \strtr($scheme, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'); - } - - /** - * @param string $component - * - * @return string - * - * @throws \InvalidArgumentException If the user info is invalid. - */ - private function filterUserInfoComponent($component) - { - if (!is_string($component)) { - throw new \InvalidArgumentException('User info must be a string'); - } - - return preg_replace_callback( - '/(?:[^%' . self::$charUnreserved . self::$charSubDelims . ']+|%(?![A-Fa-f0-9]{2}))/', - [$this, 'rawurlencodeMatchZero'], - $component - ); - } - - /** - * @param string $host - * - * @return string - * - * @throws \InvalidArgumentException If the host is invalid. - */ - private function filterHost($host) - { - if (!is_string($host)) { - throw new \InvalidArgumentException('Host must be a string'); - } - - return \strtr($host, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'); - } - - /** - * @param int|null $port - * - * @return int|null - * - * @throws \InvalidArgumentException If the port is invalid. - */ - private function filterPort($port) - { - if ($port === null) { - return null; - } - - $port = (int) $port; - if (0 > $port || 0xffff < $port) { - throw new \InvalidArgumentException( - sprintf('Invalid port: %d. Must be between 0 and 65535', $port) - ); - } - - return $port; - } - - /** - * @param UriInterface $uri - * @param array $keys - * - * @return array - */ - private static function getFilteredQueryString(UriInterface $uri, array $keys) - { - $current = $uri->getQuery(); - - if ($current === '') { - return []; - } - - $decodedKeys = array_map('rawurldecode', $keys); - - return array_filter(explode('&', $current), function ($part) use ($decodedKeys) { - return !in_array(rawurldecode(explode('=', $part)[0]), $decodedKeys, true); - }); - } - - /** - * @param string $key - * @param string|null $value - * - * @return string - */ - private static function generateQueryString($key, $value) - { - // Query string separators ("=", "&") within the key or value need to be encoded - // (while preventing double-encoding) before setting the query string. All other - // chars that need percent-encoding will be encoded by withQuery(). - $queryString = strtr($key, self::$replaceQuery); - - if ($value !== null) { - $queryString .= '=' . strtr($value, self::$replaceQuery); - } - - return $queryString; - } - - private function removeDefaultPort() - { - if ($this->port !== null && self::isDefaultPort($this)) { - $this->port = null; - } - } - - /** - * Filters the path of a URI - * - * @param string $path - * - * @return string - * - * @throws \InvalidArgumentException If the path is invalid. - */ - private function filterPath($path) - { - if (!is_string($path)) { - throw new \InvalidArgumentException('Path must be a string'); - } - - return preg_replace_callback( - '/(?:[^' . self::$charUnreserved . self::$charSubDelims . '%:@\/]++|%(?![A-Fa-f0-9]{2}))/', - [$this, 'rawurlencodeMatchZero'], - $path - ); - } - - /** - * Filters the query string or fragment of a URI. - * - * @param string $str - * - * @return string - * - * @throws \InvalidArgumentException If the query or fragment is invalid. - */ - private function filterQueryAndFragment($str) - { - if (!is_string($str)) { - throw new \InvalidArgumentException('Query and fragment must be a string'); - } - - return preg_replace_callback( - '/(?:[^' . self::$charUnreserved . self::$charSubDelims . '%:@\/\?]++|%(?![A-Fa-f0-9]{2}))/', - [$this, 'rawurlencodeMatchZero'], - $str - ); - } - - private function rawurlencodeMatchZero(array $match) - { - return rawurlencode($match[0]); - } - - private function validateState() - { - if ($this->host === '' && ($this->scheme === 'http' || $this->scheme === 'https')) { - $this->host = self::HTTP_DEFAULT_HOST; - } - - if ($this->getAuthority() === '') { - if (0 === strpos($this->path, '//')) { - throw new \InvalidArgumentException('The path of a URI without an authority must not start with two slashes "//"'); - } - if ($this->scheme === '' && false !== strpos(explode('/', $this->path, 2)[0], ':')) { - throw new \InvalidArgumentException('A relative URI must not have a path beginning with a segment containing a colon'); - } - } elseif (isset($this->path[0]) && $this->path[0] !== '/') { - @trigger_error( - 'The path of a URI with an authority must start with a slash "/" or be empty. Automagically fixing the URI ' . - 'by adding a leading slash to the path is deprecated since version 1.4 and will throw an exception instead.', - E_USER_DEPRECATED - ); - $this->path = '/' . $this->path; - //throw new \InvalidArgumentException('The path of a URI with an authority must start with a slash "/" or be empty'); - } - } -} diff --git a/source/vendor/guzzlehttp/psr7/src/UriNormalizer.php b/source/vendor/guzzlehttp/psr7/src/UriNormalizer.php deleted file mode 100644 index 81419ea..0000000 --- a/source/vendor/guzzlehttp/psr7/src/UriNormalizer.php +++ /dev/null @@ -1,219 +0,0 @@ -getPath() === '' && - ($uri->getScheme() === 'http' || $uri->getScheme() === 'https') - ) { - $uri = $uri->withPath('/'); - } - - if ($flags & self::REMOVE_DEFAULT_HOST && $uri->getScheme() === 'file' && $uri->getHost() === 'localhost') { - $uri = $uri->withHost(''); - } - - if ($flags & self::REMOVE_DEFAULT_PORT && $uri->getPort() !== null && Uri::isDefaultPort($uri)) { - $uri = $uri->withPort(null); - } - - if ($flags & self::REMOVE_DOT_SEGMENTS && !Uri::isRelativePathReference($uri)) { - $uri = $uri->withPath(UriResolver::removeDotSegments($uri->getPath())); - } - - if ($flags & self::REMOVE_DUPLICATE_SLASHES) { - $uri = $uri->withPath(preg_replace('#//++#', '/', $uri->getPath())); - } - - if ($flags & self::SORT_QUERY_PARAMETERS && $uri->getQuery() !== '') { - $queryKeyValues = explode('&', $uri->getQuery()); - sort($queryKeyValues); - $uri = $uri->withQuery(implode('&', $queryKeyValues)); - } - - return $uri; - } - - /** - * Whether two URIs can be considered equivalent. - * - * Both URIs are normalized automatically before comparison with the given $normalizations bitmask. The method also - * accepts relative URI references and returns true when they are equivalent. This of course assumes they will be - * resolved against the same base URI. If this is not the case, determination of equivalence or difference of - * relative references does not mean anything. - * - * @param UriInterface $uri1 An URI to compare - * @param UriInterface $uri2 An URI to compare - * @param int $normalizations A bitmask of normalizations to apply, see constants - * - * @return bool - * - * @link https://tools.ietf.org/html/rfc3986#section-6.1 - */ - public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, $normalizations = self::PRESERVING_NORMALIZATIONS) - { - return (string) self::normalize($uri1, $normalizations) === (string) self::normalize($uri2, $normalizations); - } - - private static function capitalizePercentEncoding(UriInterface $uri) - { - $regex = '/(?:%[A-Fa-f0-9]{2})++/'; - - $callback = function (array $match) { - return strtoupper($match[0]); - }; - - return - $uri->withPath( - preg_replace_callback($regex, $callback, $uri->getPath()) - )->withQuery( - preg_replace_callback($regex, $callback, $uri->getQuery()) - ); - } - - private static function decodeUnreservedCharacters(UriInterface $uri) - { - $regex = '/%(?:2D|2E|5F|7E|3[0-9]|[46][1-9A-F]|[57][0-9A])/i'; - - $callback = function (array $match) { - return rawurldecode($match[0]); - }; - - return - $uri->withPath( - preg_replace_callback($regex, $callback, $uri->getPath()) - )->withQuery( - preg_replace_callback($regex, $callback, $uri->getQuery()) - ); - } - - private function __construct() - { - // cannot be instantiated - } -} diff --git a/source/vendor/guzzlehttp/psr7/src/UriResolver.php b/source/vendor/guzzlehttp/psr7/src/UriResolver.php deleted file mode 100644 index a3cb15d..0000000 --- a/source/vendor/guzzlehttp/psr7/src/UriResolver.php +++ /dev/null @@ -1,222 +0,0 @@ -getScheme() != '') { - return $rel->withPath(self::removeDotSegments($rel->getPath())); - } - - if ($rel->getAuthority() != '') { - $targetAuthority = $rel->getAuthority(); - $targetPath = self::removeDotSegments($rel->getPath()); - $targetQuery = $rel->getQuery(); - } else { - $targetAuthority = $base->getAuthority(); - if ($rel->getPath() === '') { - $targetPath = $base->getPath(); - $targetQuery = $rel->getQuery() != '' ? $rel->getQuery() : $base->getQuery(); - } else { - if ($rel->getPath()[0] === '/') { - $targetPath = $rel->getPath(); - } else { - if ($targetAuthority != '' && $base->getPath() === '') { - $targetPath = '/' . $rel->getPath(); - } else { - $lastSlashPos = strrpos($base->getPath(), '/'); - if ($lastSlashPos === false) { - $targetPath = $rel->getPath(); - } else { - $targetPath = substr($base->getPath(), 0, $lastSlashPos + 1) . $rel->getPath(); - } - } - } - $targetPath = self::removeDotSegments($targetPath); - $targetQuery = $rel->getQuery(); - } - } - - return new Uri(Uri::composeComponents( - $base->getScheme(), - $targetAuthority, - $targetPath, - $targetQuery, - $rel->getFragment() - )); - } - - /** - * Returns the target URI as a relative reference from the base URI. - * - * This method is the counterpart to resolve(): - * - * (string) $target === (string) UriResolver::resolve($base, UriResolver::relativize($base, $target)) - * - * One use-case is to use the current request URI as base URI and then generate relative links in your documents - * to reduce the document size or offer self-contained downloadable document archives. - * - * $base = new Uri('http://example.com/a/b/'); - * echo UriResolver::relativize($base, new Uri('http://example.com/a/b/c')); // prints 'c'. - * echo UriResolver::relativize($base, new Uri('http://example.com/a/x/y')); // prints '../x/y'. - * echo UriResolver::relativize($base, new Uri('http://example.com/a/b/?q')); // prints '?q'. - * echo UriResolver::relativize($base, new Uri('http://example.org/a/b/')); // prints '//example.org/a/b/'. - * - * This method also accepts a target that is already relative and will try to relativize it further. Only a - * relative-path reference will be returned as-is. - * - * echo UriResolver::relativize($base, new Uri('/a/b/c')); // prints 'c' as well - * - * @param UriInterface $base Base URI - * @param UriInterface $target Target URI - * - * @return UriInterface The relative URI reference - */ - public static function relativize(UriInterface $base, UriInterface $target) - { - if ($target->getScheme() !== '' && - ($base->getScheme() !== $target->getScheme() || $target->getAuthority() === '' && $base->getAuthority() !== '') - ) { - return $target; - } - - if (Uri::isRelativePathReference($target)) { - // As the target is already highly relative we return it as-is. It would be possible to resolve - // the target with `$target = self::resolve($base, $target);` and then try make it more relative - // by removing a duplicate query. But let's not do that automatically. - return $target; - } - - if ($target->getAuthority() !== '' && $base->getAuthority() !== $target->getAuthority()) { - return $target->withScheme(''); - } - - // We must remove the path before removing the authority because if the path starts with two slashes, the URI - // would turn invalid. And we also cannot set a relative path before removing the authority, as that is also - // invalid. - $emptyPathUri = $target->withScheme('')->withPath('')->withUserInfo('')->withPort(null)->withHost(''); - - if ($base->getPath() !== $target->getPath()) { - return $emptyPathUri->withPath(self::getRelativePath($base, $target)); - } - - if ($base->getQuery() === $target->getQuery()) { - // Only the target fragment is left. And it must be returned even if base and target fragment are the same. - return $emptyPathUri->withQuery(''); - } - - // If the base URI has a query but the target has none, we cannot return an empty path reference as it would - // inherit the base query component when resolving. - if ($target->getQuery() === '') { - $segments = explode('/', $target->getPath()); - $lastSegment = end($segments); - - return $emptyPathUri->withPath($lastSegment === '' ? './' : $lastSegment); - } - - return $emptyPathUri; - } - - private static function getRelativePath(UriInterface $base, UriInterface $target) - { - $sourceSegments = explode('/', $base->getPath()); - $targetSegments = explode('/', $target->getPath()); - array_pop($sourceSegments); - $targetLastSegment = array_pop($targetSegments); - foreach ($sourceSegments as $i => $segment) { - if (isset($targetSegments[$i]) && $segment === $targetSegments[$i]) { - unset($sourceSegments[$i], $targetSegments[$i]); - } else { - break; - } - } - $targetSegments[] = $targetLastSegment; - $relativePath = str_repeat('../', count($sourceSegments)) . implode('/', $targetSegments); - - // A reference to am empty last segment or an empty first sub-segment must be prefixed with "./". - // This also applies to a segment with a colon character (e.g., "file:colon") that cannot be used - // as the first segment of a relative-path reference, as it would be mistaken for a scheme name. - if ('' === $relativePath || false !== strpos(explode('/', $relativePath, 2)[0], ':')) { - $relativePath = "./$relativePath"; - } elseif ('/' === $relativePath[0]) { - if ($base->getAuthority() != '' && $base->getPath() === '') { - // In this case an extra slash is added by resolve() automatically. So we must not add one here. - $relativePath = ".$relativePath"; - } else { - $relativePath = "./$relativePath"; - } - } - - return $relativePath; - } - - private function __construct() - { - // cannot be instantiated - } -} diff --git a/source/vendor/guzzlehttp/psr7/src/Utils.php b/source/vendor/guzzlehttp/psr7/src/Utils.php deleted file mode 100644 index 6b6c8cc..0000000 --- a/source/vendor/guzzlehttp/psr7/src/Utils.php +++ /dev/null @@ -1,428 +0,0 @@ - $keys - * - * @return array - */ - public static function caselessRemove($keys, array $data) - { - $result = []; - - foreach ($keys as &$key) { - $key = strtolower($key); - } - - foreach ($data as $k => $v) { - if (!in_array(strtolower($k), $keys)) { - $result[$k] = $v; - } - } - - return $result; - } - - /** - * Copy the contents of a stream into another stream until the given number - * of bytes have been read. - * - * @param StreamInterface $source Stream to read from - * @param StreamInterface $dest Stream to write to - * @param int $maxLen Maximum number of bytes to read. Pass -1 - * to read the entire stream. - * - * @throws \RuntimeException on error. - */ - public static function copyToStream(StreamInterface $source, StreamInterface $dest, $maxLen = -1) - { - $bufferSize = 8192; - - if ($maxLen === -1) { - while (!$source->eof()) { - if (!$dest->write($source->read($bufferSize))) { - break; - } - } - } else { - $remaining = $maxLen; - while ($remaining > 0 && !$source->eof()) { - $buf = $source->read(min($bufferSize, $remaining)); - $len = strlen($buf); - if (!$len) { - break; - } - $remaining -= $len; - $dest->write($buf); - } - } - } - - /** - * Copy the contents of a stream into a string until the given number of - * bytes have been read. - * - * @param StreamInterface $stream Stream to read - * @param int $maxLen Maximum number of bytes to read. Pass -1 - * to read the entire stream. - * - * @return string - * - * @throws \RuntimeException on error. - */ - public static function copyToString(StreamInterface $stream, $maxLen = -1) - { - $buffer = ''; - - if ($maxLen === -1) { - while (!$stream->eof()) { - $buf = $stream->read(1048576); - // Using a loose equality here to match on '' and false. - if ($buf == null) { - break; - } - $buffer .= $buf; - } - return $buffer; - } - - $len = 0; - while (!$stream->eof() && $len < $maxLen) { - $buf = $stream->read($maxLen - $len); - // Using a loose equality here to match on '' and false. - if ($buf == null) { - break; - } - $buffer .= $buf; - $len = strlen($buffer); - } - - return $buffer; - } - - /** - * Calculate a hash of a stream. - * - * This method reads the entire stream to calculate a rolling hash, based - * on PHP's `hash_init` functions. - * - * @param StreamInterface $stream Stream to calculate the hash for - * @param string $algo Hash algorithm (e.g. md5, crc32, etc) - * @param bool $rawOutput Whether or not to use raw output - * - * @return string Returns the hash of the stream - * - * @throws \RuntimeException on error. - */ - public static function hash(StreamInterface $stream, $algo, $rawOutput = false) - { - $pos = $stream->tell(); - - if ($pos > 0) { - $stream->rewind(); - } - - $ctx = hash_init($algo); - while (!$stream->eof()) { - hash_update($ctx, $stream->read(1048576)); - } - - $out = hash_final($ctx, (bool) $rawOutput); - $stream->seek($pos); - - return $out; - } - - /** - * Clone and modify a request with the given changes. - * - * This method is useful for reducing the number of clones needed to mutate - * a message. - * - * The changes can be one of: - * - method: (string) Changes the HTTP method. - * - set_headers: (array) Sets the given headers. - * - remove_headers: (array) Remove the given headers. - * - body: (mixed) Sets the given body. - * - uri: (UriInterface) Set the URI. - * - query: (string) Set the query string value of the URI. - * - version: (string) Set the protocol version. - * - * @param RequestInterface $request Request to clone and modify. - * @param array $changes Changes to apply. - * - * @return RequestInterface - */ - public static function modifyRequest(RequestInterface $request, array $changes) - { - if (!$changes) { - return $request; - } - - $headers = $request->getHeaders(); - - if (!isset($changes['uri'])) { - $uri = $request->getUri(); - } else { - // Remove the host header if one is on the URI - if ($host = $changes['uri']->getHost()) { - $changes['set_headers']['Host'] = $host; - - if ($port = $changes['uri']->getPort()) { - $standardPorts = ['http' => 80, 'https' => 443]; - $scheme = $changes['uri']->getScheme(); - if (isset($standardPorts[$scheme]) && $port != $standardPorts[$scheme]) { - $changes['set_headers']['Host'] .= ':' . $port; - } - } - } - $uri = $changes['uri']; - } - - if (!empty($changes['remove_headers'])) { - $headers = self::caselessRemove($changes['remove_headers'], $headers); - } - - if (!empty($changes['set_headers'])) { - $headers = self::caselessRemove(array_keys($changes['set_headers']), $headers); - $headers = $changes['set_headers'] + $headers; - } - - if (isset($changes['query'])) { - $uri = $uri->withQuery($changes['query']); - } - - if ($request instanceof ServerRequestInterface) { - $new = (new ServerRequest( - isset($changes['method']) ? $changes['method'] : $request->getMethod(), - $uri, - $headers, - isset($changes['body']) ? $changes['body'] : $request->getBody(), - isset($changes['version']) - ? $changes['version'] - : $request->getProtocolVersion(), - $request->getServerParams() - )) - ->withParsedBody($request->getParsedBody()) - ->withQueryParams($request->getQueryParams()) - ->withCookieParams($request->getCookieParams()) - ->withUploadedFiles($request->getUploadedFiles()); - - foreach ($request->getAttributes() as $key => $value) { - $new = $new->withAttribute($key, $value); - } - - return $new; - } - - return new Request( - isset($changes['method']) ? $changes['method'] : $request->getMethod(), - $uri, - $headers, - isset($changes['body']) ? $changes['body'] : $request->getBody(), - isset($changes['version']) - ? $changes['version'] - : $request->getProtocolVersion() - ); - } - - /** - * Read a line from the stream up to the maximum allowed buffer length. - * - * @param StreamInterface $stream Stream to read from - * @param int|null $maxLength Maximum buffer length - * - * @return string - */ - public static function readLine(StreamInterface $stream, $maxLength = null) - { - $buffer = ''; - $size = 0; - - while (!$stream->eof()) { - // Using a loose equality here to match on '' and false. - if (null == ($byte = $stream->read(1))) { - return $buffer; - } - $buffer .= $byte; - // Break when a new line is found or the max length - 1 is reached - if ($byte === "\n" || ++$size === $maxLength - 1) { - break; - } - } - - return $buffer; - } - - /** - * Create a new stream based on the input type. - * - * Options is an associative array that can contain the following keys: - * - metadata: Array of custom metadata. - * - size: Size of the stream. - * - * This method accepts the following `$resource` types: - * - `Psr\Http\Message\StreamInterface`: Returns the value as-is. - * - `string`: Creates a stream object that uses the given string as the contents. - * - `resource`: Creates a stream object that wraps the given PHP stream resource. - * - `Iterator`: If the provided value implements `Iterator`, then a read-only - * stream object will be created that wraps the given iterable. Each time the - * stream is read from, data from the iterator will fill a buffer and will be - * continuously called until the buffer is equal to the requested read size. - * Subsequent read calls will first read from the buffer and then call `next` - * on the underlying iterator until it is exhausted. - * - `object` with `__toString()`: If the object has the `__toString()` method, - * the object will be cast to a string and then a stream will be returned that - * uses the string value. - * - `NULL`: When `null` is passed, an empty stream object is returned. - * - `callable` When a callable is passed, a read-only stream object will be - * created that invokes the given callable. The callable is invoked with the - * number of suggested bytes to read. The callable can return any number of - * bytes, but MUST return `false` when there is no more data to return. The - * stream object that wraps the callable will invoke the callable until the - * number of requested bytes are available. Any additional bytes will be - * buffered and used in subsequent reads. - * - * @param resource|string|int|float|bool|StreamInterface|callable|\Iterator|null $resource Entity body data - * @param array $options Additional options - * - * @return StreamInterface - * - * @throws \InvalidArgumentException if the $resource arg is not valid. - */ - public static function streamFor($resource = '', array $options = []) - { - if (is_scalar($resource)) { - $stream = self::tryFopen('php://temp', 'r+'); - if ($resource !== '') { - fwrite($stream, $resource); - fseek($stream, 0); - } - return new Stream($stream, $options); - } - - switch (gettype($resource)) { - case 'resource': - /* - * The 'php://input' is a special stream with quirks and inconsistencies. - * We avoid using that stream by reading it into php://temp - */ - $metaData = \stream_get_meta_data($resource); - if (isset($metaData['uri']) && $metaData['uri'] === 'php://input') { - $stream = self::tryFopen('php://temp', 'w+'); - fwrite($stream, stream_get_contents($resource)); - fseek($stream, 0); - $resource = $stream; - } - return new Stream($resource, $options); - case 'object': - if ($resource instanceof StreamInterface) { - return $resource; - } elseif ($resource instanceof \Iterator) { - return new PumpStream(function () use ($resource) { - if (!$resource->valid()) { - return false; - } - $result = $resource->current(); - $resource->next(); - return $result; - }, $options); - } elseif (method_exists($resource, '__toString')) { - return Utils::streamFor((string) $resource, $options); - } - break; - case 'NULL': - return new Stream(self::tryFopen('php://temp', 'r+'), $options); - } - - if (is_callable($resource)) { - return new PumpStream($resource, $options); - } - - throw new \InvalidArgumentException('Invalid resource type: ' . gettype($resource)); - } - - /** - * Safely opens a PHP stream resource using a filename. - * - * When fopen fails, PHP normally raises a warning. This function adds an - * error handler that checks for errors and throws an exception instead. - * - * @param string $filename File to open - * @param string $mode Mode used to open the file - * - * @return resource - * - * @throws \RuntimeException if the file cannot be opened - */ - public static function tryFopen($filename, $mode) - { - $ex = null; - set_error_handler(function () use ($filename, $mode, &$ex) { - $ex = new \RuntimeException(sprintf( - 'Unable to open "%s" using mode "%s": %s', - $filename, - $mode, - func_get_args()[1] - )); - - return true; - }); - - try { - $handle = fopen($filename, $mode); - } catch (\Throwable $e) { - $ex = new \RuntimeException(sprintf( - 'Unable to open "%s" using mode "%s": %s', - $filename, - $mode, - $e->getMessage() - ), 0, $e); - } - - restore_error_handler(); - - if ($ex) { - /** @var $ex \RuntimeException */ - throw $ex; - } - - return $handle; - } - - /** - * Returns a UriInterface for the given value. - * - * This function accepts a string or UriInterface and returns a - * UriInterface for the given value. If the value is already a - * UriInterface, it is returned as-is. - * - * @param string|UriInterface $uri - * - * @return UriInterface - * - * @throws \InvalidArgumentException - */ - public static function uriFor($uri) - { - if ($uri instanceof UriInterface) { - return $uri; - } - - if (is_string($uri)) { - return new Uri($uri); - } - - throw new \InvalidArgumentException('URI must be a string or UriInterface'); - } -} diff --git a/source/vendor/guzzlehttp/psr7/src/functions.php b/source/vendor/guzzlehttp/psr7/src/functions.php deleted file mode 100644 index b0901fa..0000000 --- a/source/vendor/guzzlehttp/psr7/src/functions.php +++ /dev/null @@ -1,422 +0,0 @@ - '1', 'foo[b]' => '2'])`. - * - * @param string $str Query string to parse - * @param int|bool $urlEncoding How the query string is encoded - * - * @return array - * - * @deprecated parse_query will be removed in guzzlehttp/psr7:2.0. Use Query::parse instead. - */ -function parse_query($str, $urlEncoding = true) -{ - return Query::parse($str, $urlEncoding); -} - -/** - * Build a query string from an array of key value pairs. - * - * This function can use the return value of `parse_query()` to build a query - * string. This function does not modify the provided keys when an array is - * encountered (like `http_build_query()` would). - * - * @param array $params Query string parameters. - * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986 - * to encode using RFC3986, or PHP_QUERY_RFC1738 - * to encode using RFC1738. - * - * @return string - * - * @deprecated build_query will be removed in guzzlehttp/psr7:2.0. Use Query::build instead. - */ -function build_query(array $params, $encoding = PHP_QUERY_RFC3986) -{ - return Query::build($params, $encoding); -} - -/** - * Determines the mimetype of a file by looking at its extension. - * - * @param string $filename - * - * @return string|null - * - * @deprecated mimetype_from_filename will be removed in guzzlehttp/psr7:2.0. Use MimeType::fromFilename instead. - */ -function mimetype_from_filename($filename) -{ - return MimeType::fromFilename($filename); -} - -/** - * Maps a file extensions to a mimetype. - * - * @param $extension string The file extension. - * - * @return string|null - * - * @link http://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x/conf/mime.types - * @deprecated mimetype_from_extension will be removed in guzzlehttp/psr7:2.0. Use MimeType::fromExtension instead. - */ -function mimetype_from_extension($extension) -{ - return MimeType::fromExtension($extension); -} - -/** - * Parses an HTTP message into an associative array. - * - * The array contains the "start-line" key containing the start line of - * the message, "headers" key containing an associative array of header - * array values, and a "body" key containing the body of the message. - * - * @param string $message HTTP request or response to parse. - * - * @return array - * - * @internal - * - * @deprecated _parse_message will be removed in guzzlehttp/psr7:2.0. Use Message::parseMessage instead. - */ -function _parse_message($message) -{ - return Message::parseMessage($message); -} - -/** - * Constructs a URI for an HTTP request message. - * - * @param string $path Path from the start-line - * @param array $headers Array of headers (each value an array). - * - * @return string - * - * @internal - * - * @deprecated _parse_request_uri will be removed in guzzlehttp/psr7:2.0. Use Message::parseRequestUri instead. - */ -function _parse_request_uri($path, array $headers) -{ - return Message::parseRequestUri($path, $headers); -} - -/** - * Get a short summary of the message body. - * - * Will return `null` if the response is not printable. - * - * @param MessageInterface $message The message to get the body summary - * @param int $truncateAt The maximum allowed size of the summary - * - * @return string|null - * - * @deprecated get_message_body_summary will be removed in guzzlehttp/psr7:2.0. Use Message::bodySummary instead. - */ -function get_message_body_summary(MessageInterface $message, $truncateAt = 120) -{ - return Message::bodySummary($message, $truncateAt); -} - -/** - * Remove the items given by the keys, case insensitively from the data. - * - * @param iterable $keys - * - * @return array - * - * @internal - * - * @deprecated _caseless_remove will be removed in guzzlehttp/psr7:2.0. Use Utils::caselessRemove instead. - */ -function _caseless_remove($keys, array $data) -{ - return Utils::caselessRemove($keys, $data); -} diff --git a/source/vendor/guzzlehttp/psr7/src/functions_include.php b/source/vendor/guzzlehttp/psr7/src/functions_include.php deleted file mode 100644 index 96a4a83..0000000 --- a/source/vendor/guzzlehttp/psr7/src/functions_include.php +++ /dev/null @@ -1,6 +0,0 @@ -password = $password; - } - - public function attempt(array $credentials) - { - if (! isset($credentials['password'])) { - return false; - } - - if (! hash_equals($credentials['password'], $this->password)) { - return false; - } - - return password_hash($this->password, \PASSWORD_DEFAULT); - } - - public function check($token) - { - return password_verify($this->password, $token); - } - - public function requires() - { - return [ AuthenticatorInterface::REQUIRES_PASSWORD ]; - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Clockwork.php b/source/vendor/itsgoingd/clockwork/Clockwork/Clockwork.php deleted file mode 100644 index 72d4067..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Clockwork.php +++ /dev/null @@ -1,282 +0,0 @@ -request = new Request; - $this->authenticator = new NullAuthenticator; - - $this->shouldCollect = new ShouldCollect; - $this->shouldRecord = new ShouldRecord; - } - - // Add a new data source - public function addDataSource(DataSourceInterface $dataSource) - { - $this->dataSources[] = $dataSource; - return $this; - } - - // Resolve the current request, sending it through all data sources, finalizing log and timeline - public function resolveRequest() - { - foreach ($this->dataSources as $dataSource) { - $dataSource->resolve($this->request); - } - - $this->request->log()->sort(); - $this->request->timeline()->finalize($this->request->time); - - return $this; - } - - // Resolve the current request as a "command" type request with command-specific data - public function resolveAsCommand($name, $exitCode = null, $arguments = [], $options = [], $argumentsDefaults = [], $optionsDefaults = [], $output = null) - { - $this->resolveRequest(); - - $this->request->type = RequestType::COMMAND; - $this->request->commandName = $name; - $this->request->commandArguments = $arguments; - $this->request->commandArgumentsDefaults = $argumentsDefaults; - $this->request->commandOptions = $options; - $this->request->commandOptionsDefaults = $optionsDefaults; - $this->request->commandExitCode = $exitCode; - $this->request->commandOutput = $output; - - return $this; - } - - // Resolve the current request as a "queue-job" type request with queue-job-specific data - public function resolveAsQueueJob($name, $description = null, $status = 'processed', $payload = [], $queue = null, $connection = null, $options = []) - { - $this->resolveRequest(); - - $this->request->type = RequestType::QUEUE_JOB; - $this->request->jobName = $name; - $this->request->jobDescription = $description; - $this->request->jobStatus = $status; - $this->request->jobPayload = (new Serializer)->normalize($payload); - $this->request->jobQueue = $queue; - $this->request->jobConnection = $connection; - $this->request->jobOptions = (new Serializer)->normalizeEach($options); - - return $this; - } - - // Resolve the current request as a "test" type request with test-specific data, accepts test name, status, status - // message in case of failure and array of ran asserts - public function resolveAsTest($name, $status = 'passed', $statusMessage = null, $asserts = []) - { - $this->resolveRequest(); - - $this->request->type = RequestType::TEST; - $this->request->testName = $name; - $this->request->testStatus = $status; - $this->request->testStatusMessage = $statusMessage; - - foreach ($asserts as $assert) { - $this->request->addTestAssert($assert['name'], $assert['arguments'], $assert['passed'], $assert['trace']); - } - - return $this; - } - - // Extends the request with an additional data form all data sources, which is not required for normal use - public function extendRequest(Request $request = null) - { - foreach ($this->dataSources as $dataSource) { - $dataSource->extend($request ?: $this->request); - } - - return $this; - } - - // Store the current request via configured storage implementation - public function storeRequest() - { - return $this->storage->store($this->request); - } - - // Reset all data sources to an empty state, clearing any collected data - public function reset() - { - foreach ($this->dataSources as $dataSource) { - $dataSource->reset(); - } - - return $this; - } - - // Get or set the current request instance - public function request(Request $request = null) - { - if (! $request) return $this->request; - - $this->request = $request; - return $this; - } - - // Get the log instance for the current request or log a new message - public function log($level = null, $message = null, array $context = []) - { - if ($level) { - return $this->request->log()->log($level, $message, $context); - } - - return $this->request->log(); - } - - // Get the timeline instance for the current request - public function timeline() - { - return $this->request->timeline(); - } - - // Shortcut to create a new event on the current timeline instance - public function event($description, $data = []) - { - return $this->request->timeline()->event($description, $data); - } - - // Configure which requests should be collected, can be called with arrey of options, a custom closure or with no - // arguments for a fluent configuration api - public function shouldCollect($shouldCollect = null) - { - if ($shouldCollect instanceof Closure) return $this->shouldCollect->callback($shouldCollect); - - if (is_array($shouldCollect)) return $this->shouldCollect->merge($shouldCollect); - - return $this->shouldCollect; - } - - // Configure which requests should be recorded, can be called with arrey of options, a custom closure or with no - // arguments for a fluent configuration api - public function shouldRecord($shouldRecord = null) - { - if ($shouldRecord instanceof Closure) return $this->shouldRecord->callback($shouldRecord); - - if (is_array($shouldRecord)) return $this->shouldRecord->merge($shouldRecord); - - return $this->shouldRecord; - } - - // Get or set all data sources at once - public function dataSources($dataSources = null) - { - if (! $dataSources) return $this->dataSources; - - $this->dataSources = $dataSources; - return $this; - } - - // Get or set a storage implementation - public function storage(StorageInterface $storage = null) - { - if (! $storage) return $this->storage; - - $this->storage = $storage; - return $this; - } - - // Get or set an authenticator implementation - public function authenticator(AuthenticatorInterface $authenticator = null) - { - if (! $authenticator) return $this->authenticator; - - $this->authenticator = $authenticator; - return $this; - } - - // Forward any other method calls to the current request and log instances - public function __call($method, $args) - { - if (in_array($method, [ 'emergency', 'alert', 'critical', 'error', 'warning', 'notice', 'info', 'debug' ])) { - return $this->request->log()->$method(...$args); - } - - return $this->request->$method(...$args); - } - - // DEPRECATED The following apis are deprecated and will be removed in a future version - - // Get all added data sources - public function getDataSources() - { - return $this->dataSources; - } - - // Get the current request instance - public function getRequest() - { - return $this->request; - } - - // Set the current request instance - public function setRequest(Request $request) - { - $this->request = $request; - return $this; - } - - // Get a storage implementation - public function getStorage() - { - return $this->storage; - } - - // Set a storage implementation - public function setStorage(StorageInterface $storage) - { - $this->storage = $storage; - return $this; - } - - // Get an authenitcator implementation - public function getAuthenticator() - { - return $this->authenticator; - } - - // Set an authenticator implementation - public function setAuthenticator(AuthenticatorInterface $authenticator) - { - $this->authenticator = $authenticator; - return $this; - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/Concerns/EloquentDetectDuplicateQueries.php b/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/Concerns/EloquentDetectDuplicateQueries.php deleted file mode 100644 index 1d63942..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/Concerns/EloquentDetectDuplicateQueries.php +++ /dev/null @@ -1,64 +0,0 @@ -duplicateQueries as $query) { - if ($query['count'] <= 1) continue; - - $log->warning( - "N+1 queries: {$query['model']}::{$query['relation']} loaded {$query['count']} times.", - [ 'performance' => true, 'trace' => $query['trace'] ] - ); - } - - $request->log()->merge($log); - } - - protected function detectDuplicateQuery(StackTrace $trace) - { - $relationFrame = $trace->first(function ($frame) { - return $frame->function == 'getRelationValue' - || $frame->class == \Illuminate\Database\Eloquent\Relations\Relation::class; - }); - - if (! $relationFrame || ! $relationFrame->object) return; - - if ($relationFrame->class == \Illuminate\Database\Eloquent\Relations\Relation::class) { - $model = get_class($relationFrame->object->getParent()); - $relation = get_class($relationFrame->object->getRelated()); - } else { - $model = get_class($relationFrame->object); - $relation = $relationFrame->args[0]; - } - - $shortTrace = $trace->skip(StackFilter::make() - ->isNotVendor([ 'itsgoingd', 'laravel', 'illuminate' ]) - ->isNotNamespace([ 'Clockwork', 'Illuminate' ])); - - $hash = implode('-', [ $model, $relation, $shortTrace->first()->file, $shortTrace->first()->line ]); - - if (! isset($this->duplicateQueries[$hash])) { - $this->duplicateQueries[$hash] = [ - 'count' => 0, - 'model' => $model, - 'relation' => $relation, - 'trace' => $trace - ]; - } - - $this->duplicateQueries[$hash]['count']++; - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/DBALDataSource.php b/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/DBALDataSource.php deleted file mode 100644 index da6ba5d..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/DBALDataSource.php +++ /dev/null @@ -1,187 +0,0 @@ -connection = $connection; - - $configuration = $this->connection->getConfiguration(); - $currentLogger = $configuration->getSQLLogger(); - - if ($currentLogger === null) { - $configuration->setSQLLogger($this); - } else { - $loggerChain = new LoggerChain; - $loggerChain->addLogger($currentLogger); - $loggerChain->addLogger($this); - - $configuration->setSQLLogger($loggerChain); - } - } - - // Adds executed database queries to the request - public function resolve(Request $request) - { - $request->databaseQueries = array_merge($request->databaseQueries, $this->queries); - - return $request; - } - - // Reset the data source to an empty state, clearing any collected data - public function reset() - { - $this->queries = []; - $this->query = null; - } - - // DBAL SQLLogger event - public function startQuery($sql, array $params = null, array $types = null) - { - $this->query = [ - 'query' => $sql, - 'params' => $params, - 'types' => $types, - 'time' => microtime(true) - ]; - } - - // DBAL SQLLogger event - public function stopQuery() - { - $this->registerQuery($this->query); - $this->query = null; - } - - // Collect an executed database query - protected function registerQuery($query) - { - $query = [ - 'query' => $this->createRunnableQuery($query['query'], $query['params'], $query['types']), - 'bindings' => $query['params'], - 'duration' => (microtime(true) - $query['time']) * 1000, - 'connection' => $this->connection->getDatabase(), - 'time' => $query['time'] - ]; - - if ($this->passesFilters([ $query ])) { - $this->queries[] = $query; - } - } - - // Takes a query, an array of params and types as arguments, returns runnable query with upper-cased keywords - protected function createRunnableQuery($query, $params, $types) - { - // add params to query - $query = $this->replaceParams($this->connection->getDatabasePlatform(), $query, $params, $types); - - // highlight keywords - $keywords = [ - 'select', 'insert', 'update', 'delete', 'into', 'values', 'set', 'where', 'from', 'limit', 'is', 'null', - 'having', 'group by', 'order by', 'asc', 'desc' - ]; - $regexp = '/\b' . implode('\b|\b', $keywords) . '\b/i'; - - return preg_replace_callback($regexp, function ($match) { return strtoupper($match[0]); }, $query); - } - - /** - * Source at laravel-doctrine/orm LaravelDoctrine\ORM\Loggers\Formatters\ReplaceQueryParams::format(). - * - * @param AbstractPlatform $platform - * @param string $sql - * @param array|null $params - * @param array|null $types - * - * - * @return string - */ - public function replaceParams($platform, $sql, array $params = null, array $types = null) - { - if (is_array($params)) { - foreach ($params as $key => $param) { - $type = isset($types[$key]) ? $types[$key] : null; // Originally used null coalescing - $param = $this->convertParam($platform, $param, $type); - $sql = preg_replace('/\?/', "$param", $sql, 1); - } - } - return $sql; - } - - /** - * Source at laravel-doctrine/orm LaravelDoctrine\ORM\Loggers\Formatters\ReplaceQueryParams::convertParam(). - * - * @param mixed $param - * - * @throws \Exception - * @return string - */ - protected function convertParam($platform, $param, $type = null) - { - if (is_object($param)) { - if (!method_exists($param, '__toString')) { - if ($param instanceof \DateTimeInterface) { - $param = $param->format('Y-m-d H:i:s'); - } elseif (Type::hasType($type)) { - $type = Type::getType($type); - $param = $type->convertToDatabaseValue($param, $platform); - } else { - throw new \Exception('Given query param is an instance of ' . get_class($param) . ' and could not be converted to a string'); - } - } - } elseif (is_array($param)) { - if ($this->isNestedArray($param)) { - $param = json_encode($param, JSON_UNESCAPED_UNICODE); - } else { - $param = implode( - ', ', - array_map( - function ($part) { - return '"' . (string) $part . '"'; - }, - $param - ) - ); - return '(' . $param . ')'; - } - } else { - $param = htmlspecialchars($param); // Originally used the e() Laravel helper - } - return '"' . (string) $param . '"'; - } - - /** - * Source at laravel-doctrine/orm LaravelDoctrine\ORM\Loggers\Formatters\ReplaceQueryParams::isNestedArray(). - * - * @param array $array - * @return bool - */ - private function isNestedArray(array $array) - { - foreach ($array as $key => $value) { - if (is_array($value)) { - return true; - } - } - return false; - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/DataSource.php b/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/DataSource.php deleted file mode 100644 index 6d1b724..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/DataSource.php +++ /dev/null @@ -1,67 +0,0 @@ -filters[$type] = isset($this->filters[$type]) - ? array_merge($this->filters[$type], [ $filter ]) : [ $filter ]; - - return $this; - } - - // Clear all registered filters - public function clearFilters() - { - $this->filters = []; - - return $this; - } - - // Returns boolean whether the filterable passes all registered filters - protected function passesFilters($args, $type = 'default') - { - $filters = isset($this->filters[$type]) ? $this->filters[$type] : []; - - foreach ($filters as $filter) { - if (! $filter(...$args)) return false; - } - - return true; - } - - // Censors passwords in an array, identified by key containing "pass" substring - public function removePasswords(array $data) - { - $keys = array_keys($data); - $values = array_map(function ($value, $key) { - return strpos($key, 'pass') !== false ? '*removed*' : $value; - }, $data, $keys); - - return array_combine($keys, $values); - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/DataSourceInterface.php b/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/DataSourceInterface.php deleted file mode 100644 index 730ff13..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/DataSourceInterface.php +++ /dev/null @@ -1,16 +0,0 @@ -getConnection()); - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/EloquentDataSource.php b/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/EloquentDataSource.php deleted file mode 100644 index 29426bb..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/EloquentDataSource.php +++ /dev/null @@ -1,319 +0,0 @@ - 0, 'slow' => 0, 'select' => 0, 'insert' => 0, 'update' => 0, 'delete' => 0, 'other' => 0 - ]; - - // Collected models actions - protected $modelsActions = []; - - // Model action counts by model, eg. [ 'retrieved' => [ User::class => 1 ] ] - protected $modelsCount = [ - 'retrieved' => [], 'created' => [], 'updated' => [], 'deleted' => [] - ]; - - // Whether we are collecting database queries or stats only - protected $collectQueries = true; - - // Whether we are collecting models actions or stats only - protected $collectModelsActions = true; - - // Whether we are collecting retrieved models as well when collecting models actions - protected $collectModelsRetrieved = false; - - // Query execution time threshold in ms after which the query is marked as slow - protected $slowThreshold; - - // Enable duplicate queries detection - protected $detectDuplicateQueries = false; - - // Model name to associate with the next executed query, used to map queries to models - public $nextQueryModel; - - // Create a new data source instance, takes a database manager, an event dispatcher as arguments and additional - // options as arguments - public function __construct(ConnectionResolverInterface $databaseManager, EventDispatcher $eventDispatcher, $collectQueries = true, $slowThreshold = null, $slowOnly = false, $detectDuplicateQueries = false, $collectModelsActions = true, $collectModelsRetrieved = false) - { - $this->databaseManager = $databaseManager; - $this->eventDispatcher = $eventDispatcher; - - $this->collectQueries = $collectQueries; - $this->slowThreshold = $slowThreshold; - $this->detectDuplicateQueries = $detectDuplicateQueries; - $this->collectModelsActions = $collectModelsActions; - $this->collectModelsRetrieved = $collectModelsRetrieved; - - if ($slowOnly) $this->addFilter(function ($query) { return $query['duration'] > $this->slowThreshold; }); - } - - // Adds ran database queries, query counts, models actions and models counts to the request - public function resolve(Request $request) - { - $request->databaseQueries = array_merge($request->databaseQueries, $this->queries); - - $request->databaseQueriesCount += $this->count['total']; - $request->databaseSlowQueries += $this->count['slow']; - $request->databaseSelects += $this->count['select']; - $request->databaseInserts += $this->count['insert']; - $request->databaseUpdates += $this->count['update']; - $request->databaseDeletes += $this->count['delete']; - $request->databaseOthers += $this->count['other']; - - $request->modelsActions = array_merge($request->modelsActions, $this->modelsActions); - - $request->modelsRetrieved = $this->modelsCount['retrieved']; - $request->modelsCreated = $this->modelsCount['created']; - $request->modelsUpdated = $this->modelsCount['updated']; - $request->modelsDeleted = $this->modelsCount['deleted']; - - $this->appendDuplicateQueriesWarnings($request); - - return $request; - } - - // Reset the data source to an empty state, clearing any collected data - public function reset() - { - $this->queries = []; - $this->count = [ - 'total' => 0, 'slow' => 0, 'select' => 0, 'insert' => 0, 'update' => 0, 'delete' => 0, 'other' => 0 - ]; - - $this->modelsActions = []; - $this->modelsCount = [ - 'retrieved' => [], 'created' => [], 'updated' => [], 'deleted' => [] - ]; - - $this->nextQueryModel = null; - } - - // Start listening to Eloquent events - public function listenToEvents() - { - if ($scope = $this->getModelResolvingScope()) { - $this->eventDispatcher->listen('eloquent.booted: *', function ($model, $data = null) use ($scope) { - if (is_string($model) && is_array($data)) { // Laravel 5.4 wildcard event - $model = reset($data); - } - - $model->addGlobalScope($scope); - }); - } - - if (class_exists(\Illuminate\Database\Events\QueryExecuted::class)) { - // Laravel 5.2 and up - $this->eventDispatcher->listen(\Illuminate\Database\Events\QueryExecuted::class, function ($event) { - $this->registerQuery($event); - }); - } else { - // Laravel 5.0 to 5.1 - $this->eventDispatcher->listen('illuminate.query', function ($event) { - $this->registerLegacyQuery($event); - }); - } - - // register all event listeners individually so we don't have to regex the event type and support Laravel <5.4 - $this->listenToModelEvent('retrieved'); - $this->listenToModelEvent('created'); - $this->listenToModelEvent('updated'); - $this->listenToModelEvent('deleted'); - } - - // Register a listener collecting model events of specified type - protected function listenToModelEvent($event) - { - $this->eventDispatcher->listen("eloquent.{$event}: *", function ($model, $data = null) use ($event) { - if (is_string($model) && is_array($data)) { // Laravel 5.4 wildcard event - $model = reset($data); - } - - $this->collectModelEvent($event, $model); - }); - } - - // Collect an executed database query - protected function registerQuery($event) - { - $trace = StackTrace::get([ 'arguments' => $this->detectDuplicateQueries ])->resolveViewName(); - - if ($this->detectDuplicateQueries) $this->detectDuplicateQuery($trace); - - $query = [ - 'query' => $this->createRunnableQuery($event->sql, $event->bindings, $event->connectionName), - 'duration' => $event->time, - 'connection' => $event->connectionName, - 'time' => microtime(true) - $event->time / 1000, - 'trace' => (new Serializer)->trace($trace), - 'model' => $this->nextQueryModel, - 'tags' => $this->slowThreshold !== null && $event->time > $this->slowThreshold ? [ 'slow' ] : [] - ]; - - $this->nextQueryModel = null; - - if (! $this->passesFilters([ $query, $trace ], 'early')) return; - - $this->incrementQueryCount($query); - - if (! $this->collectQueries || ! $this->passesFilters([ $query, $trace ])) return; - - $this->queries[] = $query; - } - - // Collect an executed database query (pre Laravel 5.2) - protected function registerLegacyQuery($sql, $bindings, $time, $connection) - { - return $this->registerQuery((object) [ - 'sql' => $sql, - 'bindings' => $bindings, - 'time' => $time, - 'connectionName' => $connection - ]); - } - - // Collect a model event and update stats - protected function collectModelEvent($event, $model) - { - $lastQuery = ($queryCount = count($this->queries)) ? $this->queries[$queryCount - 1] : null; - - $action = [ - 'model' => $modelClass = get_class($model), - 'key' => $model->getKey(), - 'action' => $event, - 'attributes' => $this->collectModelsRetrieved && $event == 'retrieved' ? $model->getOriginal() : [], - 'changes' => $this->collectModelsActions ? $model->getChanges() : [], - 'time' => microtime(true) / 1000, - 'query' => $lastQuery ? $lastQuery['query'] : null, - 'duration' => $lastQuery ? $lastQuery['duration'] : null, - 'connection' => $lastQuery ? $lastQuery['connection'] : null, - 'trace' => null, - 'tags' => [] - ]; - - if ($lastQuery) $this->queries[$queryCount - 1]['model'] = $modelClass; - - if (! $this->passesFilters([ $action ], 'models-early')) return; - - $this->incrementModelsCount($action['action'], $action['model']); - - if (! $this->collectModelsActions) return; - if (! $this->collectModelsRetrieved && $event == 'retrieved') return; - if (! $this->passesFilters([ $action ], 'models')) return; - - $action['trace'] = (new Serializer)->trace(StackTrace::get()->resolveViewName()); - - $this->modelsActions[] = $action; - } - - // Takes a query, an array of bindings and the connection as arguments, returns runnable query with upper-cased keywords - protected function createRunnableQuery($query, $bindings, $connection) - { - // add bindings to query - $bindings = $this->databaseManager->connection($connection)->prepareBindings($bindings); - - foreach ($bindings as $binding) { - $binding = $this->quoteBinding($binding, $connection); - - // convert binary bindings to hexadecimal representation - if (! preg_match('//u', $binding)) $binding = '0x' . bin2hex($binding); - - // escape backslashes in the binding (preg_replace requires to do so) - $binding = str_replace('\\', '\\\\', $binding); - - $query = preg_replace('/\?/', $binding, $query, 1); - } - - // highlight keywords - $keywords = [ - 'select', 'insert', 'update', 'delete', 'into', 'values', 'set', 'where', 'from', 'limit', 'is', 'null', - 'having', 'group by', 'order by', 'asc', 'desc' - ]; - $regexp = '/\b' . implode('\b|\b', $keywords) . '\b/i'; - - return preg_replace_callback($regexp, function ($match) { return strtoupper($match[0]); }, $query); - } - - // Takes a query binding and a connection name, returns a quoted binding value - protected function quoteBinding($binding, $connection) - { - $connection = $this->databaseManager->connection($connection); - - if (! method_exists($connection, 'getPdo')) return; - - $pdo = $connection->getPdo(); - - if ($pdo === null) return; - - if ($pdo->getAttribute(\PDO::ATTR_DRIVER_NAME) === 'odbc') { - // PDO_ODBC driver doesn't support the quote method, apply simple MSSQL style quoting instead - return "'" . str_replace("'", "''", $binding) . "'"; - } - - return $pdo->quote($binding); - } - - // Increment query counts for collected query - protected function incrementQueryCount($query) - { - $sql = ltrim($query['query']); - - $this->count['total']++; - - if (preg_match('/^select\b/i', $sql)) { - $this->count['select']++; - } elseif (preg_match('/^insert\b/i', $sql)) { - $this->count['insert']++; - } elseif (preg_match('/^update\b/i', $sql)) { - $this->count['update']++; - } elseif (preg_match('/^delete\b/i', $sql)) { - $this->count['delete']++; - } else { - $this->count['other']++; - } - - if (in_array('slow', $query['tags'])) { - $this->count['slow']++; - } - } - - // Increment model counts for collected model action - protected function incrementModelsCount($action, $model) - { - if (! isset($this->modelsCount[$action][$model])) { - $this->modelsCount[$action][$model] = 0; - } - - $this->modelsCount[$action][$model]++; - } - - // Returns model resolving scope for the installed Laravel version - protected function getModelResolvingScope() - { - if (interface_exists(\Illuminate\Database\Eloquent\ScopeInterface::class)) { - // Laravel 5.0 to 5.1 - return new ResolveModelLegacyScope($this); - } - - return new ResolveModelScope($this); - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/LaravelCacheDataSource.php b/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/LaravelCacheDataSource.php deleted file mode 100644 index 144764f..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/LaravelCacheDataSource.php +++ /dev/null @@ -1,138 +0,0 @@ - 0, 'hit' => 0, 'write' => 0, 'delete' => 0 - ]; - - // Whether we are collecting cache queries or stats only - protected $collectQueries = true; - - // Whether we are collecting values from cache queries - protected $collectValues = true; - - // Create a new data source instance, takes an event dispatcher and additional options as argument - public function __construct(EventDispatcher $eventDispatcher, $collectQueries = true, $collectValues = true) - { - $this->eventDispatcher = $eventDispatcher; - - $this->collectQueries = $collectQueries; - $this->collectValues = $collectValues; - } - - // Adds cache queries and stats to the request - public function resolve(Request $request) - { - $request->cacheQueries = array_merge($request->cacheQueries, $this->queries); - - $request->cacheReads += $this->count['read']; - $request->cacheHits += $this->count['hit']; - $request->cacheWrites += $this->count['write']; - $request->cacheDeletes += $this->count['delete']; - - return $request; - } - - // Reset the data source to an empty state, clearing any collected data - public function reset() - { - $this->queries = []; - - $this->count = [ - 'read' => 0, 'hit' => 0, 'write' => 0, 'delete' => 0 - ]; - } - - // Start listening to cache events - public function listenToEvents() - { - if (class_exists(\Illuminate\Cache\Events\CacheHit::class)) { - $this->eventDispatcher->listen(\Illuminate\Cache\Events\CacheHit::class, function ($event) { - $this->registerQuery([ 'type' => 'hit', 'key' => $event->key, 'value' => $event->value ]); - }); - $this->eventDispatcher->listen(\Illuminate\Cache\Events\CacheMissed::class, function ($event) { - $this->registerQuery([ 'type' => 'miss', 'key' => $event->key ]); - }); - $this->eventDispatcher->listen(\Illuminate\Cache\Events\KeyWritten::class, function ($event) { - $this->registerQuery([ - 'type' => 'write', 'key' => $event->key, 'value' => $event->value, - 'expiration' => property_exists($event, 'seconds') ? $event->seconds : $event->minutes * 60 - ]); - }); - $this->eventDispatcher->listen(\Illuminate\Cache\Events\KeyForgotten::class, function ($event) { - $this->registerQuery([ 'type' => 'delete', 'key' => $event->key ]); - }); - } else { - // legacy Laravel 5.1 style events - $this->eventDispatcher->listen('cache.hit', function ($key, $value) { - $this->registerQuery([ 'type' => 'hit', 'key' => $key, 'value' => $value ]); - }); - $this->eventDispatcher->listen('cache.missed', function ($key) { - $this->registerQuery([ 'type' => 'miss', 'key' => $key ]); - }); - $this->eventDispatcher->listen('cache.write', function ($key, $value, $minutes) { - $this->registerQuery([ - 'type' => 'write', 'key' => $key, 'value' => $value, 'expiration' => $minutes * 60 - ]); - }); - $this->eventDispatcher->listen('cache.delete', function ($key) { - $this->registerQuery([ 'type' => 'delete', 'key' => $key ]); - }); - } - } - - // Collect an executed query - protected function registerQuery(array $query) - { - $trace = StackTrace::get()->resolveViewName(); - - $record = [ - 'type' => $query['type'], - 'key' => $query['key'], - 'time' => microtime(true), - 'connection' => null, - 'trace' => (new Serializer)->trace($trace) - ]; - - if ($this->collectValues && isset($query['value'])) { - $record['value'] = (new Serializer)->normalize($query['value']); - } - - $this->incrementQueryCount($record); - - if ($this->collectQueries && $this->passesFilters([ $record ])) { - $this->queries[] = $record; - } - } - - // Increment query counts for collected query - protected function incrementQueryCount($query) - { - if ($query['type'] == 'write') { - $this->count['write']++; - } elseif ($query['type'] == 'delete') { - $this->count['delete']++; - } else { - $this->count['read']++; - - if ($query['type'] == 'hit') { - $this->count['hit']++; - } - } - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/LaravelDataSource.php b/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/LaravelDataSource.php deleted file mode 100644 index 43814b6..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/LaravelDataSource.php +++ /dev/null @@ -1,210 +0,0 @@ -app = $app; - - $this->collectLog = $collectLog; - $this->collectRoutes = $collectRoutes; - $this->routesOnlyNamespaces = $routesOnlyNamespaces; - - $this->log = new Log; - } - - // Adds request, response information, middleware, routes, session data, user and log entries to the request - public function resolve(Request $request) - { - $request->method = $this->getRequestMethod(); - $request->url = $this->getRequestUrl(); - $request->uri = $this->getRequestUri(); - $request->controller = $this->getController(); - $request->headers = $this->getRequestHeaders(); - $request->responseStatus = $this->getResponseStatus(); - $request->middleware = $this->getMiddleware(); - $request->routes = $this->getRoutes(); - $request->sessionData = $this->getSessionData(); - - $this->resolveAuthenticatedUser($request); - - $request->log()->merge($this->log); - - return $request; - } - - // Reset the data source to an empty state, clearing any collected data - public function reset() - { - $this->log = new Log; - } - - // Set Laravel application instance for the current request - public function setApplication(Application $app) - { - $this->app = $app; - return $this; - } - - // Set Laravel response instance for the current request - public function setResponse(Response $response) - { - $this->response = $response; - return $this; - } - - // Listen for the log events - public function listenToEvents() - { - if (! $this->collectLog) return; - - if (class_exists(\Illuminate\Log\Events\MessageLogged::class)) { - // Laravel 5.4 - $this->app['events']->listen(\Illuminate\Log\Events\MessageLogged::class, function ($event) { - $this->log->log($event->level, $event->message, $event->context); - }); - } else { - // Laravel 5.0 to 5.3 - $this->app['events']->listen('illuminate.log', function ($level, $message, $context) { - $this->log->log($level, $message, $context); - }); - } - } - - // Get a textual representation of the current route's controller - protected function getController() - { - $router = $this->app['router']; - - $route = $router->current(); - $controller = $route ? $route->getActionName() : null; - - if ($controller instanceof \Closure) { - $controller = 'anonymous function'; - } elseif (is_object($controller)) { - $controller = 'instance of ' . get_class($controller); - } elseif (is_array($controller) && count($controller) == 2) { - if (is_object($controller[0])) { - $controller = get_class($controller[0]) . '->' . $controller[1]; - } else { - $controller = $controller[0] . '::' . $controller[1]; - } - } elseif (! is_string($controller)) { - $controller = null; - } - - return $controller; - } - - // Get the request headers - protected function getRequestHeaders() - { - return $this->app['request']->headers->all(); - } - - // Get the request method - protected function getRequestMethod() - { - return $this->app['request']->getMethod(); - } - - // Get the request URL - protected function getRequestUrl() - { - return $this->app['request']->fullUrl(); - } - - // Get the request URI - protected function getRequestUri() - { - return $this->app['request']->getRequestUri(); - } - - // Get the response status code - protected function getResponseStatus() - { - return $this->response ? $this->response->getStatusCode() : null; - } - - // Get an array of middleware for the matched route - protected function getMiddleware() - { - $route = $this->app['router']->current(); - - if (! $route) return; - - return method_exists($route, 'gatherMiddleware') ? $route->gatherMiddleware() : $route->middleware(); - } - - // Get an array of application routes - protected function getRoutes() - { - if (! $this->collectRoutes) return []; - - return array_values(array_filter(array_map(function ($route) { - $action = $route->getActionName() ?: 'anonymous function'; - $namespace = strpos($action, '\\') !== false ? explode('\\', $action)[0] : null; - - if (count($this->routesOnlyNamespaces) && ! in_array($namespace, $this->routesOnlyNamespaces)) return; - - return [ - 'method' => implode(', ', $route->methods()), - 'uri' => $route->uri(), - 'name' => $route->getName(), - 'action' => $action, - 'middleware' => $route->middleware(), - 'before' => method_exists($route, 'beforeFilters') ? implode(', ', array_keys($route->beforeFilters())) : '', - 'after' => method_exists($route, 'afterFilters') ? implode(', ', array_keys($route->afterFilters())) : '' - ]; - }, $this->app['router']->getRoutes()->getRoutes()))); - } - - // Get the session data (normalized with removed passwords) - protected function getSessionData() - { - if (! isset($this->app['session'])) return []; - - return $this->removePasswords((new Serializer)->normalizeEach($this->app['session']->all())); - } - - // Add authenticated user data to the request - protected function resolveAuthenticatedUser(Request $request) - { - if (! isset($this->app['auth'])) return; - if (! ($user = $this->app['auth']->user())) return; - if (! isset($user->email) || ! isset($user->id)) return; - - $request->setAuthenticatedUser($user->email, $user->id, [ - 'email' => $user->email, - 'name' => isset($user->name) ? $user->name : null - ]); - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/LaravelEventsDataSource.php b/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/LaravelEventsDataSource.php deleted file mode 100644 index 6b3095a..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/LaravelEventsDataSource.php +++ /dev/null @@ -1,143 +0,0 @@ -dispatcher = $dispatcher; - - $this->ignoredEvents = is_array($ignoredEvents) - ? array_merge($ignoredEvents, $this->defaultIgnoredEvents()) : []; - } - - // Adds fired events to the request - public function resolve(Request $request) - { - $request->events = array_merge($request->events, $this->events); - - return $request; - } - - // Reset the data source to an empty state, clearing any collected data - public function reset() - { - $this->events = []; - } - - // Start listening to the events - public function listenToEvents() - { - $this->dispatcher->listen('*', function ($event = null, $data = null) { - if (method_exists($this->dispatcher, 'firing')) { // Laravel 5.0 - 5.3 - $data = func_get_args(); - $event = $this->dispatcher->firing(); - } - - $this->registerEvent($event, $data); - }); - } - - // Collect a fired event, prepares data for serialization and resolves registered listeners - protected function registerEvent($event, array $data) - { - if (! $this->shouldCollect($event)) return; - - $trace = StackTrace::get()->resolveViewName(); - - $event = [ - 'event' => $event, - 'data' => (new Serializer)->normalize(count($data) == 1 && isset($data[0]) ? $data[0] : $data), - 'time' => microtime(true), - 'listeners' => $this->findListenersFor($event), - 'trace' => (new Serializer)->trace($trace) - ]; - - if ($this->passesFilters([ $event ])) { - $this->events[] = $event; - } - } - - // Returns registered listeners for the specified event - protected function findListenersFor($event) - { - $listener = $this->dispatcher->getListeners($event)[0]; - - return array_filter(array_map(function ($listener) { - if ($listener instanceof \Closure) { - // Laravel 5.4+ (and earlier versions in some cases) wrap the listener into a closure, - // attempt to resolve the original listener - $use = (new \ReflectionFunction($listener))->getStaticVariables(); - $listener = isset($use['listener']) ? $use['listener'] : $listener; - } - - if (is_string($listener)) { - return $listener; - } elseif (is_array($listener) && count($listener) == 2) { - if (is_object($listener[0])) { - return get_class($listener[0]) . '@' . $listener[1]; - } else { - return $listener[0] . '::' . $listener[1]; - } - } elseif ($listener instanceof \Closure) { - $listener = new \ReflectionFunction($listener); - - if (strpos($listener->getNamespaceName(), 'Clockwork\\') === 0) { // skip our own listeners - return; - } - - $filename = str_replace(base_path(), '', $listener->getFileName()); - $startLine = $listener->getStartLine(); - $endLine = $listener->getEndLine(); - - return "Closure ({$filename}:{$startLine}-{$endLine})"; - } - }, $this->dispatcher->getListeners($event))); - } - - // Returns whether the event should be collected (depending on ignored events) - protected function shouldCollect($event) - { - return ! preg_match('/^(?:' . implode('|', $this->ignoredEvents) . ')$/', $event); - } - - // Returns default ignored events (framework-specific events) - protected function defaultIgnoredEvents() - { - return [ - 'Illuminate\\\\.+', - 'Laravel\\\\.+', - 'auth\.(?:attempt|login|logout)', - 'artisan\.start', - 'bootstrapped:.+', - 'composing:.+', - 'creating:.+', - 'illuminate\.query', - 'connection\..+', - 'eloquent\..+', - 'kernel\.handled', - 'illuminate\.log', - 'mailer\.sending', - 'router\.(?:before|after|matched)', - 'router.filter:.+', - 'locale\.changed', - 'clockwork\..+' - ]; - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/LaravelNotificationsDataSource.php b/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/LaravelNotificationsDataSource.php deleted file mode 100644 index 9a3e43d..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/LaravelNotificationsDataSource.php +++ /dev/null @@ -1,233 +0,0 @@ -dispatcher = $dispatcher; - } - - // Add sent notifications to the request - public function resolve(Request $request) - { - $request->notifications = array_merge($request->notifications, $this->notifications); - - return $request; - } - - // Reset the data source to an empty state, clearing any collected data - public function reset() - { - $this->notifications = []; - } - - // Listen to the email and notification events - public function listenToEvents() - { - $this->dispatcher->listen(MessageSending::class, function ($event) { $this->sendingMessage($event); }); - $this->dispatcher->listen(MessageSent::class, function ($event) { $this->sentMessage($event); }); - - $this->dispatcher->listen(NotificationSending::class, function ($event) { $this->sendingNotification($event); }); - $this->dispatcher->listen(NotificationSent::class, function ($event) { $this->sentNotification($event); }); - } - - // Collect a sent email - protected function sendingMessage($event) - { - $trace = StackTrace::get()->resolveViewName(); - - $mailable = ($frame = $trace->first(function ($frame) { return is_subclass_of($frame->object, Mailable::class); })) - ? $frame->object : null; - - $notification = (object) [ - 'subject' => $event->message->getSubject(), - 'from' => $this->messageAddressToString($event->message->getFrom()), - 'to' => $this->messageAddressToString($event->message->getTo()), - 'content' => $event->message->getBody(), - 'type' => 'mail', - 'data' => [ - 'cc' => $this->messageAddressToString($event->message->getCc()), - 'bcc' => $this->messageAddressToString($event->message->getBcc()), - 'replyTo' => $this->messageAddressToString($event->message->getReplyTo()), - 'mailable' => (new Serializer)->normalize($mailable) - ], - 'time' => microtime(true), - 'trace' => (new Serializer)->trace($trace) - ]; - - if ($this->updateLastNotification($notification)) return; - - if ($this->passesFilters([ $notification ])) { - $this->notifications[] = $this->lastNotification = $notification; - } else { - $this->lastNotification = null; - } - } - - // Update last notification with time taken to send it - protected function sentMessage($event) - { - if ($this->lastNotification) { - $this->lastNotification->duration = (microtime(true) - $this->lastNotification->time) * 1000; - } - } - - // Collect a sent notification - protected function sendingNotification($event) - { - $trace = StackTrace::get()->resolveViewName(); - - $channelSpecific = $this->resolveChannelSpecific($event); - - $notification = (object) [ - 'subject' => $channelSpecific['subject'], - 'from' => $channelSpecific['from'], - 'to' => $channelSpecific['to'], - 'content' => $channelSpecific['content'], - 'type' => $event->channel, - 'data' => array_merge($channelSpecific['data'], [ - 'notification' => (new Serializer)->normalize($event->notification), - 'notifiable' => (new Serializer)->normalize($event->notifiable) - ]), - 'time' => microtime(true), - 'trace' => (new Serializer)->trace($trace) - ]; - - if ($this->passesFilters([ $notification ])) { - $this->notifications[] = $this->lastNotification = $notification; - } else { - $this->lastNotification = null; - } - } - - // Update last notification with time taken to send it and response - protected function sentNotification($event) - { - if ($this->lastNotification) { - $this->lastNotification->duration = (microtime(true) - $this->lastNotification->time) * 1000; - $this->lastNotification->data['response'] = $event->response; - } - } - - // Update last sent email notification with additional data from the message sent event - protected function updateLastNotification($notification) - { - if (! $this->lastNotification) return false; - - if ($this->lastNotification->to !== $notification->to) return false; - - $this->lastNotification->subject = $notification->subject; - $this->lastNotification->from = $notification->from; - $this->lastNotification->to = $notification->to; - $this->lastNotification->content = $notification->content; - - $this->lastNotification->data = array_merge($this->lastNotification->data, $notification->data); - - return true; - } - - // Resolve notification channnel specific data - protected function resolveChannelSpecific($event) - { - if (method_exists($event->notification, 'toMail')) { - $channelSpecific = $this->resolveMailChannelSpecific($event, $event->notification->toMail($event->notifiable)); - } elseif (method_exists($event->notification, 'toSlack')) { - $channelSpecific = $this->resolveSlackChannelSpecific($event, $event->notification->toSlack($event->notifiable)); - } elseif (method_exists($event->notification, 'toNexmo')) { - $channelSpecific = $this->resolveNexmoChannelSpecific($event, $event->notification->toNexmo($event->notifiable)); - } elseif (method_exists($event->notification, 'toBroadcast')) { - $channelSpecific = [ 'data' => [ 'data' => (new Serializer)->normalize($event->notification->toBroadcast($event->notifiable)) ] ]; - } elseif (method_exists($event->notification, 'toArray')) { - $channelSpecific = [ 'data' => [ 'data' => (new Serializer)->normalize($event->notification->toArray($event->notifiable)) ] ]; - } else { - $channelSpecific = []; - } - - return array_merge( - [ 'subject' => null, 'from' => null, 'to' => null, 'content' => null, 'data' => [] ], $channelSpecific - ); - } - - // Resolve mail notification channel specific data - protected function resolveMailChannelSpecific($event, $message) - { - return [ - 'subject' => $message->subject ?: get_class($event->notification), - 'from' => $this->notificationAddressToString($message->from), - 'to' => $this->notificationAddressToString($event->notifiable->routeNotificationFor('mail', $event->notification)), - 'data' => [ - 'cc' => $this->notificationAddressToString($message->cc), - 'bcc' => $this->notificationAddressToString($message->bcc), - 'replyTo' => $this->notificationAddressToString($message->replyTo) - ] - ]; - } - - // Resolve Slack notification channel specific data - protected function resolveSlackChannelSpecific($event, $message) - { - return [ - 'subject' => get_class($event->notification), - 'from' => $message->username, - 'to' => $message->channel, - 'content' => $message->content - ]; - } - - // Resolve Nexmo notification channel specific data - protected function resolveNexmoChannelSpecific($event, $message) - { - return [ - 'subject' => get_class($event->notification), - 'from' => $message->from, - 'to' => $event->notifiable->routeNotificationFor('nexmo', $event->notification), - 'content' => $message->content - ]; - } - - protected function messageAddressToString($address) - { - if (! $address) return; - - return array_map(function ($name, $email) { - return $name ? "{$name} <{$email}>" : $email; - }, $address, array_keys($address)); - } - - protected function notificationAddressToString($address) - { - if (! $address) return; - if (! is_array($address)) $address = [ $address ]; - - return array_map(function ($address) { - if (! is_array($address)) return $address; - - $email = isset($address['address']) ? $address['address'] : $address[0]; - $name = isset($address['name']) ? $address['name'] : $address[1]; - - return $name ? "{$name} <{$email}>" : $email; - }, $address); - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/LaravelQueueDataSource.php b/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/LaravelQueueDataSource.php deleted file mode 100644 index 9355584..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/LaravelQueueDataSource.php +++ /dev/null @@ -1,90 +0,0 @@ -queue = $queue; - } - - // Adds dispatched queue jobs to the request - public function resolve(Request $request) - { - $request->queueJobs = array_merge($request->queueJobs, $this->getJobs()); - - return $request; - } - - // Reset the data source to an empty state, clearing any collected data - public function reset() - { - $this->jobs = []; - } - - // Listen to the queue events - public function listenToEvents() - { - $this->queue->createPayloadUsing(function ($connection, $queue, $payload) { - $this->registerJob([ - 'id' => $id = (new Request)->id, - 'connection' => $connection, - 'queue' => $queue, - 'name' => $payload['displayName'], - 'data' => isset($payload['data']['command']) ? $payload['data']['command'] : null, - 'maxTries' => $payload['maxTries'], - 'timeout' => $payload['timeout'], - 'time' => microtime(true) - ]); - - return [ 'clockwork_id' => $id, 'clockwork_parent_id' => $this->currentRequestId ]; - }); - } - - // Set Clockwork ID of the current request - public function setCurrentRequestId($requestId) - { - $this->currentRequestId = $requestId; - return $this; - } - - // Collect a dispatched queue job - protected function registerJob(array $job) - { - $trace = StackTrace::get()->resolveViewName(); - - $job = array_merge($job, [ - 'trace' => (new Serializer)->trace($trace) - ]); - - if ($this->passesFilters([ $job ])) { - $this->jobs[] = $job; - } - } - - // Get an array of dispatched queue jobs commands - protected function getJobs() - { - return array_map(function ($query) { - return array_merge($query, [ - 'data' => isset($query['data']) ? (new Serializer)->normalize($query['data']) : null - ]); - }, $this->jobs); - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/LaravelRedisDataSource.php b/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/LaravelRedisDataSource.php deleted file mode 100644 index f6301ba..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/LaravelRedisDataSource.php +++ /dev/null @@ -1,86 +0,0 @@ -eventDispatcher = $eventDispatcher; - - $this->skipCacheCommands = $skipCacheCommands; - - if ($this->skipCacheCommands) { - $this->addFilter(function ($command, $trace) { - return ! $trace->first(function ($frame) { return $frame->class == 'Illuminate\Cache\RedisStore'; }); - }); - } - } - - // Adds redis commands to the request - public function resolve(Request $request) - { - $request->redisCommands = array_merge($request->redisCommands, $this->getCommands()); - - return $request; - } - - // Reset the data source to an empty state, clearing any collected data - public function reset() - { - $this->commands = []; - } - - // Listen to the cache events - public function listenToEvents() - { - $this->eventDispatcher->listen(\Illuminate\Redis\Events\CommandExecuted::class, function ($event) { - $this->registerCommand([ - 'command' => $event->command, - 'parameters' => $event->parameters, - 'duration' => $event->time, - 'connection' => $event->connectionName, - 'time' => microtime(true) - $event->time / 1000 - ]); - }); - } - - // Collect an executed command - protected function registerCommand(array $command) - { - $trace = StackTrace::get()->resolveViewName(); - - $command = array_merge($command, [ - 'trace' => (new Serializer)->trace($trace) - ]); - - if ($this->passesFilters([ $command, $trace ])) { - $this->commands[] = $command; - } - } - - // Get an array of executed redis commands - protected function getCommands() - { - return array_map(function ($query) { - return array_merge($query, [ - 'parameters' => isset($query['parameters']) ? (new Serializer)->normalize($query['parameters']) : null - ]); - }, $this->commands); - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/LaravelViewsDataSource.php b/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/LaravelViewsDataSource.php deleted file mode 100644 index d31b980..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/LaravelViewsDataSource.php +++ /dev/null @@ -1,71 +0,0 @@ -dispatcher = $dispatcher; - - $this->collectData = $collectData; - - $this->views = new Timeline; - } - - // Adds rendered views to the request - public function resolve(Request $request) - { - $request->viewsData = array_merge($request->viewsData, $this->views->finalize()); - - return $request; - } - - // Reset the data source to an empty state, clearing any collected data - public function reset() - { - $this->views = new Timeline; - } - - // Listen to the views events - public function listenToEvents() - { - $this->dispatcher->listen('composing:*', function ($view, $data = null) { - if (is_string($view) && is_array($data)) { // Laravel 5.4 wildcard event - $view = $data[0]; - } - - $data = array_filter( - $this->collectData ? $view->getData() : [], - function ($v, $k) { return strpos($k, '__') !== 0; }, - \ARRAY_FILTER_USE_BOTH - ); - - $this->views->event('Rendering a view', [ - 'name' => 'view ' . $view->getName(), - 'start' => $time = microtime(true), - 'end' => $time, - 'data' => [ - 'name' => $view->getName(), - 'data' => (new Serializer)->normalize($data) - ] - ]); - }); - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/LumenDataSource.php b/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/LumenDataSource.php deleted file mode 100644 index 77d89a9..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/LumenDataSource.php +++ /dev/null @@ -1,201 +0,0 @@ -app = $app; - - $this->collectLog = $collectLog; - $this->collectRoutes = $collectRoutes; - - $this->log = new Log; - } - - // Adds request, response information, middleware, routes, session data, user and log entries to the request - public function resolve(Request $request) - { - $request->method = $this->getRequestMethod(); - $request->uri = $this->getRequestUri(); - $request->controller = $this->getController(); - $request->headers = $this->getRequestHeaders(); - $request->responseStatus = $this->getResponseStatus(); - $request->routes = $this->getRoutes(); - $request->sessionData = $this->getSessionData(); - - $this->resolveAuthenticatedUser($request); - - $request->log()->merge($this->log); - - return $request; - } - - // Reset the data source to an empty state, clearing any collected data - public function reset() - { - $this->log = new Log; - } - - // Set Lumen response instance for the current request - public function setResponse(Response $response) - { - $this->response = $response; - return $this; - } - - // Listen for the log events - public function listenToEvents() - { - if (! $this->collectLog) return; - - if (class_exists(\Illuminate\Log\Events\MessageLogged::class)) { - // Lumen 5.4 - $this->app['events']->listen(\Illuminate\Log\Events\MessageLogged::class, function ($event) { - $this->log->log($event->level, $event->message, $event->context); - }); - } else { - // Lumen 5.0 to 5.3 - $this->app['events']->listen('illuminate.log', function ($level, $message, $context) { - $this->log->log($level, $message, $context); - }); - } - } - - // Get a textual representation of current route's controller - protected function getController() - { - $routes = method_exists($this->app, 'getRoutes') ? $this->app->getRoutes() : []; - - $method = $this->getRequestMethod(); - $pathInfo = $this->getPathInfo(); - - if (isset($routes[$method.$pathInfo]['action']['uses'])) { - $controller = $routes[$method.$pathInfo]['action']['uses']; - } elseif (isset($routes[$method.$pathInfo]['action'][0])) { - $controller = $routes[$method.$pathInfo]['action'][0]; - } else { - $controller = null; - } - - if ($controller instanceof \Closure) { - $controller = 'anonymous function'; - } elseif (is_object($controller)) { - $controller = 'instance of ' . get_class($controller); - } elseif (! is_string($controller)) { - $controller = null; - } - - return $controller; - } - - // Get the request headers - protected function getRequestHeaders() - { - return $this->app['request']->headers->all(); - } - - // Get the request method - protected function getRequestMethod() - { - if ($this->app->bound('request')) { - return $this->app['request']->getMethod(); - } elseif (isset($_POST['_method'])) { - return strtoupper($_POST['_method']); - } else { - return $_SERVER['REQUEST_METHOD']; - } - } - - // Get the request URI - protected function getRequestUri() - { - return $this->app['request']->getRequestUri(); - } - - // Get the response status code - protected function getResponseStatus() - { - return $this->response ? $this->response->getStatusCode() : null; - } - - // Get an array of application routes - protected function getRoutes() - { - if (! $this->collectRoutes) return []; - - if (isset($this->app->router)) { - $routes = array_values($this->app->router->getRoutes()); - } elseif (method_exists($this->app, 'getRoutes')) { - $routes = array_values($this->app->getRoutes()); - } else { - $routes = []; - } - - return array_map(function ($route) { - return [ - 'method' => $route['method'], - 'uri' => $route['uri'], - 'name' => isset($route['action']['as']) ? $route['action']['as'] : null, - 'action' => isset($route['action']['uses']) && is_string($route['action']['uses']) ? $route['action']['uses'] : 'anonymous function', - 'middleware' => isset($route['action']['middleware']) ? $route['action']['middleware'] : null, - ]; - }, $routes); - } - - // Get the session data (normalized with passwords removed) - protected function getSessionData() - { - if (! isset($this->app['session'])) return []; - - return $this->removePasswords((new Serializer)->normalizeEach($this->app['session']->all())); - } - - // Add authenticated user data to the request - protected function resolveAuthenticatedUser(Request $request) - { - if (! isset($this->app['auth'])) return; - if (! ($user = $this->app['auth']->user())) return; - if (! isset($user->email) || ! isset($user->id)) return; - - $request->setAuthenticatedUser($user->email, $user->id, [ - 'email' => $user->email, - 'name' => isset($user->name) ? $user->name : null - ]); - } - - // Get the request path info - protected function getPathInfo() - { - if ($this->app->bound('request')) { - return $this->app['request']->getPathInfo(); - } else { - $query = isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : ''; - return '/' . trim(str_replace("?{$query}", '', $_SERVER['REQUEST_URI']), '/'); - } - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/MonologDataSource.php b/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/MonologDataSource.php deleted file mode 100644 index 8671add..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/MonologDataSource.php +++ /dev/null @@ -1,37 +0,0 @@ -log = new Log; - - $monolog->pushHandler(new ClockworkHandler($this->log)); - } - - // Adds log entries to the request - public function resolve(Request $request) - { - $request->log()->merge($this->log); - - return $request; - } - - // Reset the data source to an empty state, clearing any collected data - public function reset() - { - $this->log = new Log; - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/PhpDataSource.php b/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/PhpDataSource.php deleted file mode 100644 index eaefaa7..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/PhpDataSource.php +++ /dev/null @@ -1,155 +0,0 @@ -time = PHP_SAPI !== 'cli' ? $this->getRequestTime() : $request->time; - $request->method = $this->getRequestMethod(); - $request->url = $this->getRequestUrl(); - $request->uri = $this->getRequestUri(); - $request->headers = $this->getRequestHeaders(); - $request->getData = $this->getGetData(); - $request->postData = $this->getPostData(); - $request->requestData = $this->getRequestData(); - $request->sessionData = $this->getSessionData(); - $request->cookies = $this->getCookies(); - $request->responseStatus = $this->getResponseStatus(); - $request->responseTime = $this->getResponseTime(); - $request->memoryUsage = $this->getMemoryUsage(); - - return $request; - } - - // Get the request cookies (normalized with passwords removed) - protected function getCookies() - { - return $this->removePasswords((new Serializer)->normalizeEach($_COOKIE)); - } - - // Get the request GET data (normalized with passwords removed) - protected function getGetData() - { - return $this->removePasswords((new Serializer)->normalizeEach($_GET)); - } - - // Get the request POST data (normalized with passwords removed) - protected function getPostData() - { - return $this->removePasswords((new Serializer)->normalizeEach($_POST)); - } - - // Get the request body data (attempt to parse as json, normalized with passwords removed) - protected function getRequestData() - { - // The data will already be parsed into POST data by PHP in case of application/x-www-form-urlencoded requests - if (count($_POST)) return; - - $requestData = file_get_contents('php://input'); - $requestJsonData = json_decode($requestData, true); - - return is_array($requestJsonData) - ? $this->removePasswords((new Serializer)->normalizeEach($requestJsonData)) - : $requestData; - } - - // Get the request headers - protected function getRequestHeaders() - { - $headers = []; - - foreach ($_SERVER as $key => $value) { - if (substr($key, 0, 5) !== 'HTTP_') continue; - - $header = substr($key, 5); - $header = str_replace('_', ' ', $header); - $header = ucwords(strtolower($header)); - $header = str_replace(' ', '-', $header); - - if (! isset($headers[$header])) { - $headers[$header] = [ $value ]; - } else { - $headers[$header][] = $value; - } - } - - ksort($headers); - - return $headers; - } - - // Get the request method - protected function getRequestMethod() - { - if (isset($_SERVER['REQUEST_METHOD'])) { - return $_SERVER['REQUEST_METHOD']; - } - } - - // Get the response time - protected function getRequestTime() - { - if (isset($_SERVER['REQUEST_TIME_FLOAT'])) { - return $_SERVER['REQUEST_TIME_FLOAT']; - } - } - - // Get the request URL - protected function getRequestUrl() - { - $https = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on'; - $host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : null; - $addr = isset($_SERVER['SERVER_ADDR']) ? $_SERVER['SERVER_ADDR'] : null; - $port = isset($_SERVER['SERVER_PORT']) ? $_SERVER['SERVER_PORT'] : null; - $uri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : null; - - $scheme = $https ? 'https' : 'http'; - $host = $host ?: $addr; - $port = (! $https && $port != 80 || $https && $port != 443) ? ":{$port}" : ''; - - // remove port number from the host - $host = preg_replace('/:\d+$/', '', trim($host)); - - return "{$scheme}://{$host}{$port}{$uri}"; - } - - // Get the request URI - protected function getRequestUri() - { - if (isset($_SERVER['REQUEST_URI'])) { - return $_SERVER['REQUEST_URI']; - } - } - - // Get the response status code - protected function getResponseStatus() - { - return http_response_code(); - } - - // Get the response time (current time, assuming most of the application code has already run at this point) - protected function getResponseTime() - { - return microtime(true); - } - - // Get the session data (normalized with passwords removed) - protected function getSessionData() - { - if (! isset($_SESSION)) return []; - - return $this->removePasswords((new Serializer)->normalizeEach($_SESSION)); - } - - // Get the peak memory usage in bytes - protected function getMemoryUsage() - { - return memory_get_peak_usage(true); - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/PsrMessageDataSource.php b/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/PsrMessageDataSource.php deleted file mode 100644 index a49407a..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/PsrMessageDataSource.php +++ /dev/null @@ -1,96 +0,0 @@ -psrRequest = $psrRequest; - $this->psrResponse = $psrResponse; - } - - // Adds request and response information to the request - public function resolve(Request $request) - { - if ($this->psrRequest) { - $request->method = $this->psrRequest->getMethod(); - $request->uri = $this->getRequestUri(); - $request->headers = $this->getRequestHeaders(); - $request->getData = $this->sanitize($this->psrRequest->getQueryParams()); - $request->postData = $this->sanitize($this->psrRequest->getParsedBody()); - $request->cookies = $this->sanitize($this->psrRequest->getCookieParams()); - $request->time = $this->getRequestTime(); - } - - if ($this->psrResponse !== null) { - $request->responseStatus = $this->psrResponse->getStatusCode(); - $request->responseTime = $this->getResponseTime(); - } - - return $request; - } - - // Normalize items in the array and remove passwords - protected function sanitize($data) - { - return is_array($data) ? $this->removePasswords((new Serializer)->normalizeEach($data)) : $data; - } - - // Get the response time, fetching it from ServerParams - protected function getRequestTime() - { - $env = $this->psrRequest->getServerParams(); - - if (isset($env['REQUEST_TIME_FLOAT'])) { - return $env['REQUEST_TIME_FLOAT']; - } - } - - // Get the response time (current time, assuming most of the application code has already run at this point) - protected function getResponseTime() - { - return microtime(true); - } - - // Get the request headers - protected function getRequestHeaders() - { - $headers = []; - - foreach ($this->psrRequest->getHeaders() as $header => $values) { - if (strtoupper(substr($header, 0, 5)) === 'HTTP_') { - $header = substr($header, 5); - } - - $header = str_replace('_', ' ', $header); - $header = ucwords(strtolower($header)); - $header = str_replace(' ', '-', $header); - - $headers[$header] = $values; - } - - ksort($headers); - - return $headers; - } - - // Get the request URI - protected function getRequestUri() - { - $uri = $this->psrRequest->getUri(); - - return $uri->getPath() . ($uri->getQuery() ? '?' . $uri->getQuery() : ''); - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/SlimDataSource.php b/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/SlimDataSource.php deleted file mode 100644 index 8f40799..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/SlimDataSource.php +++ /dev/null @@ -1,104 +0,0 @@ -slim = $slim; - } - - // Adds request and response information to the request - public function resolve(Request $request) - { - $request->method = $this->getRequestMethod(); - $request->uri = $this->getRequestUri(); - $request->controller = $this->getController(); - $request->headers = $this->getRequestHeaders(); - $request->responseStatus = $this->getResponseStatus(); - - return $request; - } - - // Get a textual representation of current route's controller - protected function getController() - { - $matchedRoutes = $this->slim->router()->getMatchedRoutes( - $this->slim->request()->getMethod(), $this->slim->request()->getResourceUri() - ); - - if (! count($matchedRoutes)) return; - - $controller = end($matchedRoutes)->getCallable(); - - if ($controller instanceof \Closure) { - $controller = 'anonymous function'; - } elseif (is_object($controller)) { - $controller = 'instance of ' . get_class($controller); - } elseif (is_array($controller) && count($controller) == 2) { - if (is_object($controller[0])) { - $controller = get_class($controller[0]) . '->' . $controller[1]; - } else { - $controller = $controller[0] . '::' . $controller[1]; - } - } elseif (! is_string($controller)) { - $controller = null; - } - - return $controller; - } - - // Get the request headers - protected function getRequestHeaders() - { - $headers = []; - - foreach ($_SERVER as $key => $value) { - if (substr($key, 0, 5) !== 'HTTP_') continue; - - $header = substr($key, 5); - $header = str_replace('_', ' ', $header); - $header = ucwords(strtolower($header)); - $header = str_replace(' ', '-', $header); - - $value = $this->slim->request()->headers($header, $value); - - if (! isset($headers[$header])) { - $headers[$header] = [ $value ]; - } else { - $headers[$header][] = $value; - } - } - - ksort($headers); - - return $headers; - } - - // Get the request method - protected function getRequestMethod() - { - return $this->slim->request()->getMethod(); - } - - // Get the request URI - protected function getRequestUri() - { - return $this->slim->request()->getPathInfo(); - } - - // Get the response status code - protected function getResponseStatus() - { - return $this->slim->response()->status(); - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/SwiftDataSource.php b/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/SwiftDataSource.php deleted file mode 100644 index 0cad880..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/SwiftDataSource.php +++ /dev/null @@ -1,45 +0,0 @@ -swift = $swift; - - $this->timeline = new Timeline; - } - - // Listen to the email events - public function listenToEvents() - { - $this->swift->registerPlugin(new SwiftPluginClockworkTimeline($this->timeline)); - } - - // Adds send emails to the request - public function resolve(Request $request) - { - $request->emailsData = array_merge($request->emailsData, $this->timeline->finalize()); - - return $request; - } - - // Reset the data source to an empty state, clearing any collected data - public function reset() - { - $this->timeline = new Timeline; - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/TwigDataSource.php b/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/TwigDataSource.php deleted file mode 100644 index 145a122..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/TwigDataSource.php +++ /dev/null @@ -1,40 +0,0 @@ -twig = $twig; - } - - // Register the Twig profiler extension - public function listenToEvents() - { - $this->twig->addExtension(new Twig_Extension_Profiler($this->profile = new Twig_Profiler_Profile)); - } - - // Adds rendered views to the request - public function resolve(Request $request) - { - $timeline = (new ProfilerClockworkDumper)->dump($this->profile); - - $request->viewsData = array_merge($request->viewsData, $timeline->finalize()); - - return $request; - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/XdebugDataSource.php b/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/XdebugDataSource.php deleted file mode 100644 index b963274..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/DataSource/XdebugDataSource.php +++ /dev/null @@ -1,27 +0,0 @@ -xdebug = [ 'profile' => xdebug_get_profiler_filename() ]; - - return $request; - } - - // Extends the request with full profiling data - public function extend(Request $request) - { - $profile = isset($request->xdebug['profile']) ? $request->xdebug['profile'] : null; - - if ($profile && ! preg_match('/\.php$/', $profile) && is_readable($profile)) { - $request->xdebug['profileData'] = file_get_contents($profile); - } - - return $request; - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Helpers/Concerns/ResolvesViewName.php b/source/vendor/itsgoingd/clockwork/Clockwork/Helpers/Concerns/ResolvesViewName.php deleted file mode 100644 index 2f835cc..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Helpers/Concerns/ResolvesViewName.php +++ /dev/null @@ -1,36 +0,0 @@ -first(function ($frame) { - return preg_match('#^/storage/framework/views/[a-z0-9]+\.php$#', $frame->shortPath); - }); - - if (! $viewFrame) return $this; - - $renderFrame = $this->first(function ($frame) { - return $frame->call == 'Illuminate\View\View->getContents()' - && $frame->object instanceof \Illuminate\View\View; - }); - - if (! $renderFrame) return $this; - - $resolvedViewFrame = new StackFrame( - [ 'file' => $renderFrame->object->getPath(), 'line' => $viewFrame->line ], - $this->basePath, - $this->vendorPath - ); - - return $this->copy(array_merge( - array_slice($this->frames, 0, array_search($viewFrame, $this->frames)), - [ $resolvedViewFrame ], - array_slice($this->frames, array_search($viewFrame, $this->frames) + 2) - )); - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Helpers/Serializer.php b/source/vendor/itsgoingd/clockwork/Clockwork/Helpers/Serializer.php deleted file mode 100644 index 6da46c6..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Helpers/Serializer.php +++ /dev/null @@ -1,139 +0,0 @@ - [ - \Illuminate\Container\Container::class, - \Illuminate\Foundation\Application::class, - \Laravel\Lumen\Application::class - ], - 'limit' => 10, - 'toArray' => false, - 'toString' => false, - 'debugInfo' => true, - 'jsonSerialize' => false, - 'traces' => true, - 'tracesFilter' => null, - 'tracesSkip' => null, - 'tracesLimit' => null - ]; - - // Create a new instance optionally with options overriding defaults - public function __construct(array $options = []) - { - $this->options = $options + static::$defaults; - } - - // Set default options for all new instances - public static function defaults(array $defaults) - { - static::$defaults = $defaults + static::$defaults; - } - - // Prepares the passed data to be ready for serialization, takes any kind of data to normalize as the first - // argument, other arguments are used internally in recursion - public function normalize($data, $context = null, $limit = null) - { - if ($context === null) $context = [ 'references' => [] ]; - if ($limit === null) $limit = $this->options['limit']; - - if (is_array($data)) { - if ($limit === 0) return [ '__type__' => 'array', '__omitted__' => 'limit' ]; - - return [ '__type__' => 'array' ] + $this->normalizeEach($data, $context, $limit - 1); - } elseif (is_object($data)) { - if ($data instanceof \Closure) return [ '__type__' => 'anonymous function' ]; - - $className = get_class($data); - $objectHash = spl_object_hash($data); - - if ($limit === 0) return [ '__class__' => $className, '__omitted__' => 'limit' ]; - - if (isset($context['references'][$objectHash])) return [ '__type__' => 'recursion' ]; - - $context['references'][$objectHash] = true; - - if (isset($this->cache[$objectHash])) return $this->cache[$objectHash]; - - if ($this->options['blackbox'] && in_array($className, $this->options['blackbox'])) { - return $this->cache[$objectHash] = [ '__class__' => $className, '__omitted__' => 'blackbox' ]; - } elseif ($this->options['toString'] && method_exists($data, '__toString')) { - return $this->cache[$objectHash] = (string) $data; - } - - if ($this->options['debugInfo'] && method_exists($data, '__debugInfo')) { - $data = (array) $data->__debugInfo(); - } elseif ($this->options['jsonSerialize'] && method_exists($data, 'jsonSerialize')) { - $data = (array) $data->jsonSerialize(); - } elseif ($this->options['toArray'] && method_exists($data, 'toArray')) { - $data = (array) $data->toArray(); - } else { - $data = (array) $data; - } - - $data = array_combine( - array_map(function ($key) { - // replace null-byte prefixes of protected and private properties used by php with * (protected) - // and ~ (private) - return preg_replace('/^\0.+?\0/', '~', str_replace("\0*\0", '*', $key)); - }, array_keys($data)), - $this->normalizeEach($data, $context, $limit - 1) - ); - - return $this->cache[$objectHash] = [ '__class__' => $className ] + $data; - } elseif (is_resource($data)) { - return [ '__type__' => 'resource' ]; - } - - return $data; - } - - // Normalize each member of an array (doesn't add metadata for top level) - public function normalizeEach($data, $context = null, $limit = null) { - return array_map(function ($item) use ($context, $limit) { - return $this->normalize($item, $context, $limit); - }, $data); - } - - // Normalize a stack trace instance - public function trace(StackTrace $trace) - { - if (! $this->options['traces']) return null; - - if ($this->options['tracesFilter']) $trace = $trace->filter($this->options['tracesFilter']); - if ($this->options['tracesSkip']) $trace = $trace->skip($this->options['tracesSkip']); - if ($this->options['tracesLimit']) $trace = $trace->limit($this->options['tracesLimit']); - - return array_map(function ($frame) { - return [ - 'call' => $frame->call, - 'file' => $frame->file, - 'line' => $frame->line, - 'isVendor' => (bool) $frame->vendor - ]; - }, $trace->frames()); - } - - // Normalize an exception instance - public function exception(/* Throwable */ $exception) - { - return [ - 'type' => get_class($exception), - 'message' => $exception->getMessage(), - 'code' => $exception->getCode(), - 'file' => $exception->getFile(), - 'line' => $exception->getLine(), - 'trace' => (new Serializer([ 'tracesLimit' => false ]))->trace(StackTrace::from($exception->getTrace())), - 'previous' => $exception->getPrevious() ? $this->exception($exception->getPrevious()) : null - ]; - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Helpers/ServerTiming.php b/source/vendor/itsgoingd/clockwork/Clockwork/Helpers/ServerTiming.php deleted file mode 100644 index 1ace509..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Helpers/ServerTiming.php +++ /dev/null @@ -1,45 +0,0 @@ -metrics[] = [ 'metric' => $metric, 'value' => $value, 'description' => $description ]; - - return $this; - } - - // Generate the header value - public function value() - { - return implode(', ', array_map(function ($metric) { - return "{$metric['metric']}; dur={$metric['value']}; desc=\"{$metric['description']}\""; - }, $this->metrics)); - } - - // Create a new instance from a Clockwork request - public static function fromRequest(Request $request, $eventsCount = 10) - { - $header = new static; - - $header->add('app', $request->getResponseDuration(), 'Application'); - - if ($request->getDatabaseDuration()) { - $header->add('db', $request->getDatabaseDuration(), 'Database'); - } - - // add timeline events limited to a set number so the header doesn't get too large - foreach (array_slice($request->timeline()->events, 0, $eventsCount) as $i => $event) { - $header->add("timeline-event-{$i}", $event->duration(), $event->description); - } - - return $header; - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Helpers/StackFilter.php b/source/vendor/itsgoingd/clockwork/Clockwork/Helpers/StackFilter.php deleted file mode 100644 index 49fd3f5..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Helpers/StackFilter.php +++ /dev/null @@ -1,148 +0,0 @@ -classes = array_merge($this->classes, is_array($classes) ? $classes : [ $classes ]); - return $this; - } - - public function isNotClass($classes) - { - $this->notClasses = array_merge($this->notClasses, is_array($classes) ? $classes : [ $classes ]); - return $this; - } - - public function isFile($files) - { - $this->files = array_merge($this->files, is_array($files) ? $files : [ $files ]); - return $this; - } - - public function isNotFile($files) - { - $this->notFiles = array_merge($this->notFiles, is_array($files) ? $files : [ $files ]); - return $this; - } - - public function isFunction($functions) - { - $this->functions = array_merge($this->functions, is_array($functions) ? $functions : [ $functions ]); - return $this; - } - - public function isNotFunction($functions) - { - $this->notFunctions = array_merge($this->notFunctions, is_array($functions) ? $functions : [ $functions ]); - return $this; - } - - public function isNamespace($namespaces) - { - $this->namespaces = array_merge($this->namespaces, is_array($namespaces) ? $namespaces : [ $namespaces ]); - return $this; - } - - public function isNotNamespace($namespaces) - { - $this->notNamespaces = array_merge($this->notNamespaces, is_array($namespaces) ? $namespaces : [ $namespaces ]); - return $this; - } - - public function isVendor($vendors) - { - $this->vendors = array_merge($this->vendors, is_array($vendors) ? $vendors : [ $vendors ]); - return $this; - } - - public function isNotVendor($vendors) - { - $this->notVendors = array_merge($this->notVendors, is_array($vendors) ? $vendors : [ $vendors ]); - return $this; - } - - // Apply the filter to a stack frame - public function filter(StackFrame $frame) - { - return $this->matchesClass($frame) - && $this->matchesFile($frame) - && $this->matchesFunction($frame) - && $this->matchesNamespace($frame) - && $this->matchesVendor($frame); - } - - // Return a closure calling this filter - public function closure() - { - return function ($frame) { return $this->filter($frame); }; - } - - protected function matchesClass(StackFrame $frame) - { - if (count($this->classes) && ! in_array($frame->class, $this->classes)) return false; - if (count($this->notClasses) && in_array($frame->class, $this->notClasses)) return false; - - return true; - } - - protected function matchesFile(StackFrame $frame) - { - if (count($this->files) && ! in_array($frame->file, $this->files)) return false; - if (count($this->notFiles) && in_array($frame->file, $this->notFiles)) return false; - - return true; - } - - protected function matchesFunction(StackFrame $frame) - { - if (count($this->functions) && ! in_array($frame->function, $this->functions)) return false; - if (count($this->notFunctions) && in_array($frame->function, $this->notFunctions)) return false; - - return true; - } - - protected function matchesNamespace(StackFrame $frame) - { - foreach ($this->notNamespaces as $namespace) { - if (strpos($frame->class, "{$namespace}\\") !== false) return false; - } - - if (! count($this->namespaces)) return true; - - foreach ($this->namespaces as $namespace) { - if (strpos($frame->class, "{$namespace}\\") !== false) return true; - } - - return false; - } - - protected function matchesVendor(StackFrame $frame) - { - if (count($this->vendors) && ! in_array($frame->vendor, $this->vendors)) return false; - if (count($this->notVendors) && in_array($frame->vendor, $this->notVendors)) return false; - - return true; - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Helpers/StackFrame.php b/source/vendor/itsgoingd/clockwork/Clockwork/Helpers/StackFrame.php deleted file mode 100644 index b6834c1..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Helpers/StackFrame.php +++ /dev/null @@ -1,37 +0,0 @@ - $value) { - $this->$key = $value; - } - - $this->call = $this->formatCall(); - $this->shortPath = str_replace($basePath, '', $this->file); - $this->vendor = strpos($this->file, $vendorPath) === 0 - ? explode(DIRECTORY_SEPARATOR, str_replace($vendorPath, '', $this->file))[0] : null; - } - - protected function formatCall() - { - if ($this->class) { - return "{$this->class}{$this->type}{$this->function}()"; - } else { - return "{$this->function}()"; - } - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Helpers/StackTrace.php b/source/vendor/itsgoingd/clockwork/Clockwork/Helpers/StackTrace.php deleted file mode 100644 index 884626c..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Helpers/StackTrace.php +++ /dev/null @@ -1,127 +0,0 @@ -frames = $frames; - $this->basePath = $basePath; - $this->vendorPath = $vendorPath; - } - - // Get all frames - public function frames() - { - return $this->frames; - } - - // Get the first frame, optionally filtered by a stack filter or a closure - public function first($filter = null) - { - if (! $filter) return reset($this->frames); - - if ($filter instanceof StackFilter) $filter = $filter->closure(); - - foreach ($this->frames as $frame) { - if ($filter($frame)) return $frame; - } - } - - // Get the last frame, optionally filtered by a stack filter or a closure - public function last($filter = null) - { - if (! $filter) return $this->frames[count($this->frames) - 1]; - - if ($filter instanceof StackFilter) $filter = $filter->closure(); - - foreach (array_reverse($this->frames) as $frame) { - if ($filter($frame)) return $frame; - } - } - - // Get trace filtered by a stack filter or a closure - public function filter($filter = null) - { - if ($filter instanceof StackFilter) $filter = $filter->closure(); - - return $this->copy(array_values(array_filter($this->frames, $filter))); - } - - // Get trace skipping a number of frames or frames matching a stack filter or a closure - public function skip($count = null) - { - if ($count instanceof StackFilter) $count = $count->closure(); - if ($count instanceof \Closure) $count = array_search($this->first($count), $this->frames); - - return $this->copy(array_slice($this->frames, $count)); - } - - // Get trace with a number of frames from the top - public function limit($count = null) - { - return $this->copy(array_slice($this->frames, 0, $count)); - } - - // Get a copy of the trace - public function copy($frames = null) - { - return new static($frames ?: $this->frames, $this->basePath, $this->vendorPath); - } - - protected static function resolveBasePath() - { - return substr(__DIR__, 0, strpos(__DIR__, DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR)); - } - - protected static function resolveVendorPath() - { - return static::resolveBasePath() . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR; - } - - // Fixes call_user_func stack frames missing file and line - protected static function fixCallUserFuncFrame($frame, array $trace, $index) - { - if (isset($frame['file'])) return $frame; - - $nextFrame = isset($trace[$index + 1]) ? $trace[$index + 1] : null; - - if (! $nextFrame || ! in_array($nextFrame['function'], [ 'call_user_func', 'call_user_func_array' ])) return $frame; - - $frame['file'] = $nextFrame['file']; - $frame['line'] = $nextFrame['line']; - - return $frame; - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Request/IncomingRequest.php b/source/vendor/itsgoingd/clockwork/Clockwork/Request/IncomingRequest.php deleted file mode 100644 index f1e89c1..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Request/IncomingRequest.php +++ /dev/null @@ -1,20 +0,0 @@ - $val) $this->$key = $val; - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Request/Log.php b/source/vendor/itsgoingd/clockwork/Clockwork/Request/Log.php deleted file mode 100644 index d9cfb58..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Request/Log.php +++ /dev/null @@ -1,86 +0,0 @@ -messages = $messages; - } - - // Log a new message, with a level and context, context can be used to override serializer defaults, - // $context['trace'] = true can be used to force collecting a stack trace - public function log($level = LogLevel::INFO, $message = null, array $context = []) - { - $trace = $this->hasTrace($context) ? $context['trace'] : StackTrace::get()->resolveViewName(); - - $this->messages[] = [ - 'message' => (new Serializer($context))->normalize($message), - 'exception' => $this->formatException($context), - 'context' => $this->formatContext($context), - 'level' => $level, - 'time' => microtime(true), - 'trace' => (new Serializer(! empty($context['trace']) ? [ 'traces' => true ] : []))->trace($trace) - ]; - } - - // Merge another log instance into the current log - public function merge(Log $log) - { - $this->messages = array_merge($this->messages, $log->messages); - - return $this; - } - - // Sort the log messages by timestamp - public function sort() - { - usort($this->messages, function ($a, $b) { return $a['time'] * 1000 - $b['time'] * 1000; }); - } - - // Get all messages as an array - public function toArray() - { - return $this->messages; - } - - // Format message context, removes exception and trace if we are serializing them - protected function formatContext($context) - { - if ($this->hasException($context)) unset($context['exception']); - if ($this->hasTrace($context)) unset($context['trace']); - - return (new Serializer)->normalize($context); - } - - // Format exception if present in the context - protected function formatException($context) - { - if ($this->hasException($context)) { - return (new Serializer)->exception($context['exception']); - } - } - - // Check if context has serializable trace - protected function hasTrace($context) - { - return ! empty($context['trace']) && $context['trace'] instanceof StackTrace && empty($context['raw']); - } - - // Check if context has serializable exception - protected function hasException($context) - { - return ! empty($context['exception']) && $context['exception'] instanceof \Exception && empty($context['raw']); - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Request/Request.php b/source/vendor/itsgoingd/clockwork/Clockwork/Request/Request.php deleted file mode 100644 index 3a629a8..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Request/Request.php +++ /dev/null @@ -1,590 +0,0 @@ - value ] - public $clientMetrics = []; - - // Web vitals in the form of [ vital => value ] - public $webVitals = []; - - // Parent request - public $parent; - - // Token to update this request data - public $updateToken; - - // Log instance for the current request - protected $currentLog; - - // Timeline instance for the current request - protected $currentTimeline; - - // Array of property values to override collected values from data sources - protected $overrides = []; - - // Create a new request, if optional data array argument is provided, it will be used to populate the request object, - // otherwise an empty request with current time, autogenerated ID and update token will be created - public function __construct(array $data = []) - { - $this->id = isset($data['id']) ? $data['id'] : $this->generateRequestId(); - $this->time = microtime(true); - $this->updateToken = isset($data['updateToken']) ? $data['updateToken'] : $this->generateUpdateToken(); - - foreach ($data as $key => $val) $this->$key = $val; - - $this->currentLog = new Log($this->log); - $this->currentTimeline = new Timeline\Timeline($this->timelineData); - } - - // Compute the sum of durations of all database queries - public function getDatabaseDuration() - { - return array_reduce($this->databaseQueries, function ($total, $query) { - return isset($query['duration']) ? $total + $query['duration'] : $total; - }, 0); - } - - // Compute response duration in milliseconds - public function getResponseDuration() - { - return ($this->responseTime - $this->time) * 1000; - } - - // Get all request data as an array - public function toArray() - { - return [ - 'id' => $this->id, - 'version' => $this->version, - 'type' => $this->type, - 'time' => $this->time, - 'method' => $this->method, - 'url' => $this->url, - 'uri' => $this->uri, - 'headers' => $this->headers, - 'controller' => $this->controller, - 'getData' => $this->getData, - 'postData' => $this->postData, - 'requestData' => $this->requestData, - 'sessionData' => $this->sessionData, - 'authenticatedUser' => $this->authenticatedUser, - 'cookies' => $this->cookies, - 'responseTime' => $this->responseTime, - 'responseStatus' => $this->responseStatus, - 'responseDuration' => $this->responseDuration ?: $this->getResponseDuration(), - 'memoryUsage' => $this->memoryUsage, - 'middleware' => $this->middleware, - 'databaseQueries' => $this->databaseQueries, - 'databaseQueriesCount' => $this->databaseQueriesCount, - 'databaseSlowQueries' => $this->databaseSlowQueries, - 'databaseSelects' => $this->databaseSelects, - 'databaseInserts' => $this->databaseInserts, - 'databaseUpdates' => $this->databaseUpdates, - 'databaseDeletes' => $this->databaseDeletes, - 'databaseOthers' => $this->databaseOthers, - 'databaseDuration' => $this->getDatabaseDuration(), - 'cacheQueries' => $this->cacheQueries, - 'cacheReads' => $this->cacheReads, - 'cacheHits' => $this->cacheHits, - 'cacheWrites' => $this->cacheWrites, - 'cacheDeletes' => $this->cacheDeletes, - 'cacheTime' => $this->cacheTime, - 'modelsActions' => $this->modelsActions, - 'modelsRetrieved' => $this->modelsRetrieved, - 'modelsCreated' => $this->modelsCreated, - 'modelsUpdated' => $this->modelsUpdated, - 'modelsDeleted' => $this->modelsDeleted, - 'redisCommands' => $this->redisCommands, - 'queueJobs' => $this->queueJobs, - 'timelineData' => $this->timeline()->toArray(), - 'log' => $this->log()->toArray(), - 'events' => $this->events, - 'routes' => $this->routes, - 'notifications' => $this->notifications, - 'emailsData' => $this->emailsData, - 'viewsData' => $this->viewsData, - 'userData' => array_map(function ($data) { - return $data instanceof UserData ? $data->toArray() : $data; - }, $this->userData), - 'subrequests' => $this->subrequests, - 'xdebug' => $this->xdebug, - 'commandName' => $this->commandName, - 'commandArguments' => $this->commandArguments, - 'commandArgumentsDefaults' => $this->commandArgumentsDefaults, - 'commandOptions' => $this->commandOptions, - 'commandOptionsDefaults' => $this->commandOptionsDefaults, - 'commandExitCode' => $this->commandExitCode, - 'commandOutput' => $this->commandOutput, - 'jobName' => $this->jobName, - 'jobDescription' => $this->jobDescription, - 'jobStatus' => $this->jobStatus, - 'jobPayload' => $this->jobPayload, - 'jobQueue' => $this->jobQueue, - 'jobConnection' => $this->jobConnection, - 'jobOptions' => $this->jobOptions, - 'testName' => $this->testName, - 'testStatus' => $this->testStatus, - 'testStatusMessage' => $this->testStatusMessage, - 'testAsserts' => $this->testAsserts, - 'clientMetrics' => $this->clientMetrics, - 'webVitals' => $this->webVitals, - 'parent' => $this->parent, - 'updateToken' => $this->updateToken - ]; - } - - // Get all request data as a JSON string - public function toJson() - { - return json_encode($this->toArray(), \JSON_PARTIAL_OUTPUT_ON_ERROR); - } - - // Return request data except specified keys as an array - public function except($keys) - { - return array_filter($this->toArray(), function ($value, $key) use ($keys) { - return ! in_array($key, $keys); - }, ARRAY_FILTER_USE_BOTH); - } - - // Return only request data with specified keys as an array - public function only($keys) - { - return array_filter($this->toArray(), function ($value, $key) use ($keys) { - return in_array($key, $keys); - }, ARRAY_FILTER_USE_BOTH); - } - - // Return log instance for the current request - public function log() - { - return $this->currentLog; - } - - // Return timeline instance for the current request - public function timeline() - { - return $this->currentTimeline; - } - - // Add a new overriden property - public function override($property, $value) - { - $this->overrides[$property] = $value; - return $this; - } - - // Get or set all overrides at once - public function overrides($overrides = null) - { - if (! $overrides) return $this->overrides; - - $this->overrides = $overrides; - return $this; - } - - // Add database query, takes query, bindings, duration (in ms) and additional data - connection (connection name), - // time (when was the query executed), file (caller file name), line (caller line number), trace (serialized trace), - // model (associated ORM model) - public function addDatabaseQuery($query, $bindings = [], $duration = null, $data = []) - { - $this->databaseQueries[] = [ - 'query' => $query, - 'bindings' => (new Serializer)->normalize($bindings), - 'duration' => $duration, - 'connection' => isset($data['connection']) ? $data['connection'] : null, - 'time' => isset($data['time']) ? $data['time'] : microtime(true) - ($duration ?: 0) / 1000, - 'file' => isset($data['file']) ? $data['file'] : null, - 'line' => isset($data['line']) ? $data['line'] : null, - 'trace' => isset($data['trace']) ? $data['trace'] : null, - 'model' => isset($data['model']) ? $data['model'] : null, - 'tags' => array_merge( - isset($data['tags']) ? $data['tags'] : [], isset($data['slow']) ? [ 'slow' ] : [] - ) - ]; - } - - // Add model action, takes model, action and additional data - key, attributes, changes, time (when was the action - // executed), query, duration (in ms), connection (connection name), trace (serialized trace), file (caller file - // name), line (caller line number), tags - public function addModelAction($model, $action, $data = []) - { - $this->modelActions[] = [ - 'model' => $model, - 'key' => isset($data['key']) ? $data['key'] : null, - 'action' => $action, - 'attributes' => isset($data['attributes']) ? $data['attributes'] : [], - 'changes' => isset($data['changes']) ? $data['changes'] : [], - 'duration' => $duration = isset($data['duration']) ? $data['duration'] : null, - 'time' => isset($data['time']) ? $data['time'] : microtime(true) - ($duration ?: 0) / 1000, - 'query' => isset($data['query']) ? $data['query'] : null, - 'connection' => isset($data['connection']) ? $data['connection'] : null, - 'trace' => isset($data['trace']) ? $data['trace'] : null, - 'file' => isset($data['file']) ? $data['file'] : null, - 'line' => isset($data['line']) ? $data['line'] : null, - 'tags' => isset($data['tags']) ? $data['tags'] : [] - ]; - } - - // Add cache query, takes type, key, value, duration (in ms) and additional data - connection (connection name), - // time (when was the query executed), file (caller file name), line (caller line number), trace (serialized trace), - // expiration - public function addCacheQuery($type, $key, $value = null, $duration = null, $data = []) - { - $this->cacheQueries[] = [ - 'type' => $type, - 'key' => $key, - 'value' => (new Serializer)->normalize($value), - 'duration' => $duration, - 'connection' => isset($data['connection']) ? $data['connection'] : null, - 'time' => isset($data['time']) ? $data['time'] : microtime(true) - ($duration ?: 0) / 1000, - 'file' => isset($data['file']) ? $data['file'] : null, - 'line' => isset($data['line']) ? $data['line'] : null, - 'trace' => isset($data['trace']) ? $data['trace'] : null, - 'expiration' => isset($data['expiration']) ? $data['expiration'] : null - ]; - } - - // Add event, takes event name, data, time and additional data - listeners, duration (in ms), file (caller file - // name), line (caller line number), trace (serialized trace) - public function addEvent($event, $eventData = null, $time = null, $data = []) - { - $this->events[] = [ - 'event' => $event, - 'data' => (new Serializer)->normalize($eventData), - 'duration' => $duration = isset($data['duration']) ? $data['duration'] : null, - 'time' => $time ? $time : microtime(true) - ($duration ?: 0) / 1000, - 'listeners' => isset($data['listeners']) ? $data['listeners'] : null, - 'file' => isset($data['file']) ? $data['file'] : null, - 'line' => isset($data['line']) ? $data['line'] : null, - 'trace' => isset($data['trace']) ? $data['trace'] : null - ]; - } - - // Add route, takes method, uri, action and additional data - name, middleware, before (before filters), after - // (after filters) - public function addRoute($method, $uri, $action, $data = []) - { - $this->routes[] = [ - 'method' => $method, - 'uri' => $uri, - 'action' => $action, - 'name' => isset($data['name']) ? $data['name'] : null, - 'middleware' => isset($data['middleware']) ? $data['middleware'] : null, - 'before' => isset($data['before']) ? $data['before'] : null, - 'after' => isset($data['after']) ? $data['after'] : null - ]; - } - - // Add sent notifucation, takes subject, recipient, sender, and additional data - time, duration, type, content, data - public function addNotification($subject, $to, $from = null, $data = []) - { - $this->notifications[] = [ - 'subject' => $subject, - 'from' => $from, - 'to' => $to, - 'content' => isset($data['content']) ? $data['content'] : null, - 'type' => isset($data['type']) ? $data['type'] : null, - 'data' => isset($data['data']) ? $data['data'] : [], - 'duration' => $duration = isset($data['duration']) ? $data['duration'] : null, - 'time' => isset($data['time']) ? $data['time'] : microtime(true) - ($duration ?: 0) / 1000, - 'trace' => isset($data['trace']) ? $data['trace'] : null, - 'file' => isset($data['file']) ? $data['file'] : null, - 'line' => isset($data['line']) ? $data['line'] : null - ]; - } - - // Add sent email, takes subject, recipient address, sender address, array of headers, and additional data - time - // (when was the email sent), duration (sending time in ms) - public function addEmail($subject, $to, $from = null, $headers = [], $data = []) - { - $this->emailsData[] = [ - 'start' => isset($data['time']) ? $data['time'] : null, - 'end' => isset($data['time'], $data['duration']) ? $data['time'] + $data['duration'] / 1000 : null, - 'duration' => isset($data['duration']) ? $data['duration'] : null, - 'description' => 'Sending an email message', - 'data' => [ - 'subject' => $subject, - 'to' => $to, - 'from' => $from, - 'headers' => (new Serializer)->normalize($headers) - ] - ]; - } - - // Add view, takes view name, view data and additional data - time (when was the view rendered), duration (sending - // time in ms) - public function addView($name, $viewData = [], $data = []) - { - $this->viewsData[] = [ - 'start' => isset($data['time']) ? $data['time'] : null, - 'end' => isset($data['time'], $data['duration']) ? $data['time'] + $data['duration'] / 1000 : null, - 'duration' => isset($data['duration']) ? $data['duration'] : null, - 'description' => 'Rendering a view', - 'data' => [ - 'name' => $name, - 'data' => (new Serializer)->normalize($viewData) - ] - ]; - } - - // Add executed subrequest, takes the requested url, subrequest Clockwork ID and additional data - path if non-default - public function addSubrequest($url, $id, $data = []) - { - $this->subrequests[] = [ - 'url' => $url, - 'id' => $id, - 'path' => isset($data['path']) ? $data['path'] : null - ]; - } - - // Set the authenticated user, takes a username, an id and additional data - email and name - public function setAuthenticatedUser($username, $id = null, $data = []) - { - $this->authenticatedUser = [ - 'id' => $id, - 'username' => $username, - 'email' => isset($data['email']) ? $data['email'] : null, - 'name' => isset($data['name']) ? $data['name'] : null - ]; - } - - // Set parent request, takes the request id and additional options - url and path if non-default - public function setParent($id, $data = []) - { - $this->parent = [ - 'id' => $id, - 'url' => isset($data['url']) ? $data['url'] : null, - 'path' => isset($data['path']) ? $data['path'] : null - ]; - } - - // Add custom user data - public function userData($key = null) - { - if ($key && isset($this->userData[$key])) { - return $this->userData[$key]; - } - - $userData = (new UserData)->title($key); - - return $key ? $this->userData[$key] = $userData : $this->userData[] = $userData; - } - - // Add a ran test assert, takes the assert name, arguments, whether it passed and trace as arguments - public function addTestAssert($name, $arguments = null, $passed = true, $trace = null) - { - $this->testAsserts[] = [ - 'name' => $name, - 'arguments' => (new Serializer)->normalize($arguments), - 'trace' => $trace, - 'passed' => $passed - ]; - } - - // Generate unique request ID in the form of - - protected function generateRequestId() - { - return str_replace('.', '-', sprintf('%.4F', microtime(true))) . '-' . mt_rand(); - } - - // Generate a random update token - protected function generateUpdateToken() - { - $length = 8; - $bytes = function_exists('random_bytes') ? random_bytes($length) : openssl_random_pseudo_bytes($length); - - return substr(bin2hex($bytes), 0, $length); - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Request/RequestType.php b/source/vendor/itsgoingd/clockwork/Clockwork/Request/RequestType.php deleted file mode 100644 index aad30e6..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Request/RequestType.php +++ /dev/null @@ -1,10 +0,0 @@ -except = array_merge($this->except, is_array($uris) ? $uris : [ $uris ]); - - return $this; - } - - // Append one or more only URIs - public function only($uris) - { - $this->only = array_merge($this->only, is_array($uris) ? $uris : [ $uris ]); - - return $this; - } - - // Merge multiple settings from array - public function merge(array $data = []) - { - foreach ($data as $key => $val) $this->$key = $val; - } - - // Apply the filter to an incoming request - public function filter(IncomingRequest $request) - { - return $this->passOnDemand($request) - && $this->passSampling() - && $this->passExcept($request) - && $this->passOnly($request) - && $this->passExceptPreflight($request) - && $this->passCallback($request); - } - - protected function passOnDemand(IncomingRequest $request) - { - if (! $this->onDemand) return true; - - if ($this->onDemand !== true) { - $input = isset($request->input['clockwork-profile']) ? $request->input['clockwork-profile'] : ''; - $cookie = isset($request->cookies['clockwork-profile']) ? $request->cookies['clockwork-profile'] : ''; - - return hash_equals($this->onDemand, $input) || hash_equals($this->onDemand, $cookie); - } - - return isset($request->input['clockwork-profile']) || isset($request->cookies['clockwork-profile']); - } - - protected function passSampling() - { - if (! $this->sample) return true; - - return mt_rand(0, $this->sample) == $this->sample; - } - - protected function passExcept(IncomingRequest $request) - { - if (! count($this->except)) return true; - - foreach ($this->except as $pattern) { - if (preg_match('#' . str_replace('#', '\#', $pattern) . '#', $request->uri)) return false; - } - - return true; - } - - protected function passOnly(IncomingRequest $request) - { - if (! count($this->only)) return true; - - foreach ($this->only as $pattern) { - if (preg_match('#' . str_replace('#', '\#', $pattern) . '#', $request->uri)) return true; - } - - return false; - } - - protected function passExceptPreflight(IncomingRequest $request) - { - if (! $this->exceptPreflight) return true; - - return strtoupper($request->method) != 'OPTIONS'; - } - - protected function passCallback(IncomingRequest $request) - { - if (! $this->callback) return true; - - return $this->callback($request); - } - - public function __call($method, $parameters) - { - if (! count($parameters)) return $this->$method; - - $this->$method = count($parameters) ? $parameters[0] : true; - - return $this; - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Request/ShouldRecord.php b/source/vendor/itsgoingd/clockwork/Clockwork/Request/ShouldRecord.php deleted file mode 100644 index 134cf70..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Request/ShouldRecord.php +++ /dev/null @@ -1,58 +0,0 @@ - $val) $this->$key = $val; - } - - // Apply the filter to a request - public function filter(Request $request) - { - return $this->passErrorsOnly($request) - && $this->passSlowOnly($request) - && $this->passCallback($request); - } - - protected function passErrorsOnly(Request $request) - { - if (! $this->errorsOnly) return true; - - return 400 <= $request->responseStatus && $request->responseStatus <= 599; - } - - protected function passSlowOnly(Request $request) - { - if (! $this->slowOnly) return true; - - return $request->getResponseDuration() >= $this->slowOnly; - } - - protected function passCallback(Request $request) - { - if (! $this->callback) return true; - - return $this->callback($request); - } - - // Fluent API - public function __call($method, $parameters) - { - if (! count($parameters)) return $this->$method; - - $this->$method = count($parameters) ? $parameters[0] : true; - - return $this; - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Request/Timeline/Event.php b/source/vendor/itsgoingd/clockwork/Clockwork/Request/Timeline/Event.php deleted file mode 100644 index e521929..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Request/Timeline/Event.php +++ /dev/null @@ -1,104 +0,0 @@ -description = $description; - $this->name = isset($data['name']) ? $data['name'] : $description; - - $this->start = isset($data['start']) ? $data['start'] : null; - $this->end = isset($data['end']) ? $data['end'] : null; - - $this->color = isset($data['color']) ? $data['color'] : null; - $this->data = isset($data['data']) ? $data['data'] : null; - } - - // Begin the event at current time - public function begin() - { - $this->start = microtime(true); - - return $this; - } - - // End the event at current time - public function end() - { - $this->end = microtime(true); - - return $this; - } - - // Begin the event, execute the passed in closure and end the event - public function run(\Closure $closure) - { - $this->begin(); - - $closure(); - - return $this->end(); - } - - // Set or retrieve event duration (in ms), event can be defined with both start and end time or just a single time and duration - public function duration($duration = null) - { - if (! $duration) return ($this->start && $this->end) ? ($this->end - $this->start) * 1000 : 0; - - if ($this->start) $this->end = $this->start + $duration / 1000; - if ($this->end) $this->start = $this->end - $duration / 1000; - - return $this; - } - - // Finalize the event, ends the event, fills in start time if empty and limits the start and end time - public function finalize($start = null, $end = null) - { - $end = $end ?: microtime(true); - - $this->start = $this->start ?: $start; - $this->end = $this->end ?: $end; - - if ($this->start < $start) $this->start = $start; - if ($this->end > $end) $this->end = $end; - } - - // Fluent API - public function __call($method, $parameters) - { - if (! count($parameters)) return $this->$method; - - $this->$method = $parameters[0]; - - return $this; - } - - // Return an array representation of the event - public function toArray() - { - return [ - 'description' => $this->description, - 'start' => $this->start, - 'end' => $this->end, - 'duration' => $this->duration(), - 'color' => $this->color, - 'data' => $this->data - ]; - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Request/Timeline/Timeline.php b/source/vendor/itsgoingd/clockwork/Clockwork/Request/Timeline/Timeline.php deleted file mode 100644 index cd2a34c..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Request/Timeline/Timeline.php +++ /dev/null @@ -1,72 +0,0 @@ -create($event['description'], $event); - } - } - - // Find or create a new event, takes description and optional data - name, start, end, duration, color, data - public function event($description, $data = []) - { - $name = isset($data['name']) ? $data['name'] : $description; - - if ($event = $this->find($name)) return $event; - - return $this->create($description, $data); - } - - // Create a new event, takes description and optional data - name, start, end, duration, color, data - public function create($description, $data = []) - { - return $this->events[] = new Event($description, $data); - } - - // Find event by name - public function find($name) - { - foreach ($this->events as $event) { - if ($event->name == $name) return $event; - } - } - - // Merge another timeline instance into the current timeline - public function merge(Timeline $timeline) - { - $this->events = array_merge($this->events, $timeline->events); - - return $this; - } - - // Finalize timeline, ends all events, sorts them and returns as an array - public function finalize($start = null, $end = null) - { - foreach ($this->events as $event) { - $event->finalize($start, $end); - } - - $this->sort(); - - return $this->toArray(); - } - - // Sort the timeline events by start time - public function sort() - { - usort($this->events, function ($a, $b) { return $a->start * 1000 - $b->start * 1000; }); - } - - // Return events as an array - public function toArray() - { - return array_map(function ($event) { return $event->toArray(); }, $this->events); - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Request/UserData.php b/source/vendor/itsgoingd/clockwork/Clockwork/Request/UserData.php deleted file mode 100644 index ef2351f..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Request/UserData.php +++ /dev/null @@ -1,52 +0,0 @@ -data[$key] = new UserDataItem($data); - } - - return $this->data[] = new UserDataItem($data); - } - - // Add user data shown as counters - public function counters(array $data) - { - return $this->data($data) - ->showAs('counters'); - } - - // Add user data shown as table - public function table($title, array $data) - { - return $this->data($data) - ->showAs('table') - ->title($title); - } - - // Set data title - public function title($title) - { - $this->title = $title; - return $this; - } - - // Transform data and all contents to a serializable array with metadata - public function toArray() - { - return array_merge( - array_map(function ($data) { return $data->toArray(); }, $this->data), - [ '__meta' => array_filter([ 'title' => $this->title ]) ] - ); - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Request/UserDataItem.php b/source/vendor/itsgoingd/clockwork/Clockwork/Request/UserDataItem.php deleted file mode 100644 index 6c1d1d8..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Request/UserDataItem.php +++ /dev/null @@ -1,55 +0,0 @@ -data = $data; - } - - // Set how the item should be presented ("counters" or "table") - public function showAs($showAs) - { - $this->showAs = $showAs; - return $this; - } - - // Set data title (shown as table title in the official app) - public function title($title) - { - $this->title = $title; - return $this; - } - - // Set a map of human-readable labels for the data contents - public function labels($labels) - { - $this->labels = $labels; - return $this; - } - - // Transform contents to a serializable array with metadata - public function toArray() - { - return array_merge($this->data, [ - '__meta' => array_filter([ - 'showAs' => $this->showAs, - 'title' => $this->title, - 'labels' => $this->labels - ]) - ]); - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Storage/FileStorage.php b/source/vendor/itsgoingd/clockwork/Clockwork/Storage/FileStorage.php deleted file mode 100644 index 70ae749..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Storage/FileStorage.php +++ /dev/null @@ -1,330 +0,0 @@ -path = $path; - $this->expiration = $expiration === null ? 60 * 24 * 7 : $expiration; - $this->compress = $compress; - } - - // Returns all requests - public function all(Search $search = null) - { - return $this->loadRequests($this->searchIndexForward($search)); - } - - // Return a single request by id - public function find($id) - { - return $this->loadRequest($id); - } - - // Return the latest request - public function latest(Search $search = null) - { - return $this->loadRequests($this->searchIndexBackward($search, null, 1)); - } - - // Return requests received before specified id, optionally limited to specified count - public function previous($id, $count = null, Search $search = null) - { - return $this->loadRequests($this->searchIndexBackward($search, $id, $count)); - } - - // Return requests received after specified id, optionally limited to specified count - public function next($id, $count = null, Search $search = null) - { - return $this->loadRequests($this->searchIndexForward($search, $id, $count)); - } - - // Store request, requests are stored in JSON representation in files named .json in storage path - public function store(Request $request, $skipIndex = false) - { - $path = "{$this->path}/{$request->id}.json"; - $data = @json_encode($request->toArray(), \JSON_PARTIAL_OUTPUT_ON_ERROR); - - $this->compress - ? file_put_contents("{$path}.gz", gzcompress($data)) - : file_put_contents($path, $data); - - if (! $skipIndex) $this->updateIndex($request); - - $this->cleanup(); - } - - // Update existing request - public function update(Request $request) - { - return $this->store($request, true); - } - - // Cleanup old requests - public function cleanup($force = false) - { - if ($this->expiration === false || (! $force && rand(1, $this->cleanupChance) != 1)) return; - - $this->openIndex('start', true, true); // reopen index with lock - - $expirationTime = time() - ($this->expiration * 60); - - $old = $this->searchIndexForward( - new Search([ 'received' => [ '<' . date('c', $expirationTime) ] ], [ 'stopOnFirstMismatch' => true ]) - ); - - if (! count($old)) return $this->closeIndex(true); - - $this->readPreviousIndex(); - $this->trimIndex(); - $this->closeIndex(true); // explicitly close index to unlock asap - - foreach ($old as $id) { - $path = "{$this->path}/{$id}.json"; - @unlink($this->compress ? "{$path}.gz" : $path); - } - } - - // Load a single request by id from filesystem - protected function loadRequest($id) - { - $path = "{$this->path}/{$id}.json"; - - if (! is_readable($this->compress ? "{$path}.gz" : $path)) return; - - $data = file_get_contents($this->compress ? "{$path}.gz" : $path); - - return new Request(json_decode($this->compress ? gzuncompress($data) : $data, true)); - } - - // Load multiple requests by ids from filesystem - protected function loadRequests($ids) - { - return array_filter(array_map(function ($id) { return $this->loadRequest($id); }, $ids)); - } - - // Search index backward from specified ID or last record, with optional results count limit - protected function searchIndexBackward(Search $search = null, $id = null, $count = null) - { - return $this->searchIndex('previous', $search, $id, $count); - } - - // Search index forward from specified ID or last record, with optional results count limit - protected function searchIndexForward(Search $search = null, $id = null, $count = null) - { - return $this->searchIndex('next', $search, $id, $count); - } - - // Search index in specified direction from specified ID or last record, with optional results count limit - protected function searchIndex($direction, Search $search = null, $id = null, $count = null) - { - $this->openIndex($direction == 'previous' ? 'end' : 'start', false, true); - - if ($id) { - while ($request = $this->readIndex($direction)) { if ($request->id == $id) break; } - } - - $found = []; - - while ($request = $this->readIndex($direction)) { - if (! $search || $search->matches($request)) { - $found[] = $request->id; - } elseif ($search->stopOnFirstMismatch) { - return $found; - } - - if ($count && count($found) == $count) return $found; - } - - if ($count == 1) return reset($found); - - return $direction == 'next' ? $found : array_reverse($found); - } - - // Open index file, optionally lock or move file pointer to the end, existing handle will be returned by default - protected function openIndex($position = 'start', $lock = false, $force = false) - { - if ($this->indexHandle) { - if (! $force) return; - $this->closeIndex(); - } - - $this->indexHandle = fopen("{$this->path}/index", 'r'); - - if ($lock) flock($this->indexHandle, LOCK_EX); - if ($position == 'end') fseek($this->indexHandle, 0, SEEK_END); - } - - // Close index file, optionally unlock - protected function closeIndex($lock = false) - { - if ($lock) flock($this->indexHandle, LOCK_UN); - fclose($this->indexHandle); - } - - // Read a line from index in the specified direction (next or previous) - protected function readIndex($direction) - { - return $direction == 'next' ? $this->readNextIndex() : $this->readPreviousIndex(); - } - - // Read previous line from index - protected function readPreviousIndex() - { - $position = ftell($this->indexHandle) - 1; - - if ($position <= 0) return; - - $line = ''; - - // reads 1024B chunks of the file backwards from the current position, until a newline is found or we reach the top - while ($position > 0) { - // find next position to read from, make sure we don't read beyond file boundary - $position -= $chunkSize = min($position, 1024); - - // read the chunk from the position - fseek($this->indexHandle, $position); - $chunk = fread($this->indexHandle, $chunkSize); - - // if a newline is found, append only the part after the last newline, otherwise we can append the whole chunk - $line = ($newline = strrpos($chunk, "\n")) === false - ? $chunk . $line : substr($chunk, $newline + 1) . $line; - - // if a newline was found, fix the position so we read from that newline next time - if ($newline !== false) $position += $newline + 1; - - // move file pointer to the correct position (revert fread, apply newline fix) - fseek($this->indexHandle, $position); - - // if we reached a newline and put together a non-empty line we are done - if ($newline !== false) break; - } - - return $this->makeRequestFromIndex(str_getcsv($line)); - } - - // Read next line from index - protected function readNextIndex() - { - if (feof($this->indexHandle)) return; - - // File pointer is always at the start of the line, call extra fgets to skip current line - fgets($this->indexHandle); - $line = fgets($this->indexHandle); - - // Check if we read an empty line or reached the end of file - if ($line === false) return; - - // Reset the file pointer to the start of the read line - fseek($this->indexHandle, ftell($this->indexHandle) - strlen($line)); - - return $this->makeRequestFromIndex(str_getcsv($line)); - } - - // Trim index file from beginning to current position (including) - protected function trimIndex() - { - // File pointer is always at the start of the line, call extra fgets to skip current line - fgets($this->indexHandle); - - // Read the rest of the index file - $trimmedLength = filesize("{$this->path}/index") - ftell($this->indexHandle); - $trimmed = $trimmedLength > 0 ? fread($this->indexHandle, $trimmedLength) : ''; - - // Rewrite the index file with a trimmed version - file_put_contents("{$this->path}/index", $trimmed); - } - - // Create an incomplete request from index data - protected function makeRequestFromIndex($record) - { - $type = isset($record[7]) ? $record[7] : 'response'; - - if ($type == 'command') { - $nameField = 'commandName'; - } elseif ($type == 'queue-job') { - $nameField = 'jobName'; - } elseif ($type == 'test') { - $nameField = 'testName'; - } else { - $nameField = 'uri'; - } - - return new Request(array_combine( - [ 'id', 'time', 'method', $nameField, 'controller', 'responseStatus', 'responseDuration', 'type' ], - array_slice($record, 0, 8) + [ null, null, null, null, null, null, null, 'response' ] - )); - } - - // Update index with a new request - protected function updateIndex(Request $request) - { - $handle = fopen("{$this->path}/index", 'a'); - - if (! $handle) return; - - if (! flock($handle, LOCK_EX)) return fclose($handle); - - if ($request->type == 'command') { - $nameField = 'commandName'; - } elseif ($request->type == 'queue-job') { - $nameField = 'jobName'; - } elseif ($request->type == 'test') { - $nameField = 'testName'; - } else { - $nameField = 'uri'; - } - - fputcsv($handle, [ - $request->id, - $request->time, - $request->method, - $request->$nameField, - $request->controller, - $request->responseStatus, - $request->getResponseDuration(), - $request->type - ]); - - flock($handle, LOCK_UN); - fclose($handle); - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Storage/Search.php b/source/vendor/itsgoingd/clockwork/Clockwork/Storage/Search.php deleted file mode 100644 index df13868..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Storage/Search.php +++ /dev/null @@ -1,166 +0,0 @@ -$condition = isset($search[$condition]) ? $search[$condition] : []; - } - - foreach ([ 'stopOnFirstMismatch' ] as $option) { - $this->$option = isset($options[$option]) ? $options[$option] : $this->$condition; - } - - $this->method = array_map('strtolower', $this->method); - } - - // Create a new instance from request input - public static function fromRequest($data = []) - { - return new static($data); - } - - // Check whether the request matches current search parameters - public function matches(Request $request) - { - if ($request->type == RequestType::COMMAND) { - return $this->matchesCommand($request); - } elseif ($request->type == RequestType::QUEUE_JOB) { - return $this->matchesQueueJob($request); - } elseif ($request->type == RequestType::TEST) { - return $this->matchesTest($request); - } else { - return $this->matchesRequest($request); - } - } - - // Check whether a request type request matches - protected function matchesRequest(Request $request) - { - return $this->matchesString($this->type, RequestType::REQUEST) - && $this->matchesString($this->uri, $request->uri) - && $this->matchesString($this->controller, $request->controller) - && $this->matchesExact($this->method, strtolower($request->method)) - && $this->matchesNumber($this->status, $request->responseStatus) - && $this->matchesNumber($this->time, $request->responseDuration) - && $this->matchesDate($this->received, $request->time); - } - - // Check whether a command type request matches - protected function matchesCommand(Request $request) - { - return $this->matchesString($this->type, RequestType::COMMAND) - && $this->matchesString($this->name, $request->commandName) - && $this->matchesNumber($this->status, $request->commandExitCode) - && $this->matchesNumber($this->time, $request->responseDuration) - && $this->matchesDate($this->received, $request->time); - } - - // Check whether a queue-job type request matches - protected function matchesQueueJob(Request $request) - { - return $this->matchesString($this->type, RequestType::QUEUE_JOB) - && $this->matchesString($this->name, $request->jobName) - && $this->matchesString($this->status, $request->jobStatus) - && $this->matchesNumber($this->time, $request->responseDuration) - && $this->matchesDate($this->received, $request->time); - } - - // Check whether a test type request matches - protected function matchesTest(Request $request) - { - return $this->matchesString($this->type, RequestType::TEST) - && $this->matchesString($this->name, $request->testName) - && $this->matchesString($this->status, $request->testStatus) - && $this->matchesNumber($this->time, $request->responseDuration) - && $this->matchesDate($this->received, $request->time); - } - - // Check if there are no search parameters specified - public function isEmpty() - { - return ! count($this->uri) && ! count($this->controller) && ! count($this->method) && ! count($this->status) - && ! count($this->time) && ! count($this->received) && ! count($this->name) && ! count($this->type); - } - - // Check if there are some search parameters specified - public function isNotEmpty() - { - return ! $this->isEmpty(); - } - - // Check if the value matches date type search parameter - protected function matchesDate($inputs, $value) - { - if (! count($inputs)) return true; - - foreach ($inputs as $input) { - if (preg_match('/^<(.+)$/', $input, $match)) { - if ($value < strtotime($match[1])) return true; - } elseif (preg_match('/^>(.+)$/', $input, $match)) { - if ($value > strtotime($match[1])) return true; - } - } - - return false; - } - - // Check if the value matches exact type search parameter - protected function matchesExact($inputs, $value) - { - if (! count($inputs)) return true; - - return in_array($value, $inputs); - } - - // Check if the value matches number type search parameter - protected function matchesNumber($inputs, $value) - { - if (! count($inputs)) return true; - - foreach ($inputs as $input) { - if (preg_match('/^<(\d+(?:\.\d+)?)$/', $input, $match)) { - if ($value < $match[1]) return true; - } elseif (preg_match('/^>(\d+(?:\.\d+)?)$/', $input, $match)) { - if ($value > $match[1]) return true; - } elseif (preg_match('/^(\d+(?:\.\d+)?)-(\d+(?:\.\d+)?)$/', $input, $match)) { - if ($match[1] < $value && $value < $match[2]) return true; - } else { - if ($value == $input) return true; - } - } - - return false; - } - - // Check if the value matches string type search parameter - protected function matchesString($inputs, $value) - { - if (! count($inputs)) return true; - - foreach ($inputs as $input) { - if (strpos($value, $input) !== false) return true; - } - - return false; - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Storage/SqlSearch.php b/source/vendor/itsgoingd/clockwork/Clockwork/Storage/SqlSearch.php deleted file mode 100644 index 2d349b5..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Storage/SqlSearch.php +++ /dev/null @@ -1,150 +0,0 @@ -conditions, $this->bindings) = $this->resolveConditions(); - - $this->buildQuery(); - } - - // Creates a new isntance from a base Search class instance - public static function fromBase(Search $search) - { - return new static((array) $search); - } - - // Add an additional where condition, takes the SQL condition and array of bindings - public function addCondition($condition, $bindings = []) - { - $this->conditions = array_merge([ $condition ], $this->conditions); - $this->bindings = array_merge($bindings, $this->bindings); - $this->buildQuery(); - - return $this; - } - - // Resolve SQL conditions and bindings based on the search parameters - protected function resolveConditions() - { - if ($this->isEmpty()) return [ [], [] ]; - - $conditions = array_filter([ - $this->resolveStringCondition([ 'type' ], $this->type), - $this->resolveStringCondition([ 'uri', 'commandName', 'jobName', 'testName' ], array_merge($this->uri, $this->name)), - $this->resolveStringCondition([ 'controller' ], $this->controller), - $this->resolveExactCondition([ 'method' ], $this->method), - $this->resolveNumberCondition([ 'responseStatus', 'commandExitCode', 'jobStatus', 'testStatus' ], $this->status), - $this->resolveNumberCondition([ 'responseDuration' ], $this->time), - $this->resolveDateCondition([ 'time' ], $this->received) - ]); - - $sql = array_map(function ($condition) { return $condition[0]; }, $conditions); - $bindings = array_reduce($conditions, function ($bindings, $condition) { - return array_merge($bindings, $condition[1]); - }, []); - - return [ $sql, $bindings ]; - } - - // Resolve a date type condition and bindings - protected function resolveDateCondition($fields, $inputs) - { - if (! count($inputs)) return null; - - $bindings = []; - $conditions = implode(' OR ', array_map(function ($field) use ($inputs, &$bindings) { - return implode(' OR ', array_map(function ($input, $index) use ($field, &$bindings) { - if (preg_match('/^<(.+)$/', $input, $match)) { - $bindings["{$field}{$index}"] = $match[1]; - return "{$field} < :{$field}{$index}"; - } elseif (preg_match('/^>(.+)$/', $input, $match)) { - $bindings["{$field}{$index}"] = $match[1]; - return "{$field} > :{$field}{$index}"; - } - }, $inputs, array_keys($inputs))); - }, $fields)); - - return [ "({$conditions})", $bindings ]; - } - - // Resolve an exact type condition and bindings - protected function resolveExactCondition($fields, $inputs) - { - if (! count($inputs)) return null; - - $bindings = []; - $values = implode(' OR ', array_map(function ($field) use ($inputs, &$bindings) { - return implode(', ', array_map(function ($input, $index) use ($field, &$bindings) { - $bindings["{$field}{$index}"] = $input; - return ":{$field}{$index}"; - }, $inputs, array_keys($inputs))); - }, $fields)); - - return [ "{$field} IN ({$values})", $bindings ]; - } - - // Resolve a number type condition and bindings - protected function resolveNumberCondition($fields, $inputs) - { - if (! count($inputs)) return null; - - $bindings = []; - $conditions = implode(' OR ', array_map(function ($field) use ($inputs, &$bindings) { - return implode(' OR ', array_map(function ($input, $index) use ($field, &$bindings) { - if (preg_match('/^<(\d+(?:\.\d+)?)$/', $input, $match)) { - $bindings["{$field}{$index}"] = $match[1]; - return "{$field} < :{$field}{$index}"; - } elseif (preg_match('/^>(\d+(?:\.\d+)?)$/', $input, $match)) { - $bindings["{$field}{$index}"] = $match[1]; - return "{$field} > :{$field}{$index}"; - } elseif (preg_match('/^(\d+(?:\.\d+)?)-(\d+(?:\.\d+)?)$/', $input, $match)) { - $bindings["{$field}{$index}from"] = $match[1]; - $bindings["{$field}{$index}to"] = $match[2]; - return "({$field} > :{$field}{$index}from AND {$field} < :{$field}{$index}to)"; - } else { - $bindings["{$field}{$index}"] = $input; - return "{$field} = :{$field}{$index}"; - } - }, $inputs, array_keys($inputs))); - }, $fields)); - - return [ "({$conditions})", $bindings ]; - } - - // Resolve a string type condition and bindings - protected function resolveStringCondition($fields, $inputs) - { - if (! count($inputs)) return null; - - $bindings = []; - $conditions = implode(' OR ', array_map(function ($field) use ($inputs, &$bindings) { - return implode(' OR ', array_map(function ($input, $index) use ($field, &$bindings) { - $bindings["{$field}{$index}"] = $input; - return "{$field} LIKE :{$field}{$index}"; - }, $inputs, array_keys($inputs))); - }, $fields)); - - return [ "({$conditions})", $bindings ]; - } - - // Build the where part of the SQL query - protected function buildQuery() - { - $this->query = count($this->conditions) ? 'WHERE ' . implode(' AND ', $this->conditions) : ''; - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Storage/SqlStorage.php b/source/vendor/itsgoingd/clockwork/Clockwork/Storage/SqlStorage.php deleted file mode 100644 index dfb19fb..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Storage/SqlStorage.php +++ /dev/null @@ -1,296 +0,0 @@ - 'VARCHAR(100) PRIMARY KEY', - 'version' => 'INTEGER', - 'type' => 'VARCHAR(100) NULL', - 'time' => 'DOUBLE PRECISION NULL', - 'method' => 'VARCHAR(10) NULL', - 'url' => 'TEXT NULL', - 'uri' => 'TEXT NULL', - 'headers' => 'TEXT NULL', - 'controller' => 'VARCHAR(250) NULL', - 'getData' => 'TEXT NULL', - 'postData' => 'TEXT NULL', - 'requestData' => 'TEXT NULL', - 'sessionData' => 'TEXT NULL', - 'authenticatedUser' => 'TEXT NULL', - 'cookies' => 'TEXT NULL', - 'responseTime' => 'DOUBLE PRECISION NULL', - 'responseStatus' => 'INTEGER NULL', - 'responseDuration' => 'DOUBLE PRECISION NULL', - 'memoryUsage' => 'DOUBLE PRECISION NULL', - 'middleware' => 'TEXT NULL', - 'databaseQueries' => 'TEXT NULL', - 'databaseQueriesCount' => 'INTEGER NULL', - 'databaseSlowQueries' => 'INTEGER NULL', - 'databaseSelects' => 'INTEGER NULL', - 'databaseInserts' => 'INTEGER NULL', - 'databaseUpdates' => 'INTEGER NULL', - 'databaseDeletes' => 'INTEGER NULL', - 'databaseOthers' => 'INTEGER NULL', - 'databaseDuration' => 'DOUBLE PRECISION NULL', - 'cacheQueries' => 'TEXT NULL', - 'cacheReads' => 'INTEGER NULL', - 'cacheHits' => 'INTEGER NULL', - 'cacheWrites' => 'INTEGER NULL', - 'cacheDeletes' => 'INTEGER NULL', - 'cacheTime' => 'DOUBLE PRECISION NULL', - 'modelsActions' => 'TEXT NULL', - 'modelsRetrieved' => 'TEXT NULL', - 'modelsCreated' => 'TEXT NULL', - 'modelsUpdated' => 'TEXT NULL', - 'modelsDeleted' => 'TEXT NULL', - 'redisCommands' => 'TEXT NULL', - 'queueJobs' => 'TEXT NULL', - 'timelineData' => 'TEXT NULL', - 'log' => 'TEXT NULL', - 'events' => 'TEXT NULL', - 'routes' => 'TEXT NULL', - 'notifications' => 'TEXT NULL', - 'emailsData' => 'TEXT NULL', - 'viewsData' => 'TEXT NULL', - 'userData' => 'TEXT NULL', - 'subrequests' => 'TEXT NULL', - 'xdebug' => 'TEXT NULL', - 'commandName' => 'TEXT NULL', - 'commandArguments' => 'TEXT NULL', - 'commandArgumentsDefaults' => 'TEXT NULL', - 'commandOptions' => 'TEXT NULL', - 'commandOptionsDefaults' => 'TEXT NULL', - 'commandExitCode' => 'INTEGER NULL', - 'commandOutput' => 'TEXT NULL', - 'jobName' => 'TEXT NULL', - 'jobDescription' => 'TEXT NULL', - 'jobStatus' => 'TEXT NULL', - 'jobPayload' => 'TEXT NULL', - 'jobQueue' => 'TEXT NULL', - 'jobConnection' => 'TEXT NULL', - 'jobOptions' => 'TEXT NULL', - 'testName' => 'TEXT NULL', - 'testStatus' => 'TEXT NULL', - 'testStatusMessage' => 'TEXT NULL', - 'testAsserts' => 'TEXT NULL', - 'clientMetrics' => 'TEXT NULL', - 'webVitals' => 'TEXT NULL', - 'parent' => 'TEXT NULL', - 'updateToken' => 'VARCHAR(100) NULL' - ]; - - // List of Request keys that need to be serialized before they can be stored in database - protected $needsSerialization = [ - 'headers', 'getData', 'postData', 'requestData', 'sessionData', 'authenticatedUser', 'cookies', 'middleware', - 'databaseQueries', 'cacheQueries', 'modelsActions', 'modelsRetrieved', 'modelsCreated', 'modelsUpdated', - 'modelsDeleted', 'redisCommands', 'queueJobs', 'timelineData', 'log', 'events', 'routes', 'notifications', - 'emailsData', 'viewsData', 'userData', 'subrequests', 'xdebug', 'commandArguments', 'commandArgumentsDefaults', - 'commandOptions', 'commandOptionsDefaults', 'jobPayload', 'jobOptions', 'testAsserts', 'parent', - 'clientMetrics', 'webVitals' - ]; - - // Return a new storage, takes PDO object or DSN and optionally a table name and database credentials as arguments - public function __construct($dsn, $table = 'clockwork', $username = null, $password = null, $expiration = null) - { - $this->pdo = $dsn instanceof PDO ? $dsn : new PDO($dsn, $username, $password); - $this->table = $table; - $this->expiration = $expiration === null ? 60 * 24 * 7 : $expiration; - } - - // Returns all requests - public function all(Search $search = null) - { - $fields = implode(', ', array_map(function ($field) { return $this->quote($field); }, array_keys($this->fields))); - $search = SqlSearch::fromBase($search); - $result = $this->query("SELECT {$fields} FROM {$this->table} {$search->query}", $search->bindings); - - return $this->resultsToRequests($result); - } - - // Return a single request by id - public function find($id) - { - $fields = implode(', ', array_map(function ($field) { return $this->quote($field); }, array_keys($this->fields))); - $result = $this->query("SELECT {$fields} FROM {$this->table} WHERE id = :id", [ 'id' => $id ]); - - $requests = $this->resultsToRequests($result); - return end($requests); - } - - // Return the latest request - public function latest(Search $search = null) - { - $fields = implode(', ', array_map(function ($field) { return $this->quote($field); }, array_keys($this->fields))); - $search = SqlSearch::fromBase($search); - $result = $this->query( - "SELECT {$fields} FROM {$this->table} {$search->query} ORDER BY id DESC LIMIT 1", $search->bindings - ); - - $requests = $this->resultsToRequests($result); - return end($requests); - } - - // Return requests received before specified id, optionally limited to specified count - public function previous($id, $count = null, Search $search = null) - { - $count = (int) $count; - - $fields = implode(', ', array_map(function ($field) { return $this->quote($field); }, array_keys($this->fields))); - $search = SqlSearch::fromBase($search)->addCondition('id < :id', [ 'id' => $id ]); - $limit = $count ? "LIMIT {$count}" : ''; - $result = $this->query( - "SELECT {$fields} FROM {$this->table} {$search->query} ORDER BY id DESC {$limit}", $search->bindings - ); - - return array_reverse($this->resultsToRequests($result)); - } - - // Return requests received after specified id, optionally limited to specified count - public function next($id, $count = null, Search $search = null) - { - $count = (int) $count; - - $fields = implode(', ', array_map(function ($field) { return $this->quote($field); }, array_keys($this->fields))); - $search = SqlSearch::fromBase($search)->addCondition('id > :id', [ 'id' => $id ]); - $limit = $count ? "LIMIT {$count}" : ''; - $result = $this->query( - "SELECT {$fields} FROM {$this->table} {$search->query} ORDER BY id ASC {$limit}", $search->bindings - ); - - return $this->resultsToRequests($result); - } - - // Store the request in the database - public function store(Request $request) - { - $data = $request->toArray(); - - foreach ($this->needsSerialization as $key) { - $data[$key] = @json_encode($data[$key], \JSON_PARTIAL_OUTPUT_ON_ERROR); - } - - $fields = implode(', ', array_map(function ($field) { return $this->quote($field); }, array_keys($this->fields))); - $bindings = implode(', ', array_map(function ($field) { return ":{$field}"; }, array_keys($this->fields))); - - $this->query("INSERT INTO {$this->table} ($fields) VALUES ($bindings)", $data); - - $this->cleanup(); - } - - // Update an existing request in the database - public function update(Request $request) - { - $data = $request->toArray(); - - foreach ($this->needsSerialization as $key) { - $data[$key] = @json_encode($data[$key], \JSON_PARTIAL_OUTPUT_ON_ERROR); - } - - $values = implode(', ', array_map(function ($field) { - return $this->quote($field) . " = :{$field}"; - }, array_keys($this->fields))); - - $this->query("UPDATE {$this->table} SET {$values} WHERE id = :id", $data); - - $this->cleanup(); - } - - // Cleanup old requests - public function cleanup() - { - if ($this->expiration === false) return; - - $this->query("DELETE FROM {$this->table} WHERE time < :time", [ 'time' => time() - ($this->expiration * 60) ]); - } - - // Create or update the Clockwork metadata table - protected function initialize() - { - // first we get rid of existing table if it exists by renaming it so we won't lose any data - try { - $table = $this->quote($this->table); - $backupTableName = $this->quote("{$this->table}_backup_" . date('Ymd')); - $this->pdo->exec("ALTER TABLE {$table} RENAME TO {$backupTableName};"); - } catch (\PDOException $e) { - // this just means the table doesn't yet exist, nothing to do here - } - - // create the metadata table - $this->pdo->exec($this->buildSchema($table)); - - $indexName = $this->quote("{$this->table}_time_index"); - $this->pdo->exec("CREATE INDEX {$indexName} ON {$table} (". $this->quote('time') .')'); - } - - // Builds the query to create Clockwork database table - protected function buildSchema($table) - { - $textType = $this->pdo->getAttribute(PDO::ATTR_DRIVER_NAME) == 'mysql' ? 'MEDIUMTEXT' : 'TEXT'; - - $columns = implode(', ', array_map(function ($field, $type) use ($textType) { - return $this->quote($field) . ' ' . str_replace('TEXT', $textType, $type); - }, array_keys($this->fields), array_values($this->fields))); - - return "CREATE TABLE {$table} ({$columns});"; - } - - // Executes an sql query, lazily initiates the clockwork database schema if it's old or doesn't exist yet, returns - // executed statement or false on error - protected function query($query, array $bindings = [], $firstTry = true) - { - try { - if ($stmt = $this->pdo->prepare($query)) { - if ($stmt->execute($bindings)) return $stmt; - throw new \PDOException; - } - } catch (\PDOException $e) { - $stmt = false; - } - - // the query failed to execute, assume it's caused by missing or old schema, try to reinitialize database - if (! $stmt && $firstTry) { - $this->initialize(); - return $this->query($query, $bindings, false); - } - } - - // Quotes SQL identifier name properly for the current database - protected function quote($identifier) - { - return $this->pdo->getAttribute(PDO::ATTR_DRIVER_NAME) == 'mysql' ? "`{$identifier}`" : "\"{$identifier}\""; - } - - // Returns array of Requests instances from the executed PDO statement - protected function resultsToRequests($stmt) - { - return array_map(function ($data) { - return $this->dataToRequest($data); - }, $stmt->fetchAll(PDO::FETCH_ASSOC)); - } - - // Returns a Request instance from a single database record - protected function dataToRequest($data) - { - foreach ($this->needsSerialization as $key) { - $data[$key] = json_decode($data[$key], true); - } - - return new Request($data); - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Storage/Storage.php b/source/vendor/itsgoingd/clockwork/Clockwork/Storage/Storage.php deleted file mode 100644 index 40e497b..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Storage/Storage.php +++ /dev/null @@ -1,8 +0,0 @@ -profiler = $profiler; - $this->path = $path; - } - - // Store request, no-op since this is read-only storage implementation - public function store(Request $request, $skipIndex = false) - { - return; - } - - // Cleanup old requests, no-op since this is read-only storage implementation - public function cleanup($force = false) - { - return; - } - - protected function loadRequest($token) - { - return ($profile = $this->profiler->loadProfile($token)) ? (new ProfileTransformer)->transform($profile) : null; - } - - // Open index file, optionally move file pointer to the end - protected function openIndex($position = 'start', $lock = null, $force = null) - { - $this->indexHandle = fopen("{$this->path}/index.csv", 'r'); - - if ($position == 'end') fseek($this->indexHandle, 0, SEEK_END); - } - - protected function makeRequestFromIndex($record) - { - return new Request(array_combine( - [ 'id', 'ip', 'method', 'uri', 'time', 'parent', 'responseStatus' ], $record - )); - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Laravel/ClockworkCleanCommand.php b/source/vendor/itsgoingd/clockwork/Clockwork/Support/Laravel/ClockworkCleanCommand.php deleted file mode 100644 index edad226..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Laravel/ClockworkCleanCommand.php +++ /dev/null @@ -1,43 +0,0 @@ -option('all')) { - $this->laravel['config']->set('clockwork.storage_expiration', 0); - } elseif ($expiration = $this->option('expiration')) { - $this->laravel['config']->set('clockwork.storage_expiration', $expiration); - } - - $this->laravel['clockwork.support']->makeStorage()->cleanup($force = true); - - $this->info('Metadata cleaned successfully.'); - } - - // Compatibility for the old Laravel versions - public function fire() - { - return $this->handle(); - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Laravel/ClockworkController.php b/source/vendor/itsgoingd/clockwork/Clockwork/Support/Laravel/ClockworkController.php deleted file mode 100644 index 160df35..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Laravel/ClockworkController.php +++ /dev/null @@ -1,86 +0,0 @@ -ensureClockworkIsEnabled($clockworkSupport); - - $token = $clockwork->authenticator()->attempt( - $request->only([ 'username', 'password' ]) - ); - - return new JsonResponse([ 'token' => $token ], $token ? 200 : 403); - } - - // Metadata retrieving endpoint - public function getData(ClockworkSupport $clockworkSupport, Request $request, $id = null, $direction = null, $count = null) - { - $this->ensureClockworkIsEnabled($clockworkSupport); - - return $clockworkSupport->getData( - $id, $direction, $count, $request->only([ 'only', 'except' ]) - ); - } - - // Extended metadata retrieving endpoint - public function getExtendedData(ClockworkSupport $clockworkSupport, Request $request, $id = null) - { - $this->ensureClockworkIsEnabled($clockworkSupport); - - return $clockworkSupport->getExtendedData( - $id, $request->only([ 'only', 'except' ]) - ); - } - - // Metadata updating endpoint - public function updateData(ClockworkSupport $clockworkSupport, Request $request, $id = null) - { - $this->ensureClockworkIsEnabled($clockworkSupport); - - return $clockworkSupport->updateData($id, $request->json()->all()); - } - - // App index - public function webIndex(ClockworkSupport $clockworkSupport) - { - $this->ensureClockworkIsEnabled($clockworkSupport); - - return $clockworkSupport->getWebAsset('index.html'); - } - - // App assets serving - public function webAsset(ClockworkSupport $clockworkSupport, $path) - { - $this->ensureClockworkIsEnabled($clockworkSupport); - - return $clockworkSupport->getWebAsset($path); - } - - // App redirect (/clockwork -> /clockwork/app) - public function webRedirect(ClockworkSupport $clockworkSupport, Request $request) - { - $this->ensureClockworkIsEnabled($clockworkSupport); - - return new RedirectResponse($request->path() . '/app'); - } - - // Ensure Clockwork is still enabled at this point and stop Telescope recording if present - protected function ensureClockworkIsEnabled(ClockworkSupport $clockworkSupport) - { - if (class_exists(Telescope::class)) Telescope::stopRecording(); - - if (! $clockworkSupport->isEnabled()) abort(404); - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Laravel/ClockworkMiddleware.php b/source/vendor/itsgoingd/clockwork/Clockwork/Support/Laravel/ClockworkMiddleware.php deleted file mode 100644 index 5654093..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Laravel/ClockworkMiddleware.php +++ /dev/null @@ -1,38 +0,0 @@ -app = $app; - } - - // Handle an incoming request - public function handle($request, \Closure $next) - { - $this->app['clockwork']->event('Controller')->begin(); - - try { - $response = $next($request); - } catch (\Exception $e) { - $this->app[ExceptionHandler::class]->report($e); - $response = $this->app[ExceptionHandler::class]->render($request, $e); - } - - return $this->app['clockwork.support']->processRequest($request, $response); - } - - // Record the current request after a response is sent - public function terminate() - { - $this->app['clockwork.support']->recordRequest(); - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Laravel/ClockworkServiceProvider.php b/source/vendor/itsgoingd/clockwork/Clockwork/Support/Laravel/ClockworkServiceProvider.php deleted file mode 100644 index 1785488..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Laravel/ClockworkServiceProvider.php +++ /dev/null @@ -1,270 +0,0 @@ -app['clockwork.support']->isCollectingData()) { - $this->registerEventListeners(); - $this->registerMiddleware(); - } - - $this->app['clockwork.support']->handleOctaneEvents(); - - // If Clockwork is disabled, return before registering middleware or routes - if (! $this->app['clockwork.support']->isEnabled()) return; - - $this->registerRoutes(); - - // register the Clockwork Web UI routes - if ($this->app['clockwork.support']->isWebEnabled()) { - $this->registerWebRoutes(); - } - } - - public function register() - { - $this->registerConfiguration(); - $this->registerClockwork(); - $this->registerCommands(); - $this->registerDataSources(); - $this->registerAliases(); - - $this->app->make('clockwork.request'); // instantiate the request to have id and time available as early as possible - - $this->app['clockwork.support'] - ->configureSerializer() - ->configureShouldCollect() - ->configureShouldRecord(); - - if ($this->app['clockwork.support']->getConfig('register_helpers', true)) { - require __DIR__ . '/helpers.php'; - } - } - - // Register the configuration file - protected function registerConfiguration() - { - $this->publishes([ __DIR__ . '/config/clockwork.php' => config_path('clockwork.php') ]); - $this->mergeConfigFrom(__DIR__ . '/config/clockwork.php', 'clockwork'); - } - - // Register core Clockwork components - protected function registerClockwork() - { - $this->app->singleton('clockwork', function ($app) { - return (new Clockwork) - ->authenticator($app['clockwork.authenticator']) - ->request($app['clockwork.request']) - ->storage($app['clockwork.storage']); - }); - - $this->app->singleton('clockwork.authenticator', function ($app) { - return $app['clockwork.support']->makeAuthenticator(); - }); - - $this->app->singleton('clockwork.request', function ($app) { - return new Request; - }); - - $this->app->singleton('clockwork.storage', function ($app) { - return $app['clockwork.support']->makeStorage(); - }); - - $this->app->singleton('clockwork.support', function ($app) { - return new ClockworkSupport($app); - }); - } - - // Register the artisan commands - protected function registerCommands() - { - $this->commands([ - ClockworkCleanCommand::class - ]); - } - - // Register Clockwork data sources - protected function registerDataSources() - { - $this->app->singleton('clockwork.cache', function ($app) { - return (new LaravelCacheDataSource( - $app['events'], - $app['clockwork.support']->getConfig('features.cache.collect_queries'), - $app['clockwork.support']->getConfig('features.cache.collect_values') - )); - }); - - $this->app->singleton('clockwork.eloquent', function ($app) { - $dataSource = (new EloquentDataSource( - $app['db'], - $app['events'], - $app['clockwork.support']->getConfig('features.database.collect_queries'), - $app['clockwork.support']->getConfig('features.database.slow_threshold'), - $app['clockwork.support']->getConfig('features.database.slow_only'), - $app['clockwork.support']->getConfig('features.database.detect_duplicate_queries'), - $app['clockwork.support']->getConfig('features.database.collect_models_actions'), - $app['clockwork.support']->getConfig('features.database.collect_models_retrieved') - )); - - // if we are collecting queue jobs, filter out queries caused by the database queue implementation - if ($app['clockwork.support']->isCollectingQueueJobs()) { - $dataSource->addFilter(function ($query, $trace) { - return ! $trace->first(StackFilter::make()->isClass(\Illuminate\Queue\DatabaseQueue::class)); - }, 'early'); - } - - if ($app->runningUnitTests()) { - $dataSource->addFilter(function ($query, $trace) { - return ! $trace->first(StackFilter::make()->isClass([ - \Illuminate\Database\Migrations\Migrator::class, - \Illuminate\Database\Console\Migrations\MigrateCommand::class - ])); - }); - } - - return $dataSource; - }); - - $this->app->singleton('clockwork.events', function ($app) { - return (new LaravelEventsDataSource( - $app['events'], - $app['clockwork.support']->getConfig('features.events.ignored_events', []) - )); - }); - - $this->app->singleton('clockwork.laravel', function ($app) { - return (new LaravelDataSource( - $app, - $app['clockwork.support']->isFeatureEnabled('log'), - $app['clockwork.support']->isFeatureEnabled('routes'), - $app['clockwork.support']->getConfig('features.routes.only_namespaces', []) - )); - }); - - $this->app->singleton('clockwork.notifications', function ($app) { - return new LaravelNotificationsDataSource($app['events']); - }); - - $this->app->singleton('clockwork.queue', function ($app) { - return (new LaravelQueueDataSource($app['queue']->connection())); - }); - - $this->app->singleton('clockwork.redis', function ($app) { - $dataSource = new LaravelRedisDataSource($app['events']); - - // if we are collecting queue jobs, filter out commands executed by the redis queue implementation - if ($app['clockwork.support']->isCollectingQueueJobs()) { - $dataSource->addFilter(function ($query, $trace) { - return ! $trace->first(StackFilter::make()->isClass([ - \Illuminate\Queue\RedisQueue::class, - \Laravel\Horizon\Repositories\RedisJobRepository::class, - \Laravel\Horizon\Repositories\RedisTagRepository::class, - \Laravel\Horizon\Repositories\RedisMetricsRepository::class - ])); - }); - } - - return $dataSource; - }); - - $this->app->singleton('clockwork.swift', function ($app) { - return new SwiftDataSource($app['mailer']->getSwiftMailer()); - }); - - $this->app->singleton('clockwork.twig', function ($app) { - return new TwigDataSource($app['twig']); - }); - - $this->app->singleton('clockwork.views', function ($app) { - return new LaravelViewsDataSource( - $app['events'], - $app['clockwork.support']->getConfig('features.views.collect_data') - ); - }); - - $this->app->singleton('clockwork.xdebug', function ($app) { - return new XdebugDataSource; - }); - } - - // Set up aliases for all Clockwork parts so they can be resolved by type-hinting - protected function registerAliases() - { - $this->app->alias('clockwork', Clockwork::class); - - $this->app->alias('clockwork.authenticator', AuthenticatorInterface::class); - $this->app->alias('clockwork.storage', StorageInterface::class); - $this->app->alias('clockwork.support', ClockworkSupport::class); - - $this->app->alias('clockwork.cache', LaravelCacheDataSource::class); - $this->app->alias('clockwork.eloquent', EloquentDataSource::class); - $this->app->alias('clockwork.events', LaravelEventsDataSource::class); - $this->app->alias('clockwork.laravel', LaravelDataSource::class); - $this->app->alias('clockwork.notifications', LaravelNotificationsDataSource::class); - $this->app->alias('clockwork.queue', LaravelQueueDataSource::class); - $this->app->alias('clockwork.redis', LaravelRedisDataSource::class); - $this->app->alias('clockwork.swift', SwiftDataSource::class); - $this->app->alias('clockwork.xdebug', XdebugDataSource::class); - } - - // Register event listeners - protected function registerEventListeners() - { - $this->app->booted(function () { - $this->app['clockwork.support']->addDataSources()->listenToEvents(); - }); - } - - // Register middleware - protected function registerMiddleware() - { - $this->app[\Illuminate\Contracts\Http\Kernel::class] - ->prependMiddleware(ClockworkMiddleware::class); - } - - protected function registerRoutes() - { - $this->app['router']->get('/__clockwork/{id}/extended', 'Clockwork\Support\Laravel\ClockworkController@getExtendedData') - ->where('id', '([0-9-]+|latest)'); - $this->app['router']->get('/__clockwork/{id}/{direction?}/{count?}', 'Clockwork\Support\Laravel\ClockworkController@getData') - ->where('id', '([0-9-]+|latest)')->where('direction', '(next|previous)')->where('count', '\d+'); - $this->app['router']->put('/__clockwork/{id}', 'Clockwork\Support\Laravel\ClockworkController@updateData'); - $this->app['router']->post('/__clockwork/auth', 'Clockwork\Support\Laravel\ClockworkController@authenticate'); - } - - protected function registerWebRoutes() - { - $this->app['clockwork.support']->webPaths()->each(function ($path) { - $this->app['router']->get("{$path}", 'Clockwork\Support\Laravel\ClockworkController@webRedirect'); - $this->app['router']->get("{$path}/app", 'Clockwork\Support\Laravel\ClockworkController@webIndex'); - $this->app['router']->get("{$path}/{path}", 'Clockwork\Support\Laravel\ClockworkController@webAsset') - ->where('path', '.+'); - }); - } - - public function provides() - { - return [ 'clockwork' ]; - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Laravel/ClockworkSupport.php b/source/vendor/itsgoingd/clockwork/Clockwork/Support/Laravel/ClockworkSupport.php deleted file mode 100644 index 117c540..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Laravel/ClockworkSupport.php +++ /dev/null @@ -1,711 +0,0 @@ -app = $app; - } - - // Get a value form the Clockwork config - public function getConfig($key, $default = null) - { - return $this->app['config']->get("clockwork.{$key}", $default); - } - - // Retrieve metadata - public function getData($id = null, $direction = null, $count = null, $filter = [], $extended = false) - { - if (isset($this->app['session'])) $this->app['session.store']->reflash(); - - $authenticator = $this->app['clockwork']->authenticator(); - $storage = $this->app['clockwork']->storage(); - - $authenticated = $authenticator->check($this->app['request']->header('X-Clockwork-Auth')); - - if ($authenticated !== true) { - return new JsonResponse([ 'message' => $authenticated, 'requires' => $authenticator->requires() ], 403); - } - - if ($direction == 'previous') { - $data = $storage->previous($id, $count, Search::fromRequest($this->app['request']->all())); - } elseif ($direction == 'next') { - $data = $storage->next($id, $count, Search::fromRequest($this->app['request']->all())); - } elseif ($id == 'latest') { - $data = $storage->latest(Search::fromRequest($this->app['request']->all())); - } else { - $data = $storage->find($id); - } - - if ($extended) { - $this->addDataSources(); - $this->app['clockwork']->extendRequest($data); - } - - $except = isset($filter['except']) ? explode(',', $filter['except']) : []; - $only = isset($filter['only']) ? explode(',', $filter['only']) : null; - - if (is_array($data)) { - $data = array_map(function ($request) use ($except, $only) { - return $only ? $request->only($only) : $request->except(array_merge($except, [ 'updateToken' ])); - }, $data); - } elseif ($data) { - $data = $only ? $data->only($only) : $data->except(array_merge($except, [ 'updateToken' ])); - } - - return new JsonResponse($data); - } - - // Retrieve extended metadata - public function getExtendedData($id, $filter = []) - { - return $this->getData($id, null, null, $filter, true); - } - - // Update metadata - public function updateData($id, $input = []) - { - if (isset($this->app['session'])) $this->app['session.store']->reflash(); - - if (! $this->isCollectingClientMetrics()) { - throw new NotFoundHttpException; - } - - $storage = $this->app['clockwork']->storage(); - - $request = $storage->find($id); - - if (! $request) { - return new JsonResponse([ 'message' => 'Request not found.' ], 404); - } - - $token = isset($input['_token']) ? $input['_token'] : ''; - - if (! $request->updateToken || ! hash_equals($request->updateToken, $token)) { - return new JsonResponse([ 'message' => 'Invalid update token.' ], 403); - } - - foreach ($input as $key => $value) { - if (in_array($key, [ 'clientMetrics', 'webVitals' ])) { - $request->$key = $value; - } - } - - $storage->update($request); - } - - // Return an asset for web ui based on it's path, resolves correct mime-type and protectes from accessing files - // outside of Clockwork public dir - public function getWebAsset($path) - { - $asset = (new Web)->asset($path); - - if (! $asset) throw new NotFoundHttpException; - - return new BinaryFileResponse($asset['path'], 200, [ 'Content-Type' => $asset['mime'] ]); - } - - // Add enabled data sources - public function addDataSources() - { - $clockwork = $this->app['clockwork']; - - $clockwork - ->addDataSource(new PhpDataSource) - ->addDataSource($this->frameworkDataSource()); - - if ($this->isFeatureEnabled('database')) $clockwork->addDataSource($this->app['clockwork.eloquent']); - if ($this->isFeatureEnabled('cache')) $clockwork->addDataSource($this->app['clockwork.cache']); - if ($this->isFeatureEnabled('redis')) $clockwork->addDataSource($this->app['clockwork.redis']); - if ($this->isFeatureEnabled('queue')) $clockwork->addDataSource($this->app['clockwork.queue']); - if ($this->isFeatureEnabled('events')) $clockwork->addDataSource($this->app['clockwork.events']); - if ($this->isFeatureEnabled('notifications')) { - $clockwork->addDataSource( - $this->isFeatureAvailable('notifications-events') - ? $this->app['clockwork.notifications'] : $this->app['clockwork.swift'] - ); - } - if ($this->isFeatureAvailable('xdebug')) $clockwork->addDataSource($this->app['clockwork.xdebug']); - if ($this->isFeatureEnabled('views')) { - $clockwork->addDataSource( - $this->getConfig('features.views.use_twig_profiler', false) - ? $this->app['clockwork.twig'] : $this->app['clockwork.views'] - ); - } - - return $this; - } - - // Start listening to events - public function listenToEvents() - { - $this->frameworkDataSource()->listenToEvents(); - - if ($this->isFeatureEnabled('cache')) $this->app['clockwork.cache']->listenToEvents(); - if ($this->isFeatureEnabled('database')) $this->app['clockwork.eloquent']->listenToEvents(); - if ($this->isFeatureEnabled('events')) $this->app['clockwork.events']->listenToEvents(); - if ($this->isFeatureEnabled('notifications')) { - $this->isFeatureAvailable('notifications-events') - ? $this->app['clockwork.notifications']->listenToEvents() : $this->app['clockwork.swift']->listenToEvents(); - } - if ($this->isFeatureEnabled('queue')) { - $this->app['clockwork.queue']->listenToEvents(); - $this->app['clockwork.queue']->setCurrentRequestId($this->app['clockwork.request']->id); - } - if ($this->isFeatureEnabled('redis')) { - $this->app[RedisManager::class]->enableEvents(); - $this->app['clockwork.redis']->listenToEvents(); - } - if ($this->isFeatureEnabled('views')) { - $this->getConfig('features.views.use_twig_profiler', false) - ? $this->app['clockwork.twig']->listenToEvents() : $this->app['clockwork.views']->listenToEvents(); - } - - if ($this->isCollectingCommands()) $this->collectCommands(); - if ($this->isCollectingQueueJobs()) $this->collectQueueJobs(); - - return $this; - } - - // Resolves the framework data source from the container - protected function frameworkDataSource() - { - return $this->app['clockwork.laravel']; - } - - public function handleOctaneEvents() - { - $this->app['events']->listen(\Laravel\Octane\Events\RequestReceived::class, function ($event) { - $this->app = $event->sandbox; - $this->incomingRequest = null; - - $this->app->forgetInstance('clockwork.request'); - $request = $this->app->make('clockwork.request')->override('requestTime', microtime(true)); - - $this->app['clockwork']->reset()->request($request); - $this->app['clockwork.laravel']->setApplication($this->app); - }); - } - - // Make a storage instance based on the current configuration - public function makeStorage() - { - $expiration = $this->getConfig('storage_expiration'); - - if ($this->getConfig('storage', 'files') == 'sql') { - $database = $this->getConfig('storage_sql_database', storage_path('clockwork.sqlite')); - $table = $this->getConfig('storage_sql_table', 'clockwork'); - - if ($this->app['config']->get("database.connections.{$database}")) { - $database = $this->app['db']->connection($database)->getPdo(); - } else { - $database = "sqlite:{$database}"; - } - - return new SqlStorage($database, $table, null, null, $expiration); - } else { - return new FileStorage( - $this->getConfig('storage_files_path', storage_path('clockwork')), - 0700, - $expiration, - $this->getConfig('storage_files_compress', false) - ); - } - } - - // Make an authenticator instance based on the current configuration - public function makeAuthenticator() - { - $authenticator = $this->getConfig('authentication'); - - if (is_string($authenticator)) { - return $this->app->make($authenticator); - } elseif ($authenticator) { - return new SimpleAuthenticator($this->getConfig('authentication_password')); - } else { - return new NullAuthenticator; - } - } - - // Set up collecting of executed artisan commands - public function collectCommands() - { - $this->app['events']->listen(\Illuminate\Console\Events\CommandStarting::class, function ($event) { - // only collect commands ran through artisan cli, other commands are recorded as part of respective request - if (basename(StackTrace::get()->last()->file) != 'artisan') return; - - if (! $this->getConfig('artisan.collect_output')) return; - if (! $event->command || $this->isCommandFiltered($event->command)) return; - - $event->output->setFormatter( - new Console\CapturingFormatter($event->output->getFormatter()) - ); - }); - - $this->app['events']->listen(\Illuminate\Console\Events\CommandFinished::class, function ($event) { - // only collect commands ran through artisan cli, other commands are recorded as part of respective request - if (basename(StackTrace::get()->last()->file) != 'artisan') return; - - if (! $event->command || $this->isCommandFiltered($event->command)) return; - - $command = $this->app->make(ConsoleKernel::class)->all()[$event->command]; - - $allArguments = $event->input->getArguments(); - $allOptions = $event->input->getOptions(); - - $defaultArguments = $command->getDefinition()->getArgumentDefaults(); - $defaultOptions = $command->getDefinition()->getOptionDefaults(); - - $this->app->make('clockwork') - ->resolveAsCommand( - $event->command, - $event->exitCode, - array_udiff_assoc($allArguments, $defaultArguments, function ($a, $b) { return $a == $b ? 0 : 1; }), - array_udiff_assoc($allOptions, $defaultOptions, function ($a, $b) { return $a == $b ? 0 : 1; }), - $defaultArguments, - $defaultOptions, - $this->getConfig('artisan.collect_output') ? $event->output->getFormatter()->capturedOutput() : null - ) - ->storeRequest(); - }); - } - - // Set up collecting of executed queue jobs - public function collectQueueJobs() - { - $this->app['events']->listen(\Illuminate\Queue\Events\JobProcessing::class, function ($event) { - // sync jobs are recorded as part of the parent request - if ($event->job instanceof \Illuminate\Queue\Jobs\SyncJob) return; - - $payload = $event->job->payload(); - - if (! isset($payload['clockwork_id']) || $this->isQueueJobFiltered($payload['displayName'])) return; - - $request = new Request([ 'id' => $payload['clockwork_id'] ]); - if (isset($payload['clockwork_parent_id'])) $request->setParent($payload['clockwork_parent_id']); - - $this->app->make('clockwork')->reset()->request($request); - - $this->app['clockwork.queue']->setCurrentRequestId($request->id); - }); - - $this->app['events']->listen(\Illuminate\Queue\Events\JobProcessed::class, function ($event) { - $this->processQueueJob($event->job); - }); - - $this->app['events']->listen(\Illuminate\Queue\Events\JobFailed::class, function ($event) { - $this->processQueueJob($event->job, $event->exception); - }); - } - - // Process an executed queue job, resolves and records the current request - protected function processQueueJob($job, $exception = null) - { - // sync jobs are recorded as part of the parent request - if ($job instanceof \Illuminate\Queue\Jobs\SyncJob) return; - - $payload = $job->payload(); - - if (! isset($payload['clockwork_id'])) return; - - $unserialized = isset($payload['data']['command']) ? unserialize($payload['data']['command']) : null; - - if (! $unserialized || $this->isQueueJobFiltered(get_class($unserialized))) return; - - if ($exception) { - $this->app->make('clockwork')->error($exception->getMessage(), [ 'exception' => $exception ]); - } - - $this->app->make('clockwork') - ->resolveAsQueueJob( - get_class($unserialized), - $payload['displayName'], - $job->hasFailed() ? 'failed' : ($job->isReleased() ? 'released' : 'done'), - $unserialized, - $job->getQueue(), - $job->getConnectionName(), - array_filter([ - 'maxTries' => isset($payload['maxTries']) ? $payload['maxTries'] : null, - 'delaySeconds' => isset($payload['delaySeconds']) ? $payload['delaySeconds'] : null, - 'timeout' => isset($payload['timeout']) ? $payload['timeout'] : null, - 'timeoutAt' => isset($payload['timeoutAt']) ? $payload['timeoutAt'] : null - ]) - ) - ->storeRequest(); - } - - // Process an executed http request, resolves the current request, sets Clockwork headers and cookies - public function processRequest($request, $response) - { - if (! $this->isCollectingRequests()) { - return $response; // Clockwork is not collecting data, additional check when the middleware is enabled manually - } - - $clockwork = $this->app['clockwork']; - $clockworkRequest = $clockwork->request(); - - $clockwork->event('Controller')->end(); - - $this->setResponse($response); - - $clockwork->resolveRequest(); - - if (! $this->isEnabled() || ! $this->isRecording($clockworkRequest)) { - return $response; // Clockwork is disabled or we are not recording this request - } - - $response->headers->set('X-Clockwork-Id', $clockworkRequest->id, true); - $response->headers->set('X-Clockwork-Version', Clockwork::VERSION, true); - - if ($request->getBasePath()) { - $response->headers->set('X-Clockwork-Path', $request->getBasePath() . '/__clockwork/', true); - } - - foreach ($this->getConfig('headers', []) as $headerName => $headerValue) { - $response->headers->set("X-Clockwork-Header-{$headerName}", $headerValue); - } - - foreach ($clockwork->request()->subrequests as $subrequest) { - $url = urlencode($subrequest['url']); - $path = urlencode($subrequest['path']); - - $response->headers->set('X-Clockwork-Subrequest', "{$subrequest['id']};{$url};{$path}", false); - } - - $this->appendServerTimingHeader($response, $clockworkRequest); - - if (! ($response instanceof Response)) { - return $response; - } - - if ($this->isCollectingClientMetrics() || $this->isToolbarEnabled()) { - $clockworkBrowser = [ - 'requestId' => $clockworkRequest->id, - 'version' => Clockwork::VERSION, - 'path' => $request->getBasePath() . '/__clockwork/', - 'webPath' => $this->webPaths()[0] . '/app', - 'token' => $clockworkRequest->updateToken, - 'metrics' => $this->isCollectingClientMetrics(), - 'toolbar' => $this->isToolbarEnabled() - ]; - - $response->cookie( - new Cookie('x-clockwork', json_encode($clockworkBrowser), time() + 60, null, null, null, false) - ); - } - - return $response; - } - - // Records the current http request - public function recordRequest() - { - if (! $this->isCollectingRequests()) { - return; // Clockwork is not collecting data, additional check when the middleware is enabled manually - } - - $clockwork = $this->app['clockwork']; - - if (! $this->isRecording($clockwork->request())) { - return; // Collecting data is disabled, return immediately - } - - $clockwork->storeRequest(); - } - - // Set current http response on the framework data source - protected function setResponse($response) - { - $this->app['clockwork.laravel']->setResponse($response); - } - - // Configure serializer defaults - public function configureSerializer() - { - Serializer::defaults([ - 'limit' => $this->getConfig('serialization_depth'), - 'blackbox' => $this->getConfig('serialization_blackbox'), - 'traces' => $this->getConfig('stack_traces.enabled', true), - 'tracesSkip' => StackFilter::make() - ->isNotVendor(array_merge( - $this->getConfig('stack_traces.skip_vendors', []), - [ 'itsgoingd', 'laravel', 'illuminate' ] - )) - ->isNotNamespace($this->getConfig('stack_traces.skip_namespaces', [])) - ->isNotFunction([ 'call_user_func', 'call_user_func_array' ]) - ->isNotClass($this->getConfig('stack_traces.skip_classes', [])), - 'tracesLimit' => $this->getConfig('stack_traces.limit', 10) - ]); - - return $this; - } - - // Configure should collect rules - public function configureShouldCollect() - { - $this->app['clockwork']->shouldCollect([ - 'onDemand' => $this->getConfig('requests.on_demand', false), - 'sample' => $this->getConfig('requests.sample', false), - 'except' => $this->getConfig('requests.except', []), - 'only' => $this->getConfig('requests.only', []), - 'exceptPreflight' => $this->getConfig('requests.except_preflight', []) - ]); - - // don't collect data for Clockwork requests - $webPath = $this->webPaths()[0]; - $this->app['clockwork']->shouldCollect()->except([ '/__clockwork(?:/.*)?', "/{$webPath}(?:/.*)?" ]); - - return $this; - } - - // Configure should record rules - public function configureShouldRecord() - { - $this->app['clockwork']->shouldRecord([ - 'errorsOnly' => $this->getConfig('requests.errors_only', false), - 'slowOnly' => $this->getConfig('requests.slow_only', false) ? $this->getConfig('requests.slow_threshold') : false - ]); - - return $this; - } - - // Check whether Clockwork is enabled at all - public function isEnabled() - { - return $this->getConfig('enable') - || $this->getConfig('enable') === null && $this->app['config']->get('app.debug'); - } - - // Check whether we are collecting data - public function isCollectingData() - { - return $this->isCollectingCommands() - || $this->isCollectingQueueJobs() - || $this->isCollectingRequests() - || $this->isCollectingTests(); - } - - // Check whether we are collecting artisan commands - public function isCollectingCommands() - { - return ($this->isEnabled() || $this->getConfig('collect_data_always', false)) - && $this->app->runningInConsole() - && $this->getConfig('artisan.collect', false); - } - - // Check whether we are collecting queue jobs - public function isCollectingQueueJobs() - { - return ($this->isEnabled() || $this->getConfig('collect_data_always', false)) - && $this->app->runningInConsole() - && $this->getConfig('queue.collect', false); - } - - // Check whether we are collecting http requests - public function isCollectingRequests() - { - return ($this->isEnabled() || $this->getConfig('collect_data_always', false)) - && ! $this->app->runningInConsole() - && $this->app['clockwork']->shouldCollect()->filter($this->incomingRequest()); - } - - // Check whether we are collecting tests - public function isCollectingTests() - { - return ($this->isEnabled() || $this->getConfig('collect_data_always', false)) - && $this->app->runningInConsole() - && $this->getConfig('tests.collect', false); - } - - // Check whether we are recording the passed request - public function isRecording($incomingRequest) - { - return ($this->isEnabled() || $this->getConfig('collect_data_always', false)) - && $this->app['clockwork']->shouldRecord()->filter($incomingRequest); - } - - // Check whether a feature is enabled - public function isFeatureEnabled($feature) - { - return $this->getConfig("features.{$feature}.enabled") && $this->isFeatureAvailable($feature); - } - - // Check whether a feature is available - public function isFeatureAvailable($feature) - { - if ($feature == 'database') { - return $this->app['config']->get('database.default'); - } elseif ($feature == 'notifications-events') { - return class_exists(\Illuminate\Mail\Events\MessageSent::class) - && class_exists(\Illuminate\Notifications\Events\NotificationSent::class); - } elseif ($feature == 'redis') { - return method_exists(\Illuminate\Redis\RedisManager::class, 'enableEvents'); - } elseif ($feature == 'queue') { - return method_exists(\Illuminate\Queue\Queue::class, 'createPayloadUsing'); - } elseif ($feature == 'xdebug') { - return in_array('xdebug', get_loaded_extensions()); - } - - return true; - } - - // Check whether we are collecting client metrics - public function isCollectingClientMetrics() - { - return $this->getConfig('features.performance.client_metrics', true); - } - - // Check whether the toolbar is enabled - public function isToolbarEnabled() - { - return $this->getConfig('toolbar', false); - } - - // Check whether the web ui is enabled - public function isWebEnabled() - { - return $this->getConfig('web', true); - } - - // Check whether a command should not be collected - protected function isCommandFiltered($command) - { - $only = $this->getConfig('artisan.only', []); - - if (count($only)) return ! in_array($command, $only); - - $except = $this->getConfig('artisan.except', []); - - if ($this->getConfig('artisan.except_laravel_commands', true)) { - $except = array_merge($except, $this->builtinLaravelCommands()); - } - - $except = array_merge($except, $this->builtinClockworkCommands()); - - return in_array($command, $except); - } - - // Check whether a queue job should not be collected - protected function isQueueJobFiltered($queueJob) - { - $only = $this->getConfig('queue.only', []); - - if (count($only)) return ! in_array($queueJob, $only); - - $except = $this->getConfig('queue.except', []); - - return in_array($queueJob, $except); - } - - // Check whether a test should not be collected - public function isTestFiltered($test) - { - $except = $this->getConfig('tests.except', []); - - return in_array($test, $except); - } - - // Append server timing headers from a Clockwork request to a http response - protected function appendServerTimingHeader($response, $request) - { - if (($eventsCount = $this->getConfig('server_timing', 10)) !== false) { - $response->headers->set('Server-Timing', ServerTiming::fromRequest($request, $eventsCount)->value()); - } - } - - // Make an incoming request instance - protected function incomingRequest() - { - if ($this->incomingRequest) return $this->incomingRequest; - - return $this->incomingRequest = new IncomingRequest([ - 'method' => $this->app['request']->getMethod(), - 'uri' => $this->app['request']->getRequestUri(), - 'input' => $this->app['request']->input(), - 'cookies' => $this->app['request']->cookie() - ]); - } - - // Return an array of web ui paths - public function webPaths() - { - $path = $this->getConfig('web', true); - - if (is_string($path)) return collect([ trim($path, '/') ]); - - return collect([ 'clockwork', '__clockwork' ]); - } - - // Return an array of built-in Laravel commands - protected function builtinLaravelCommands() - { - return [ - 'clear-compiled', 'down', 'dump-server', 'env', 'help', 'list', 'migrate', 'optimize', 'preset', 'serve', - 'tinker', 'up', - 'app:name', - 'auth:clear-resets', - 'cache:clear', 'cache:forget', 'cache:table', - 'config:cache', 'config:clear', - 'db:seed', - 'event:cache', 'event:clear', 'event:generate', 'event:list', - 'key:generate', - 'make:auth', 'make:channel', 'make:command', 'make:controller', 'make:event', 'make:exception', - 'make:factory', 'make:job', 'make:listener', 'make:mail', 'make:middleware', 'make:migration', 'make:model', - 'make:notification', 'make:observer', 'make:policy', 'make:provider', 'make:request', 'make:resource', - 'make:rule', 'make:seeder', 'make:test', - 'migrate:fresh', 'migrate:install', 'migrate:refresh', 'migrate:reset', 'migrate:rollback', - 'migrate:status', - 'notifications:table', - 'octane:install', 'octane:reload', 'octane:start', 'octane:status', 'octane:stop', - 'optimize:clear', - 'package:discover', - 'queue:failed', 'queue:failed-table', 'queue:flush', 'queue:forget', 'queue:listen', 'queue:restart', - 'queue:retry', 'queue:table', 'queue:work', - 'route:cache', 'route:clear', 'route:list', - 'schedule:run', - 'session:table', - 'storage:link', - 'vendor:publish', - 'view:cache', 'view:clear' - ]; - } - - // Return an array of built-in Clockwork commands - protected function builtinClockworkCommands() - { - return [ - 'clockwork:clean' - ]; - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Laravel/Console/CapturingFormatter.php b/source/vendor/itsgoingd/clockwork/Clockwork/Support/Laravel/Console/CapturingFormatter.php deleted file mode 100644 index a55c8ea..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Laravel/Console/CapturingFormatter.php +++ /dev/null @@ -1,70 +0,0 @@ -formatter = $formatter; - } - - public function capturedOutput() - { - $capturedOutput = $this->capturedOutput; - - $this->capturedOutput = null; - - return $capturedOutput; - } - - public function setDecorated($decorated) - { - return $this->formatter->setDecorated($decorated); - } - - public function isDecorated() - { - return $this->formatter->isDecorated(); - } - - public function setStyle($name, OutputFormatterStyleInterface $style) - { - return $this->formatter->setStyle($name, $style); - } - - public function hasStyle($name) - { - return $this->formatter->hasStyle($name); - } - - public function getStyle($name) - { - return $this->formatter->getStyle($name); - } - - public function format($message) - { - $formatted = $this->formatter->format($message); - - $this->capturedOutput .= $formatted; - - return $formatted; - } - - public function __call($method, $args) - { - return $this->formatter->$method(...$args); - } - - public function __clone() - { - $this->formatter = clone $this->formatter; - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Laravel/Eloquent/ResolveModelLegacyScope.php b/source/vendor/itsgoingd/clockwork/Clockwork/Support/Laravel/Eloquent/ResolveModelLegacyScope.php deleted file mode 100644 index 19fc061..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Laravel/Eloquent/ResolveModelLegacyScope.php +++ /dev/null @@ -1,27 +0,0 @@ -dataSource = $dataSource; - } - - public function apply(Builder $builder, Model $model) - { - $this->dataSource->nextQueryModel = get_class($model); - } - - public function remove(Builder $builder, Model $model) - { - // nothing to do here - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Laravel/Eloquent/ResolveModelScope.php b/source/vendor/itsgoingd/clockwork/Clockwork/Support/Laravel/Eloquent/ResolveModelScope.php deleted file mode 100644 index 67b9c4e..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Laravel/Eloquent/ResolveModelScope.php +++ /dev/null @@ -1,22 +0,0 @@ -dataSource = $dataSource; - } - - public function apply(Builder $builder, Model $model) - { - $this->dataSource->nextQueryModel = get_class($model); - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Laravel/Facade.php b/source/vendor/itsgoingd/clockwork/Clockwork/Support/Laravel/Facade.php deleted file mode 100644 index e587671..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Laravel/Facade.php +++ /dev/null @@ -1,9 +0,0 @@ - [] - ]; - - // Set up Clockwork in this test case, should be called from the PHPUnit setUp method - protected function setUpClockwork() - { - $this->beforeApplicationDestroyed(function () { - if ($this->app->make('clockwork.support')->isTestFiltered($this->toString())) return; - - $this->app->make('clockwork') - ->resolveAsTest( - $this->toString(), - $this->resolveClockworkStatus(), - $this->getStatusMessage(), - $this->resolveClockworkAsserts() - ) - ->storeRequest(); - }); - } - - // Resolve Clockwork test status - protected function resolveClockworkStatus() - { - $status = $this->getStatus(); - - $statuses = [ - BaseTestRunner::STATUS_UNKNOWN => 'unknown', - BaseTestRunner::STATUS_PASSED => 'passed', - BaseTestRunner::STATUS_SKIPPED => 'skipped', - BaseTestRunner::STATUS_INCOMPLETE => 'incomplete', - BaseTestRunner::STATUS_FAILURE => 'failed', - BaseTestRunner::STATUS_ERROR => 'error', - BaseTestRunner::STATUS_RISKY => 'passed', - BaseTestRunner::STATUS_WARNING => 'warning' - ]; - - return isset($statuses[$status]) ? $statuses[$status] : null; - } - - // Resolve executed asserts - protected function resolveClockworkAsserts() - { - $asserts = static::$clockwork['asserts']; - - if ($this->getStatus() == BaseTestRunner::STATUS_FAILURE) { - $asserts[count($asserts) - 1]['passed'] = false; - } - - static::$clockwork['asserts'] = []; - - return $asserts; - } - - // Overload the main PHPUnit assert method to collect executed asserts - public static function assertThat($value, Constraint $constraint, string $message = ''): void - { - $trace = StackTrace::get([ 'arguments' => true, 'limit' => 10 ]); - - $assertFrame = $trace->filter(function ($frame) { return strpos($frame->function, 'assert') === 0; })->last(); - $trace = $trace->skip(StackFilter::make()->isNotVendor([ 'itsgoingd', 'phpunit' ]))->limit(3); - - static::$clockwork['asserts'][] = [ - 'name' => $assertFrame->function, - 'arguments' => $assertFrame->args, - 'trace' => (new Serializer)->trace($trace), - 'passed' => true - ]; - - parent::assertThat($value, $constraint, $message); - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Laravel/config/clockwork.php b/source/vendor/itsgoingd/clockwork/Clockwork/Support/Laravel/config/clockwork.php deleted file mode 100644 index c48e3b0..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Laravel/config/clockwork.php +++ /dev/null @@ -1,416 +0,0 @@ - env('CLOCKWORK_ENABLE', null), - - /* - |------------------------------------------------------------------------------------------------------------------ - | Features - |------------------------------------------------------------------------------------------------------------------ - | - | You can enable or disable various Clockwork features here. Some features have additional settings (eg. slow query - | threshold for database queries). - | - */ - - 'features' => [ - - // Cache usage stats and cache queries including results - 'cache' => [ - 'enabled' => env('CLOCKWORK_CACHE_ENABLED', true), - - // Collect cache queries - 'collect_queries' => env('CLOCKWORK_CACHE_QUERIES', true), - - // Collect values from cache queries (high performance impact with a very high number of queries) - 'collect_values' => env('CLOCKWORK_CACHE_COLLECT_VALUES', false) - ], - - // Database usage stats and queries - 'database' => [ - 'enabled' => env('CLOCKWORK_DATABASE_ENABLED', true), - - // Collect database queries (high performance impact with a very high number of queries) - 'collect_queries' => env('CLOCKWORK_DATABASE_COLLECT_QUERIES', true), - - // Collect details of models updates (high performance impact with a lot of model updates) - 'collect_models_actions' => env('CLOCKWORK_DATABASE_COLLECT_MODELS_ACTIONS', true), - - // Collect details of retrieved models (very high performance impact with a lot of models retrieved) - 'collect_models_retrieved' => env('CLOCKWORK_DATABASE_COLLECT_MODELS_RETRIEVED', false), - - // Query execution time threshold in miliseconds after which the query will be marked as slow - 'slow_threshold' => env('CLOCKWORK_DATABASE_SLOW_THRESHOLD'), - - // Collect only slow database queries - 'slow_only' => env('CLOCKWORK_DATABASE_SLOW_ONLY', false), - - // Detect and report duplicate (N+1) queries - 'detect_duplicate_queries' => env('CLOCKWORK_DATABASE_DETECT_DUPLICATE_QUERIES', false) - ], - - // Dispatched events - 'events' => [ - 'enabled' => env('CLOCKWORK_EVENTS_ENABLED', true), - - // Ignored events (framework events are ignored by default) - 'ignored_events' => [ - // App\Events\UserRegistered::class, - // 'user.registered' - ], - ], - - // Laravel log (you can still log directly to Clockwork with laravel log disabled) - 'log' => [ - 'enabled' => env('CLOCKWORK_LOG_ENABLED', true) - ], - - // Sent notifications - 'notifications' => [ - 'enabled' => env('CLOCKWORK_NOTIFICATIONS_ENABLED', true), - ], - - // Performance metrics - 'performance' => [ - // Allow collecting of client metrics. Requires separate clockwork-browser npm package. - 'client_metrics' => env('CLOCKWORK_PERFORMANCE_CLIENT_METRICS', true) - ], - - // Dispatched queue jobs - 'queue' => [ - 'enabled' => env('CLOCKWORK_QUEUE_ENABLED', true) - ], - - // Redis commands - 'redis' => [ - 'enabled' => env('CLOCKWORK_REDIS_ENABLED', true) - ], - - // Routes list - 'routes' => [ - 'enabled' => env('CLOCKWORK_ROUTES_ENABLED', false), - - // Collect only routes from particular namespaces (only application routes by default) - 'only_namespaces' => [ 'App' ] - ], - - // Rendered views - 'views' => [ - 'enabled' => env('CLOCKWORK_VIEWS_ENABLED', true), - - // Collect views including view data (high performance impact with a high number of views) - 'collect_data' => env('CLOCKWORK_VIEWS_COLLECT_DATA', false), - - // Use Twig profiler instead of Laravel events for apps using laravel-twigbridge (more precise, but does - // not support collecting view data) - 'use_twig_profiler' => env('CLOCKWORK_VIEWS_USE_TWIG_PROFILER', false) - ] - - ], - - /* - |------------------------------------------------------------------------------------------------------------------ - | Enable web UI - |------------------------------------------------------------------------------------------------------------------ - | - | Clockwork comes with a web UI accessibla via http://your.app/clockwork. Here you can enable or disable this - | feature. You can also set a custom path for the web UI. - | - */ - - 'web' => env('CLOCKWORK_WEB', true), - - /* - |------------------------------------------------------------------------------------------------------------------ - | Enable toolbar - |------------------------------------------------------------------------------------------------------------------ - | - | Clockwork can show a toolbar with basic metrics on all responses. Here you can enable or disable this feature. - | Requires a separate clockwork-browser npm library. - | For installation instructions see https://underground.works/clockwork/#docs-viewing-data - | - */ - - 'toolbar' => env('CLOCKWORK_TOOLBAR', true), - - /* - |------------------------------------------------------------------------------------------------------------------ - | HTTP requests collection - |------------------------------------------------------------------------------------------------------------------ - | - | Clockwork collects data about HTTP requests to your app. Here you can choose which requests should be collected. - | - */ - - 'requests' => [ - // With on-demand mode enabled, Clockwork will only profile requests when the browser extension is open or you - // manually pass a "clockwork-profile" cookie or get/post data key. - // Optionally you can specify a "secret" that has to be passed as the value to enable profiling. - 'on_demand' => env('CLOCKWORK_REQUESTS_ON_DEMAND', false), - - // Collect only errors (requests with HTTP 4xx and 5xx responses) - 'errors_only' => env('CLOCKWORK_REQUESTS_ERRORS_ONLY', false), - - // Response time threshold in miliseconds after which the request will be marked as slow - 'slow_threshold' => env('CLOCKWORK_REQUESTS_SLOW_THRESHOLD'), - - // Collect only slow requests - 'slow_only' => env('CLOCKWORK_REQUESTS_SLOW_ONLY', false), - - // Sample the collected requests (eg. set to 100 to collect only 1 in 100 requests) - 'sample' => env('CLOCKWORK_REQUESTS_SAMPLE', false), - - // List of URIs that should not be collected - 'except' => [ - '/horizon/.*', // Laravel Horizon requests - '/telescope/.*', // Laravel Telescope requests - '/_debugbar/.*', // Laravel DebugBar requests - ], - - // List of URIs that should be collected, any other URI will not be collected if not empty - 'only' => [ - // '/api/.*' - ], - - // Don't collect OPTIONS requests, mostly used in the CSRF pre-flight requests and are rarely of interest - 'except_preflight' => env('CLOCKWORK_REQUESTS_EXCEPT_PREFLIGHT', true) - ], - - /* - |------------------------------------------------------------------------------------------------------------------ - | Artisan commands collection - |------------------------------------------------------------------------------------------------------------------ - | - | Clockwork can collect data about executed artisan commands. Here you can enable and configure which commands - | should be collected. - | - */ - - 'artisan' => [ - // Enable or disable collection of executed Artisan commands - 'collect' => env('CLOCKWORK_ARTISAN_COLLECT', false), - - // List of commands that should not be collected (built-in commands are not collected by default) - 'except' => [ - // 'inspire' - ], - - // List of commands that should be collected, any other command will not be collected if not empty - 'only' => [ - // 'inspire' - ], - - // Enable or disable collection of command output - 'collect_output' => env('CLOCKWORK_ARTISAN_COLLECT_OUTPUT', false), - - // Enable or disable collection of built-in Laravel commands - 'except_laravel_commands' => env('CLOCKWORK_ARTISAN_EXCEPT_LARAVEL_COMMANDS', true) - ], - - /* - |------------------------------------------------------------------------------------------------------------------ - | Queue jobs collection - |------------------------------------------------------------------------------------------------------------------ - | - | Clockwork can collect data about executed queue jobs. Here you can enable and configure which queue jobs should - | be collected. - | - */ - - 'queue' => [ - // Enable or disable collection of executed queue jobs - 'collect' => env('CLOCKWORK_QUEUE_COLLECT', false), - - // List of queue jobs that should not be collected - 'except' => [ - // App\Jobs\ExpensiveJob::class - ], - - // List of queue jobs that should be collected, any other queue job will not be collected if not empty - 'only' => [ - // App\Jobs\BuggyJob::class - ] - ], - - /* - |------------------------------------------------------------------------------------------------------------------ - | Tests collection - |------------------------------------------------------------------------------------------------------------------ - | - | Clockwork can collect data about executed tests. Here you can enable and configure which tests should be - | collected. - | - */ - - 'tests' => [ - // Enable or disable collection of ran tests - 'collect' => env('CLOCKWORK_TESTS_COLLECT', false), - - // List of tests that should not be collected - 'except' => [ - // Tests\Unit\ExampleTest::class - ] - ], - - /* - |------------------------------------------------------------------------------------------------------------------ - | Enable data collection when Clockwork is disabled - |------------------------------------------------------------------------------------------------------------------ - | - | You can enable this setting to collect data even when Clockwork is disabled. Eg. for future analysis. - | - */ - - 'collect_data_always' => env('CLOCKWORK_COLLECT_DATA_ALWAYS', false), - - /* - |------------------------------------------------------------------------------------------------------------------ - | Metadata storage - |------------------------------------------------------------------------------------------------------------------ - | - | Configure how is the metadata collected by Clockwork stored. Two options are available: - | - files - A simple fast storage implementation storing data in one-per-request files. - | - sql - Stores requests in a sql database. Supports MySQL, Postgresql, Sqlite and requires PDO. - | - */ - - 'storage' => env('CLOCKWORK_STORAGE', 'files'), - - // Path where the Clockwork metadata is stored - 'storage_files_path' => env('CLOCKWORK_STORAGE_FILES_PATH', storage_path('clockwork')), - - // Compress the metadata files using gzip, trading a little bit of performance for lower disk usage - 'storage_files_compress' => env('CLOCKWORK_STORAGE_FILES_COMPRESS', false), - - // SQL database to use, can be a name of database configured in database.php or a path to a sqlite file - 'storage_sql_database' => env('CLOCKWORK_STORAGE_SQL_DATABASE', storage_path('clockwork.sqlite')), - - // SQL table name to use, the table is automatically created and udpated when needed - 'storage_sql_table' => env('CLOCKWORK_STORAGE_SQL_TABLE', 'clockwork'), - - // Maximum lifetime of collected metadata in minutes, older requests will automatically be deleted, false to disable - 'storage_expiration' => env('CLOCKWORK_STORAGE_EXPIRATION', 60 * 24 * 7), - - /* - |------------------------------------------------------------------------------------------------------------------ - | Authentication - |------------------------------------------------------------------------------------------------------------------ - | - | Clockwork can be configured to require authentication before allowing access to the collected data. This might be - | useful when the application is publicly accessible. Setting to true will enable a simple authentication with a - | pre-configured password. You can also pass a class name of a custom implementation. - | - */ - - 'authentication' => env('CLOCKWORK_AUTHENTICATION', false), - - // Password for the simple authentication - 'authentication_password' => env('CLOCKWORK_AUTHENTICATION_PASSWORD', 'VerySecretPassword'), - - /* - |------------------------------------------------------------------------------------------------------------------ - | Stack traces collection - |------------------------------------------------------------------------------------------------------------------ - | - | Clockwork can collect stack traces for log messages and certain data like database queries. Here you can set - | whether to collect stack traces, limit the number of collected frames and set further configuration. Collecting - | long stack traces considerably increases metadata size. - | - */ - - 'stack_traces' => [ - // Enable or disable collecting of stack traces - 'enabled' => env('CLOCKWORK_STACK_TRACES_ENABLED', true), - - // Limit the number of frames to be collected - 'limit' => env('CLOCKWORK_STACK_TRACES_LIMIT', 10), - - // List of vendor names to skip when determining caller, common vendors are automatically added - 'skip_vendors' => [ - // 'phpunit' - ], - - // List of namespaces to skip when determining caller - 'skip_namespaces' => [ - // 'Laravel' - ], - - // List of class names to skip when determining caller - 'skip_classes' => [ - // App\CustomLog::class - ] - - ], - - /* - |------------------------------------------------------------------------------------------------------------------ - | Serialization - |------------------------------------------------------------------------------------------------------------------ - | - | Clockwork serializes the collected data to json for storage and transfer. Here you can configure certain aspects - | of serialization. Serialization has a large effect on the cpu time and memory usage. - | - */ - - // Maximum depth of serialized multi-level arrays and objects - 'serialization_depth' => env('CLOCKWORK_SERIALIZATION_DEPTH', 10), - - // A list of classes that will never be serialized (eg. a common service container class) - 'serialization_blackbox' => [ - \Illuminate\Container\Container::class, - \Illuminate\Foundation\Application::class, - \Laravel\Lumen\Application::class - ], - - /* - |------------------------------------------------------------------------------------------------------------------ - | Register helpers - |------------------------------------------------------------------------------------------------------------------ - | - | Clockwork comes with a "clock" global helper function. You can use this helper to quickly log something and to - | access the Clockwork instance. - | - */ - - 'register_helpers' => env('CLOCKWORK_REGISTER_HELPERS', true), - - /* - |------------------------------------------------------------------------------------------------------------------ - | Send Headers for AJAX request - |------------------------------------------------------------------------------------------------------------------ - | - | When trying to collect data the AJAX method can sometimes fail if it is missing required headers. For example, an - | API might require a version number using Accept headers to route the HTTP request to the correct codebase. - | - */ - - 'headers' => [ - // 'Accept' => 'application/vnd.com.whatever.v1+json', - ], - - /* - |------------------------------------------------------------------------------------------------------------------ - | Server-Timing - |------------------------------------------------------------------------------------------------------------------ - | - | Clockwork supports the W3C Server Timing specification, which allows for collecting a simple performance metrics - | in a cross-browser way. Eg. in Chrome, your app, database and timeline event timings will be shown in the Dev - | Tools network tab. This setting specifies the max number of timeline events that will be sent. Setting to false - | will disable the feature. - | - */ - - 'server_timing' => env('CLOCKWORK_SERVER_TIMING', 10) - -]; diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Laravel/helpers.php b/source/vendor/itsgoingd/clockwork/Clockwork/Support/Laravel/helpers.php deleted file mode 100644 index 405581d..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Laravel/helpers.php +++ /dev/null @@ -1,17 +0,0 @@ -debug($argument); - } - - return reset($arguments); - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Lumen/ClockworkMiddleware.php b/source/vendor/itsgoingd/clockwork/Clockwork/Support/Lumen/ClockworkMiddleware.php deleted file mode 100644 index 4826032..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Lumen/ClockworkMiddleware.php +++ /dev/null @@ -1,38 +0,0 @@ -app = $app; - } - - // Handle an incoming request - public function handle($request, \Closure $next) - { - $this->app['clockwork']->event('Controller')->begin(); - - try { - $response = $next($request); - } catch (\Exception $e) { - $this->app[ExceptionHandler::class]->report($e); - $response = $this->app[ExceptionHandler::class]->render($request, $e); - } - - return $this->app['clockwork.support']->processRequest($request, $response); - } - - // Record the current request after a response is sent - public function terminate() - { - $this->app['clockwork.support']->recordRequest(); - } -} \ No newline at end of file diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Lumen/ClockworkServiceProvider.php b/source/vendor/itsgoingd/clockwork/Clockwork/Support/Lumen/ClockworkServiceProvider.php deleted file mode 100644 index d6524a0..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Lumen/ClockworkServiceProvider.php +++ /dev/null @@ -1,95 +0,0 @@ -app->configure('clockwork'); - $this->mergeConfigFrom(__DIR__ . '/../Laravel/config/clockwork.php', 'clockwork'); - } - - // Register Clockwork components - protected function registerClockwork() - { - parent::registerClockwork(); - - $this->app->singleton('clockwork.support', function ($app) { - return new ClockworkSupport($app); - }); - - if ($this->isRunningWithFacades() && ! class_exists('Clockwork')) { - class_alias(\Clockwork\Support\Laravel\Facade::class, 'Clockwork'); - } - } - - // Register Clockwork data sources - protected function registerDataSources() - { - parent::registerDataSources(); - - $this->app->singleton('clockwork.lumen', function ($app) { - return (new LumenDataSource( - $app, - $app['clockwork.support']->isFeatureEnabled('log'), - $app['clockwork.support']->isFeatureEnabled('views'), - $app['clockwork.support']->isFeatureEnabled('routes') - )); - }); - } - - // Register Clockwork components aliases for type hinting - protected function registerAliases() - { - parent::registerAliases(); - - $this->app->alias('clockwork.lumen', LumenDataSource::class); - } - - // Register event listeners - protected function registerEventListeners() - { - $this->app['clockwork.support']->addDataSources()->listenToEvents(); - } - - // Register Clockwork middleware - public function registerMiddleware() - { - $this->app->middleware([ ClockworkMiddleware::class ]); - } - - // Register Clockwork REST api routes - public function registerRoutes() - { - $router = isset($this->app->router) ? $this->app->router : $this->app; - - $router->get('/__clockwork/{id:(?:[0-9-]+|latest)}/extended', 'Clockwork\Support\Lumen\Controller@getExtendedData'); - $router->get('/__clockwork/{id:(?:[0-9-]+|latest)}[/{direction:(?:next|previous)}[/{count:\d+}]]', 'Clockwork\Support\Lumen\Controller@getData'); - $router->put('/__clockwork/{id}', 'Clockwork\Support\Lumen\Controller@updateData'); - $router->post('/__clockwork/auth', 'Clockwork\Support\Lumen\Controller@authenticate'); - } - - // Register Clockwork app routes - public function registerWebRoutes() - { - $router = isset($this->app->router) ? $this->app->router : $this->app; - - $this->app['clockwork.support']->webPaths()->each(function ($path) use ($router) { - $router->get("{$path}", 'Clockwork\Support\Lumen\Controller@webRedirect'); - $router->get("{$path}/app", 'Clockwork\Support\Lumen\Controller@webIndex'); - $router->get("{$path}/{path:.+}", 'Clockwork\Support\Lumen\Controller@webAsset'); - }); - } - - // Check whether we are running with facades enabled - protected function isRunningWithFacades() - { - return Facade::getFacadeApplication() !== null; - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Lumen/ClockworkSupport.php b/source/vendor/itsgoingd/clockwork/Clockwork/Support/Lumen/ClockworkSupport.php deleted file mode 100644 index f7311c2..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Lumen/ClockworkSupport.php +++ /dev/null @@ -1,65 +0,0 @@ -app = $app; - } - - // Resolves the framework data source from the container - protected function frameworkDataSource() - { - return $this->app['clockwork.lumen']; - } - - // Process an http request and response, resolves the request, sets Clockwork headers and cookies - public function process($request, $response) - { - if (! $response instanceof Response) { - $response = new Response((string) $response); - } - - return parent::process($request, $response); - } - - // Set response on the framework data source - protected function setResponse($response) - { - $this->app['clockwork.lumen']->setResponse($response); - } - - // Check whether Clockwork is enabled - public function isEnabled() - { - return $this->getConfig('enable') - || $this->getConfig('enable') === null && env('APP_DEBUG', false); - } - - // Check whether a particular feature is available - public function isFeatureAvailable($feature) - { - if ($feature == 'database') { - return $this->app->bound('db') && $this->app['config']->get('database.default'); - } elseif ($feature == 'emails') { - return $this->app->bound('mailer'); - } elseif ($feature == 'redis') { - return $this->app->bound('redis') && method_exists(\Illuminate\Redis\RedisManager::class, 'enableEvents'); - } elseif ($feature == 'queue') { - return $this->app->bound('queue') && method_exists(\Illuminate\Queue\Queue::class, 'createPayloadUsing'); - } elseif ($feature == 'xdebug') { - return in_array('xdebug', get_loaded_extensions()); - } - - return true; - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Lumen/Controller.php b/source/vendor/itsgoingd/clockwork/Clockwork/Support/Lumen/Controller.php deleted file mode 100644 index 36ee4e1..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Lumen/Controller.php +++ /dev/null @@ -1,96 +0,0 @@ -clockwork = $clockwork; - $this->clockworkSupport = $clockworkSupport; - } - - // Authantication endpoint - public function authenticate(Request $request) - { - $this->ensureClockworkIsEnabled(); - - $token = $this->clockwork->authenticator()->attempt( - $request->only([ 'username', 'password' ]) - ); - - return new JsonResponse([ 'token' => $token ], $token ? 200 : 403); - } - - // Metadata retrieving endpoint - public function getData(Request $request, $id = null, $direction = null, $count = null) - { - $this->ensureClockworkIsEnabled(); - - return $this->clockworkSupport->getData( - $id, $direction, $count, $request->only([ 'only', 'except' ]) - ); - } - - // Extended metadata retrieving endpoint - public function getExtendedData(Request $request, $id = null) - { - $this->ensureClockworkIsEnabled(); - - return $this->clockworkSupport->getExtendedData( - $id, $request->only([ 'only', 'except' ]) - ); - } - - // Metadata updating endpoint - public function updateData(Request $request, $id = null) - { - $this->ensureClockworkIsEnabled(); - - return $this->clockworkSupport->updateData($id, $request->json()->all()); - } - - // App index - public function webIndex(Request $request) - { - $this->ensureClockworkIsEnabled(); - - return $this->clockworkSupport->getWebAsset('index.html'); - } - - // App assets serving - public function webAsset($path) - { - $this->ensureClockworkIsEnabled(); - - return $this->clockworkSupport->getWebAsset($path); - } - - // App redirect (/clockwork -> /clockwork/app) - public function webRedirect(Request $request) - { - $this->ensureClockworkIsEnabled(); - - return new RedirectResponse($request->path() . '/app'); - } - - // Ensure Clockwork is still enabled at this point and stop Telescope recording if present - protected function ensureClockworkIsEnabled() - { - if (class_exists(Telescope::class)) Telescope::stopRecording(); - - if (! $this->clockworkSupport->isEnabled()) abort(404); - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Monolog/Handler/ClockworkHandler.php b/source/vendor/itsgoingd/clockwork/Clockwork/Support/Monolog/Handler/ClockworkHandler.php deleted file mode 100644 index 0f144a1..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Monolog/Handler/ClockworkHandler.php +++ /dev/null @@ -1,24 +0,0 @@ -clockworkLog = $clockworkLog; - } - - protected function write(array $record) - { - $this->clockworkLog->log($record['level'], $record['message']); - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Slim/ClockworkMiddleware.php b/source/vendor/itsgoingd/clockwork/Clockwork/Support/Slim/ClockworkMiddleware.php deleted file mode 100644 index a14dbbf..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Slim/ClockworkMiddleware.php +++ /dev/null @@ -1,122 +0,0 @@ -app = $app; - $this->clockwork = $storagePathOrClockwork instanceof Clockwork - ? $storagePathOrClockwork : $this->createDefaultClockwork($storagePathOrClockwork); - $this->startTime = $startTime ?: microtime(true); - } - - public function __invoke(Request $request, RequestHandler $handler) - { - return $this->process($request, $handler); - } - - public function process(Request $request, RequestHandler $handler) - { - $authUri = '#/__clockwork/auth#'; - if (preg_match($authUri, $request->getUri()->getPath(), $matches)) { - return $this->authenticate($request); - } - - $clockworkDataUri = '#/__clockwork(?:/(?[0-9-]+))?(?:/(?(?:previous|next)))?(?:/(?\d+))?#'; - if (preg_match($clockworkDataUri, $request->getUri()->getPath(), $matches)) { - $matches = array_merge([ 'id' => null, 'direction' => null, 'count' => null ], $matches); - return $this->retrieveRequest($request, $matches['id'], $matches['direction'], $matches['count']); - } - - $response = $handler->handle($request); - - return $this->logRequest($request, $response); - } - - protected function authenticate(Request $request) - { - $token = $this->clockwork->authenticator()->attempt($request->getParsedBody()); - - return $this->jsonResponse([ 'token' => $token ], $token ? 200 : 403); - } - - protected function retrieveRequest(Request $request, $id, $direction, $count) - { - $authenticator = $this->clockwork->authenticator(); - $storage = $this->clockwork->storage(); - - $authenticated = $authenticator->check(current($request->getHeader('X-Clockwork-Auth'))); - - if ($authenticated !== true) { - return $this->jsonResponse([ 'message' => $authenticated, 'requires' => $authenticator->requires() ], 403); - } - - if ($direction == 'previous') { - $data = $storage->previous($id, $count); - } elseif ($direction == 'next') { - $data = $storage->next($id, $count); - } elseif ($id == 'latest') { - $data = $storage->latest(); - } else { - $data = $storage->find($id); - } - - return $this->jsonResponse($data); - } - - protected function logRequest(Request $request, $response) - { - $this->clockwork->timeline()->finalize($this->startTime); - $this->clockwork->addDataSource(new PsrMessageDataSource($request, $response)); - - $this->clockwork->resolveRequest(); - $this->clockwork->storeRequest(); - - $clockworkRequest = $this->clockwork->request(); - - $response = $response - ->withHeader('X-Clockwork-Id', $clockworkRequest->id) - ->withHeader('X-Clockwork-Version', Clockwork::VERSION); - - if ($basePath = $this->app->getBasePath()) { - $response = $response->withHeader('X-Clockwork-Path', $basePath); - } - - return $response->withHeader('Server-Timing', ServerTiming::fromRequest($clockworkRequest)->value()); - } - - protected function createDefaultClockwork($storagePath) - { - $clockwork = new Clockwork(); - - $clockwork->storage(new FileStorage($storagePath)); - $clockwork->authenticator(new NullAuthenticator); - - return $clockwork; - } - - protected function jsonResponse($data, $status = 200) - { - $response = $this->app->getResponseFactory() - ->createResponse($status) - ->withHeader('Content-Type', 'application/json'); - - $response->getBody()->write(json_encode($data)); - - return $response; - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Slim/Legacy/ClockworkMiddleware.php b/source/vendor/itsgoingd/clockwork/Clockwork/Support/Slim/Legacy/ClockworkMiddleware.php deleted file mode 100644 index 5199396..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Slim/Legacy/ClockworkMiddleware.php +++ /dev/null @@ -1,113 +0,0 @@ -clockwork = $storagePathOrClockwork instanceof Clockwork - ? $storagePathOrClockwork : $this->createDefaultClockwork($storagePathOrClockwork); - $this->startTime = $startTime ?: microtime(true); - } - - public function __invoke(Request $request, Response $response, callable $next) - { - return $this->process($request, $response, $next); - } - - public function process(Request $request, Response $response, callable $next) - { - $authUri = '#/__clockwork/auth#'; - if (preg_match($authUri, $request->getUri()->getPath(), $matches)) { - return $this->authenticate($response, $request); - } - - $clockworkDataUri = '#/__clockwork(?:/(?[0-9-]+))?(?:/(?(?:previous|next)))?(?:/(?\d+))?#'; - if (preg_match($clockworkDataUri, $request->getUri()->getPath(), $matches)) { - $matches = array_merge([ 'id' => null, 'direction' => null, 'count' => null ], $matches); - return $this->retrieveRequest($response, $request, $matches['id'], $matches['direction'], $matches['count']); - } - - $response = $next($request, $response); - - return $this->logRequest($request, $response); - } - - protected function authenticate(Response $response, Request $request) - { - $token = $this->clockwork->authenticator()->attempt($request->getParsedBody()); - - return $response->withJson([ 'token' => $token ])->withStatus($token ? 200 : 403); - } - - protected function retrieveRequest(Response $response, Request $request, $id, $direction, $count) - { - $authenticator = $this->clockwork->authenticator(); - $storage = $this->clockwork->storage(); - - $authenticated = $authenticator->check(current($request->getHeader('X-Clockwork-Auth'))); - - if ($authenticated !== true) { - return $response - ->withJson([ 'message' => $authenticated, 'requires' => $authenticator->requires() ]) - ->withStatus(403); - } - - if ($direction == 'previous') { - $data = $storage->previous($id, $count); - } elseif ($direction == 'next') { - $data = $storage->next($id, $count); - } elseif ($id == 'latest') { - $data = $storage->latest(); - } else { - $data = $storage->find($id); - } - - return $response - ->withHeader('Content-Type', 'application/json') - ->withJson($data); - } - - protected function logRequest(Request $request, Response $response) - { - $this->clockwork->timeline()->finalize($this->startTime); - $this->clockwork->addDataSource(new PsrMessageDataSource($request, $response)); - - $this->clockwork->resolveRequest(); - $this->clockwork->storeRequest(); - - $clockworkRequest = $this->clockwork->request(); - - $response = $response - ->withHeader('X-Clockwork-Id', $clockworkRequest->id) - ->withHeader('X-Clockwork-Version', Clockwork::VERSION); - - if ($basePath = $request->getUri()->getBasePath()) { - $response = $response->withHeader('X-Clockwork-Path', $basePath); - } - - return $response->withHeader('Server-Timing', ServerTiming::fromRequest($clockworkRequest)->value()); - } - - protected function createDefaultClockwork($storagePath) - { - $clockwork = new Clockwork(); - - $clockwork->storage(new FileStorage($storagePath)); - $clockwork->authenticator(new NullAuthenticator); - - return $clockwork; - } -} \ No newline at end of file diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Slim/Old/ClockworkLogWriter.php b/source/vendor/itsgoingd/clockwork/Clockwork/Support/Slim/Old/ClockworkLogWriter.php deleted file mode 100644 index aa194ca..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Slim/Old/ClockworkLogWriter.php +++ /dev/null @@ -1,42 +0,0 @@ - 'emergency', - 2 => 'alert', - 3 => 'critical', - 4 => 'error', - 5 => 'warning', - 6 => 'notice', - 7 => 'info', - 8 => 'debug' - ]; - - public function __construct(Clockwork $clockwork, $originalLogWriter) - { - $this->clockwork = $clockwork; - $this->originalLogWriter = $originalLogWriter; - } - - public function write($message, $level = null) - { - $this->clockwork->log($this->getPsrLevel($level), $message); - - if ($this->originalLogWriter) { - return $this->originalLogWriter->write($message, $level); - } - } - - protected function getPsrLevel($level) - { - return isset($this->logLevels[$level]) ? $this->logLevels[$level] : $level; - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Slim/Old/ClockworkMiddleware.php b/source/vendor/itsgoingd/clockwork/Clockwork/Support/Slim/Old/ClockworkMiddleware.php deleted file mode 100644 index 880bd79..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Slim/Old/ClockworkMiddleware.php +++ /dev/null @@ -1,92 +0,0 @@ -storagePathOrClockwork = $storagePathOrClockwork; - } - - public function call() - { - $this->app->container->singleton('clockwork', function () { - if ($this->storagePathOrClockwork instanceof Clockwork) { - return $this->storagePathOrClockwork; - } - - $clockwork = new Clockwork(); - - $clockwork->addDataSource(new PhpDataSource()) - ->addDataSource(new SlimDataSource($this->app)) - ->storage(new FileStorage($this->storagePathOrClockwork)); - - return $clockwork; - }); - - $originalLogWriter = $this->app->getLog()->getWriter(); - $clockworkLogWriter = new ClockworkLogWriter($this->app->clockwork, $originalLogWriter); - - $this->app->getLog()->setWriter($clockworkLogWriter); - - $clockworkDataUri = '#/__clockwork(?:/(?[0-9-]+))?(?:/(?(?:previous|next)))?(?:/(?\d+))?#'; - if ($this->app->config('debug') && preg_match($clockworkDataUri, $this->app->request()->getPathInfo(), $matches)) { - $matches = array_merge([ 'direction' => null, 'count' => null ], $matches); - return $this->retrieveRequest($matches['id'], $matches['direction'], $matches['count']); - } - - try { - $this->next->call(); - $this->logRequest(); - } catch (Exception $e) { - $this->logRequest(); - throw $e; - } - } - - public function retrieveRequest($id = null, $direction = null, $count = null) - { - $storage = $this->app->clockwork->storage(); - - if ($direction == 'previous') { - $data = $storage->previous($id, $count); - } elseif ($direction == 'next') { - $data = $storage->next($id, $count); - } elseif ($id == 'latest') { - $data = $storage->latest(); - } else { - $data = $storage->find($id); - } - - echo json_encode($data, \JSON_PARTIAL_OUTPUT_ON_ERROR); - } - - protected function logRequest() - { - $this->app->clockwork->resolveRequest(); - $this->app->clockwork->storeRequest(); - - if ($this->app->config('debug')) { - $this->app->response()->header('X-Clockwork-Id', $this->app->clockwork->request()->id); - $this->app->response()->header('X-Clockwork-Version', Clockwork::VERSION); - - $env = $this->app->environment(); - if ($env['SCRIPT_NAME']) { - $this->app->response()->header('X-Clockwork-Path', $env['SCRIPT_NAME'] . '/__clockwork/'); - } - - $request = $this->app->clockwork->request(); - $this->app->response()->header('Server-Timing', ServerTiming::fromRequest($request)->value()); - } - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Swift/SwiftPluginClockworkTimeline.php b/source/vendor/itsgoingd/clockwork/Clockwork/Support/Swift/SwiftPluginClockworkTimeline.php deleted file mode 100644 index 5ae239e..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Swift/SwiftPluginClockworkTimeline.php +++ /dev/null @@ -1,59 +0,0 @@ -timeline = $timeline; - } - - // Invoked immediately before a message is sent - public function beforeSendPerformed(Swift_Events_SendEvent $evt) - { - $message = $evt->getMessage(); - - $headers = []; - foreach ($message->getHeaders()->getAll() as $header) { - $headers[$header->getFieldName()] = $header->getFieldBody(); - } - - $this->timeline->event('Sending an email message', [ - 'name' => 'email ' . $message->getId(), - 'start' => $time = microtime(true), - 'data' => [ - 'from' => $this->addressToString($message->getFrom()), - 'to' => $this->addressToString($message->getTo()), - 'subject' => $message->getSubject(), - 'headers' => $headers - ] - ]); - } - - // Invoked immediately after a message is sent - public function sendPerformed(Swift_Events_SendEvent $evt) - { - $message = $evt->getMessage(); - - $this->timeline->event('email ' . $message->getId())->end(); - } - - protected function addressToString($address) - { - if (! $address) return; - - foreach ($address as $email => $name) { - $address[$email] = $name ? "$name <$email>" : $email; - } - - return implode(', ', $address); - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Symfony/ClockworkBundle.php b/source/vendor/itsgoingd/clockwork/Clockwork/Support/Symfony/ClockworkBundle.php deleted file mode 100644 index 8b0969a..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Symfony/ClockworkBundle.php +++ /dev/null @@ -1,11 +0,0 @@ -debug = $debug; - } - - public function getConfigTreeBuilder() - { - return $this->getConfigRoot() - ->children() - ->booleanNode('enable')->defaultValue($this->debug)->end() - ->variableNode('web')->defaultValue(true)->end() - ->booleanNode('authentication')->defaultValue(false)->end() - ->scalarNode('authentication_password')->defaultValue('VerySecretPassword')->end() - ->end() - ->end(); - } - - protected function getConfigRoot() - { - if (Kernel::VERSION_ID < 40300) { - return (new TreeBuilder)->root('clockwork'); - } - - return (new TreeBuilder('clockwork'))->getRootNode(); - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Symfony/ClockworkController.php b/source/vendor/itsgoingd/clockwork/Clockwork/Support/Symfony/ClockworkController.php deleted file mode 100644 index fb576eb..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Symfony/ClockworkController.php +++ /dev/null @@ -1,69 +0,0 @@ -clockwork = $clockwork; - $this->support = $support; - } - - public function authenticate(Request $request) - { - $this->ensureClockworkIsEnabled(); - - $token = $this->clockwork->authenticator()->attempt($request->request->all()); - - return new JsonResponse([ 'token' => $token ], $token ? 200 : 403); - } - - public function getData(Request $request, $id = null, $direction = null, $count = null) - { - $this->ensureClockworkIsEnabled(); - - return $this->support->getData($request, $id, $direction, $count); - } - - public function webIndex(Request $request) - { - $this->ensureClockworkIsEnabled(); - $this->ensureClockworkWebIsEnabled(); - - return $this->support->getWebAsset('index.html'); - } - - public function webAsset($path) - { - $this->ensureClockworkIsEnabled(); - $this->ensureClockworkWebIsEnabled(); - - return $this->support->getWebAsset($path); - } - - public function webRedirect(Request $request) - { - $this->ensureClockworkIsEnabled(); - $this->ensureClockworkWebIsEnabled(); - - return $this->redirect($request->getPathInfo() . '/app'); - } - - protected function ensureClockworkIsEnabled() - { - if (! $this->support->isEnabled()) throw $this->createNotFoundException(); - } - - protected function ensureClockworkWebIsEnabled() - { - if (! $this->support->isWebEnabled()) throw $this->createNotFoundException(); - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Symfony/ClockworkExtension.php b/source/vendor/itsgoingd/clockwork/Clockwork/Support/Symfony/ClockworkExtension.php deleted file mode 100644 index ad7a115..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Symfony/ClockworkExtension.php +++ /dev/null @@ -1,22 +0,0 @@ -load('clockwork.php'); - - $container->getDefinition(ClockworkSupport::class)->replaceArgument('$config', $config); - } - - public function getConfiguration(array $config, ContainerBuilder $container) - { - return new ClockworkConfiguration($container->getParameter('kernel.debug')); - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Symfony/ClockworkFactory.php b/source/vendor/itsgoingd/clockwork/Clockwork/Support/Symfony/ClockworkFactory.php deleted file mode 100644 index 2c6f2ed..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Symfony/ClockworkFactory.php +++ /dev/null @@ -1,38 +0,0 @@ -container = $container; - } - - public function clockwork() - { - return (new Clockwork) - ->authenticator($this->container->get('clockwork.authenticator')) - ->storage($this->container->get('clockwork.storage')); - } - - public function clockworkAuthenticator() - { - return $this->container->get('clockwork.support')->makeAuthenticator(); - } - - public function clockworkStorage() - { - return new SymfonyStorage( - $this->container->get('profiler'), substr($this->container->getParameter('profiler.storage.dsn'), 5) - ); - } - - public function clockworkSupport($config) - { - return new ClockworkSupport($this->container, $config); - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Symfony/ClockworkListener.php b/source/vendor/itsgoingd/clockwork/Clockwork/Support/Symfony/ClockworkListener.php deleted file mode 100644 index bd20111..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Symfony/ClockworkListener.php +++ /dev/null @@ -1,47 +0,0 @@ -clockwork = $clockwork; - $this->profiler = $profiler; - } - - public function onKernelRequest(KernelEvent $event) - { - if (preg_match('#/__clockwork(.*)#', $event->getRequest()->getPathInfo())) { - $this->profiler->disable(); - } - } - - public function onKernelResponse(KernelEvent $event) - { - if (! $this->clockwork->isEnabled()) return; - - $response = $event->getResponse(); - - if (! $response->headers->has('X-Debug-Token')) return; - - $response->headers->set('X-Clockwork-Id', $response->headers->get('X-Debug-Token')); - $response->headers->set('X-Clockwork-Version', Clockwork::VERSION); - } - - public static function getSubscribedEvents() - { - return [ - KernelEvents::REQUEST => [ 'onKernelRequest', 512 ], - KernelEvents::RESPONSE => [ 'onKernelResponse', -128 ] - ]; - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Symfony/ClockworkLoader.php b/source/vendor/itsgoingd/clockwork/Clockwork/Support/Symfony/ClockworkLoader.php deleted file mode 100644 index 36ce945..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Symfony/ClockworkLoader.php +++ /dev/null @@ -1,53 +0,0 @@ -support = $support; - } - - public function load($resource, $type = null) - { - $routes = new RouteCollection(); - - $routes->add('clockwork', new Route('/__clockwork/{id}/{direction}/{count}', [ - '_controller' => [ ClockworkController::class, 'getData' ], - 'direction' => null, - 'count' => null - ], [ 'id' => '(?!(app|auth))([a-z0-9-]+|latest)', 'direction' => '(next|previous)', 'count' => '\d+' ])); - - $routes->add('clockwork.auth', new Route('/__clockwork/auth', [ - '_controller' => [ ClockworkController::class, 'authenticate' ] - ])); - - if (! $this->support->isWebEnabled()) return $routes; - - foreach ($this->support->webPaths() as $path) { - $routes->add("clockwork.webRedirect.{$path}", new Route("{$path}", [ - '_controller' => [ ClockworkController::class, 'webRedirect' ] - ])); - - $routes->add("clockwork.webIndex.{$path}", new Route("{$path}/app", [ - '_controller' => [ ClockworkController::class, 'webIndex' ] - ])); - - $routes->add("clockwork.webAsset.{$path}", new Route("{$path}/{path}", [ - '_controller' => [ ClockworkController::class, 'webAsset' ] - ], [ 'path' => '.+' ])); - } - - return $routes; - } - - public function supports($resource, $type = null) - { - return $type == 'clockwork'; - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Symfony/ClockworkSupport.php b/source/vendor/itsgoingd/clockwork/Clockwork/Support/Symfony/ClockworkSupport.php deleted file mode 100644 index 034750f..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Symfony/ClockworkSupport.php +++ /dev/null @@ -1,100 +0,0 @@ -container = $container; - $this->config = $config; - } - - public function getConfig($key, $default = null) - { - return isset($this->config[$key]) ? $this->config[$key] : $default; - } - - public function getData(Request $request, $id = null, $direction = null, $count = null) - { - $authenticator = $this->container->get('clockwork')->authenticator(); - $storage = $this->container->get('clockwork')->storage(); - - $authenticated = $authenticator->check($request->headers->get('X-Clockwork-Auth')); - - if ($authenticated !== true) { - return new JsonResponse([ 'message' => $authenticated, 'requires' => $authenticator->requires() ], 403); - } - - if ($direction == 'previous') { - $data = $storage->previous($id, $count, Search::fromRequest($request->query->all())); - } elseif ($direction == 'next') { - $data = $storage->next($id, $count, Search::fromRequest($request->query->all())); - } elseif ($id == 'latest') { - $data = $storage->latest(Search::fromRequest($request->query->all())); - } else { - $data = $storage->find($id); - } - - $data = is_array($data) - ? array_map(function ($request) { return $request->toArray(); }, $data) - : $data->toArray(); - - return new JsonResponse($data); - } - - public function getWebAsset($path) - { - $web = new Web; - - if ($asset = $web->asset($path)) { - return new BinaryFileResponse($asset['path'], 200, [ 'Content-Type' => $asset['mime'] ]); - } else { - throw new NotFoundHttpException; - } - } - - public function makeAuthenticator() - { - $authenticator = $this->getConfig('authentication'); - - if (is_string($authenticator)) { - return $this->container->get($authenticator); - } elseif ($authenticator) { - return new SimpleAuthenticator($this->getConfig('authentication_password')); - } else { - return new NullAuthenticator; - } - } - - public function isEnabled() - { - return $this->getConfig('enable', false); - } - - public function isWebEnabled() - { - return $this->getConfig('web', true); - } - - public function webPaths() - { - $path = $this->getConfig('web', true); - - if (is_string($path)) return [ trim($path, '/') ]; - - return [ 'clockwork', '__clockwork' ]; - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Symfony/ProfileTransformer.php b/source/vendor/itsgoingd/clockwork/Clockwork/Support/Symfony/ProfileTransformer.php deleted file mode 100644 index b3c9c0e..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Symfony/ProfileTransformer.php +++ /dev/null @@ -1,303 +0,0 @@ - $profile->getToken() ]); - - $this->transformCacheData($profile, $request); - $this->transformDoctrineData($profile, $request); - $this->transformEventsData($profile, $request); - $this->transformLoggerData($profile, $request); - $this->transformRequestData($profile, $request); - $this->transformTimeData($profile, $request); - $this->transformTwigData($profile, $request); - - $request->subrequests = $this->getSubrequests($profile); - - return $request; - } - - // Cache collector - - protected function transformCacheData(Profile $profile, Request $request) - { - if (! $profile->hasCollector('cache')) return; - - $data = $profile->getCollector('cache'); - - $request->cacheQueries = $this->getCacheQueries($data); - $request->cacheReads = $data->getTotals()['reads']; - $request->cacheHits = $data->getTotals()['hits']; - $request->cacheWrites = $data->getTotals()['writes']; - $request->cacheDeletes = $data->getTotals()['deletes']; - } - - protected function getCacheQueries($data) - { - return array_reduce(array_map(function ($queries, $connection) { - return array_filter(array_map(function ($query) use ($connection) { - $value = $query['result']; - - if (! is_array($value) || ! count($value)) return; - - return [ - 'connection' => $connection, - 'time' => $query['start'], - 'type' => array_values($value)[0] ? 'hit' : 'miss', - 'key' => array_keys($value)[0], - 'value' => '', - 'duration' => $query['end'] - $query['start'] - ]; - }, $queries)); - }, $this->unwrap($data->getCalls()), array_keys($this->unwrap($data->getCalls()))), function ($all, $queries) { - return array_merge($all, $queries); - }, []); - } - - // Doctrine collector - - protected function transformDoctrineData(Profile $profile, Request $request) - { - if (! $profile->hasCollector('db')) return; - - $data = $profile->getCollector('db'); - - $request->databaseDuration = $data->getTime(); - $request->databaseQueries = $this->getQueries($data); - } - - protected function getQueries($data) - { - return array_reduce(array_map(function ($queries, $connection) { - return array_filter(array_map(function ($query) use ($connection) { - return [ - 'query' => $this->createRunnableQuery($query['sql'], $this->unwrap($query['params'])), - 'duration' => $query['executionMS'] * 1000, - 'connection' => $connection - ]; - }, $queries)); - }, $data->getQueries(), array_keys($data->getQueries())), function ($all, $queries) { - return array_merge($all, $queries); - }, []); - } - - protected function createRunnableQuery($query, $bindings) - { - foreach ($bindings as $binding) { - $binding = \Doctrine\Bundle\DoctrineBundle\Twig\DoctrineExtension::escapeFunction($binding); - - // escape backslashes in the binding (preg_replace requires to do so) - $binding = str_replace('\\', '\\\\', $binding); - - $query = preg_replace('/\?/', $binding, $query, 1); - } - - // highlight keywords - $keywords = [ - 'select', 'insert', 'update', 'delete', 'where', 'from', 'limit', 'is', 'null', 'having', 'group by', - 'order by', 'asc', 'desc' - ]; - $regexp = '/\b' . implode('\b|\b', $keywords) . '\b/i'; - - $query = preg_replace_callback($regexp, function ($match) { return strtoupper($match[0]); }, $query); - - return $query; - } - - // Events collector - - protected function transformEventsData(Profile $profile, Request $request) - { - if (! $profile->hasCollector('events')) return; - - $data = $profile->getCollector('events'); - - $request->events = $this->getEvents($data); - } - - protected function getEvents($data) - { - $handledEvents = array_values(array_reduce($this->unwrap($data->getCalledListeners()), function ($events, $listener) { - if (! isset($events[$listener['event']])) { - $events[$listener['event']] = [ 'event' => $listener['event'], 'listeners' => [] ]; - } - - $events[$listener['event']]['listeners'][] = $listener['stub']; - - return $events; - }, [])); - - $orphanedEvents = array_map(function ($event) { - return [ 'event' => $event ]; - }, $this->unwrap($data->getOrphanedEvents())); - - return array_merge($handledEvents, $orphanedEvents); - } - - // Log collector - - protected function transformLoggerData(Profile $profile, Request $request) - { - if (! $profile->hasCollector('logger')) return; - - $data = $profile->getCollector('logger'); - - $request->log()->merge($this->getLog($data)); - } - - protected function getLog($data) - { - $messages = array_map(function ($log) { - $context = isset($log['context']) ? $log['context'] : []; - $replacements = array_filter($context, function ($v) { return ! is_array($v) && ! is_object($v) && ! is_resource($v); }); - - return [ - 'message' => str_replace( - array_map(function ($v) { return "{{$v}}"; }, array_keys($replacements)), - array_values($replacements), - $log['message'] - ), - 'context' => (new Serializer)->normalize($log['context']), - 'level' => strtolower($log['priorityName']), - 'time' => $log['timestamp'] - ]; - }, $this->unwrap($data->getLogs())); - - return new Log($messages); - } - - // Request collector - - protected function transformRequestData(Profile $profile, Request $request) - { - if (! $profile->hasCollector('request')) return; - - $data = $profile->getCollector('request'); - - $request->method = $data->getMethod(); - $request->uri = $data->getPathInfo(); - $request->controller = $this->getController($data); - $request->responseStatus = $data->getStatusCode(); - $request->headers = $this->unwrap($data->getRequestHeaders()); - $request->getData = $this->unwrap($data->getRequestQuery()); - $request->postData = $this->unwrap($data->getRequestRequest()); - $request->cookies = $this->unwrap($data->getRequestCookies()); - $request->sessionData = (new Serializer)->normalizeEach($this->unwrap($data->getSessionAttributes())); - } - - protected function getController($data) - { - $controller = $this->unwrap($data->getController()); - - if (! is_array($controller)) return $controller; - - return isset($controller['method']) - ? "{$controller['class']}@{$controller['method']}" - : $controller['class']; - } - - // Time collector - - protected function transformTimeData(Profile $profile, Request $request) - { - if (! $profile->hasCollector('time')) return; - - $data = $profile->getCollector('time'); - - $request->time = $data->getStartTime() / 1000; - $request->responseTime = $this->getResponseTime($data); - - $request->timeline()->merge($this->getTimeline($data)); - } - - protected function getResponseTime($data) - { - $lastEvent = $data->getEvents()['__section__']; - - return ($lastEvent->getOrigin() + $lastEvent->getDuration()) / 1000; - } - - protected function getTimeline($data) - { - $events = array_map(function ($event, $name) { - if ($name == '__section__') { - $name = 'Application runtime'; - } elseif ($name == '__section__.child') { - $name = 'Subrequest'; - } - - return [ - 'start' => ($event->getOrigin() + $event->getStartTime()) / 1000, - 'end' => ($event->getOrigin() + $event->getEndTime()) / 1000, - 'duration' => $event->getDuration(), - 'description' => $name, - 'data' => [] - ]; - }, $data->getEvents(), array_keys($data->getEvents())); - - $topEvent = $data->getEvents()['__section__']; - array_unshift($events, [ - 'start' => $start = $data->getStartTime() / 1000, - 'end' => $end = ($topEvent->getOrigin() + $topEvent->getStartTime()) / 1000, - 'duration' => ($end - $start) * 1000, - 'description' => 'Symfony initialization', - 'data' => [] - ]); - - return new Timeline($events); - } - - // Twig collector - - protected function transformTwigData(Profile $profile, Request $request) - { - if (! $profile->hasCollector('twig')) return; - - $data = $profile->getCollector('twig'); - - $request->viewsData = $this->getViews($data); - } - - protected function getViews($data) - { - return array_map(function ($template) { - return [ - 'description' => 'Rendering a view', - 'data' => [ 'name' => $template, 'data' => [] ] - ]; - }, array_keys($data->getTemplates())); - } - - protected function getSubrequests($profile) - { - return array_map(function ($child) { - return [ - 'url' => urlencode($child->getCollector('request')->getPathInfo()), - 'id' => $child->getToken(), - 'path' => null - ]; - }, $profile->getChildren()); - } - - protected function unwrap($data) - { - if ($data instanceof \Symfony\Component\VarDumper\Cloner\Data) { - return $data->getValue(true); - } elseif ($data instanceof \Symfony\Component\HttpFoundation\ParameterBag) { - return array_map(function ($val) { return $val->getValue(); }, $data->all()); - } elseif (is_array($data)) { - return array_map(function ($item) { return $this->unwrap($item); }, $data); - } - - return $data; - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Symfony/Resources/config/clockwork.php b/source/vendor/itsgoingd/clockwork/Clockwork/Support/Symfony/Resources/config/clockwork.php deleted file mode 100644 index e9e2b37..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Symfony/Resources/config/clockwork.php +++ /dev/null @@ -1,39 +0,0 @@ -autowire(Clockwork\Support\Symfony\ClockworkFactory::class); - -$container->register(Clockwork\Clockwork::class) - ->setFactory([ new Reference(ClockworkFactory::class), 'clockwork' ]) - ->setPublic(true); - -$container->register(Clockwork\Authentication\AuthenticatorInterface::class) - ->setFactory([ new Reference(ClockworkFactory::class), 'clockworkAuthenticator' ]) - ->setPublic(true); - -$container->register(Clockwork\Storage\StorageInterface::class) - ->setFactory([ new Reference(ClockworkFactory::class), 'clockworkStorage' ]) - ->setPublic(true); - -$container->register(Clockwork\Support\Symfony\ClockworkSupport::class) - ->setArgument('$config', []) - ->setFactory([ new Reference(ClockworkFactory::class), 'clockworkSupport' ]) - ->setPublic(true); - -$container->autowire(Clockwork\Support\Symfony\ClockworkController::class) - ->setAutoconfigured(true); - -$container->autowire(Clockwork\Support\Symfony\ClockworkListener::class) - ->setArgument('$profiler', new Reference('profiler')) - ->addTag('kernel.event_subscriber'); - -$container->autowire(Clockwork\Support\Symfony\ClockworkLoader::class) - ->addTag('routing.loader'); - -$container->setAlias('clockwork', Clockwork\Clockwork::class)->setPublic('true'); -$container->setAlias('clockwork.authenticator', Clockwork\Authentication\AuthenticatorInterface::class)->setPublic('true'); -$container->setAlias('clockwork.storage', Clockwork\Storage\StorageInterface::class)->setPublic('true'); -$container->setAlias('clockwork.support', Clockwork\Support\Symfony\ClockworkSupport::class)->setPublic('true'); diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Symfony/Resources/config/routing/clockwork.php b/source/vendor/itsgoingd/clockwork/Clockwork/Support/Symfony/Resources/config/routing/clockwork.php deleted file mode 100644 index 2367fbd..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Symfony/Resources/config/routing/clockwork.php +++ /dev/null @@ -1,7 +0,0 @@ -import('.', 'clockwork'); -}; diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Twig/ProfilerClockworkDumper.php b/source/vendor/itsgoingd/clockwork/Clockwork/Support/Twig/ProfilerClockworkDumper.php deleted file mode 100644 index e1b2cbf..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Twig/ProfilerClockworkDumper.php +++ /dev/null @@ -1,51 +0,0 @@ -dumpProfile($profile, $timeline); - - return $timeline; - } - - public function dumpProfile(Profile $profile, Timeline $timeline, $parent = null) - { - $id = $this->lastId++; - - if ($profile->isRoot()) { - $name = $profile->getName(); - } elseif ($profile->isTemplate()) { - $name = basename($profile->getTemplate()); - } else { - $name = basename($profile->getTemplate()) . '::' . $profile->getType() . '(' . $profile->getName() . ')'; - } - - foreach ($profile as $p) { - $this->dumpProfile($p, $timeline, $id); - } - - $data = $profile->__serialize(); - - $timeline->event($name, [ - 'name' => $id, - 'start' => isset($data[3]['wt']) ? $data[3]['wt'] : null, - 'end' => isset($data[4]['wt']) ? $data[4]['wt'] : null, - 'data' => [ - 'data' => [], - 'memoryUsage' => isset($data[4]['mu']) ? $data[4]['mu'] : null, - 'parent' => $parent - ] - ]); - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Vanilla/Clockwork.php b/source/vendor/itsgoingd/clockwork/Clockwork/Support/Vanilla/Clockwork.php deleted file mode 100644 index d9decfd..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Vanilla/Clockwork.php +++ /dev/null @@ -1,431 +0,0 @@ -config = array_merge(include __DIR__ . '/config.php', $config); - - $this->clockwork = new BaseClockwork; - - $this->clockwork->addDataSource(new PhpDataSource); - $this->clockwork->storage($this->makeStorage()); - - $this->configureSerializer(); - $this->configureShouldCollect(); - $this->configureShouldRecord(); - - if ($this->config['register_helpers']) include __DIR__ . '/helpers.php'; - } - - // Initialize a singleton instance, takes an additional config - public static function init($config = []) - { - return static::$defaultInstance = new static($config); - } - - // Return the singleton instance - public static function instance() - { - return static::$defaultInstance; - } - - // Resolves and records the current request and sends Clockwork headers, should be called at the end of app - // execution, return PSR-7 response if one was set - public function requestProcessed() - { - if (! $this->config['enable'] && ! $this->config['collect_data_always']) return $this->psrResponse; - - if (! $this->clockwork->shouldCollect()->filter($this->incomingRequest())) return $this->psrResponse; - if (! $this->clockwork->shouldRecord()->filter($this->clockwork->request())) return $this->psrResponse; - - $this->clockwork->resolveRequest()->storeRequest(); - - if (! $this->config['enable']) return $this->psrResponse; - - $this->sendHeaders(); - - if (($eventsCount = $this->config['server_timing']) !== false) { - $this->setHeader('Server-Timing', ServerTiming::fromRequest($this->clockwork->request(), $eventsCount)->value()); - } - - return $this->psrResponse; - } - - // Resolves and records the current request as a command, should be called at the end of app execution - public function commandExecuted($name, $exitCode = null, $arguments = [], $options = [], $argumentsDefaults = [], $optionsDefaults = [], $output = null) - { - if (! $this->config['enable'] && ! $this->config['collect_data_always']) return; - - if (! $this->clockwork->shouldRecord()->filter($this->clockwork->request())) return; - - $this->clockwork - ->resolveAsCommand($name, $exitCode, $arguments, $options, $argumentsDefaults, $optionsDefaults, $output) - ->storeRequest(); - } - - // Resolves and records the current request as a queue job, should be called at the end of app execution - public function queueJobExecuted($name, $description = null, $status = 'processed', $payload = [], $queue = null, $connection = null, $options = []) - { - if (! $this->config['enable'] && ! $this->config['collect_data_always']) return; - - if (! $this->clockwork->shouldRecord()->filter($this->clockwork->request())) return; - - $this->clockwork - ->resolveAsQueueJob($name, $description, $status, $payload, $queue, $connection, $options) - ->storeRequest(); - } - - // Manually send the Clockwork headers, this should be manually called only when the headers need to be sent early - // in the request processing - public function sendHeaders() - { - if (! $this->config['enable'] || $this->headersSent) return; - - $this->headersSent = true; - - $clockworkRequest = $this->request(); - - $this->setHeader('X-Clockwork-Id', $clockworkRequest->id); - $this->setHeader('X-Clockwork-Version', BaseClockwork::VERSION); - - if ($this->config['api'] != '/__clockwork/') { - $this->setHeader('X-Clockwork-Path', $this->config['api']); - } - - foreach ($this->config['headers'] as $headerName => $headerValue) { - $this->setHeader("X-Clockwork-Header-{$headerName}", $headerValue); - } - - if ($this->config['features']['performance']['client_metrics'] || $this->config['toolbar']) { - $this->setCookie('x-clockwork', $this->getCookiePayload(), time() + 60); - } - } - - // Returns the x-clockwork cookie payload in case you need to set the cookie yourself (cookie can't be http only, - // expiration time should be 60 seconds) - public function getCookiePayload() - { - $clockworkRequest = $this->request(); - - return json_encode([ - 'requestId' => $clockworkRequest->id, - 'version' => BaseClockwork::VERSION, - 'path' => $this->config['api'], - 'webPath' => $this->config['web']['enable'], - 'token' => $clockworkRequest->updateToken, - 'metrics' => $this->config['features']['performance']['client_metrics'], - 'toolbar' => $this->config['toolbar'] - ]); - } - - // Handle Clockwork REST api request, retrieves or updates Clockwork metadata - public function handleMetadata($request = null, $method = null) - { - if (! $method) $method = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : 'GET'; - - return $method == 'POST' ? $this->updateMetadata($request) : $this->returnMetadata($request); - } - - // Retrieve metadata based on the passed Clockwork REST api request and send HTTP response - public function returnMetadata($request = null) - { - if (! $this->config['enable']) return; - - return $this->response($this->getMetadata($request)); - } - - // Returns metadata based on the passed Clockwork REST api request - public function getMetadata($request = null) - { - if (! $this->config['enable']) return $this->response(null, 404); - - if (! $request) $request = isset($_GET['request']) ? $_GET['request'] : ''; - - preg_match('#(?[0-9-]+|latest)(?:/(?next|previous))?(?:/(?\d+))?#', $request, $matches); - - $id = isset($matches['id']) ? $matches['id'] : null; - $direction = isset($matches['direction']) ? $matches['direction'] : null; - $count = isset($matches['count']) ? $matches['count'] : null; - - if ($direction == 'previous') { - $data = $this->clockwork->storage()->previous($id, $count, Search::fromRequest($_GET)); - } elseif ($direction == 'next') { - $data = $this->clockwork->storage()->next($id, $count, Search::fromRequest($_GET)); - } elseif ($id == 'latest') { - $data = $this->clockwork->storage()->latest(Search::fromRequest($_GET)); - } else { - $data = $this->clockwork->storage()->find($id); - } - - if (preg_match('#(?[0-9-]+|latest)/extended#', $request)) { - $this->clockwork->extendRequest($data); - } - - if ($data) { - $data = is_array($data) ? array_map(function ($item) { return $item->toArray(); }, $data) : $data->toArray(); - } - - return $data; - } - - // Update metadata based on the passed Clockwork REST api request and send HTTP response - public function updateMetadata($request = null) - { - if (! $this->config['enable'] || ! $this->config['features']['performance']['client_metrics']) { - return $this->response(null, 404); - } - - if (! $request) $request = isset($_GET['request']) ? $_GET['request'] : ''; - - $storage = $this->clockwork->storage(); - - $request = $storage->find($request); - - if (! $request) { - return $this->response([ 'message' => 'Request not found.' ], 404); - } - - $input = json_decode(file_get_contents('php://input'), true); - - $token = isset($input['_token']) ? $input['_token'] : ''; - - if (! $request->updateToken || ! hash_equals($request->updateToken, $token)) { - return $this->response([ 'message' => 'Invalid update token.' ], 403); - } - - foreach ($input as $key => $value) { - if (in_array($key, [ 'clientMetrics', 'webVitals' ])) { - $request->$key = $value; - } - } - - $storage->update($request); - - return $this->response(); - } - - // Returns the Clockwork Web UI as a HTTP response, installs the Web UI on the first run - public function returnWeb() - { - if (! $this->config['web']['enable']) return; - - $this->installWeb(); - - $asset = function ($uri) { return "{$this->config['web']['uri']}/{$uri}"; }; - $metadataPath = $this->config['api']; - $url = $this->config['web']['uri']; - - if (! preg_match('#/index.html$#', $url)) { - $url = rtrim($url, '/') . '/index.html'; - } - - ob_start(); - - include __DIR__ . '/iframe.html.php'; - - $html = ob_get_clean(); - - return $this->response($html, null, false); - } - - // Installs the Web UI by copying the assets to the public directory, no-op if already installed - public function installWeb() - { - $path = $this->config['web']['path']; - $source = __DIR__ . '/../../Web/public'; - - if (file_exists("{$path}/index.html")) return; - - @mkdir($path, 0755, true); - - $iterator = new \RecursiveIteratorIterator( - new \RecursiveDirectoryIterator($source, \RecursiveDirectoryIterator::SKIP_DOTS), - \RecursiveIteratorIterator::SELF_FIRST - ); - - foreach ($iterator as $item) { - if ($item->isDir()) { - mkdir("{$path}/" . $iterator->getSubPathName()); - } else { - copy($item, "{$path}/" . $iterator->getSubPathName()); - } - } - } - - // Use a PSR-7 request and response instances instead of vanilla php HTTP apis - public function usePsrMessage(PsrRequest $request, PsrResponse $response = null) - { - $this->psrRequest = $request; - $this->psrResponse = $response; - - $this->clockwork->addDataSource(new PsrMessageDataSource($request, $response)); - - return $this; - } - - // Make a storage implementation based on user configuration - protected function makeStorage() - { - if ($this->config['storage'] == 'sql') { - $database = $this->config['storage_sql_database']; - $table = $this->config['storage_sql_table']; - - $storage = new SqlStorage( - $this->config['storage_sql_database'], - $this->config['storage_sql_table'], - $this->config['storage_sql_username'], - $this->config['storage_sql_password'], - $this->config['storage_expiration'] - ); - } else { - $storage = new FileStorage( - $this->config['storage_files_path'], - 0700, - $this->config['storage_expiration'], - $this->config['storage_files_compress'] - ); - } - - return $storage; - } - - // Configure serializer defaults based on user configuration - protected function configureSerializer() - { - Serializer::defaults([ - 'limit' => $this->config['serialization_depth'], - 'blackbox' => $this->config['serialization_blackbox'], - 'traces' => $this->config['stack_traces']['enabled'], - 'tracesSkip' => StackFilter::make() - ->isNotVendor(array_merge( - $this->config['stack_traces']['skip_vendors'], - [ 'itsgoingd', 'laravel', 'illuminate' ] - )) - ->isNotNamespace($this->config['stack_traces']['skip_namespaces']) - ->isNotFunction([ 'call_user_func', 'call_user_func_array' ]) - ->isNotClass($this->config['stack_traces']['skip_classes']), - 'tracesLimit' => $this->config['stack_traces']['limit'] - ]); - } - - // Configure should collect rules based on user configuration - public function configureShouldCollect() - { - $this->clockwork->shouldCollect([ - 'onDemand' => $this->config['requests']['on_demand'], - 'sample' => $this->config['requests']['sample'], - 'except' => $this->config['requests']['except'], - 'only' => $this->config['requests']['only'], - 'exceptPreflight' => $this->config['requests']['except_preflight'] - ]); - - // don't collect data for Clockwork requests - $this->clockwork->shouldCollect()->except(preg_quote(rtrim($this->config['api'], '/'), '#')); - } - - // Configure should record rules based on user configuration - public function configureShouldRecord() - { - $this->clockwork->shouldRecord([ - 'errorsOnly' => $this->config['requests']['errors_only'], - 'slowOnly' => $this->config['requests']['slow_only'] ? $this->config['requests']['slow_threshold'] : false - ]); - } - - // Set a cookie on PSR-7 response or using vanilla php - protected function setCookie($name, $value, $expires) { - if ($this->psrResponse) { - $this->psrResponse = $this->psrResponse->withAddedHeader( - 'Set-Cookie', "{$name}=" . urlencode($value) . '; expires=' . gmdate('D, d M Y H:i:s T', $expires) - ); - } else { - setcookie($name, $value, $expires); - } - } - - // Set a header on PSR-7 response or using vanilla php - protected function setHeader($header, $value) - { - if ($this->psrResponse) { - $this->psrResponse = $this->psrResponse->withHeader($header, $value); - } else { - header("{$header}: {$value}"); - } - } - - // Send a json response, uses the PSR-7 response if set - protected function response($data = null, $status = null, $json = true) - { - if ($json) $this->setHeader('Content-Type', 'application/json'); - - if ($this->psrResponse) { - if ($status) $this->psrResponse = $this->psrResponse->withStatus($status); - $this->psrResponse->getBody()->write($json ? json_encode($data, \JSON_PARTIAL_OUTPUT_ON_ERROR) : $data); - return $this->psrResponse; - } else { - if ($status) http_response_code($status); - echo $json ? json_encode($data, \JSON_PARTIAL_OUTPUT_ON_ERROR) : $data; - } - } - - // Make a Clockwork incoming request instance - protected function incomingRequest() - { - return new IncomingRequest([ - 'method' => $_SERVER['REQUEST_METHOD'], - 'uri' => $_SERVER['REQUEST_URI'], - 'input' => $_REQUEST, - 'cookies' => $_COOKIE - ]); - } - - // Return the underlaying Clockwork instance - public function getClockwork() - { - return $this->clockwork; - } - - // Pass any method calls to the underlaying Clockwork instance - public function __call($method, $args = []) - { - return $this->clockwork->$method(...$args); - } - - // Pass any static method calls to the underlaying Clockwork instance - public static function __callStatic($method, $args = []) - { - return static::instance()->$method(...$args); - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Vanilla/config.php b/source/vendor/itsgoingd/clockwork/Clockwork/Support/Vanilla/config.php deleted file mode 100644 index 97a37d2..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Vanilla/config.php +++ /dev/null @@ -1,258 +0,0 @@ - isset($_ENV['CLOCKWORK_ENABLE']) ? $_ENV['CLOCKWORK_ENABLE'] : true, - - /* - |------------------------------------------------------------------------------------------------------------------ - | Features - |------------------------------------------------------------------------------------------------------------------ - | - | You can enable or disable various Clockwork features here. Some features have additional settings (eg. slow query - | threshold for database queries). - | - */ - - 'features' => [ - - // Performance metrics - 'performance' => [ - // Allow collecting of client metrics. Requires separate clockwork-browser npm package. - 'client_metrics' => isset($_ENV['CLOCKWORK_PERFORMANCE_CLIENT_METRICS']) ? $_ENV['CLOCKWORK_PERFORMANCE_CLIENT_METRICS'] : true - ] - - ], - - /* - |------------------------------------------------------------------------------------------------------------------ - | Enable toolbar - |------------------------------------------------------------------------------------------------------------------ - | - | Clockwork can show a toolbar with basic metrics on all responses. Here you can enable or disable this feature. - | Requires a separate clockwork-browser npm library. - | - */ - - 'toolbar' => isset($_ENV['CLOCKWORK_TOOLBAR']) ? $_ENV['CLOCKWORK_TOOLBAR'] : true, - - /* - |------------------------------------------------------------------------------------------------------------------ - | HTTP requests collection - |------------------------------------------------------------------------------------------------------------------ - | - | Clockwork collects data about HTTP requests to your app. Here you can choose which requests should be collected. - | - */ - - 'requests' => [ - // With on-demand mode enabled, Clockwork will only profile requests when the browser extension is open or you - // manually pass a "clockwork-profile" cookie or get/post data key. - // Optionally you can specify a "secret" that has to be passed as the value to enable profiling. - 'on_demand' => isset($_ENV['CLOCKWORK_REQUESTS_ON_DEMAND']) ? $_ENV['CLOCKWORK_REQUESTS_ON_DEMAND'] : false, - - // Collect only errors (requests with HTTP 4xx and 5xx responses) - 'errors_only' => isset($_ENV['CLOCKWORK_REQUESTS_ERRORS_ONLY']) ? $_ENV['CLOCKWORK_REQUESTS_ERRORS_ONLY'] : false, - - // Response time threshold in miliseconds after which the request will be marked as slow - 'slow_threshold' => isset($_ENV['CLOCKWORK_REQUESTS_SLOW_THRESHOLD']) ? $_ENV['CLOCKWORK_REQUESTS_SLOW_THRESHOLD'] : null, - - // Collect only slow requests - 'slow_only' => isset($_ENV['CLOCKWORK_REQUESTS_SLOW_ONLY']) ? $_ENV['CLOCKWORK_REQUESTS_SLOW_ONLY'] : false, - - // Sample the collected requests (eg. set to 100 to collect only 1 in 100 requests) - 'sample' => isset($_ENV['CLOCKWORK_REQUESTS_SAMPLE']) ? $_ENV['CLOCKWORK_REQUESTS_SAMPLE'] : false, - - // List of URIs that should not be collected - 'except' => [ - // '/api/.*' - ], - - // List of URIs that should be collected, any other URI will not be collected if not empty - 'only' => [ - // '/api/.*' - ], - - // Don't collect OPTIONS requests, mostly used in the CSRF pre-flight requests and are rarely of interest - 'except_preflight' => isset($_ENV['CLOCKWORK_REQUESTS_EXCEPT_PREFLIGHT']) ? $_ENV['CLOCKWORK_REQUESTS_EXCEPT_PREFLIGHT'] : true - ], - - /* - |------------------------------------------------------------------------------------------------------------------ - | Enable data collection when Clockwork is disabled - |------------------------------------------------------------------------------------------------------------------ - | - | You can enable this setting to collect data even when Clockwork is disabled. Eg. for future analysis. - | - */ - - 'collect_data_always' => isset($_ENV['CLOCKWORK_COLLECT_DATA_ALWAYS']) ? $_ENV['CLOCKWORK_COLLECT_DATA_ALWAYS'] : false, - - /* - |------------------------------------------------------------------------------------------------------------------ - | Clockwork API URI - |------------------------------------------------------------------------------------------------------------------ - | - | Path of the script calling returnRequest to return Clockwork metadata to the client app. See installation - | instructions for details. - | - */ - - 'api' => isset($_ENV['CLOCKWORK_API']) ? $_ENV['CLOCKWORK_API'] : '/__clockwork/', - - /* - |------------------------------------------------------------------------------------------------------------------ - | Clockwork web UI - |------------------------------------------------------------------------------------------------------------------ - | - | Clockwork comes bundled with a full Clockwork App accessible as a Web UI. Here you can enable and configure this - | feature. - | Clockwork::returnWeb api is used to expose the Web UI in your vanilla app, see the installation instructions for - | details. - | - */ - - 'web' => [ - // Enable or disable the Web UI, set to the public uri where Clockwork Web UI is accessible - 'enable' => isset($_ENV['CLOCKWORK_WEB_ENABLE']) ? $_ENV['CLOCKWORK_WEB_ENABLE'] : true, - - // Path where to install the Web UI assets, should be publicly accessible - 'path' => isset($_ENV['CLOCKWORK_WEB_PATH']) ? $_ENV['CLOCKWORK_WEB_PATH'] : __DIR__ . '/../../../../../public/vendor/clockwork', - - // Public URI where the installed Web UI assets will be accessible - 'uri' => isset($_ENV['CLOCKWORK_WEB_URI']) ? $_ENV['CLOCKWORK_WEB_URI'] : '/vendor/clockwork' - ], - - /* - |------------------------------------------------------------------------------------------------------------------ - | Metadata storage - |------------------------------------------------------------------------------------------------------------------ - | - | Configure how is the metadata collected by Clockwork stored. Two options are available: - | - files - A simple fast storage implementation storing data in one-per-request files. - | - sql - Stores requests in a sql database. Supports MySQL, Postgresql, Sqlite and requires PDO. - | - */ - - 'storage' => isset($_ENV['CLOCKWORK_STORAGE']) ? $_ENV['CLOCKWORK_STORAGE'] : 'files', - - // Path where the Clockwork metadata is stored - 'storage_files_path' => isset($_ENV['CLOCKWORK_STORAGE_FILES_PATH']) ? $_ENV['CLOCKWORK_STORAGE_FILES_PATH'] : __DIR__ . '/../../../../../../clockwork', - - // Compress the metadata files using gzip, trading a little bit of performance for lower disk usage - 'storage_files_compress' => isset($_ENV['CLOCKWORK_STORAGE_FILES_COMPRESS']) ? $_ENV['CLOCKWORK_STORAGE_FILES_COMPRESS'] : false, - - // SQL database to use, can be a PDO connection string or a path to a sqlite file - 'storage_sql_database' => isset($_ENV['CLOCKWORK_STORAGE_SQL_DATABASE']) ? $_ENV['CLOCKWORK_STORAGE_SQL_DATABASE'] : 'sqlite:' . __DIR__ . '/../../../../../clockwork.sqlite', - 'storage_sql_username' => isset($_ENV['CLOCKWORK_STORAGE_SQL_USERNAME']) ? $_ENV['CLOCKWORK_STORAGE_SQL_USERNAME'] : null, - 'storage_sql_password' => isset($_ENV['CLOCKWORK_STORAGE_SQL_PASSWORD']) ? $_ENV['CLOCKWORK_STORAGE_SQL_PASSWORD'] : null, - - // SQL table name to use, the table is automatically created and udpated when needed - 'storage_sql_table' => isset($_ENV['CLOCKWORK_STORAGE_SQL_TABLE']) ? $_ENV['CLOCKWORK_STORAGE_SQL_TABLE'] : 'clockwork', - - // Maximum lifetime of collected metadata in minutes, older requests will automatically be deleted, false to disable - 'storage_expiration' => isset($_ENV['CLOCKWORK_STORAGE_EXPIRATION']) ? $_ENV['CLOCKWORK_STORAGE_EXPIRATION'] : 60 * 24 * 7, - - /* - |------------------------------------------------------------------------------------------------------------------ - | Stack traces collection - |------------------------------------------------------------------------------------------------------------------ - | - | Clockwork can collect stack traces for log messages and certain data like database queries. Here you can set - | whether to collect stack traces, limit the number of collected frames and set further configuration. Collecting - | long stack traces considerably increases metadata size. - | - */ - - 'stack_traces' => [ - // Enable or disable collecting of stack traces - 'enabled' => isset($_ENV['CLOCKWORK_STACK_TRACES_ENABLED']) ? $_ENV['CLOCKWORK_STACK_TRACES_ENABLED'] : true, - - // Limit the number of frames to be collected - 'limit' => isset($_ENV['CLOCKWORK_STACK_TRACES_LIMIT']) ? $_ENV['CLOCKWORK_STACK_TRACES_LIMIT'] : 10, - - // List of vendor names to skip when determining caller, common vendor are automatically added - 'skip_vendors' => [ - // 'phpunit' - ], - - // List of namespaces to skip when determining caller - 'skip_namespaces' => [ - // 'Vendor' - ], - - // List of class names to skip when determining caller - 'skip_classes' => [ - // App\CustomLog::class - ] - ], - - /* - |------------------------------------------------------------------------------------------------------------------ - | Serialization - |------------------------------------------------------------------------------------------------------------------ - | - | Clockwork serializes the collected data to json for storage and transfer. Here you can configure certain aspects - | of serialization. Serialization has a large effect on the cpu time and memory usage. - | - */ - - // Maximum depth of serialized multi-level arrays and objects - 'serialization_depth' => isset($_ENV['CLOCKWORK_SERIALIZATION_DEPTH']) ? $_ENV['CLOCKWORK_SERIALIZATION_DEPTH'] : 10, - - // A list of classes that will never be serialized (eg. a common service container class) - 'serialization_blackbox' => [ - // \App\ServiceContainer::class - ], - - /* - |------------------------------------------------------------------------------------------------------------------ - | Register helpers - |------------------------------------------------------------------------------------------------------------------ - | - | Clockwork comes with a "clock" global helper function. You can use this helper to quickly log something and to - | access the Clockwork instance. - | - */ - - 'register_helpers' => isset($_ENV['CLOCKWORK_REGISTER_HELPERS']) ? $_ENV['CLOCKWORK_REGISTER_HELPERS'] : false, - - /* - |------------------------------------------------------------------------------------------------------------------ - | Send Headers for AJAX request - |------------------------------------------------------------------------------------------------------------------ - | - | When trying to collect data the AJAX method can sometimes fail if it is missing required headers. For example, an - | API might require a version number using Accept headers to route the HTTP request to the correct codebase. - | - */ - - 'headers' => [ - // 'Accept' => 'application/vnd.com.whatever.v1+json', - ], - /* - |------------------------------------------------------------------------------------------------------------------ - | Server-Timing - |------------------------------------------------------------------------------------------------------------------ - | - | Clockwork supports the W3C Server Timing specification, which allows for collecting a simple performance metrics - | in a cross-browser way. Eg. in Chrome, your app, database and timeline event timings will be shown in the Dev - | Tools network tab. This setting specifies the max number of timeline events that will be sent. Setting to false - | will disable the feature. - | - */ - - 'server_timing' => isset($_ENV['CLOCKWORK_SERVER_TIMING']) ? $_ENV['CLOCKWORK_SERVER_TIMING'] : 10 - -]; diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Vanilla/helpers.php b/source/vendor/itsgoingd/clockwork/Clockwork/Support/Vanilla/helpers.php deleted file mode 100644 index bc98e2c..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Support/Vanilla/helpers.php +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - Clockwork - - - - - - - - - - - - - - - - - - - - diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Web/Web.php b/source/vendor/itsgoingd/clockwork/Clockwork/Web/Web.php deleted file mode 100644 index 71430ec..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Web/Web.php +++ /dev/null @@ -1,34 +0,0 @@ -resolveAssetPath($path); - - if (! $path) return; - - switch (pathinfo($path, PATHINFO_EXTENSION)) { - case 'css': $mime = 'text/css'; break; - case 'js': $mime = 'application/javascript'; break; - default: $mime = 'text/html'; break; - } - - return [ - 'path' => $path, - 'mime' => $mime - ]; - } - - // Resolves absolute path of the asset, protects from accessing files outside Clockwork public dir - protected function resolveAssetPath($path) - { - $publicPath = realpath(__DIR__ . '/public'); - - $path = realpath("$publicPath/{$path}"); - - return strpos($path, $publicPath) === 0 ? $path : false; - } -} diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/css/app.515e4027.css b/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/css/app.515e4027.css deleted file mode 100644 index 35aca72..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/css/app.515e4027.css +++ /dev/null @@ -1 +0,0 @@ -.modal-backdrop{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background:rgba(224,224,235,.6);display:-webkit-box;display:-ms-flexbox;display:flex;height:100%;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;left:0;opacity:1;position:fixed;top:0;-webkit-transition:opacity .2s;transition:opacity .2s;width:100%;z-index:666}.application.dark .modal-backdrop{background:rgba(41,41,61,.6)}.modal{background:#fcfcfd;border-radius:8px;-webkit-box-shadow:0 0 1px 1px #e0e0eb,0 2px 4px 0 #e0e0eb;box-shadow:0 0 1px 1px #e0e0eb,0 2px 4px 0 #e0e0eb;max-height:calc(100vh - 20px);overflow:auto;padding:25px}.application.dark .modal{background:#1f1f1f;-webkit-box-shadow:0 0 1px 1px #131315,0 2px 4px 0 #131315;box-shadow:0 0 1px 1px #131315,0 2px 4px 0 #131315}.modal .modal-header{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;font-size:13px;font-weight:600}.modal .modal-header .header-title{-webkit-box-flex:1;-ms-flex:1;flex:1}.modal .modal-header .header-title .ui-icon{color:#111;margin-right:5px}.application.dark .modal .modal-header .header-title .ui-icon{color:#b2b2b2}.modal .modal-header .header-close{font-size:110%}.modal .modal-header .header-close:hover{color:#258cdb}.application.dark .modal .modal-header .header-close:hover{color:#f27e02}.modal-enter,.modal-leave-to{opacity:0}.credits-modal{font-size:13px;max-height:450px;max-width:600px;padding-top:10px;width:90vw}.credits-modal .credits-section{margin-bottom:35px}.credits-modal h1{font-size:180%;font-weight:600;margin-bottom:0;text-align:center}.credits-modal h2{font-size:120%;font-weight:600;margin-bottom:10px;margin-left:56px;margin-top:30px}.credits-modal .credits-version{font-size:85%;margin-top:2px;text-align:center}.credits-modal .credits-authors,.credits-modal .credits-contributors,.credits-modal .credits-sponsors{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-bottom:10px}.credits-modal .credits-authors .authors-author,.credits-modal .credits-contributors .authors-author,.credits-modal .credits-sponsors .authors-author{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:100%}.credits-modal .credits-authors .authors-author .author-avatar,.credits-modal .credits-contributors .authors-author .author-avatar,.credits-modal .credits-sponsors .authors-author .author-avatar{margin-right:12px}.credits-modal .credits-authors .authors-author .author-name,.credits-modal .credits-contributors .authors-author .author-name,.credits-modal .credits-sponsors .authors-author .author-name{font-size:110%;font-weight:500;margin-bottom:4px}.credits-modal .credits-authors .authors-author .author-links,.credits-modal .credits-contributors .authors-author .author-links,.credits-modal .credits-sponsors .authors-author .author-links{font-size:110%}.credits-modal .credits-authors .authors-author .author-links a,.credits-modal .credits-contributors .authors-author .author-links a,.credits-modal .credits-sponsors .authors-author .author-links a{margin-right:6px}.credits-modal .credits-authors .author-avatar,.credits-modal .credits-authors .contributor-avatar,.credits-modal .credits-authors .sponsor-avatar,.credits-modal .credits-contributors .author-avatar,.credits-modal .credits-contributors .contributor-avatar,.credits-modal .credits-contributors .sponsor-avatar,.credits-modal .credits-sponsors .author-avatar,.credits-modal .credits-sponsors .contributor-avatar,.credits-modal .credits-sponsors .sponsor-avatar{background-color:#fff;background-size:cover;border-radius:50%;height:38px;margin:6px;width:38px}.credits-modal .credits-dependencies{padding-bottom:40px;text-align:center}.credits-modal .credits-dependencies h3{font-size:100%;margin-top:20px}.credits-modal .credits-dependencies a{text-decoration:none}.credits-modal .credits-dependencies .dependencies-dependency{margin-bottom:10px}.content-request{font-size:130%;margin-top:-46px;padding:15px 15px 61px}.content-request .counters-row{margin-bottom:0!important;margin-top:10px}.content-request .request-details,.content-request .request-main{overflow:hidden;text-overflow:ellipsis}.content-request .request-alerts.alert-errors{color:#b3492e}.application.dark .content-request .request-alerts.alert-errors{color:#ed797a}.content-request .request-alerts.alert-warnings{color:#f4bd00}.application.dark .content-request .request-alerts.alert-warnings{color:#fad89f}.content-request .type-text{background:#cbdeec;border-radius:3px;color:#365063;font-size:90%;padding:2px 4px}.application.dark .content-request .type-text{background:#002e52;color:#6ebef7}.content-request .status-text{background:#e3eccb;border-radius:8px;color:#586336;font-size:90%;padding:2px 6px;text-transform:uppercase}.application.dark .content-request .status-text{background:#293800;color:#e3fa9e}.content-request .status-text.client-error{background:#fffae2;color:#a85919}.application.dark .content-request .status-text.client-error{background:#382f00;color:#fad89f}.content-request .status-text.server-error{background:#ffebeb;color:#c51f24}.application.dark .content-request .status-text.server-error{background:#380000;color:#ed797a}.content-request .method-text{color:#696969;font-size:90%;margin-right:8px}.application.dark .content-request .method-text{color:#767676}.popover-container{position:relative}.popover{left:calc(50% - 200px);padding-top:17px;position:absolute;top:100%;width:400px;z-index:666}.popover.left-aligned{left:0;right:auto}.popover.left-aligned .popover-content:before{left:15px;right:auto}.popover.left-aligned .popover-content:after{left:14px;right:auto}.popover.right-aligned{left:auto;right:0}.popover.right-aligned .popover-content:before{left:auto;right:8px}.popover.right-aligned .popover-content:after{left:auto;right:7px}.popover .popover-content{background:#fcfcfd;border-radius:8px;-webkit-box-shadow:0 0 1px 1px #e0e0eb,0 2px 4px 0 #e0e0eb;box-shadow:0 0 1px 1px #e0e0eb,0 2px 4px 0 #e0e0eb;max-height:400px;overflow:auto;padding:5px 0;text-align:center;width:100%}.application.dark .popover .popover-content{background:#252527;-webkit-box-shadow:0 0 1px 1px #131315,0 2px 4px 0 #131315;box-shadow:0 0 1px 1px #131315,0 2px 4px 0 #131315}.popover .popover-content:after,.popover .popover-content:before{border-style:solid;content:"";height:0;position:absolute;width:0}.popover .popover-content:before{border-color:transparent transparent #fcfcfd transparent;border-width:0 11px 11px 11px;left:calc(50% - 10px);top:7px;z-index:500}.application.dark .popover .popover-content:before{border-color:transparent transparent #252527 transparent}.popover .popover-content:after{border-color:transparent transparent rgba(51,51,51,.06) transparent;border-width:0 12px 12px 12px;left:calc(50% - 11px);top:5px}.application.dark .popover .popover-content:after{border-color:transparent transparent rgba(19,19,21,.5) transparent}.exception-section{border-bottom:1px solid #e7e7ef}.application.dark .exception-section{border-bottom:1px solid #343436}.exception-section.compact .exception-info{background:rgba(255,235,235,.9)}.application.dark .exception-section.compact .exception-info{background:rgba(56,0,0,.9)}.exception-section.compact .exception-message{font-size:13px!important}.exception-section.compact .exception-message h3{display:inline;font-size:13px;padding-right:4px}.exception-section.compact .exception-message .ui-icon{margin-right:5px}.exception-section .exception-info{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background:#ffebeb;color:#c51f24;display:-webkit-box;display:-ms-flexbox;display:flex;padding:6px 10px}.exception-section .exception-info:nth-child(2n){background:#ffe0e0}.exception-section .exception-info:first-child{padding-top:12px}.exception-section .exception-info:last-child{padding-bottom:12px}.application.dark .exception-section .exception-info{background:#380000;color:#ed797a}.application.dark .exception-section .exception-info:nth-child(2n){background:#2e0000}.exception-section .exception-info h3{border-bottom:0;font-size:14px;margin:0 0 5px;word-break:break-all}.exception-section .exception-info .exception-message{-webkit-box-flex:1;-ms-flex:1;flex:1;font-size:12px;line-height:1.33}.exception-section .exception-info .exception-previous,.exception-section .exception-info .exception-trace>a{color:#c51f24;font-size:12px;margin:0 4px}.application.dark .exception-section .exception-info .exception-previous,.application.dark .exception-section .exception-info .exception-trace>a{color:#ed797a}.exception-section .exception-info .exception-previous{margin-right:4px;text-decoration:none}.exception-section .exception-info .exception-trace{display:inline-block}.parent-request{-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-bottom:1px solid #e7e7ef;display:-webkit-box;display:-ms-flexbox;display:flex;font-size:12px;font-weight:600;padding:8px 10px}.application.dark .parent-request{border-bottom:1px solid #343436}.parent-request.compact{background:hsla(0,0%,100%,.9)}.application.dark .parent-request.compact{background:rgba(30,30,30,.9)}.parent-request.compact .parent-title{padding-right:4px}.parent-request.compact .parent-name,.parent-request.compact .parent-title{display:inline}.parent-request .parent-title{font-size:10px;margin-bottom:2px}.parent-request .parent-method{color:grey;font-size:90%;font-weight:400;margin-right:2px}.application.dark .parent-request .parent-method{color:#767676}.parent-request .parent-uri{font-weight:400}.parent-request .type-text{background:#cbdeec;border-radius:3px;color:#365063;font-size:80%;margin-right:2px;padding:1px 3px;vertical-align:1px}.application.dark .parent-request .type-text{background:#002e52;color:#6ebef7}.parent-request a{color:#258cdb;font-size:11px;font-weight:400;padding:0 6px;text-decoration:none;text-transform:uppercase}.application.dark .parent-request a{color:#f27e02}.parent-request .parent-close{margin-left:auto}.messages-overlay{border-top:1px solid #d1d1e0;bottom:0;position:absolute;width:100%}.application.dark .messages-overlay{border-top:1px solid #2a2a3c}.messages-overlay .update-notification{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background:rgba(227,236,203,.9);color:#586336;display:-webkit-box;display:-ms-flexbox;display:flex;font-size:13px;padding:12px 10px}.application.dark .messages-overlay .update-notification{background:rgba(41,56,0,.9);color:#e3fa9e}.messages-overlay .update-notification .notification-text{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex}.messages-overlay .update-notification .ui-icon{margin-right:5px}.messages-overlay .update-notification a{color:#586336;font-size:80%;padding:0 6px;text-decoration:none;text-transform:uppercase}.application.dark .messages-overlay .update-notification a{color:#f27e02}.messages-overlay .update-notification strong{font-weight:500}.messages-overlay .update-notification .updateNotification-close{margin-left:auto}.settings-modal{font-size:13px;max-width:600px;padding-top:10px;width:90%}.settings-modal a{padding:0}.settings-modal .controls-group{display:-webkit-box;display:-ms-flexbox;display:flex;margin:22px 0}.settings-modal .controls-group .controls{-webkit-box-flex:1;-ms-flex:1;flex:1}.settings-modal .help-text{font-size:90%;margin-top:8px}.settings-modal label{margin-right:10px;margin-top:5px;text-align:right;width:25%}.settings-modal input,.settings-modal select{border:1px solid #ccc;border-radius:4px;font-size:13px;height:26px;padding:4px 8px;width:100%}.application.dark .settings-modal input,.application.dark .settings-modal select{background:#3f3e3d;border-color:#5d5c5b;color:#e9e9e9}.application.dark .settings-modal input::-webkit-input-placeholder,.application.dark .settings-modal select::-webkit-input-placeholder{color:#a7a6a5;opacity:1}.application.dark .settings-modal input::-moz-placeholder,.application.dark .settings-modal select::-moz-placeholder{color:#a7a6a5;opacity:1}.application.dark .settings-modal input:-ms-input-placeholder,.application.dark .settings-modal select:-ms-input-placeholder{color:#a7a6a5;opacity:1}.application.dark .settings-modal input::-ms-input-placeholder,.application.dark .settings-modal select::-ms-input-placeholder{color:#a7a6a5;opacity:1}.application.dark .settings-modal input::placeholder,.application.dark .settings-modal select::placeholder{color:#a7a6a5;opacity:1}.settings-modal input[type=checkbox],.settings-modal select[type=checkbox]{height:auto;margin:0 3px 0 0;vertical-align:middle;width:auto}.application.dark .settings-modal select{background:#3f3e3d;border:1px solid #5d5c5b;border-radius:5px}.settings-modal .controls-input-vgroup input:first-child{border-radius:4px 4px 0 0}.settings-modal .controls-input-vgroup input:last-child{border-radius:0 0 4px 4px;margin-top:-2px}.settings-modal .controls-checkbox{display:inline-block;margin-bottom:10px;margin-top:0;text-align:left;width:100%}.settings-modal .controls-checkbox:last-child{margin:0}.settings-modal .appearance-controls{display:-webkit-box;display:-ms-flexbox;display:flex}.settings-modal .appearance-controls .option{-webkit-box-flex:0;-ms-flex:0;flex:0;margin-right:12px;text-align:center}.settings-modal .appearance-controls .option.selected img{border:2px solid #258cdb;-webkit-box-shadow:0 0 2px #258cdb;box-shadow:0 0 2px #258cdb}.application.dark .settings-modal .appearance-controls .option.selected img{border:2px solid #f27e02;-webkit-box-shadow:0 0 2px #f27e02;box-shadow:0 0 2px #f27e02}.settings-modal .appearance-controls .option img{border:1px solid #ccc;border-radius:4px;height:50px;width:75px}.application.dark .settings-modal .appearance-controls .option img{border:1px solid #363636}.settings-modal .settings-warning{background:#ffebeb;color:#c51f24;margin-left:-35px;padding:10px 15px;width:calc(100% + 70px)}.settings-modal .settings-warning .warning-text{display:-webkit-box;display:-ms-flexbox;display:flex}.settings-modal .settings-warning .warning-details{font-size:90%;margin-top:5px}.settings-modal .settings-warning .warning-label{border:1px solid #dd888b;border-radius:6px;color:#dd888b;font-size:90%;font-weight:500;margin-right:5px;text-transform:uppercase;padding:1px 3px}.settings-modal .settings-warning a{color:#dd888b;margin-left:auto}.application.dark .settings-modal .settings-warning{background:#380000;color:#ed797a}.application.dark .settings-modal .settings-warning .warning-label{border:1px solid #c3797b;color:#c3797b}.application.dark .settings-modal .settings-warning a{color:#c3797b}.settings-modal .settings-footer{font-size:80%;margin:10px 0;text-align:right;margin-right:-20px}.settings-modal .settings-footer a{text-decoration:none}.sharing-modal{font-size:13px;max-width:320px;padding-top:10px}.sharing-modal .sharing-content{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-left:-8px;margin-top:10px;width:calc(100% + 16px)}.sharing-modal .sharing-content .content-item{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background:#f2f2f2;border-radius:4px;display:-webkit-box;display:-ms-flexbox;display:flex;font-size:12px;margin:8px 8px;max-width:152px;padding:5px 10px;width:100%}.application.dark .sharing-modal .sharing-content .content-item{background:#252527}.sharing-modal .sharing-content .content-item:hover{color:#258cdb}.application.dark .sharing-modal .sharing-content .content-item:hover{color:#d46f02}.sharing-modal .sharing-content .content-item.active{background:#2786f3;color:#f5f5f5}.application.dark .sharing-modal .sharing-content .content-item.active{background:#d46f02;color:#fff}.sharing-modal .sharing-content .content-item.unavailable{opacity:.33}.sharing-modal .sharing-content .content-item.item-all{font-size:14px;margin:8px 22%;max-width:60%;text-align:center}.sharing-modal .sharing-content .content-item .ui-icon{margin-right:5px}.sharing-modal .sharing-content .content-item .item-text{-webkit-box-flex:1;-ms-flex:1;flex:1}.sharing-modal .sharing-content .content-item input{display:none}.sharing-modal .error-message{text-align:center}.sharing-modal .button{margin:30px auto 10px;max-width:60%}.sharing-modal .button .sk-spinner{margin-right:6px}.sharing-modal .sharing-terms h1{font-size:200%;margin:0;text-align:center}.sharing-modal .sharing-terms h2{font-size:110%;margin-top:25px}.sharing-modal .sharing-terms ul{margin-bottom:25px;padding-left:20px}.sharing-modal .sharing-terms ul li{font-size:95%;margin-bottom:8px}.sharing-modal .sharing-terms .button{margin-top:35px}.delete-shared-modal{font-size:13px;max-width:320px;padding-top:10px}.delete-shared-modal h1{font-size:200%;text-align:center}.delete-shared-modal .button{margin:30px auto 10px;max-width:60%}.delete-shared-modal .button .sk-spinner{margin-right:6px}.details-header-tab{-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-bottom:1px solid #d1d1e0;border-left:1px solid transparent;border-right:1px solid #d1d1e0;color:#404040;cursor:default;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex:1;flex:1;font-size:12px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding:0 12px;text-align:center;text-decoration:none;-webkit-transition:all .1s;transition:all .1s}.application.dark .details-header-tab{border-bottom:1px solid #2a2a3c;border-right:1px solid #2a2a3c;color:#9e9e9e}.details-header-tab:first-child{border-left:1px solid #d1d1e0}.application.dark .details-header-tab:first-child{border-left:1px solid #2a2a3c}.details-header-tab:hover{background:#e3e3ed;color:#258cdb}.application.dark .details-header-tab:hover{background:#191924}.details-header-tab.active{background:#f6f6f9;border-bottom:0;border-right:1px solid #d1d1e0;color:#258cdb;margin-bottom:-1px;padding-bottom:1px}.application.dark .details-header-tab.active{background:#252527;color:#f27e02}.details-header-tab.active .tab-badge{background:transparent;border:1px solid #258cdb;color:#258cdb}.details-header-tab.full{min-width:40px}.details-header-tab.short{-webkit-box-flex:0;-ms-flex:0;flex:0;width:40px}.details-header-tab.short .ui-icon{margin-right:0}.details-header-tab .ui-icon{-ms-flex-negative:0;flex-shrink:0;margin-right:5px}.details-header-tab .tab-title{overflow:hidden;text-overflow:ellipsis}.details-header-tab .tab-badge{background:#9d9daf;border:1px solid #9d9daf;border-radius:6px;color:#f5f5f5;font-size:90%;margin-left:5px;margin-top:1px;padding:0 4px}.details-table{background:#fcfcfd;border-radius:8px;-webkit-box-shadow:0 0 0 1px #e0e0eb,0 2px 2px 0 #e0e0eb;box-shadow:0 0 0 1px #e0e0eb,0 2px 2px 0 #e0e0eb;margin-bottom:20px;padding-bottom:10px}.application.dark .details-table{background:#252527;-webkit-box-shadow:0 0 0 1px #15151e,0 2px 2px 0 #15151e;box-shadow:0 0 0 1px #15151e,0 2px 2px 0 #15151e}.details-table .table-header{-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-radius:8px 8px 0 0;display:-webkit-box;display:-ms-flexbox;display:flex;font-size:14px;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:8px 8px 8px 12px}.application.dark .details-table .table-header{background:#252527}.details-table .table-header .header-title{-webkit-box-flex:1;-ms-flex:1;flex:1;font-size:13px;font-weight:600;margin-right:10px;white-space:nowrap}.details-table .table-header .header-title .ui-icon{color:#111;margin-right:5px}.application.dark .details-table .table-header .header-title .ui-icon{color:#b2b2b2}.details-table .table-header .header-title .title-badge{background:#2786f3;color:#f5f5f5;border-radius:8px;margin-left:4px;padding:1px 8px}.application.dark .details-table .table-header .header-title .title-badge{background:#d46f02;color:#fff}.details-table .table-header .header-group{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;height:100%;margin-right:12px}.details-table .table-header .header-group:last-child{margin-right:0}.details-table .table-header .header-item{-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-radius:4px;display:-webkit-box;display:-ms-flexbox;display:flex;height:24px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-right:4px;text-decoration:none;width:24px}.application.dark .details-table .table-header .header-item{color:#9e9e9e}.details-table .table-header .header-item:hover{color:#258cdb}.application.dark .details-table .table-header .header-item:hover{color:#d46f02}.details-table .table-header .header-item:last-child{margin-right:0}.details-table .table-header .header-item.active{background:#2786f3;color:#f5f5f5}.application.dark .details-table .table-header .header-item.active{background:#d46f02;color:#fff}.details-table .table-header .header-item.item-text{font-size:12px;min-width:24px;padding:0 4px;width:auto}.details-table .table-header .header-toggle{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background:#eee;border-radius:4px;display:-webkit-box;display:-ms-flexbox;display:flex;font-size:95%;height:24px;padding:0 8px}.application.dark .details-table .table-header .header-toggle{background:#3f3e3d}.details-table .table-header .header-toggle input{margin:0 5px 0 0}.details-table .table-header .header-search{position:relative}.details-table .table-header .header-search input{background:#eee;border:0;border-radius:4px;font-size:13px;height:24px;max-width:180px;padding-left:28px;width:100%}.application.dark .details-table .table-header .header-search input{background:#3f3e3d;color:#e9e9e9}.application.dark .details-table .table-header .header-search input::-webkit-input-placeholder{color:#a7a6a5;opacity:1}.application.dark .details-table .table-header .header-search input::-moz-placeholder{color:#a7a6a5;opacity:1}.application.dark .details-table .table-header .header-search input:-ms-input-placeholder{color:#a7a6a5;opacity:1}.application.dark .details-table .table-header .header-search input::-ms-input-placeholder{color:#a7a6a5;opacity:1}.application.dark .details-table .table-header .header-search input::placeholder{color:#a7a6a5;opacity:1}.details-table .table-header .header-search .ui-icon{left:7px;position:absolute;top:5px}.details-table table{font-size:12px}.details-table table thead .ui-icon{font-size:110%}.details-table table tr:nth-child(2n){background:#f3f3f7}.application.dark .details-table table tr:nth-child(2n){background:#202022}.details-table table th{color:#333;font-size:90%;font-weight:600;padding:8px 6px;text-align:center;white-space:nowrap}.application.dark .details-table table th{color:#b2b2b2}.details-table table th:first-child{padding-left:12px}.details-table table th:last-child{padding-right:12px}.details-table table td{padding:8px 10px;vertical-align:top}.details-table table td:first-child{padding-left:12px}.details-table table td:last-child{padding-right:12px}.details-table table td.key{font-size:12px;white-space:nowrap}.details-table table td.value{word-break:break-all}.details-table .pagination-controls{background:transparent}.details-table .pagination-controls td{text-align:center}.details-table .pagination-controls a{color:#258cdb;text-decoration:none}.application.dark .details-table .pagination-controls a{color:#f27e02}.highlighted-code{line-height:1.4;margin:0;white-space:pre-wrap}.highlighted-code .language-sql .keyword{font-weight:600;text-transform:uppercase}.highlighted-code .language-sql .function{color:#881280}.highlighted-code .language-sql .number{color:#1c00cf}.highlighted-code .language-sql .string{color:#c41a16}.highlighted-code .language-sql .punctuation{color:grey}.highlighted-code .language-sql .boolean,.highlighted-code .language-sql .operator{color:#132ba2}.application.dark .highlighted-code .language-sql .function{color:#e36eec}.application.dark .highlighted-code .language-sql .number{color:#997fff}.application.dark .highlighted-code .language-sql .string{color:#e33e3a}.application.dark .highlighted-code .language-sql .punctuation{color:#7f7f7f}.application.dark .highlighted-code .language-sql .boolean,.application.dark .highlighted-code .language-sql .operator{color:#8296ff}.counter.database-slow-query .has-mark:before{background-color:#d7a175}.application.dark .counter.database-slow-query .has-mark:before{background-color:#8a6c38}.details-table table tr.database-slow-query{background:#fffae2;color:#a85919}.details-table table tr.database-slow-query:nth-child(2n){background:#fff5c2!important}.details-table table tr.database-slow-query .database-query-path>a{color:#d7a175!important}.application.dark .details-table table tr.database-slow-query{background:#382f00;color:#fad89f}.application.dark .details-table table tr.database-slow-query:nth-child(2n){background:#2e2600!important}.application.dark .details-table table tr.database-slow-query .database-query-path>a{color:#ae8847!important}.details-table table .database-query-bindings{margin-top:2px}.details-table .log-row.error{background:#ffebeb;color:#c51f24}.details-table .log-row.error:nth-child(2n){background:#ffe0e0}.details-table .log-row.error .log-message-path{color:#dd888b}.application.dark .details-table .log-row.error{background:#380000;color:#ed797a}.application.dark .details-table .log-row.error:nth-child(2n){background:#2e0000}.application.dark .details-table .log-row.error .log-message-path{color:#c3797b}.details-table .log-row.warning{background:#fffae2;color:#a85919}.details-table .log-row.warning:nth-child(2n){background:#fff5c2}.details-table .log-row.warning .log-message-path{color:#d7a175}.application.dark .details-table .log-row.warning{background:#382f00;color:#fad89f}.application.dark .details-table .log-row.warning:nth-child(2n){background:#2e2600}.application.dark .details-table .log-row.warning .log-message-path{color:#d0b78b}.details-table .log-date,.details-table .log-level{width:70px}.details-table .log-message{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.details-table .log-message .log-message-content{-webkit-box-flex:1;-ms-flex:1 0 auto;flex:1 0 auto;max-width:100%}.details-table .log-message .log-message-content .linkified{text-decoration:none}.details-table .log-message .log-message-exception{-webkit-box-flex:0;-ms-flex:0;flex:0;font-size:90%;margin:3px 5px 0 0;white-space:nowrap}.details-table .log-message .log-message-exception .exception-previous{border:1px solid #aaa;border-radius:4px;text-decoration:none;padding:2px 4px;margin-right:5px}.application.dark .details-table .log-message .log-message-exception .exception-previous{border-color:grey}.details-table .log-message .log-message-context{margin-top:4px}.details-table .log-message .log-message-path{color:#aaa;-webkit-box-flex:0;-ms-flex:0;flex:0;font-size:90%;margin-top:3px}.application.dark .details-table .log-message .log-message-path{color:#777}.models-counters .counter-retrieved .has-mark:before{background:#78b1de}.application.dark .models-counters .counter-retrieved .has-mark:before{background:#649dca}.models-counters .counter-created .has-mark:before{background:#b1ca6d}.application.dark .models-counters .counter-created .has-mark:before{background:#9db659}.models-counters .counter-updated .has-mark:before{background:#d4c163}.application.dark .models-counters .counter-updated .has-mark:before{background:#b68258}.models-counters .counter-deleted .has-mark:before{background:#e79697}.application.dark .models-counters .counter-deleted .has-mark:before{background:#d38283}.models-tabs{-webkit-box-flex:1;-ms-flex:1;flex:1;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-bottom:10px;margin-top:30px}.models-tabs,.models-tabs .models-tab{display:-webkit-box;display:-ms-flexbox;display:flex}.models-tabs .models-tab{-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-radius:12px;color:#404040;cursor:default;font-size:12px;line-height:26px;padding:0 26px;text-align:center;text-decoration:none}.application.dark .models-tabs .models-tab{color:#9e9e9e}.models-tabs .models-tab:hover{color:#258cdb}.application.dark .models-tabs .models-tab:hover{color:#f27e02}.models-tabs .models-tab.active{background:#2786f3;color:#f5f5f5}.application.dark .models-tabs .models-tab.active{background:#d46f02;color:#fff}.models-tabs .models-tab .ui-icon{margin-right:5px}.models-actions .actions-action .action-model{width:100%}.models-actions .actions-action .action-model .model-content{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;width:100%}.models-actions .actions-action .action-model .model-content .content-trace{margin-left:auto}.models-actions .actions-action .action-key{color:grey;font-size:11px}.application.dark .models-actions .actions-action .action-key{color:#767676}.models-actions .actions-action .action-key .key-hash{margin:0 1px 0 2px}.models-actions .actions-action .action-action{background:#cbdeec;border-radius:8px;color:#365063;font-size:10px;padding:3px 8px;text-transform:uppercase}.application.dark .models-actions .actions-action .action-action{background:#002e52;color:#6ebef7}.models-actions .actions-action .action-action.action-created{background:#e3eccb;color:#586336}.application.dark .models-actions .actions-action .action-action.action-created{background:#293800;color:#e3fa9e}.models-actions .actions-action .action-action.action-updated{background:#fffae2;color:#a85919}.application.dark .models-actions .actions-action .action-action.action-updated{background:#382f00;color:#fad89f}.models-actions .actions-action .action-action.action-deleted{background:#ffebeb;color:#c51f24}.application.dark .models-actions .actions-action .action-action.action-deleted{background:#380000;color:#ed797a}.models-actions .actions-details td{padding:0 20px 10px!important}.models-actions .actions-details h4{color:#333;font-size:90%;font-weight:600;margin:0 0 3px}.application.dark .models-actions .actions-details h4{color:#b2b2b2}.models-actions .actions-details .details-row{display:-webkit-box;display:-ms-flexbox;display:flex;margin-top:12px}.models-actions .actions-details .details-row:first-child{margin-top:6px}.models-actions .actions-details .details-row .row-group{margin-right:15px}.models-actions .actions-details .details-row .row-group:last-child{margin-right:0}.models-actions .actions-details .details-row .row-group.group-query{-webkit-box-flex:1;-ms-flex:1;flex:1}.models-actions tr{background:#fcfcfd!important}.application.dark .models-actions tr{background:#252527!important}.models-actions tr:nth-child(4n),.models-actions tr:nth-child(4n-1){background:#f3f3f7!important}.application.dark .models-actions tr:nth-child(4n),.application.dark .models-actions tr:nth-child(4n-1){background:#202022!important}.models-counts .counts-model{width:100%}.models-counts .counts-count{text-align:center}.models-counts .count-text{background:#cbdeec;border-radius:8px;color:#365063;font-size:11px;padding:3px 8px;text-transform:uppercase}.application.dark .models-counts .count-text{background:#002e52;color:#6ebef7}.models-counts .count-text.count-created{background:#e3eccb;color:#586336}.application.dark .models-counts .count-text.count-created{background:#293800;color:#e3fa9e}.models-counts .count-text.count-updated{background:#fffae2;color:#a85919}.application.dark .models-counts .count-text.count-updated{background:#382f00;color:#fad89f}.models-counts .count-text.count-deleted{background:#ffebeb;color:#c51f24}.application.dark .models-counts .count-text.count-deleted{background:#380000;color:#ed797a}.email-message{font-size:13px;margin:0 auto;max-width:820px;width:100vw}.email-message .message-info{margin:15px 0}.email-message .message-info .info-row{margin-bottom:5px}.email-message .message-info .info-row .row-label{color:#333;font-size:90%;font-weight:600;padding-right:2px}.application.dark .email-message .message-info .info-row .row-label{color:#b2b2b2}.email-message .message-content{border-bottom:1px solid #e7e7ef;border-top:1px solid #e7e7ef;margin-left:-25px;width:calc(100% + 50px)}.application.dark .email-message .message-content{border-bottom:1px solid #343436;border-top:1px solid #343436}.email-message .message-content iframe{border:0;min-height:70vh;width:100%}.notifications-notifications .notification-subject{width:100%}.notifications-notifications .notification-subject .subject-content{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;width:100%}.notifications-notifications .notification-subject .subject-content .content-trace{margin-left:auto}.notifications-notifications .notification-actions{white-space:nowrap}.notifications-notifications .notification-actions a{margin-left:5px}.notifications-notifications .notifications-details td{padding:0 20px 10px!important}.notifications-notifications .notifications-details h4{color:#333;font-size:90%;font-weight:600;margin:0 0 3px}.application.dark .notifications-notifications .notifications-details h4{color:#b2b2b2}.notifications-notifications .notifications-details .details-row{display:-webkit-box;display:-ms-flexbox;display:flex;margin-top:12px}.notifications-notifications .notifications-details .details-row:first-child{margin-top:6px}.notifications-notifications .notifications-details .details-row .row-group{margin-right:15px}.notifications-notifications .notifications-details .details-row .row-group:last-child{margin-right:0}.notifications-notifications .notifications-details .details-row .row-group.group-query{-webkit-box-flex:1;-ms-flex:1;flex:1}.notifications-notifications tr{background:#fcfcfd!important}.application.dark .notifications-notifications tr{background:#252527!important}.notifications-notifications tr:nth-child(4n),.notifications-notifications tr:nth-child(4n-1){background:#f3f3f7!important}.application.dark .notifications-notifications tr:nth-child(4n),.application.dark .notifications-notifications tr:nth-child(4n-1){background:#202022!important}.command-output{background:#333;border-radius:6px;font-family:Menlo,monospace;overflow:auto;padding:16px 12px;white-space:pre}.application.dark .command-output{background:#111}.performance-chart{background:#414148;border-radius:3px;-webkit-box-shadow:0 2px 5px rgba(162,172,180,.25),0 0 2px rgba(162,172,180,.5);box-shadow:0 2px 5px rgba(162,172,180,.25),0 0 2px rgba(162,172,180,.5);display:-webkit-box;display:-ms-flexbox;display:flex;height:6px;margin:0 auto 20px;width:calc(100% - 2px)}.application.dark .performance-chart{background:#7e7e8b;-webkit-box-shadow:0 0 1px 1px #131315,0 2px 4px 0 #131315;box-shadow:0 0 1px 1px #131315,0 2px 4px 0 #131315}.performance-chart .chart-section{height:100%}.performance-chart .chart-section:first-child{border-top-left-radius:4px;border-bottom-left-radius:4px}.performance-chart .chart-section:last-child{border-top-right-radius:4px;border-bottom-right-radius:4px}.performance-chart .chart-section.section-blue{background:-webkit-gradient(linear,left top,left bottom,from(#6faef6),to(#2685f2));background:linear-gradient(180deg,#6faef6,#2685f2)}.performance-chart .chart-section.section-red{background:-webkit-gradient(linear,left top,left bottom,from(#de8788),to(#ce4b4d));background:linear-gradient(180deg,#de8788,#ce4b4d)}.performance-chart .chart-section.section-green{background:-webkit-gradient(linear,left top,left bottom,from(#77ce64),to(#4dae37));background:linear-gradient(180deg,#77ce64,#4dae37)}.performance-chart .chart-section.section-purple{background:-webkit-gradient(linear,left top,left bottom,from(#b787de),to(#934bce));background:linear-gradient(180deg,#b787de,#934bce)}.performance-chart .chart-section.section-grey{background:-webkit-gradient(linear,left top,left bottom,from(#9999a3),to(#414148));background:linear-gradient(180deg,#9999a3,#414148)}.application.dark .performance-chart .chart-section.section-blue{background:-webkit-gradient(linear,left top,left bottom,from(#4b94e7),to(#1d79e2));background:linear-gradient(180deg,#4b94e7,#1d79e2)}.application.dark .performance-chart .chart-section.section-red{background:-webkit-gradient(linear,left top,left bottom,from(#c76b6d),to(#b94648));background:linear-gradient(180deg,#c76b6d,#b94648)}.application.dark .performance-chart .chart-section.section-green{background:-webkit-gradient(linear,left top,left bottom,from(#5fb34d),to(#4c8f3d));background:linear-gradient(180deg,#5fb34d,#4c8f3d)}.application.dark .performance-chart .chart-section.section-purple{background:-webkit-gradient(linear,left top,left bottom,from(#9e6bc7),to(#8546b9));background:linear-gradient(180deg,#9e6bc7,#8546b9)}.application.dark .performance-chart .chart-section.section-grey{background:-webkit-gradient(linear,left top,left bottom,from(#94949e),to(#61616b));background:linear-gradient(180deg,#94949e,#61616b)}.performance-vitals tbody tr:first-child .vitals-row{margin-top:10px}.performance-vitals .vitals-row{margin:0 auto;max-width:600px}.performance-vitals .vitals-metric,.performance-vitals .vitals-row{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.performance-vitals .vitals-metric{-webkit-box-align:center;-ms-flex-align:center;align-items:center;font-weight:500;padding:12px 24px;width:50%}.performance-vitals .vitals-metric:first-child{border-right:1px solid #e7e7ef}.application.dark .performance-vitals .vitals-metric:first-child{border-right:1px solid #343436}.performance-vitals .vitals-metric .metric-value{border-radius:8px;font-size:95%;margin-left:auto;padding:2px 6px}.performance-vitals .vitals-metric .metric-value.value-fast{background:#e3eccb;color:#586336}.application.dark .performance-vitals .vitals-metric .metric-value.value-fast{background:#293800;color:#e3fa9e}.performance-vitals .vitals-metric .metric-value.value-moderate{background:#fff6cc;color:#a85919}.application.dark .performance-vitals .vitals-metric .metric-value.value-moderate{background:#382f00;color:#fad89f}.performance-vitals .vitals-metric .metric-value.value-slow{background:#ffebeb;color:#c51f24}.application.dark .performance-vitals .vitals-metric .metric-value.value-slow{background:#380000;color:#ed797a}.performance-vitals .vitals-metric .metric-info{color:grey;font-weight:400;margin-top:10px;width:100%}.performance-vitals .vitals-metric .metric-info a{color:grey;display:block;margin-top:5px}.profiler .profiler-metric{white-space:nowrap}.profiler .profiler-function{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.profiler .profiler-function .profiler-function-name{-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;word-break:break-all}.profiler .profiler-function .profiler-path{color:#aaa;-webkit-box-flex:0;-ms-flex:0;flex:0;font-size:90%;margin-top:3px}.profiler .profiler-content{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;font-size:14px;padding:80px 0;text-align:center;width:100%}.profiler .profiler-content h1{font-size:110%}.timeline .table-header{padding-bottom:10px}.timeline table{table-layout:fixed}.timeline .timeline-description,.timeline .timeline-timing{display:none}.timeline .timeline-description .description-content{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;word-break:break-word}.timeline .timeline-description .description-tags{font-size:95%;margin-right:5px;opacity:.7}.timeline .timeline-timing{padding-right:10px!important;text-align:right;width:80px}.timeline .timeline-timing.timing-total{font-weight:600}.timeline .timeline-size-monitor td{padding-bottom:0;padding-top:0}.timeline .timeline-chart{padding:8px!important}.timeline .timeline-chart .chart-event-group{cursor:pointer;height:16px;position:relative}.timeline .timeline-chart .chart-event-group .group-label{color:#365063;font-size:12px;line-height:16px;overflow:hidden;padding:0 6px;position:absolute;text-overflow:ellipsis;white-space:nowrap;z-index:100}.timeline .timeline-chart .chart-event-group .group-label .label-tags{font-size:95%;opacity:.8}.timeline .timeline-chart .chart-event-group .group-label.inside{color:#fff!important;text-align:center;width:100%!important}.timeline .timeline-chart .chart-event-group .group-label.before{right:100%;text-align:right}.timeline .timeline-chart .chart-event-group .group-label.after{left:100%}.timeline .timeline-chart .chart-event-group .group-label.blue{color:#2685f2}.timeline .timeline-chart .chart-event-group .group-label.red{color:#ce4b4d}.timeline .timeline-chart .chart-event-group .group-label.green{color:#4dae37}.timeline .timeline-chart .chart-event-group .group-label.purple{color:#934bce}.timeline .timeline-chart .chart-event-group .group-label.grey{color:#494950}.application.dark .timeline .timeline-chart .chart-event-group .group-label.blue{color:#4493ee}.application.dark .timeline .timeline-chart .chart-event-group .group-label.red{color:#ce6466}.application.dark .timeline .timeline-chart .chart-event-group .group-label.green{color:#5abb44}.application.dark .timeline .timeline-chart .chart-event-group .group-label.purple{color:#9e64ce}.application.dark .timeline .timeline-chart .chart-event-group .group-label.grey{color:#797986}.timeline .timeline-chart .group-event{height:100%;position:absolute}.timeline .timeline-chart .group-event .event-bar{background:#4295c5;border-radius:3px;height:100%;left:0;overflow:hidden;position:absolute;top:0;width:100%}.application.dark .timeline .timeline-chart .group-event .event-bar{background:#649dca}.timeline .timeline-chart .group-event .event-bar .bar-light{height:100%;position:absolute}.timeline .timeline-chart .group-event.blue .event-bar{background:#2685f2}.timeline .timeline-chart .group-event.blue .event-bar .bar-light{background:#6faef6}.timeline .timeline-chart .group-event.red .event-bar{background:#ce4b4d}.timeline .timeline-chart .group-event.red .event-bar .bar-light{background:#de8788}.timeline .timeline-chart .group-event.green .event-bar{background:#4dae37}.timeline .timeline-chart .group-event.green .event-bar .bar-light{background:#77ce64}.timeline .timeline-chart .group-event.purple .event-bar{background:#934bce}.timeline .timeline-chart .group-event.purple .event-bar .bar-light{background:#b787de}.timeline .timeline-chart .group-event.grey .event-bar{background:#494950}.timeline .timeline-chart .group-event.grey .event-bar .bar-light{background:#a1a1aa}.application.dark .timeline .timeline-chart .group-event.blue .event-bar{background:#4493ee}.application.dark .timeline .timeline-chart .group-event.blue .event-bar .bar-light{background:#126cd3}.application.dark .timeline .timeline-chart .group-event.red .event-bar{background:#ce6466}.application.dark .timeline .timeline-chart .group-event.red .event-bar .bar-light{background:#ae3739}.application.dark .timeline .timeline-chart .group-event.green .event-bar{background:#5abb44}.application.dark .timeline .timeline-chart .group-event.green .event-bar .bar-light{background:#3f832f}.application.dark .timeline .timeline-chart .group-event.purple .event-bar{background:#9e64ce}.application.dark .timeline .timeline-chart .group-event.purple .event-bar .bar-light{background:#7937ae}.application.dark .timeline .timeline-chart .group-event.grey .event-bar{background:#797986}.application.dark .timeline .timeline-chart .group-event.grey .event-bar .bar-light{background:#494950}.timeline .timeline-popover .popover-content{padding-bottom:0}.timeline .timeline-popover .popover-event{border-bottom:1px solid rgba(51,51,51,.1);margin-bottom:5px}.application.dark .timeline .timeline-popover .popover-event{border-color:hsla(0,0%,93.3%,.1)}.timeline .timeline-popover .popover-event:last-child{border-bottom:0;margin-bottom:0}.timeline .timeline-popover .popover-event .event-header{display:-webkit-box;display:-ms-flexbox;display:flex;padding:12px 12px 14px}.timeline .timeline-popover .popover-event .event-header h1{-webkit-box-flex:1;-ms-flex:1;flex:1;font-size:110%;margin:0;text-align:left}.timeline .timeline-popover .popover-event .event-header .header-tags{color:#777}.timeline .timeline-popover .popover-event .event-description{background:rgba(51,51,51,.03);border-top:1px solid rgba(51,51,51,.1);padding:12px;text-align:left}.application.dark .timeline .timeline-popover .popover-event .event-description{background:hsla(0,0%,86.7%,.03);border-color:hsla(0,0%,93.3%,.1)}.timeline .timeline-popover .popover-event .event-timings{border-top:1px solid rgba(51,51,51,.1);display:-webkit-box;display:-ms-flexbox;display:flex}.application.dark .timeline .timeline-popover .popover-event .event-timings{border-color:hsla(0,0%,93.3%,.1)}.timeline .timeline-popover .popover-event .event-timings .timings-timing{border-right:1px solid rgba(51,51,51,.1);-webkit-box-flex:1;-ms-flex:1;flex:1;padding:10px 0}.application.dark .timeline .timeline-popover .popover-event .event-timings .timings-timing{border-color:hsla(0,0%,93.3%,.1)}.timeline .timeline-popover .popover-event .event-timings .timings-timing:last-child{border-right:0}.timeline .timeline-popover .popover-event .event-timings .timings-timing .timing-value{font-size:110%}.timeline .timeline-popover .popover-event .event-timings .timings-timing .timing-label{color:#777;margin-top:5px;font-size:95%}.timeline .timeline-popover .popover-event .event-timings .timings-timing .timing-label:before{content:"";display:inline-block;border-radius:5px;background:#4295c5;width:14px;height:8px;vertical-align:0}.application.dark .timeline .timeline-popover .popover-event .event-timings .timings-timing .timing-label:before{background:#649dca}.timeline .timeline-popover .popover-event .event-timings .timings-timing.timing-total .timing-value{font-weight:600}.timeline .timeline-popover .popover-event .event-timings .timings-timing.timing-total .timing-label:before{background:-webkit-gradient(linear,left top,right top,color-stop(50%,#4295c5),color-stop(50%,#78b1de));background:linear-gradient(90deg,#4295c5 50%,#78b1de 0)}.application.dark .timeline .timeline-popover .popover-event .event-timings .timings-timing.timing-total .timing-label:before{background:-webkit-gradient(linear,left top,right top,color-stop(50%,#649dca),color-stop(50%,#2e81b1));background:linear-gradient(90deg,#649dca 50%,#2e81b1 0)}.timeline .timeline-popover .popover-event .event-timings .timings-timing.timing-children .timing-label:before{background:#78b1de}.application.dark .timeline .timeline-popover .popover-event .event-timings .timings-timing.timing-children .timing-label:before{background:#2e81b1}.timeline .timeline-popover .popover-event.blue .timings-timing .timing-label:before{background:#2685f2}.timeline .timeline-popover .popover-event.blue .timings-timing.timing-total .timing-label:before{background:-webkit-gradient(linear,left top,right top,color-stop(50%,#2685f2),color-stop(50%,#6faef6));background:linear-gradient(90deg,#2685f2 50%,#6faef6 0)}.timeline .timeline-popover .popover-event.blue .timings-timing.timing-children .timing-label:before{background:#6faef6}.timeline .timeline-popover .popover-event.red .timings-timing .timing-label:before{background:#ce4b4d}.timeline .timeline-popover .popover-event.red .timings-timing.timing-total .timing-label:before{background:-webkit-gradient(linear,left top,right top,color-stop(50%,#ce4b4d),color-stop(50%,#de8788));background:linear-gradient(90deg,#ce4b4d 50%,#de8788 0)}.timeline .timeline-popover .popover-event.red .timings-timing.timing-children .timing-label:before{background:#de8788}.timeline .timeline-popover .popover-event.green .timings-timing .timing-label:before{background:#4dae37}.timeline .timeline-popover .popover-event.green .timings-timing.timing-total .timing-label:before{background:-webkit-gradient(linear,left top,right top,color-stop(50%,#4dae37),color-stop(50%,#77ce64));background:linear-gradient(90deg,#4dae37 50%,#77ce64 0)}.timeline .timeline-popover .popover-event.green .timings-timing.timing-children .timing-label:before{background:#77ce64}.timeline .timeline-popover .popover-event.purple .timings-timing .timing-label:before{background:#934bce}.timeline .timeline-popover .popover-event.purple .timings-timing.timing-total .timing-label:before{background:-webkit-gradient(linear,left top,right top,color-stop(50%,#934bce),color-stop(50%,#b787de));background:linear-gradient(90deg,#934bce 50%,#b787de 0)}.timeline .timeline-popover .popover-event.purple .timings-timing.timing-children .timing-label:before{background:#b787de}.timeline .timeline-popover .popover-event.grey .timings-timing .timing-label:before{background:#494950}.timeline .timeline-popover .popover-event.grey .timings-timing.timing-total .timing-label:before{background:-webkit-gradient(linear,left top,right top,color-stop(50%,#494950),color-stop(50%,#a1a1aa));background:linear-gradient(90deg,#494950 50%,#a1a1aa 0)}.timeline .timeline-popover .popover-event.grey .timings-timing.timing-children .timing-label:before{background:#a1a1aa}.application.dark .timeline .timeline-popover .popover-event.blue .timings-timing .timing-label:before{background:#4493ee}.application.dark .timeline .timeline-popover .popover-event.blue .timings-timing.timing-total .timing-label:before{background:-webkit-gradient(linear,left top,right top,color-stop(50%,#4493ee),color-stop(50%,#126cd3));background:linear-gradient(90deg,#4493ee 50%,#126cd3 0)}.application.dark .timeline .timeline-popover .popover-event.blue .timings-timing.timing-children .timing-label:before{background:#126cd3}.application.dark .timeline .timeline-popover .popover-event.red .timings-timing .timing-label:before{background:#ce6466}.application.dark .timeline .timeline-popover .popover-event.red .timings-timing.timing-total .timing-label:before{background:-webkit-gradient(linear,left top,right top,color-stop(50%,#ce6466),color-stop(50%,#ae3739));background:linear-gradient(90deg,#ce6466 50%,#ae3739 0)}.application.dark .timeline .timeline-popover .popover-event.red .timings-timing.timing-children .timing-label:before{background:#ae3739}.application.dark .timeline .timeline-popover .popover-event.green .timings-timing .timing-label:before{background:#5abb44}.application.dark .timeline .timeline-popover .popover-event.green .timings-timing.timing-total .timing-label:before{background:-webkit-gradient(linear,left top,right top,color-stop(50%,#5abb44),color-stop(50%,#3f832f));background:linear-gradient(90deg,#5abb44 50%,#3f832f 0)}.application.dark .timeline .timeline-popover .popover-event.green .timings-timing.timing-children .timing-label:before{background:#3f832f}.application.dark .timeline .timeline-popover .popover-event.purple .timings-timing .timing-label:before{background:#9e64ce}.application.dark .timeline .timeline-popover .popover-event.purple .timings-timing.timing-total .timing-label:before{background:-webkit-gradient(linear,left top,right top,color-stop(50%,#9e64ce),color-stop(50%,#7937ae));background:linear-gradient(90deg,#9e64ce 50%,#7937ae 0)}.application.dark .timeline .timeline-popover .popover-event.purple .timings-timing.timing-children .timing-label:before{background:#7937ae}.application.dark .timeline .timeline-popover .popover-event.grey .timings-timing .timing-label:before{background:#797986}.application.dark .timeline .timeline-popover .popover-event.grey .timings-timing.timing-total .timing-label:before{background:-webkit-gradient(linear,left top,right top,color-stop(50%,#797986),color-stop(50%,#494950));background:linear-gradient(90deg,#797986 50%,#494950 0)}.application.dark .timeline .timeline-popover .popover-event.grey .timings-timing.timing-children .timing-label:before{background:#494950}.timeline.show-details .timeline-description,.timeline.show-details .timeline-timing{display:table-cell}.timeline.show-details .timeline-chart{width:20%}.timeline.show-details .timeline-chart .chart-event-group .group-label{display:none}.performance-metrics{margin-bottom:15px!important}.performance-chart-legend .mark-blue:before{background:#2685f2}.performance-chart-legend .mark-red:before{background:#ce4b4d}.performance-chart-legend .mark-green:before{background:#4dae37}.performance-chart-legend .mark-purple:before{background:#934bce}.performance-chart-legend .mark-grey:before{background:#414148}.application.dark .performance-chart-legend .mark-blue:before{background:#4b94e7}.application.dark .performance-chart-legend .mark-red:before{background:#c76b6d}.application.dark .performance-chart-legend .mark-green:before{background:#5fb34d}.application.dark .performance-chart-legend .mark-purple:before{background:#9e6bc7}.application.dark .performance-chart-legend .mark-grey:before{background:#94949e}.performance-tabs{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex:1;flex:1;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-bottom:10px;margin-top:30px}.performance-tabs .performance-tab{-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-radius:12px;color:#404040;cursor:default;display:-webkit-box;display:-ms-flexbox;display:flex;font-size:12px;line-height:26px;padding:0 26px;text-align:center;text-decoration:none}.application.dark .performance-tabs .performance-tab{color:#9e9e9e}.performance-tabs .performance-tab:hover{color:#258cdb}.application.dark .performance-tabs .performance-tab:hover{color:#f27e02}.performance-tabs .performance-tab.active{background:#2786f3;color:#f5f5f5}.application.dark .performance-tabs .performance-tab.active{background:#d46f02;color:#fff}.performance-tabs .performance-tab .ui-icon{margin-right:5px}.job-options[data-v-51ab4b8e]{margin:2px 0;width:100%}.job-options span[data-v-51ab4b8e]{display:block;white-space:nowrap}.job-status-text[data-v-51ab4b8e]{background:#fffae2;border-radius:8px;color:#a85919;font-size:11px;padding:2px 8px;text-transform:uppercase}.application.dark .job-status-text[data-v-51ab4b8e]{background:#382f00;color:#fad89f}.job-status-text.is-success[data-v-51ab4b8e]{background:#e3eccb;color:#586336}.application.dark .job-status-text.is-success[data-v-51ab4b8e]{background:#293800;color:#e3fa9e}.job-status-text.is-error[data-v-51ab4b8e]{background:#ffebeb;color:#c51f24}.application.dark .job-status-text.is-error[data-v-51ab4b8e]{background:#380000;color:#ed797a}.views-view-name{margin-bottom:3px}.split-view-details{overflow:hidden}.sidebar-section{border-bottom:1px solid #e7e7ef}.application.dark .sidebar-section{border-bottom:1px solid #323234}.sidebar-section .section-header{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background:#fcfcfd;display:-webkit-box;display:-ms-flexbox;display:flex;font-size:14px;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:8px 8px 8px 12px}.application.dark .sidebar-section .section-header{background:#252527}.sidebar-section .section-header .header-title{cursor:pointer;-webkit-box-flex:1;-ms-flex:1;flex:1;font-size:13px;font-weight:600;margin-right:10px}.sidebar-section .section-header .header-title .ui-icon{color:#111;margin-right:2px}.application.dark .sidebar-section .section-header .header-title .ui-icon{color:#b2b2b2}.sidebar-section .section-header .header-item{-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-radius:4px;display:-webkit-box;display:-ms-flexbox;display:flex;height:24px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-right:4px;text-decoration:none;width:24px}.application.dark .sidebar-section .section-header .header-item{color:#9e9e9e}.sidebar-section .section-header .header-item:hover{color:#258cdb}.application.dark .sidebar-section .section-header .header-item:hover{color:#d46f02}.sidebar-section .section-header .header-item.active{background:#258cdb;color:#f5f5f5}.application.dark .sidebar-section .section-header .header-item.active{background:#d46f02;color:#fff}.sidebar-section .section-header .header-item:last-child{margin-right:0}.sidebar-section .section-header .header-search{position:relative}.sidebar-section .section-header .header-search input{background:#eee;border:0;border-radius:4px;font-size:13px;height:24px;padding-left:28px;width:180px}.application.dark .sidebar-section .section-header .header-search input{background:#3f3e3d;color:#e9e9e9}.application.dark .sidebar-section .section-header .header-search input::-webkit-input-placeholder{color:#a7a6a5;opacity:1}.application.dark .sidebar-section .section-header .header-search input::-moz-placeholder{color:#a7a6a5;opacity:1}.application.dark .sidebar-section .section-header .header-search input:-ms-input-placeholder{color:#a7a6a5;opacity:1}.application.dark .sidebar-section .section-header .header-search input::-ms-input-placeholder{color:#a7a6a5;opacity:1}.application.dark .sidebar-section .section-header .header-search input::placeholder{color:#a7a6a5;opacity:1}.sidebar-section .section-header .header-search .ui-icon{left:7px;position:absolute;top:5px}.sidebar-section .details-table{border-radius:0;margin-bottom:0;padding-bottom:0}.application.dark .sidebar-section .details-table,.sidebar-section .details-table{-webkit-box-shadow:none;box-shadow:none}.sidebar-section .details-table td{vertical-align:top}.sidebar-section .details-table td .key{font-size:11px;font-weight:600;margin-bottom:3px;white-space:nowrap}.sidebar-section .details-table td .value{word-break:break-all}.command-tab{background:#fff}.application.dark .command-tab{background:#1f1f1f}.queue-job-tab{background:#fff}.application.dark .queue-job-tab{background:#1f1f1f}.queue-job-tab .data-value{border-bottom:1px solid #d1d1d1;padding:8px 10px}.application.dark .queue-job-tab .data-value{border-bottom:1px solid #363636}.request-tab{background:#fff}.application.dark .request-tab{background:#1f1f1f}.request-tab .data-raw{overflow:auto;padding:8px 12px;white-space:pre}.request-tab .session-user{-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-bottom:1px solid rgba(0,0,0,.06);display:-webkit-box;display:-ms-flexbox;display:flex;font-size:110%;padding:8px 10px}.application.dark .request-tab .session-user{border-bottom:1px solid #363636}.request-tab .session-user .ui-icon{color:#666;font-size:120%;margin-right:5px}.request-tab .session-user .name{margin-right:6px}.request-tab .session-user .dimmed{color:grey;font-size:90%}.application.dark .request-tab .session-user .dimmed{color:#767676}.request-tab .session-user .session-user-details{margin-left:auto}.test-tab .test-status-message{border-bottom:1px solid #d1d1d1;padding:12px 10px;font-size:13px}.application.dark .test-tab .test-status-message{border-bottom:1px solid #363636}.test-tab .test-status-message.error{background:#ffebeb;color:#c51f24}.application.dark .test-tab .test-status-message.error{background:#380000;color:#ed797a}.test-tab .test-status-message.warning{background:#fffae2;color:#a85919}.application.dark .test-tab .test-status-message.warning{background:#382f00;color:#fad89f}.test-tab .test-assert .assert-name{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.test-tab .test-assert .assert-name .assert-name-content{-webkit-box-flex:1;-ms-flex:1 0 auto;flex:1 0 auto;font-size:12px;margin-bottom:3px;max-width:100%;white-space:nowrap;margin-bottom:5px}.test-tab .test-assert .assert-name .assert-name-content.assert-failed .assert-name-text{background:#ffebeb;color:#c51f24}.application.dark .test-tab .test-assert .assert-name .assert-name-content.assert-failed .assert-name-text{background:#380000;color:#ed797a}.test-tab .test-assert .assert-name .assert-name-content .assert-name-text{background:#e3eccb;border-radius:8px;color:#586336;padding:2px 6px}.application.dark .test-tab .test-assert .assert-name .assert-name-content .assert-name-text{background:#293800;color:#e3fa9e}.test-tab .test-assert .assert-name .assert-name-trace{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;margin-bottom:5px}.test-tab .test-assert .pretty-jason{font-size:11px}.request-sidebar{background:#f9f9fb;border-top:1px solid #d1d1d1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-ms-flex-negative:0;flex-shrink:0;height:25%}.application.dark .request-sidebar{background:#1b1b1b;border-top:1px solid #2a2a3c}.request-sidebar.large{height:33%}@media screen and (min-width:900px){.request-sidebar{border-left:1px solid #d1d1e0;border-top:0;height:100%;width:300px}.application.dark .request-sidebar{border-left:1px solid #2a2a3c;border-top:0}.request-sidebar.large{height:100%;width:400px}}@media screen and (min-width:1280px){.request-sidebar{width:360px}.request-sidebar.large{width:420px}}.request-sidebar .sidebar-header{-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-bottom:1px solid #e7e7ef;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0;font-size:13px;padding:14px 12px;width:100%}.application.dark .request-sidebar .sidebar-header{border-bottom:1px solid #323234}.request-sidebar .sidebar-header .header-info{-webkit-box-flex:1;-ms-flex:1;flex:1;margin-right:5px;overflow:hidden}.request-sidebar .sidebar-header .header-info:hover .info-copy{display:inline-block}.request-sidebar .sidebar-header .header-info .info-main{font-size:110%;overflow:hidden;text-overflow:ellipsis}.request-sidebar .sidebar-header .header-info .info-details{color:#696969;font-size:95%;margin-top:4px;overflow:hidden;text-overflow:ellipsis}.request-sidebar .sidebar-header .header-info .info-copy{display:none;font-size:90%;margin-left:2px}.request-sidebar .sidebar-header .header-alert{margin-right:5px}.request-sidebar .sidebar-header .header-alert.alert-errors{color:#b3492e}.application.dark .request-sidebar .sidebar-header .header-alert.alert-errors{color:#ed797a}.request-sidebar .sidebar-header .header-alert.alert-warnings{color:#f4bd00}.application.dark .request-sidebar .sidebar-header .header-alert.alert-warnings{color:#fad89f}.request-sidebar .sidebar-header .type-text{background:#cbdeec;border-radius:3px;color:#365063;font-size:75%;margin-right:5px;padding:2px 4px;vertical-align:1px}.application.dark .request-sidebar .sidebar-header .type-text{background:#002e52;color:#6ebef7}.request-sidebar .sidebar-header .method-text{color:#696969;font-size:80%}.application.dark .request-sidebar .sidebar-header .method-text{color:#767676}.request-sidebar .sidebar-header .status-text{background:#e3eccb;border-radius:8px;color:#586336;padding:2px 6px;text-transform:uppercase}.application.dark .request-sidebar .sidebar-header .status-text{background:#293800;color:#e3fa9e}.request-sidebar .sidebar-header .status-text.client-error{background:#fffae2;color:#a85919}.application.dark .request-sidebar .sidebar-header .status-text.client-error{background:#382f00;color:#fad89f}.request-sidebar .sidebar-header .status-text.server-error{background:#ffebeb;color:#c51f24}.application.dark .request-sidebar .sidebar-header .status-text.server-error{background:#380000;color:#ed797a}.request-sidebar .sidebar-header .status-text.status-text-small{font-size:9px}.request-sidebar .sidebar-content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex:1;flex:1;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;overflow:auto}.request-sidebar .sidebar-content .content-actions{padding:14px 12px}.request-sidebar .sidebar-content .content-actions .button{font-size:13px;margin-bottom:10px}.request-sidebar .sidebar-content .content-meta{margin-top:auto;padding:10px 12px;text-align:center}.request-sidebar .sidebar-content .content-meta .meta-id{margin-top:5px}.request-sidebar .sidebar-content .content-meta .meta-id a{color:grey;text-decoration:none}.application.dark .request-sidebar .sidebar-content .content-meta .meta-id a{color:#767676}.split-view-requests{background:#f9f9fb;border-bottom:1px solid #d1d1d1;cursor:default;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-ms-flex-negative:0;flex-shrink:0;height:25%;width:100%}.application.dark .split-view-requests{background:#1b1b1b;border-bottom:1px solid #2a2a3c}@media screen and (min-width:900px){.split-view-requests{border-bottom:0;border-right:1px solid #d1d1e0;height:100%;width:300px}.application.dark .split-view-requests{border-right:1px solid #2a2a3c}.split-view-requests.large{width:380px}}@media screen and (min-width:1280px){.split-view-requests{width:320px}}.split-view-requests table{line-height:1.4;table-layout:fixed}.application.dark .split-view-requests tr:first-child td,.split-view-requests tr:first-child td{border-top:1px solid transparent}.split-view-requests tr.selected td{background:#2786f3!important;border-top:1px solid transparent;color:#fff}.application.dark .split-view-requests tr.selected td{background:#d46f02!important}.split-view-requests tr.selected+tr td{border-top:1px solid transparent}.application.dark .split-view-requests tr.selected .method-text,.application.dark .split-view-requests tr.selected small,.split-view-requests tr.selected .method-text,.split-view-requests tr.selected small{color:#fff}.application.dark .split-view-requests tr.selected .status-text,.application.dark .split-view-requests tr.selected .type-text,.split-view-requests tr.selected .status-text,.split-view-requests tr.selected .type-text{background:transparent;color:#fff}.application.dark .split-view-requests tr.selected .request-alert,.split-view-requests tr.selected .request-alert{color:#fff}.split-view-requests tr td{border-top:1px solid #f0f0f0}.application.dark .split-view-requests tr td{border-top:1px solid #242424}.split-view-requests tr td:first-child{border-radius:6px 0 0 6px}.split-view-requests tr td:last-child{border-radius:0 6px 6px 0}.split-view-requests th{color:#333;font-size:90%;font-weight:600;height:30px;line-height:1.1;padding:8px;white-space:nowrap}.application.dark .split-view-requests th{color:#b2b2b2}.split-view-requests td{overflow:hidden;padding:7px 6px 8px;vertical-align:middle;white-space:nowrap}.split-view-requests small{color:grey;font-size:100%}.application.dark .split-view-requests small{color:#767676}.split-view-requests big{font-size:115%}.split-view-requests .status{text-align:center;width:52px}.split-view-requests .duration{text-align:right;width:68px}.split-view-requests .type-text{background:#cbdeec;border-radius:3px;color:#365063;font-size:80%;margin-right:2px;padding:1px 3px;vertical-align:1px}.application.dark .split-view-requests .type-text{background:#002e52;color:#6ebef7}.split-view-requests .method-text{color:grey;font-size:90%}.application.dark .split-view-requests .method-text{color:#767676}.split-view-requests .status-text{background:#e3eccb;border-radius:8px;color:#586336;padding:2px 6px;text-transform:uppercase}.application.dark .split-view-requests .status-text{background:#293800;color:#e3fa9e}.split-view-requests .status-text.client-error{background:#fffae2;color:#a85919}.application.dark .split-view-requests .status-text.client-error{background:#382f00;color:#fad89f}.split-view-requests .status-text.server-error{background:#ffebeb;color:#c51f24}.application.dark .split-view-requests .status-text.server-error{background:#380000;color:#ed797a}.split-view-requests .status-text.status-text-small{font-size:9px}.split-view-requests .request-alert{font-size:90%;margin-right:4px}.split-view-requests .request-alert.alert-errors{color:#b3492e}.application.dark .split-view-requests .request-alert.alert-errors{color:#ed797a}.split-view-requests .request-alert.alert-warnings{color:#f4bd00}.application.dark .split-view-requests .request-alert.alert-warnings{color:#fad89f}.split-view-requests .requests-header{padding:2px 4px}.split-view-requests .requests-search{font-size:14px;margin-bottom:10px;position:relative}.split-view-requests .requests-search input{background:#eee;border:0;border-radius:4px;font-size:13px;height:24px;padding-left:28px;width:100%}.application.dark .split-view-requests .requests-search input{background:#3f3e3d;color:#e9e9e9}.application.dark .split-view-requests .requests-search input::-webkit-input-placeholder{color:#a7a6a5;opacity:1}.application.dark .split-view-requests .requests-search input::-moz-placeholder{color:#a7a6a5;opacity:1}.application.dark .split-view-requests .requests-search input:-ms-input-placeholder{color:#a7a6a5;opacity:1}.application.dark .split-view-requests .requests-search input::-ms-input-placeholder{color:#a7a6a5;opacity:1}.application.dark .split-view-requests .requests-search input::placeholder{color:#a7a6a5;opacity:1}.split-view-requests .requests-search .ui-icon{left:7px;position:absolute;top:5px}.split-view-requests .requests-container{height:calc(100% - 31px);overflow:auto;padding:5px}.split-view-requests .requests-content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;min-height:calc(100% + 69px)}.split-view-requests .requests-content .content-above{padding-top:2px}.split-view-requests .requests-content .content-above .button{font-size:13px}.split-view-requests .requests-table{margin-bottom:auto;margin-top:10px}.split-view-requests .requests-clear{font-size:13px;margin-bottom:5px;margin-top:5px}.whats-new{font-size:14px;width:100%}.application.dark .whats-new{background:#1f1f1f}.whats-new .whats-new-content{margin:0 auto;max-width:820px;padding:4px 16px 20px}.whats-new h1{font-size:18px;font-weight:400;margin:50px 0;text-align:center;width:100%}.whats-new h2{font-size:16px;font-weight:500}.whats-new .whats-new-section{margin-bottom:50px}.whats-new .whats-new-section.image-left,.whats-new .whats-new-section.image-right{padding-top:20px}.whats-new .whats-new-section.image-left:after,.whats-new .whats-new-section.image-right:after{clear:both;content:"";display:block}.whats-new .whats-new-section.image-left img,.whats-new .whats-new-section.image-right img{border-bottom:0;float:left;margin-left:-40px;margin-top:-20px;max-width:65%}.application.dark .whats-new .whats-new-section.image-left img,.application.dark .whats-new .whats-new-section.image-right img{border-bottom:0}.whats-new .whats-new-section.image-right img{float:right;margin-left:0;margin-right:-40px}.whats-new .whats-new-section.image-top img{border-bottom:0;border-top:1px solid #eee;margin-top:0}.application.dark .whats-new .whats-new-section.image-top img{border-bottom:0;border-top:1px solid #444}.whats-new .whats-new-section.image-top h2{margin-top:0}.whats-new .whats-new-section img{border-bottom:1px solid #eee;margin-top:10px;max-width:100%}.application.dark .whats-new .whats-new-section img{border-bottom:1px solid #444}.whats-new .whats-new-actions{padding-top:25px;text-align:center;width:100%}.whats-new .whats-new-actions a{color:#258cdb;font-size:15px;margin:0 15px;text-decoration:none}.application.dark .whats-new .whats-new-actions a{color:#f27e02}.whats-new .whats-new-actions a.actions-show-more{border:1px solid #258cdb;border-radius:4px;padding:6px 12px}.application.dark .whats-new .whats-new-actions a.actions-show-more{border-color:#f27e02}.whats-new .whats-new-actions p{margin-top:45px}.pretty-jason{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:12px;padding:0;margin:0;list-style:none;color:#222}.pretty-jason ul{list-style:none;padding-left:12px}.pretty-jason li{padding:1px 0}.pretty-jason-key{color:#881280}.pretty-jason-value-number{color:#1c00cf}.pretty-jason-value-string{color:#c41a16}.pretty-jason-value-null,.pretty-jason-value-undefined{color:grey}.pretty-jason-value-anonymous-function,.pretty-jason-value-boolean,.pretty-jason-value-resource{color:#132ba2}.pretty-jason-icon,.pretty-jason-icon-closed,.pretty-jason-icon-open{display:inline-block;width:0;height:0}.pretty-jason-icon{width:12px}.pretty-jason-icon-closed{border-style:solid;border-width:4.5px 0 4.5px 7.8px;border-color:transparent transparent transparent #7f7f80}.pretty-jason-icon-open{border-style:solid;border-width:7.8px 4.5px 0 4.5px;border-color:#7f7f80 transparent transparent transparent}.pretty-jason-preview{font-style:italic}.pretty-jason-preview:before{content:"{"}.pretty-jason-preview:after{content:"}"}.pretty-jason-preview-item:after{content:", "}.pretty-jason-preview .pretty-jason-preview-item:last-child:after{content:""}*{-webkit-box-sizing:border-box;box-sizing:border-box}html{background:#fff;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:11px;overflow:hidden}body,html{height:100%}body{font-size:100%;margin:0}.application.dark,body.dark{background:#1e1e1e;color:#b2b2b2}table{border-collapse:collapse;font-size:100%;width:100%}table td,table th{text-align:left}a{color:#696969;cursor:default}a:hover{color:#3b3b3b}.application.dark a:hover{color:#f27e02}.application.dark a{color:grey}.button{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background:#ebebea;border-radius:4px;color:#696969;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding:6px 12px;text-decoration:none}.application.dark .button{background:#2e2e2d}.button:hover{color:#3b3b3b}.button .ui-icon{margin-right:5px}code{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.split-view{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%;width:100%}@media screen and (min-width:900px){.split-view{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}}.split-view-details{-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:0}@media screen and (min-width:900px){.split-view-details{height:100%}}.split-view-details{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.details-header,.split-view-details{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative}.details-header{background:#e0e0eb;-ms-flex-negative:0;flex-shrink:0;height:34px;z-index:500}.application.dark .details-header{background:#15151e}.details-header .details-header-tabs{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex:1;flex:1;overflow:hidden}.details-header .icons{-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-bottom:1px solid #d1d1e0;display:-webkit-box;display:-ms-flexbox;display:flex;font-size:15px;padding:0 5px}.application.dark .details-header .icons{border-bottom:1px solid #2a2a3c}.details-header .icons a{padding:0 5px}.details-header .icons a.active,.details-header .icons a:hover{color:#258cdb}.application.dark .details-header .icons a.active,.application.dark .details-header .icons a:hover{color:#f27e02}.details-content{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow:auto}.details-content .content-header{background:#f6f6f9;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-flex:1;-ms-flex:1;flex:1;height:46px;width:100%}.application.dark .details-content .content-header{background:#252527}.details-content .content-content{margin-top:-46px;padding:15px}.details-content h3{border-bottom:1px solid #d1d1d1;font-size:13px;font-weight:600;margin:0;padding:4px 10px}.details-content .counters-row{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;border-radius:8px;background:#fcfcfd;-webkit-box-shadow:0 0 0 1px #e0e0eb,0 2px 2px 0 #e0e0eb;box-shadow:0 0 0 1px #e0e0eb,0 2px 2px 0 #e0e0eb;margin-bottom:20px}.application.dark .details-content .counters-row{background:#252527;-webkit-box-shadow:0 0 0 1px #15151e,0 2px 2px 0 #15151e;box-shadow:0 0 0 1px #15151e,0 2px 2px 0 #15151e}.details-content .counters-row .counters-group{display:-webkit-box;display:-ms-flexbox;display:flex}.details-content .counters-row .counters-group.right-aligned{margin-left:auto}.details-content .counters-row .counters-group.right-aligned .counter{border-left:1px solid #e7e7ef;border-right:0}.application.dark .details-content .counters-row .counters-group.right-aligned .counter{border-left:1px solid #1b1b27;border-right:0}.details-content .counters-row .counter{border-right:1px solid #e7e7ef;cursor:default;padding:12px 24px 13px}.application.dark .details-content .counters-row .counter{border-right:1px solid #1b1b27}.details-content .counters-row .counter .counter-value{color:#258cdb;font-size:170%;margin-bottom:3px;white-space:nowrap}.application.dark .details-content .counters-row .counter .counter-value{color:#f27e02}.details-content .counters-row .counter .counter-title{color:#777;font-size:95%;text-transform:uppercase;white-space:nowrap}.details-content .counters-row .counter .counter-title.has-mark:before{border-radius:50%;content:"";display:inline-block;height:9px;margin-right:4px;vertical-align:-1px;width:9px}.details-content .request-tab-info{display:-webkit-box;display:-ms-flexbox;display:flex;margin:4px 0 8px}.details-content .request-tab-info .field{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin:0 5px;padding:0 20px}.details-content .request-tab-info .field:first-child{margin-left:0}.details-content .request-tab-info .field:last-child{margin-right:0}.details-content .request-tab-info .field .field-value{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex:1;flex:1;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;font-size:130%;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.details-content .request-tab-info .field .field-value .small{color:#888;font-size:75%;padding-top:2px}.details-content .request-tab-info .field .field-title{font-size:120%;font-variant:small-caps;padding-bottom:5px;text-transform:lowercase}.details-content .request-tab-info .field.action{-webkit-box-flex:1;-ms-flex:1;flex:1}.details-content .request-tab-info .field.link{font-size:90%;padding:0}.details-content .fired-event{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.details-content .fired-event .fired-event-content{-webkit-box-flex:1;-ms-flex:1 0 auto;flex:1 0 auto;max-width:100%}.details-content .fired-event .fired-event-path{color:#aaa;-webkit-box-flex:0;-ms-flex:0;flex:0;font-size:90%;margin-top:3px}.application.dark .details-content .fired-event .fired-event-path{color:#777}.details-content .fired-event-details h4{margin:6px 0 3px}.details-content .fired-event-actions{padding-left:5px;width:10px}.details-content .database-query{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.details-content .database-query .database-query-content{-webkit-box-flex:1;-ms-flex:1 0 auto;flex:1 0 auto;max-width:100%;word-break:break-word}.details-content .database-query .database-query-path{color:#aaa;-webkit-box-flex:0;-ms-flex:0;flex:0;font-size:90%;margin-top:3px;word-break:normal;text-align:right}.application.dark .details-content .database-query .database-query-path{color:#777}.details-content .database-duration{text-align:right;white-space:nowrap}.details-content .cache-query-type{font-size:125%;font-variant:small-caps}.details-authentication-overlay,.details-error-overlay,.details-loading-overlay{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background:#fff;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;font-size:16px;height:calc(100% - 31px);-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;left:0;position:absolute;top:31px;width:100%;z-index:500}.application.dark .details-authentication-overlay,.application.dark .details-error-overlay,.application.dark .details-loading-overlay{background:#1f1f1f}.details-authentication-overlay .ui-icon,.details-error-overlay .ui-icon,.details-loading-overlay .ui-icon{color:#696969;font-size:46px}.details-authentication-overlay .title,.details-error-overlay .title,.details-loading-overlay .title{margin:10px 0 0 0}.details-authentication-overlay .message,.details-error-overlay .message,.details-loading-overlay .message{color:#aaa;font-size:75%;margin:5px 0 0 0}.details-authentication-overlay{text-align:center}.details-authentication-overlay .message,.details-authentication-overlay .title{font-size:80%}.details-authentication-overlay .title.failed{display:none}.details-authentication-overlay p{margin:1.3em 0}.details-authentication-overlay input{background:#eee;border:1px solid #eee;border-radius:4px;font-size:14px;height:30px;padding:0 10px}.application.dark .details-authentication-overlay input{background:#2e2e2e;border:1px solid #2e2e2e;color:#ccc}.details-authentication-overlay button{background:transparent;border:none;color:#258cdb;font-size:90%}.application.dark .details-authentication-overlay button{color:#f27e02}.details-authentication-overlay.failed .title{display:none}.details-authentication-overlay.failed .title.failed{display:block}.details-authentication-overlay.failed .ui-icon{-webkit-animation:shake .77s linear;animation:shake .77s linear}@-webkit-keyframes shake{10%,90%{-webkit-transform:translate(-2px);transform:translate(-2px)}20%,80%{-webkit-transform:translate(3px);transform:translate(3px)}30%,50%,70%{-webkit-transform:translate(-5px);transform:translate(-5px)}40%,60%{-webkit-transform:translate(5px);transform:translate(5px)}}@keyframes shake{10%,90%{-webkit-transform:translate(-2px);transform:translate(-2px)}20%,80%{-webkit-transform:translate(3px);transform:translate(3px)}30%,50%,70%{-webkit-transform:translate(-5px);transform:translate(-5px)}40%,60%{-webkit-transform:translate(5px);transform:translate(5px)}}.stack-trace{cursor:pointer}.stack-trace .popover{cursor:default}.stack-trace a{color:#a6a6a6;text-decoration:none}.stack-trace a:hover{color:#969696}.application.dark .stack-trace a{color:#595959}.application.dark .stack-trace a:hover{color:#696969}.stack-trace .stack-frame{color:#000;padding:6px 10px;text-align:left;word-break:break-word}.application.dark .stack-trace .stack-frame{color:#b2b2b2}.stack-trace .stack-frame:nth-child(2n){background:#f6f6f9}.application.dark .stack-trace .stack-frame:nth-child(2n){background:#202022}.stack-trace .stack-frame .stack-frame-call{font-size:12px;padding-bottom:3px}.stack-trace .stack-frame .stack-frame-file{color:#aaa;font-size:11px}.stack-trace .stack-frame.is-vendor .stack-frame-call,.stack-trace .stack-frame.is-vendor .stack-frame-file{font-size:10px}.hidden{display:none}[stupid-table] th{cursor:default}[tab-content]{display:none}.application.dark .pretty-jason{color:#d5d5d5}.application.dark .pretty-jason-key{color:#e36eec}.application.dark .pretty-jason-value-number{color:#997fff}.application.dark .pretty-jason-value-string{color:#e33e3a}.application.dark .pretty-jason-value-null,.application.dark .pretty-jason-value-undefined{color:#7f7f7f}.application.dark .pretty-jason-value-anonymous-function,.application.dark .pretty-jason-value-boolean,.application.dark .pretty-jason-value-resource{color:#8296ff}.application.dark .pretty-jason-icon-closed{border-color:transparent transparent transparent #919191}.application.dark .pretty-jason-icon-open{border-color:#919191 transparent transparent transparent}.ui-icon{display:inline-block;height:1em;width:1em;vertical-align:-.125em}.ui-icon svg{display:block;height:100%;width:100%} \ No newline at end of file diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/appearance-auto-icon.png b/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/appearance-auto-icon.png deleted file mode 100644 index 5cb21ee..0000000 Binary files a/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/appearance-auto-icon.png and /dev/null differ diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/appearance-dark-icon.png b/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/appearance-dark-icon.png deleted file mode 100644 index f7d4285..0000000 Binary files a/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/appearance-dark-icon.png and /dev/null differ diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/appearance-light-icon.png b/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/appearance-light-icon.png deleted file mode 100644 index 7341c02..0000000 Binary files a/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/appearance-light-icon.png and /dev/null differ diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/icons/apple-touch-icon-120x120.png b/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/icons/apple-touch-icon-120x120.png deleted file mode 100644 index 72982ec..0000000 Binary files a/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/icons/apple-touch-icon-120x120.png and /dev/null differ diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/icons/apple-touch-icon-152x152.png b/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/icons/apple-touch-icon-152x152.png deleted file mode 100644 index c868b99..0000000 Binary files a/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/icons/apple-touch-icon-152x152.png and /dev/null differ diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/icons/apple-touch-icon-180x180.png b/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/icons/apple-touch-icon-180x180.png deleted file mode 100644 index dcb82bc..0000000 Binary files a/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/icons/apple-touch-icon-180x180.png and /dev/null differ diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/icons/apple-touch-icon-60x60.png b/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/icons/apple-touch-icon-60x60.png deleted file mode 100644 index fb20164..0000000 Binary files a/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/icons/apple-touch-icon-60x60.png and /dev/null differ diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/icons/apple-touch-icon-76x76.png b/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/icons/apple-touch-icon-76x76.png deleted file mode 100644 index dba45cc..0000000 Binary files a/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/icons/apple-touch-icon-76x76.png and /dev/null differ diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/icons/apple-touch-icon.png b/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/icons/apple-touch-icon.png deleted file mode 100644 index dcb82bc..0000000 Binary files a/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/icons/apple-touch-icon.png and /dev/null differ diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/icons/favicon-16x16.png b/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/icons/favicon-16x16.png deleted file mode 100644 index 6562f9c..0000000 Binary files a/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/icons/favicon-16x16.png and /dev/null differ diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/icons/favicon-32x32.png b/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/icons/favicon-32x32.png deleted file mode 100644 index e38d7f5..0000000 Binary files a/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/icons/favicon-32x32.png and /dev/null differ diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/whats-new/5.0/client-metrics.png b/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/whats-new/5.0/client-metrics.png deleted file mode 100644 index bd473b2..0000000 Binary files a/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/whats-new/5.0/client-metrics.png and /dev/null differ diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/whats-new/5.0/clockwork-5.png b/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/whats-new/5.0/clockwork-5.png deleted file mode 100644 index e91ba93..0000000 Binary files a/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/whats-new/5.0/clockwork-5.png and /dev/null differ diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/whats-new/5.0/models-tab.png b/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/whats-new/5.0/models-tab.png deleted file mode 100644 index f2f2e47..0000000 Binary files a/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/whats-new/5.0/models-tab.png and /dev/null differ diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/whats-new/5.0/notifications-tab.png b/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/whats-new/5.0/notifications-tab.png deleted file mode 100644 index 091491a..0000000 Binary files a/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/whats-new/5.0/notifications-tab.png and /dev/null differ diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/whats-new/5.0/timeline.png b/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/whats-new/5.0/timeline.png deleted file mode 100644 index e1af120..0000000 Binary files a/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/whats-new/5.0/timeline.png and /dev/null differ diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/whats-new/5.0/toolbar.png b/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/whats-new/5.0/toolbar.png deleted file mode 100644 index c391b3e..0000000 Binary files a/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/whats-new/5.0/toolbar.png and /dev/null differ diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/whats-new/5.1/database-queries.png b/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/whats-new/5.1/database-queries.png deleted file mode 100644 index 8855907..0000000 Binary files a/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/img/whats-new/5.1/database-queries.png and /dev/null differ diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/index.html b/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/index.html deleted file mode 100644 index 5b54955..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/index.html +++ /dev/null @@ -1 +0,0 @@ -Clockwork
    \ No newline at end of file diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/js/app.1b17e5e6.js b/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/js/app.1b17e5e6.js deleted file mode 100644 index 7302e40..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/js/app.1b17e5e6.js +++ /dev/null @@ -1,2 +0,0 @@ -(function(e){function t(t){for(var a,r,o=t[0],l=t[1],c=t[2],d=0,h=[];da.left+a.width/2-200?this.classList=["left-aligned"]:t.right-1:e.$settings.global.showIncomingRequests},on:{change:[function(t){var s=e.$settings.global.showIncomingRequests,a=t.target,i=!!a.checked;if(Array.isArray(s)){var n=null,r=e._i(s,n);a.checked?r<0&&e.$set(e.$settings.global,"showIncomingRequests",s.concat([n])):r>-1&&e.$set(e.$settings.global,"showIncomingRequests",s.slice(0,r).concat(s.slice(r+1)))}else e.$set(e.$settings.global,"showIncomingRequests",i)},e.save]}}),e._v(" Show incoming requests ")]),s("label",{staticClass:"controls-checkbox"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.$settings.global.preserveLog,expression:"$settings.global.preserveLog"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.$settings.global.preserveLog)?e._i(e.$settings.global.preserveLog,null)>-1:e.$settings.global.preserveLog},on:{change:[function(t){var s=e.$settings.global.preserveLog,a=t.target,i=!!a.checked;if(Array.isArray(s)){var n=null,r=e._i(s,n);a.checked?r<0&&e.$set(e.$settings.global,"preserveLog",s.concat([n])):r>-1&&e.$set(e.$settings.global,"preserveLog",s.slice(0,r).concat(s.slice(r+1)))}else e.$set(e.$settings.global,"preserveLog",i)},e.save]}}),e._v(" Keep requests log ")])])]),s("div",{directives:[{name:"show",rawName:"v-show",value:e.$platform.hasFeature("requests-list"),expression:"$platform.hasFeature('requests-list')"}],staticClass:"controls-group"},[s("label"),s("div",{staticClass:"controls"},[s("label",{staticClass:"controls-checkbox"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.$settings.global.hideCommandTypeRequests,expression:"$settings.global.hideCommandTypeRequests"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.$settings.global.hideCommandTypeRequests)?e._i(e.$settings.global.hideCommandTypeRequests,null)>-1:e.$settings.global.hideCommandTypeRequests},on:{change:[function(t){var s=e.$settings.global.hideCommandTypeRequests,a=t.target,i=!!a.checked;if(Array.isArray(s)){var n=null,r=e._i(s,n);a.checked?r<0&&e.$set(e.$settings.global,"hideCommandTypeRequests",s.concat([n])):r>-1&&e.$set(e.$settings.global,"hideCommandTypeRequests",s.slice(0,r).concat(s.slice(r+1)))}else e.$set(e.$settings.global,"hideCommandTypeRequests",i)},e.save]}}),e._v(" Hide commands in requests list ")]),s("label",{staticClass:"controls-checkbox"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.$settings.global.hideQueueJobTypeRequests,expression:"$settings.global.hideQueueJobTypeRequests"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.$settings.global.hideQueueJobTypeRequests)?e._i(e.$settings.global.hideQueueJobTypeRequests,null)>-1:e.$settings.global.hideQueueJobTypeRequests},on:{change:[function(t){var s=e.$settings.global.hideQueueJobTypeRequests,a=t.target,i=!!a.checked;if(Array.isArray(s)){var n=null,r=e._i(s,n);a.checked?r<0&&e.$set(e.$settings.global,"hideQueueJobTypeRequests",s.concat([n])):r>-1&&e.$set(e.$settings.global,"hideQueueJobTypeRequests",s.slice(0,r).concat(s.slice(r+1)))}else e.$set(e.$settings.global,"hideQueueJobTypeRequests",i)},e.save]}}),e._v(" Hide queue jobs in requests list ")]),s("label",{staticClass:"controls-checkbox"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.$settings.global.hideTestTypeRequests,expression:"$settings.global.hideTestTypeRequests"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.$settings.global.hideTestTypeRequests)?e._i(e.$settings.global.hideTestTypeRequests,null)>-1:e.$settings.global.hideTestTypeRequests},on:{change:[function(t){var s=e.$settings.global.hideTestTypeRequests,a=t.target,i=!!a.checked;if(Array.isArray(s)){var n=null,r=e._i(s,n);a.checked?r<0&&e.$set(e.$settings.global,"hideTestTypeRequests",s.concat([n])):r>-1&&e.$set(e.$settings.global,"hideTestTypeRequests",s.slice(0,r).concat(s.slice(r+1)))}else e.$set(e.$settings.global,"hideTestTypeRequests",i)},e.save]}}),e._v(" Hide tests in requests list ")])])]),s("div",{staticClass:"settings-footer"},[e._v(" Version "+e._s(e.$credits.version)+" • "),s("a",{attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.showCredits.apply(null,arguments)}}},[e._v("Credits")])])])])},de=[],he={name:"SettingsModal",components:{Modal:p},data:function(){return{showPersistWarning:!1}},methods:{setAppearance:function(e){this.$settings.global.appearance=e,this.save()},save:function(){this.$settings.save(),this.$onDemand.enableProfiling()},showCredits:function(){this.$settings.toggle(),this.$credits.toggle()}}},ve=he,fe=(s("28e9"),Object(f["a"])(ve,ue,de,!1,null,null,null)),me=fe.exports,pe=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("modal",{attrs:{icon:"share",title:"Share",shown:e.$sharing.shown},on:{"update:shown":function(t){return e.$set(e.$sharing,"shown",t)}}},[s("div",{staticClass:"sharing-modal"},[e.$sharing.termsAccepted?[s("div",{staticClass:"sharing-content"},[s("label",{staticClass:"content-item item-all",class:{active:e.filterAll}},[s("span",{staticClass:"item-text"},[e._v("All")]),s("input",{directives:[{name:"model",rawName:"v-model",value:e.filterAll,expression:"filterAll"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.filterAll)?e._i(e.filterAll,null)>-1:e.filterAll},on:{change:function(t){var s=e.filterAll,a=t.target,i=!!a.checked;if(Array.isArray(s)){var n=null,r=e._i(s,n);a.checked?r<0&&(e.filterAll=s.concat([n])):r>-1&&(e.filterAll=s.slice(0,r).concat(s.slice(r+1)))}else e.filterAll=i}}})]),e._l(e.sections,(function(t){return s("label",{staticClass:"content-item",class:{active:e.filter[t.name]&&t.available,unavailable:!t.available}},[s("icon",{attrs:{name:t.icon}}),s("span",{staticClass:"item-text"},[e._v(e._s(t.text))]),s("input",{directives:[{name:"model",rawName:"v-model",value:e.filter[t.name],expression:"filter[section.name]"}],attrs:{type:"checkbox",disabled:t.readonly||!t.available},domProps:{checked:Array.isArray(e.filter[t.name])?e._i(e.filter[t.name],null)>-1:e.filter[t.name]},on:{change:function(s){var a=e.filter[t.name],i=s.target,n=!!i.checked;if(Array.isArray(a)){var r=null,o=e._i(a,r);i.checked?o<0&&e.$set(e.filter,t.name,a.concat([r])):o>-1&&e.$set(e.filter,t.name,a.slice(0,o).concat(a.slice(o+1)))}else e.$set(e.filter,t.name,n)}}})],1)}))],2),e.error?s("p",{staticClass:"error-message"},[e._v(e._s(e.errorMessage))]):e._e(),s("a",{staticClass:"button",attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.share.apply(null,arguments)}}},[e.isCopied?[e._v(" Copied to clipboard! ")]:e.$sharing.inProgress?[s("spinner",{attrs:{name:"fading-circle",width:"18",height:"18","no-fade-in":!0,color:"dark"==e.$settings.appearance?"#f27e02":"#258cdb"}}),e._v(" Sharing... ")]:[e._v(" Share ")]],2)]:[s("div",{staticClass:"sharing-terms"},[s("h1",[s("icon",{attrs:{name:"users"}})],1),s("p",[e._v("Request will be uploaded to the Clockwork Cloud servers and a unique public link generated for you.")]),s("h2",[e._v("Deleting")]),s("ul",[s("li",[e._v("You can delete the request anytime via the shared link.")]),s("li",[e._v("Shared links might expire after a few weeks.")])]),s("h2",[e._v("Privacy")]),s("ul",[s("li",[e._v("Shared requests are hosted on DigitalOcean servers.")]),s("li",[e._v("Collected data is never shared with third-parties.")])]),s("a",{staticClass:"button",attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.$sharing.acceptTerms()}}},[e._v("Continue")])])]],2)])},ge=[],be=(s("b0c0"),s("159b"),{name:"SharingModal",components:{Modal:p},data:function(){return{filter:{performance:!0,log:!0,events:!0,models:!0,database:!0,cache:!0,redis:!0,queue:!0,views:!0,notifications:!0,routes:!0,output:!0,userData:!0},isCopied:!1,error:!1}},computed:{sections:function(){var e,t;return[{text:"Performance",name:"performance",icon:"activity",available:!0,readonly:!0},{text:"Log",name:"log",icon:"edit-2",available:this.shownSections.log},{text:"Events",name:"events",icon:"zap",available:this.shownSections.events},{text:"Models",name:"models",icon:"disc",available:this.shownSections.models},{text:"Database",name:"database",icon:"database",available:this.shownSections.database},{text:"Cache",name:"cache",icon:"paperclip",available:this.shownSections.cache},{text:"Redis",name:"redis",icon:"layers",available:this.shownSections.redis},{text:"Queue",name:"queue",icon:"clock",available:this.shownSections.queue},{text:"Views",name:"views",icon:"image",available:this.shownSections.views},{text:"Notifications",name:"notifications",icon:"mail",available:this.shownSections.notifications},{text:"Routes",name:"routes",icon:"map",available:this.shownSections.routes},{text:"Output",name:"output",icon:"terminal",available:this.shownSections.output},{text:"Custom tabs",name:"userData",icon:"menu",available:null===(e=this.$request)||void 0===e||null===(t=e.userData)||void 0===t?void 0:t.length}]},shownSections:function(){var e,t,s,a,i,n,r,o,l,c,u,d,h,v,f,m,p,g,b,w,_,y=this;return{log:(null===(e=this.$request)||void 0===e||null===(t=e.log)||void 0===t?void 0:t.length)>0,models:["modelsRetrieved","modelsCreated","modelsUpdated","modelsDeleted"].some((function(e){var t;return null===(t=y.$request)||void 0===t?void 0:t[e]}))||(null===(s=this.$request)||void 0===s?void 0:s.modelsActions.length)>0,database:(null===(a=this.$request)||void 0===a?void 0:a.databaseQueriesCount)>0||(null===(i=this.$request)||void 0===i||null===(n=i.databaseQueries)||void 0===n?void 0:n.length)>0,cache:["cacheReads","cacheHits","cacheWrites","cacheDeletes","cacheTime"].some((function(e){var t;return null===(t=y.$request)||void 0===t?void 0:t[e]}))||(null===(r=this.$request)||void 0===r?void 0:r.cacheQueries.length)>0,redis:(null===(o=this.$request)||void 0===o||null===(l=o.redisCommands)||void 0===l?void 0:l.length)>0,queue:(null===(c=this.$request)||void 0===c||null===(u=c.queueJobs)||void 0===u?void 0:u.length)>0,events:(null===(d=this.$request)||void 0===d||null===(h=d.events)||void 0===h?void 0:h.length)>0,views:(null===(v=this.$request)||void 0===v||null===(f=v.viewsData)||void 0===f?void 0:f.events.length)>0,notifications:(null===(m=this.$request)||void 0===m||null===(p=m.notifications)||void 0===p?void 0:p.length)>0,routes:(null===(g=this.$request)||void 0===g||null===(b=g.routes)||void 0===b?void 0:b.length)>0,output:(null===(w=this.$request)||void 0===w||null===(_=w.commandOutput)||void 0===_?void 0:_.length)>0}},filterAll:{get:function(){var e=this;return this.sections.every((function(t){return!t.available||e.filter[t.name]}))},set:function(e){var t=this;this.sections.filter((function(e){return e.available&&!e.readonly})).forEach((function(s){return t.filter[s.name]=e}))}},errorMessage:function(){return"metadata-too-large"==this.error?"Shared request metadata is too large, please try selecting fewer sections.":"temporarily-unavailable"==this.error?"Share service is temporarily unavailable, please try again later.":"Unexpected error, please try again later."}},methods:{share:function(){var e=this;this.$sharing.share(this.$request,this.filter).then((function(t){if(t&&t.error)return e.error=t.error;e.$copyText(e.$request.shareUrl).then((function(){return e.isCopied=!0}))}))}},watch:{filter:{handler:function(){this.$sharing.clear(this.$request),this.isCopied=!1},deep:!0},$request:function(){this.isCopied=!1},"$sharing.shown":function(){this.isCopied=this.error=!1}}}),we=be,_e=(s("d901"),Object(f["a"])(we,pe,ge,!1,null,null,null)),ye=_e.exports,Ce=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("modal",{attrs:{icon:"trash-2",title:"Delete",shown:e.$sharing.shownDelete},on:{"update:shown":function(t){return e.$set(e.$sharing,"shownDelete",t)}}},[s("div",{staticClass:"delete-shared-modal"},[s("h1",[e.deleted?[s("icon",{attrs:{name:"check-circle"}})]:[s("icon",{attrs:{name:"trash-2"}})]],2),s("p",[e.deleted?[e._v(" Shared request was successfully deleted. ")]:[e._v(" Are you sure you want to delete this shared request? ")]],2),s("a",{staticClass:"button",attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.deleteShared.apply(null,arguments)}}},[e.deleted?[e._v(" Deleted! ")]:e.deleting?[s("spinner",{attrs:{name:"fading-circle",width:"18",height:"18","no-fade-in":!0,color:"dark"==e.$settings.appearance?"#f27e02":"#258cdb"}}),e._v(" Deleting... ")]:[e._v(" Delete ")]],2)])])},qe=[],$e={name:"SharingDeleteModal",components:{Modal:p},data:function(){return{deleting:!1,deleted:!1}},methods:{deleteShared:function(){var e=this;this.deleting=!0,this.$sharing.deleteShared().then((function(){return e.deleted=!0}))}}},ke=$e,xe=(s("7e04"),Object(f["a"])(ke,Ce,qe,!1,null,null,null)),Te=xe.exports,Se=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"details-header-tabs"},e._l(e.tabs,(function(t){return t.shown?s("tab-handle",{key:t.name,attrs:{text:t.text,name:t.name,icon:t.icon,active:t.name==e.activeTab,short:e.shortTabs.includes(t),full:e.fullTabs.includes(t)},on:{"tab-selected":function(t){return e.$emit("tab-selected",t)}}},[e._v(e._s(t.text))]):e._e()})),1)},je=[],Oe=(s("7db0"),s("4e82"),s("fb6a"),s("caad"),s("2532"),function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("a",{staticClass:"details-header-tab",class:{active:e.active,short:e.short,full:e.full},attrs:{href:"#"},on:{click:e.selectTab}},[e.icon?s("icon",{attrs:{name:e.icon,title:e.text}}):e._e(),s("div",{directives:[{name:"show",rawName:"v-show",value:!e.short,expression:"! short"}],staticClass:"tab-title"},[e._v(e._s(e.text))]),s("div",{directives:[{name:"show",rawName:"v-show",value:e.badge&&!e.short,expression:"badge && ! short"}],staticClass:"tab-badge"},[e._v(e._s(e.badge))])],1)}),Pe=[],De={name:"TabHandle",props:["text","name","icon","badge","active","short","full"],methods:{selectTab:function(){this.$emit("tab-selected",this.name)}}},Re=De,Ee=(s("0877"),Object(f["a"])(Re,Oe,Pe,!1,null,null,null)),Ne=Ee.exports,Ae=s("2fd4"),Ie=s.n(Ae),Me={name:"TabBar",components:{TabHandle:Ne},props:{tabs:{default:function(){return[]}},activeTab:{}},data:function(){return{shortTabs:[],fullTabs:[]}},methods:{hideOverflowingTabs:function(){var e=this;this.shortTabs=[],this.fullTabs=[],this.$nextTick((function(){return e.hideNextOverflowingTab()}))},hideNextOverflowingTab:function(){var e=this;if(!(this.$el.scrollWidth<=this.$el.clientWidth)){var t=this.tabs.indexOf(this.tabs.find((function(t){return t.name==e.activeTab}))),s=this.tabs.slice().sort((function(s,a){return Math.abs(t-e.tabs.indexOf(a))-Math.abs(t-e.tabs.indexOf(s))})).find((function(t){return!e.shortTabs.includes(t)}));if(!s||s.name==this.activeTab)return this.fullTabs=this.tabs.filter((function(t){return!e.shortTabs.includes(t)}));this.shortTabs.push(s),this.$nextTick((function(){return e.hideNextOverflowingTab()}))}}},watch:{tabs:function(){this.hideOverflowingTabs()},activeTab:function(){this.hideOverflowingTabs()}},mounted:function(){var e=this;this.resizeObserver=new ResizeObserver(Ie()((function(){return e.hideOverflowingTabs()}),10)),this.resizeObserver.observe(this.$el)}},Le=Me,Qe=Object(f["a"])(Le,Se,je,!1,null,null,null),Ue=Qe.exports,Fe=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{directives:[{name:"show",rawName:"v-show",value:e.active,expression:"active"}]},[s("div",{staticClass:"counters-row"},[s("div",{directives:[{name:"show",rawName:"v-show",value:e.$request.cacheQueries.length,expression:"$request.cacheQueries.length"}],staticClass:"counter"},[s("div",{staticClass:"counter-value"},[e._v(e._s(e.$request.cacheQueries.length))]),s("div",{staticClass:"counter-title"},[e._v("queries")])]),s("div",{directives:[{name:"show",rawName:"v-show",value:null!==e.$request.cacheReads,expression:"$request.cacheReads !== null"}],staticClass:"counter"},[s("div",{staticClass:"counter-value"},[e._v(e._s(e.$request.cacheReads))]),s("div",{staticClass:"counter-title"},[e._v("reads")])]),s("div",{directives:[{name:"show",rawName:"v-show",value:null!==e.$request.cacheHits,expression:"$request.cacheHits !== null"}],staticClass:"counter"},[s("div",{staticClass:"counter-value"},[e._v(e._s(e.$request.cacheHits))]),s("div",{staticClass:"counter-title"},[e._v("hits")])]),s("div",{directives:[{name:"show",rawName:"v-show",value:null!==e.$request.cacheMisses,expression:"$request.cacheMisses !== null"}],staticClass:"counter"},[s("div",{staticClass:"counter-value"},[e._v(e._s(e.$request.cacheMisses))]),s("div",{staticClass:"counter-title"},[e._v("misses")])]),s("div",{directives:[{name:"show",rawName:"v-show",value:null!==e.$request.cacheWrites,expression:"$request.cacheWrites !== null"}],staticClass:"counter"},[s("div",{staticClass:"counter-value"},[e._v(e._s(e.$request.cacheWrites))]),s("div",{staticClass:"counter-title"},[e._v("writes")])]),s("div",{directives:[{name:"show",rawName:"v-show",value:null!==e.$request.cacheDeletes,expression:"$request.cacheDeletes !== null"}],staticClass:"counter"},[s("div",{staticClass:"counter-value"},[e._v(e._s(e.$request.cacheDeletes))]),s("div",{staticClass:"counter-title"},[e._v("deletes")])]),s("div",{directives:[{name:"show",rawName:"v-show",value:null!==e.$request.cacheTime,expression:"$request.cacheTime !== null"}],staticClass:"counter"},[s("div",{staticClass:"counter-value"},[e._v(e._s(e.$request.cacheTime))]),s("div",{staticClass:"counter-title"},[e._v("time")])])]),e.$request.cacheQueries.length?s("details-table",{attrs:{title:"Queries",icon:"paperclip",columns:e.columns,items:e.$request.cacheQueries,filter:e.filter,"filter-example":"info@underground.works action:miss key:lastRequest file:Controller.php"},scopedSlots:e._u([{key:"body",fn:function(t){var a=t.items;return e._l(a,(function(t,a){return s("tr",{key:e.$request.id+"-"+a},[e.columns.includes("Connection")?s("td",[e._v(e._s(t.connection))]):e._e(),s("td",{staticClass:"cache-query-type"},[e._v(e._s(t.type))]),s("td",[e._v(e._s(t.key))]),s("td",[s("div",{staticClass:"database-query"},[s("div",{staticClass:"database-query-content"},[s("pretty-print",{attrs:{data:t.value}})],1),s("stack-trace",{staticClass:"database-query-path",attrs:{trace:t.trace,file:t.file,line:t.line}})],1)]),s("td",[t.expiration?s("span",[e._v(e._s(t.expiration))]):e._e()]),e.columns.includes("Duration")?s("td",[e._v(e._s(e._f("round")(t.duration,3))+" ms")]):e._e()])}))}}],null,!1,1651104168)}):e._e()],1)},Je=[],He=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"details-table"},[e.noHeader?e._e():s("div",{staticClass:"table-header"},[s("div",{staticClass:"header-title"},[s("icon",{attrs:{name:e.icon}}),e._v(" "+e._s(e.title)+" "),e.badge?s("span",{staticClass:"title-badge"},[e._v(e._s(e.badge))]):e._e()],1),e._t("toolbar",(function(){return[s("div",{staticClass:"header-group"},[e.filter?s("div",{staticClass:"header-search"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.filter.input,expression:"filter.input"}],attrs:{type:"search",placeholder:"Search..."},domProps:{value:e.filter.input},on:{input:function(t){t.target.composing||e.$set(e.filter,"input",t.target.value)}}}),s("icon",{attrs:{name:"search"}})],1):e._e()])]}),{filter:e.filter})],2),s("div",{staticClass:"table-content"},[s("table",[s("thead",[e.noTableHead?e._e():s("tr",[e._t("header",(function(){return e._l(e.columns,(function(t,a){return s("th",{class:t.class,on:{click:function(s){e.filter.sortBy(t.sortBy||t.toLowerCase())}}},[e._v(" "+e._s(t.name||t)+" "),s("icon",{directives:[{name:"show",rawName:"v-show",value:e.filter.sortedBy==(t.sortBy||t.toLowerCase()),expression:"filter.sortedBy == (column.sortBy || column.toLowerCase())"}],attrs:{name:e.filter.sortedDesc?"chevron-down":"chevron-up"}})],1)}))}),{filter:e.filter})],2)]),s("tbody",[e.hasPreviousItems?s("tr",{staticClass:"pagination-controls"},[s("td",{attrs:{colspan:e.columns.length}},[s("a",{attrs:{href:"#"},on:{click:e.showPreviousItems}},[e._v("Show "+e._s(e.previousItemsCount)+" previous")])])]):e._e(),e._t("body",null,{items:e.shownItems}),e.hasNextItems?s("tr",{staticClass:"pagination-controls"},[s("td",{attrs:{colspan:e.columns.length}},[s("a",{attrs:{href:"#"},on:{click:e.showNextItems}},[e._v("Show "+e._s(e.nextItemsCount)+" more")])])]):e._e()],2)])])])},Ve=[],We=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("a",{staticClass:"toggle-filter",attrs:{href:"#"},on:{click:function(t){return t.stopPropagation(),e.filter.toggle(t)}}},[s("icon",{attrs:{name:"search"}})],1)},Be=[],ze={name:"DetailsTableFilterToggle",props:["filter"]},Ge=ze,Ke=Object(f["a"])(Ge,We,Be,!1,null,null,null),Xe=Ke.exports,Ze=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div")},Ye=[],et=s("53ca"),tt=s("d4ec"),st=s("bee2"),at=(s("b64b"),s("07ac"),s("5319"),s("d3b7"),s("25f0"),function(){function e(t){if(Object(tt["a"])(this,e),t instanceof Object||(t=this.parseJson(t)),!(t instanceof Object))throw new it("Input does not contain serialized object.");this.data=t}return Object(st["a"])(e,[{key:"parseJson",value:function(e){try{return JSON.parse(e)}catch(t){throw new it("Input is not a valid JSON string.",t)}}},{key:"print",value:function(e){e.innerHTML=this.generateHtml()}},{key:"generateHtml",value:function(){var e=this,t=this.resolveValueAndType(this.data),s=Object(a["a"])(t,2),i=s[0];s[1];return this.createElement("ul",{class:"pretty-jason"},[this.createElement("li",{},[this.createElement("span",{data:{rendered:!0},click:function(t){return e.objectNodeClickedCallback(t)}},[this.createElement("span",{class:"pretty-jason-icon",html:''}),this.createElement("span",{text:"".concat(i," ")})]),this.generateHtmlPreview(this.data),this.generateHtmlNode(this.data)])])}},{key:"generateHtmlNode",value:function(e){var t=this;return this.createElement("ul",{style:{display:"none"}},Object.keys(e).filter((function(e){return!["__class__","__type__","__hash__"].includes(e)})).map((function(s){var i=t.resolveValueAndType(e[s]),n=Object(a["a"])(i,2),r=n[0],o=n[1];return t.createElement("li",{data:{key:s}},[t.createElement("span",{click:"object"==o?function(e){return t.objectNodeClickedCallback(e)}:void 0},[t.createElement("span",{class:"pretty-jason-icon",html:"object"==o?'':void 0}),t.createElement("span",{class:"pretty-jason-key",text:"".concat(s,": ")}),t.createElement("span",{class:"pretty-jason-value-".concat(o),text:r})])])})))}},{key:"generateHtmlPreview",value:function(e){var t=this;return this.createElement("span",{class:"pretty-jason-preview"},Object.keys(e).filter((function(e){return!["__class__","__type__","__hash__"].includes(e)})).slice(0,3).map((function(s){var i=t.resolveValueAndType(e[s]),n=Object(a["a"])(i,2),r=n[0],o=n[1];return t.createElement("span",{class:"pretty-jason-preview-item"},[t.createElement("span",{class:"pretty-jason-key",text:"".concat(s,": ")}),t.createElement("span",{class:"pretty-jason-value-".concat(o),text:r})])})).concat(Object.keys(e).length>3?[this.createElement("span",{class:"pretty-jason-preview-item",text:"..."})]:[]))}},{key:"resolveValueAndType",value:function(e){return null===e?["null","null"]:void 0===e?["undefined","undefined"]:"boolean"==typeof e?[e?"true":"false","boolean"]:"string"==typeof e?['"'.concat(e,'"'),"string"]:"object"==Object(et["a"])(e)?"array"==e.__type__?["Array(".concat(Object.values(e).length-1,")"),"object"]:e.__type__&&"object"!=e.__type__?[e.__type__,e.__type__.replace(" ","-")]:[e.__class__||"Object","object"]:[e.toString(),Object(et["a"])(e)]}},{key:"objectNodeClickedCallback",value:function(e){var t=e.currentTarget;this.isNodeExpanded(t)?this.collapseNode(t,e.ctrlKey||e.metaKey):this.expandNode(t,e.ctrlKey||e.metaKey)}},{key:"isNodeExpanded",value:function(e){var t=e.parentNode.querySelector("ul");return t&&"none"!=t.style.display}},{key:"expandNode",value:function(e,t){var s=this;this.renderObjectNode(e);var a=e.parentNode.querySelector("ul"),i=e.querySelector("i");i.classList.remove("pretty-jason-icon-closed","pretty-jason-icon-open"),a.style.display="block",i.classList.add("pretty-jason-icon-open"),t&&a.querySelectorAll(".pretty-jason-icon-closed").forEach((function(e){s.expandNode(e.parentNode.parentNode,t)}))}},{key:"collapseNode",value:function(e,t){var s=this,a=e.parentNode.querySelector("ul"),i=e.querySelector("i");i.classList.remove("pretty-jason-icon-closed","pretty-jason-icon-open"),a.style.display="none",i.classList.add("pretty-jason-icon-closed"),t&&a.querySelectorAll(".pretty-jason-icon-open").forEach((function(e){s.collapseNode(e.parentNode.parentNode,t)}))}},{key:"renderObjectNode",value:function(e){if(!e.dataset.rendered){var t=[],s=e;while(s=s.parentNode)if("LI"==s.tagName&&"key"in s.dataset){if(s.classList.contains("pretty-jason"))break;var a=s.dataset.key;t.unshift(isNaN(parseInt(a,10))?a:parseInt(a,10))}e.parentNode.append(this.generateHtmlNode(this.getDataFromPath(t))),e.dataset.rendered=!0}}},{key:"getDataFromPath",value:function(e){var t,s=this.data;while(void 0!==(t=e.shift()))s=s[t];return s}},{key:"createElement",value:function(e,t,s){var a=document.createElement(e);return t.html&&(a.innerHTML=t.html),t.text&&(a.innerText=t.text),t.class&&a.classList.add(t.class),t.style instanceof Object&&Object.keys(t.style).forEach((function(e){return a.style[e]=t.style[e]})),t.data instanceof Object&&Object.keys(t.data).forEach((function(e){return a.dataset[e]=t.data[e]})),t.click&&a.addEventListener("click",t.click),s instanceof Array&&s.forEach((function(e){return a.append(e)})),a}}]),e}()),it=function e(t,s){Object(tt["a"])(this,e),this.message=t,this.exception=s},nt=s("1901"),rt=s.n(nt),ot={name:"PrettyPrint",props:["data","expanded","linkify"],methods:{render:function(){var e=this.data,t=document.createElement("div");if(!0===e)t.innerHTML="true";else if(!1===e)t.innerHTML="false";else if(void 0===e)t.innerHTML="undefined";else if(null===e)t.innerHTML="null";else if("number"===typeof e)t.innerText=e;else try{t.append(new at(e).generateHtml())}catch(s){t.innerText=e,this.linkify&&(t.innerHTML=rt()(t.innerHTML))}this.$el.firstChild&&this.$el.firstChild.remove(),this.$el.append(t),this.expanded&&this.$el.querySelector(".pretty-jason > li > span").click()}},mounted:function(){this.render()},watch:{data:function(){this.render()}}},lt=ot,ct=Object(f["a"])(lt,Ze,Ye,!1,null,null,null),ut=ct.exports,dt={name:"DetailsTable",components:{DetailsTableFilterToggle:Xe,PrettyPrint:ut},props:{badge:{},columns:{},filter:{},filterExample:{},icon:{default:"menu"},items:{},noHeader:{},noTableHead:{},perPage:{default:30},title:{}},data:function(){return{firstShown:0}},computed:{filteredItems:function(){return this.filter?this.filter.filter(this.items):this.items},shownItems:function(){return this.firstShown>this.filteredItems.length&&(this.firstShown=Math.max(this.filteredItems.length-this.perPage,0)),this.filteredItems.slice(this.firstShown,this.firstShown+this.perPage)},hasPreviousItems:function(){return this.firstShown>0},previousItemsCount:function(){return this.firstShown},hasNextItems:function(){return this.firstShown+this.perPaget&&(e.scrollTop=t)}},watch:{filteredItems:function(){this.firstShown=0}}},ht=dt,vt=(s("2958"),Object(f["a"])(ht,He,Ve,!1,null,null,null)),ft=vt.exports,mt=(s("466d"),s("7677")),pt=s("460c"),gt=s("e3ee"),bt=s("b166"),wt=s("1212"),_t=s("cc73"),yt=s("2b0e"),Ct=function(){function e(t,s){Object(tt["a"])(this,e),this.tags=t,this.map=s,this.shown=!1,this.sortedBy=void 0,this.sortedDesc=!1,this.input=""}return Object(st["a"])(e,[{key:"toggle",value:function(e){this.shown=!this.shown,this.shown&&yt["a"].nextTick((function(){var t=e.target;while(t=t.parentNode)if("TABLE"==t.tagName)break;t.querySelector(".filter input").focus()}))}},{key:"sortBy",value:function(e){this.sortedBy==e?this.sortedDesc=!this.sortedDesc:(this.sortedBy=e,this.sortedDesc=!0)}},{key:"filter",value:function(e){var t=this,s=this.tokenize(this.input),a=s.terms,i=s.tags;if(e=e.filter((function(e){var s=t.map?t.map(e):e;return t.matchesTerms(s,a)&&t.matchesTags(e,i)})),this.sortedBy){var n=this.tags.find((function(e){return e.tag==t.sortedBy}));e.sort((function(e,s){var a,i;return n&&"number"==n.type?e[t.sortedBy]-s[t.sortedBy]:null===(a=e[t.sortedBy])||void 0===a?void 0:a.toString().localeCompare(null===(i=s[t.sortedBy])||void 0===i?void 0:i.toString())}))}return this.sortedDesc&&(e=e.reverse()),e}},{key:"matchesTerms",value:function(e,t){var s=this;return!t.length||("object"==Object(et["a"])(e)&&null!==e?Object.values(e).find((function(e){return s.matchesTerms(e,t)})):"string"==typeof e&&t.find((function(t){return e.toLowerCase().includes(t.toLowerCase())})))}},{key:"matchesTags",value:function(e,t){var s=this;return!Object.keys(t).length||Object.keys(t).every((function(a){return a=s.tags.find((function(e){return e.tag==a})),!!a&&("number"==a.type||"date"==a.type?t[a.tag].every((function(t){return s.isTagApplicable(a,e,t)})):t[a.tag].find((function(t){return s.isTagApplicable(a,e,t)})))}))}},{key:"isTagApplicable",value:function(e,t,s){return e.apply?e.apply(t,s):(t=e.map?e.map(t):t[e.tag],"number"==e.type?(a=s.match(/^<(\d+(?:\.\d+)?)$/))?t(\d+(?:\.\d+)?)$/))?parseFloat(a[1])(.+)$/))?Object(wt["a"])(Object(pt["a"])(new Date(t),0),Object(gt["a"])(i[1].match(/^\d+:\d+(:\d+)?$/)?Object(bt["a"])(new Date,"yyyy-MM-dd ")+i[1]:i[1])):Object(_t["a"])(Object(pt["a"])(new Date(t),0),Object(gt["a"])(s.match(/^\d+:\d+(:\d+)?$/)?Object(bt["a"])(new Date,"yyyy-MM-dd ")+s:s)):"string"==typeof t&&t.toLowerCase().includes(s.toLowerCase()));var a,i}},{key:"tokenize",value:function(e){var t,s=[],a={},i=/(\w+:)?("[^"]*"|[^\s]+)/g;while(t=i.exec(e)){var n=t[1]?t[1].substr(0,t[1].length-1):void 0,r=t[2];(t=r.match(/^"(.+?)"$/))&&(r=t[1]),n?(a[n]||(a[n]=[]),a[n].push(r)):s.push(r)}return{terms:s,tags:a}}}]),e}(),qt={name:"CacheTab",components:{DetailsTable:ft,PrettyPrint:ut,StackTrace:z},props:["active"],data:function(){return{filter:new Ct([{tag:"action",apply:function(e,t){if(["read","write","delete","miss"].includes(t.toLowerCase()))return e.type.toLowerCase()==t.toLowerCase()}},{tag:"key"},{tag:"file",map:function(e){return e.shortPath}}])}},computed:{columns:function(){var e=[{name:"Action",sortBy:"type"},"Key","Value","Expires"];return this.$request.cacheQueries.some((function(e){return e.connection}))&&e.unshift("Connection"),this.$request.cacheQueries.some((function(e){return e.duration}))&&e.push("Duration"),e}}},$t=qt,kt=Object(f["a"])($t,Fe,Je,!1,null,null,null),xt=kt.exports,Tt=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{directives:[{name:"show",rawName:"v-show",value:e.active,expression:"active"}]},[s("div",{staticClass:"counters-row"},[s("div",{staticClass:"counter"},[s("div",{staticClass:"counter-value"},[e._v(e._s(e.$request.databaseQueriesCount))]),s("div",{staticClass:"counter-title"},[e._v("queries")])]),e.$request.databaseSlowQueries?s("div",{staticClass:"counter database-slow-query"},[s("div",{staticClass:"counter-value"},[e._v(e._s(e.$request.databaseSlowQueries))]),s("div",{staticClass:"counter-title has-mark"},[e._v("slow")])]):e._e(),e.$request.databaseSelects?s("div",{staticClass:"counter"},[s("div",{staticClass:"counter-value"},[e._v(e._s(e.$request.databaseSelects))]),s("div",{staticClass:"counter-title"},[e._v("selects")])]):e._e(),e.$request.databaseInserts?s("div",{staticClass:"counter"},[s("div",{staticClass:"counter-value"},[e._v(e._s(e.$request.databaseInserts))]),s("div",{staticClass:"counter-title"},[e._v("inserts")])]):e._e(),e.$request.databaseUpdates?s("div",{staticClass:"counter"},[s("div",{staticClass:"counter-value"},[e._v(e._s(e.$request.databaseUpdates))]),s("div",{staticClass:"counter-title"},[e._v("updates")])]):e._e(),e.$request.databaseDeletes?s("div",{staticClass:"counter"},[s("div",{staticClass:"counter-value"},[e._v(e._s(e.$request.databaseDeletes))]),s("div",{staticClass:"counter-title"},[e._v("deletes")])]):e._e(),e.$request.databaseOthers?s("div",{staticClass:"counter"},[s("div",{staticClass:"counter-value"},[e._v(e._s(e.$request.databaseOthers))]),s("div",{staticClass:"counter-title"},[e._v("other")])]):e._e(),s("div",{staticClass:"counter"},[s("div",{staticClass:"counter-value"},[e._v(e._s(e.$request.databaseDurationRounded)+" ms")]),s("div",{staticClass:"counter-title"},[e._v("time")])])]),e.$request.databaseQueries.length?s("details-table",{attrs:{title:"Queries",icon:"database",columns:e.columns,items:e.$request.databaseQueries,filter:e.filter,"filter-example":"where request_id model:request type:select file:Controller.php duration:>100"},scopedSlots:e._u([{key:"toolbar",fn:function(t){var a=t.filter;return[s("div",{staticClass:"header-group"},[s("label",{staticClass:"header-toggle"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.prettify,expression:"prettify"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.prettify)?e._i(e.prettify,null)>-1:e.prettify},on:{change:function(t){var s=e.prettify,a=t.target,i=!!a.checked;if(Array.isArray(s)){var n=null,r=e._i(s,n);a.checked?r<0&&(e.prettify=s.concat([n])):r>-1&&(e.prettify=s.slice(0,r).concat(s.slice(r+1)))}else e.prettify=i}}}),e._v(" Prettify ")])]),s("div",{staticClass:"header-group"},[s("div",{staticClass:"header-search"},[s("input",{directives:[{name:"model",rawName:"v-model",value:a.input,expression:"filter.input"}],attrs:{type:"search",placeholder:"Search..."},domProps:{value:a.input},on:{input:function(t){t.target.composing||e.$set(a,"input",t.target.value)}}}),s("icon",{attrs:{name:"search"}})],1)])]}},{key:"body",fn:function(t){var a=t.items;return e._l(a,(function(t,a){return s("tr",{key:e.$request.id+"-"+a,class:{"database-slow-query":t.tags.includes("slow")}},[s("td",[s("shortened-text",{attrs:{full:t.model}},[e._v(e._s(t.shortModel))])],1),e.columns.includes("Connection")?s("td",[e._v(e._s(t.connection))]):e._e(),s("td",[s("div",{staticClass:"database-query"},[s("div",{staticClass:"database-query-content"},[s("highlighted-code",{attrs:{language:"sql",code:e.prettify?t.prettifiedQuery:t.query}}),t.bindings?s("div",{staticClass:"database-query-bindings"},[s("pretty-print",{attrs:{data:t.bindings}})],1):e._e()],1),s("stack-trace",{staticClass:"database-query-path",attrs:{trace:t.trace,file:t.file,line:t.line}})],1)]),s("td",{staticClass:"database-duration"},[t.duration?s("span",[e._v(e._s(e._f("round")(t.duration,3))+" ms")]):e._e()])])}))}}],null,!1,475677615)}):e._e()],1)},St=[],jt=(s("4d63"),s("6062"),s("3ca3"),s("ddb0"),s("a434"),function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("pre",{staticClass:"highlighted-code"},[s("code",{class:e.languageClass,domProps:{innerHTML:e._s(e.html)}})])}),Ot=[],Pt=s("8c7a"),Dt=s.n(Pt),Rt=(s("af8a"),{name:"HighlightedCode",props:["code","language"],computed:{languageClass:function(){return"language-".concat(this.language)},html:function(){return Dt.a.highlight(this.code,Dt.a.languages.sql,"sql")}}}),Et=Rt,Nt=(s("0774"),Object(f["a"])(Et,jt,Ot,!1,null,null,null)),At=Nt.exports,It={name:"DatabaseTab",components:{DetailsTable:ft,HighlightedCode:At,PrettyPrint:ut,ShortenedText:H,StackTrace:z},props:["active"],data:function(){return{prettify:!1,filter:new Ct([{tag:"model"},{tag:"type",apply:function(e,t){if(["select","update","insert","delete"].includes(t.toLowerCase()))return e.query.match(new RegExp("^".concat(t.toLowerCase()),"i"))}},{tag:"file",map:function(e){return e.shortPath}},{tag:"duration",type:"number"}])}},computed:{columns:function(){var e=["Model","Query","Duration"],t=new Set(this.$request.databaseQueries.map((function(e){return e.connection}))).size>1;return t&&e.splice(1,0,"Connection"),e}},watch:{prettify:function(e,t){void 0!==t&&(this.$settings.global.databasePrettified=this.prettify,this.$settings.save())}},mounted:function(){this.prettify=this.$settings.global.databasePrettified||!1}},Mt=It,Lt=(s("c563"),Object(f["a"])(Mt,Tt,St,!1,null,null,null)),Qt=Lt.exports,Ut=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{directives:[{name:"show",rawName:"v-show",value:e.active,expression:"active"}]},[s("details-table",{attrs:{title:"Events",icon:"zap",columns:["Time","Event",""],items:e.$request.events,filter:e.filter,"filter-example":'"user registered" file:Controller.php time:<13:08:30'},scopedSlots:e._u([{key:"body",fn:function(t){var a=t.items;return e._l(a,(function(t,a){return s("tr",{key:e.$request.id+"-"+a},[s("td",[e._v(e._s(e._f("date")(t.time,"HH:mm:ss")))]),s("td",[s("div",{staticClass:"fired-event"},[s("div",{staticClass:"fired-event-content"},[t.objectEvent?s("div",[s("pretty-print",{attrs:{data:t.data}})],1):e._e(),t.objectEvent?e._e():s("div",[e._v(" "+e._s(t.event)+" ")])]),s("stack-trace",{staticClass:"fired-query-path",attrs:{trace:t.trace,file:t.file,line:t.line}})],1),s("div",{directives:[{name:"show",rawName:"v-show",value:e.isEventExpanded(t),expression:"isEventExpanded(event)"}],staticClass:"fired-event-details"},[t.objectEvent?e._e():s("div",{staticClass:"fired-event-parameters"},[s("h4",[e._v("Parameters")]),s("pretty-print",{attrs:{data:t.data}})],1),s("div",{staticClass:"fired-event-listeners"},[s("h4",[e._v("Listeners")]),e._l(t.listeners,(function(t,a){return s("shortened-text",{key:e.$request.id+"-"+a,attrs:{full:t.name}},[e._v(" "+e._s(t.shortName)+" ")])}))],2)])]),s("td",{staticClass:"fired-event-actions"},[s("a",{attrs:{href:"#"},on:{click:function(s){return s.preventDefault(),e.toggleEvent(t)}}},[s("icon",{attrs:{name:e.isEventExpanded(t)?"chevron-up":"chevron-down"}})],1)])])}))}}])})],1)},Ft=[],Jt={name:"EventsTab",components:{DetailsTable:ft,PrettyPrint:ut,ShortenedText:H,StackTrace:z},props:["active"],data:function(){return{filter:new Ct([{tag:"time",type:"date"},{tag:"file",map:function(e){return e.shortPath}}]),expandedEvents:[]}},methods:{toggleEvent:function(e){this.isEventExpanded(e)?this.expandedEvents=this.expandedEvents.filter((function(t){return t!=e})):this.expandedEvents.push(e)},isEventExpanded:function(e){return-1!==this.expandedEvents.indexOf(e)}}},Ht=Jt,Vt=Object(f["a"])(Ht,Ut,Ft,!1,null,null,null),Wt=Vt.exports,Bt=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{directives:[{name:"show",rawName:"v-show",value:e.active,expression:"active"}]},[s("details-table",{attrs:{title:"Messages",icon:"edit-2",columns:["Time","Level","Message"],items:e.log,filter:e.filter,"filter-example":"query failed level:error file:Controller.php time:>13:08:29"},scopedSlots:e._u([{key:"body",fn:function(t){var a=t.items;return e._l(a,(function(t,a){return s("tr",{key:e.$request.id+"-"+a,class:{"log-row":!0,error:["emergency","alert","critical","error"].includes(t.level),warning:"warning"==t.level}},[s("td",{staticClass:"log-date"},[e._v(e._s(e._f("date")(t.time,"HH:mm:ss")))]),s("td",{staticClass:"log-level"},[e._v(e._s(t.level))]),s("td",[s("div",{staticClass:"log-message"},[s("div",{staticClass:"log-message-content"},[s("pretty-print",{attrs:{data:t.message,linkify:!0}}),s("div",{directives:[{name:"show",rawName:"v-show",value:t.context,expression:"message.context"}],staticClass:"log-message-context"},[s("pretty-print",{attrs:{data:t.context}})],1)],1),t.exception?s("div",{staticClass:"log-message-exception"},[t.exception.previous?s("a",{staticClass:"exception-previous",attrs:{href:"#"},on:{click:function(s){return s.preventDefault(),e.showPreviousException(t)}}},[e._v("Show previous")]):e._e(),s("span",{staticClass:"exception-type"},[e._v(e._s(t.exception.type))]),t.exception.code?s("span",{staticClass:"exception-code"},[e._v("#"+e._s(t.exception.code))]):e._e()]):e._e(),s("stack-trace",{staticClass:"log-message-path",attrs:{trace:t.trace,file:t.file,line:t.line}})],1)])])}))}}])})],1)},zt=[],Gt={name:"LogTab",components:{DetailsTable:ft,PrettyPrint:ut,StackTrace:z},props:["active"],data:function(){return{filter:new Ct([{tag:"time",type:"date"},{tag:"level"},{tag:"file",map:function(e){return e.shortPath}}],(function(e){return e.message}))}},computed:{log:function(){return this.$request.log.filter((function(e){var t;return!(null!==(t=e.context)&&void 0!==t&&t.performance)}))}},methods:{showPreviousException:function(e){var t=this.$request.log.indexOf(e);this.$request.log.splice(t+1,0,{time:e.time,message:e.exception.previous.message,exception:e.exception.previous,level:"error",shortPath:"".concat(e.exception.previous.file.split(/[\/\\]/).pop(),":").concat(e.exception.previous.line),trace:e.exception.previous.trace}),e.exception.previous=void 0}}},Kt=Gt,Xt=(s("f16e"),Object(f["a"])(Kt,Bt,zt,!1,null,null,null)),Zt=Xt.exports,Yt=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{directives:[{name:"show",rawName:"v-show",value:e.active,expression:"active"}]},[s("div",{staticClass:"counters-row models-counters"},[e.totals.retrieved?s("div",{staticClass:"counter counter-retrieved"},[s("div",{staticClass:"counter-value"},[e._v(e._s(e.totals.retrieved))]),s("div",{staticClass:"counter-title has-mark"},[e._v("retrieved")])]):e._e(),e.totals.created?s("div",{staticClass:"counter counter-created"},[s("div",{staticClass:"counter-value"},[e._v(e._s(e.totals.created))]),s("div",{staticClass:"counter-title has-mark"},[e._v("created")])]):e._e(),e.totals.updated?s("div",{staticClass:"counter counter-updated"},[s("div",{staticClass:"counter-value"},[e._v(e._s(e.totals.updated))]),s("div",{staticClass:"counter-title has-mark"},[e._v("updated")])]):e._e(),e.totals.deleted?s("div",{staticClass:"counter counter-deleted"},[s("div",{staticClass:"counter-value"},[e._v(e._s(e.totals.deleted))]),s("div",{staticClass:"counter-title has-mark"},[e._v("deleted")])]):e._e()]),e.$request.modelsActions.length?s("div",{staticClass:"models-tabs"},[s("a",{staticClass:"models-tab",class:{active:"actions"==e.activeModelsTab},attrs:{href:"#"},on:{click:function(t){t.preventDefault(),e.selectedModelsTab="actions"}}},[s("icon",{attrs:{name:"activity"}}),e._v(" Actions ")],1),s("a",{staticClass:"models-tab",class:{active:"models"==e.activeModelsTab},attrs:{href:"#"},on:{click:function(t){t.preventDefault(),e.selectedModelsTab="models"}}},[s("icon",{attrs:{name:"hash"}}),e._v(" Models ")],1)]):e._e(),"actions"==e.activeModelsTab?s("details-table",{staticClass:"models-actions",attrs:{title:"Actions",icon:"activity",columns:["Model","",""],items:e.$request.modelsActions,filter:e.actionsFilter,"filter-example":"App\\User action:updated"},scopedSlots:e._u([{key:"body",fn:function(t){var a=t.items;return[e._l(a,(function(t,a){return[s("tr",{key:e.$request.id+"-models-actions-"+a,staticClass:"actions-action"},[s("td",{staticClass:"action-model"},[s("div",{staticClass:"model-content"},[s("div",{staticClass:"content-text"},[s("shortened-text",{attrs:{full:t.model}},[e._v(e._s(t.shortModel))]),t.key?s("span",{staticClass:"action-key"},[s("span",{staticClass:"key-hash"},[e._v("#")]),e._v(e._s(t.key)+" ")]):e._e()],1),s("stack-trace",{staticClass:"content-trace",attrs:{trace:t.trace,file:t.file,line:t.line}})],1)]),s("td",{staticClass:"database-duration"},[s("span",{staticClass:"action-action",class:"action-"+t.action},[e._v(e._s(t.action))])]),s("td",[t.attributes||t.changes?s("a",{attrs:{href:"#",title:"Show details"},on:{click:function(e){e.preventDefault(),t.isShowingDetails=!t.isShowingDetails}}},[s("icon",{attrs:{name:t.isShowingDetails?"chevron-up":"chevron-down"}})],1):e._e()])]),s("tr",{directives:[{name:"show",rawName:"v-show",value:t.isShowingDetails,expression:"action.isShowingDetails"}],key:e.$request.id+"-models-actions-details-"+a,staticClass:"actions-details"},[s("td",{attrs:{colspan:"3"}},[t.attributes?s("div",{staticClass:"details-row"},[s("div",{staticClass:"row-group"},[s("h4",[e._v("Attributes")]),s("pretty-print",{attrs:{data:t.attributes}})],1)]):e._e(),t.changes?s("div",{staticClass:"details-row"},[s("div",{staticClass:"row-group"},[s("h4",[e._v("Changes")]),s("pretty-print",{attrs:{data:t.changes}})],1)]):e._e(),t.query?s("div",{staticClass:"details-row"},[t.query?s("div",{staticClass:"row-group group-query"},[s("h4",[e._v("Query")]),s("highlighted-code",{attrs:{language:"sql",code:t.query}})],1):e._e(),t.duration?s("div",{staticClass:"row-group"},[s("h4",[e._v("Duration")]),s("span",[e._v(e._s(e._f("round")(t.duration,3))+" ms")])]):e._e(),t.connection?s("div",{staticClass:"row-group"},[s("h4",[e._v("Connection")]),s("span",[e._v(e._s(t.connection))])]):e._e()]):e._e()])])]}))]}}],null,!1,1918269834)}):e._e(),"models"==e.activeModelsTab?s("details-table",{staticClass:"models-counts",attrs:{title:"Models",icon:"hash",columns:["Model","Retrieved","Created","Updated","Deleted"],items:e.modelsCounts,filter:e.countsFilter,"filter-example":"App\\User retrieved:>10"},scopedSlots:e._u([{key:"body",fn:function(t){var a=t.items;return[e._l(a,(function(t,a){return[s("tr",{key:e.$request.id+"-models-counts-"+a},[s("td",{staticClass:"counts-model"},[s("shortened-text",{attrs:{full:t.model}},[e._v(e._s(t.shortModel))])],1),s("td",{staticClass:"counts-count"},[t.retrieved?s("span",{staticClass:"count-text count-retrieved"},[e._v(e._s(t.retrieved))]):s("span",[e._v("-")])]),s("td",{staticClass:"counts-count"},[t.created?s("span",{staticClass:"count-text count-created"},[e._v(e._s(t.created))]):s("span",[e._v("-")])]),s("td",{staticClass:"counts-count"},[t.updated?s("span",{staticClass:"count-text count-updated"},[e._v(e._s(t.updated))]):s("span",[e._v("-")])]),s("td",{staticClass:"counts-count"},[t.deleted?s("span",{staticClass:"count-text count-deleted"},[e._v(e._s(t.deleted))]):s("span",[e._v("-")])])])]}))]}}],null,!1,639342335)}):e._e()],1)},es=[],ts=s("2909"),ss=(s("a630"),{name:"ModelsTab",components:{DetailsTable:ft,HighlightedCode:At,PrettyPrint:ut,ShortenedText:H,StackTrace:z},props:["active"],data:function(){return{selectedModelsTab:"actions",actionsFilter:new Ct([{tag:"model"},{tag:"action"},{tag:"file",map:function(e){return e.shortPath}}]),countsFilter:new Ct([{tag:"model"},{tag:"retrieved",type:"number"},{tag:"created",type:"number"},{tag:"updated",type:"number"},{tag:"deleted",type:"number"}])}},computed:{totals:function(){return{retrieved:Object.values(this.$request.modelsRetrieved).reduce((function(e,t){return e+t}),0),created:Object.values(this.$request.modelsCreated).reduce((function(e,t){return e+t}),0),updated:Object.values(this.$request.modelsUpdated).reduce((function(e,t){return e+t}),0),deleted:Object.values(this.$request.modelsDeleted).reduce((function(e,t){return e+t}),0)}},activeModelsTab:function(){return"actions"!=this.selectedModelsTab||this.$request.modelsActions.length?this.selectedModelsTab:"models"},modelsCounts:function(){var e=this,t=new Set([].concat(Object(ts["a"])(Object.keys(this.$request.modelsRetrieved)),Object(ts["a"])(Object.keys(this.$request.modelsCreated)),Object(ts["a"])(Object.keys(this.$request.modelsUpdated)),Object(ts["a"])(Object.keys(this.$request.modelsDeleted))));return Array.from(t).map((function(t){return{model:t,shortModel:t.split("\\").pop(),retrieved:e.$request.modelsRetrieved[t],created:e.$request.modelsCreated[t],updated:e.$request.modelsUpdated[t],deleted:e.$request.modelsDeleted[t]}}))}},methods:{isTabActive:function(e){if(""==e)return this.selectedModelsTab==e},showTab:function(e){this.selectedModelsTab=e}}}),as=ss,is=(s("d3ec"),Object(f["a"])(as,Yt,es,!1,null,null,null)),ns=is.exports,rs=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{directives:[{name:"show",rawName:"v-show",value:e.active,expression:"active"}]},[s("details-table",{staticClass:"notifications-notifications",attrs:{title:"Notifications",icon:"mail",columns:e.columns,items:e.$request.notifications,filter:e.filter,"filter-example":'"User Registration" to:its@underground.works'},scopedSlots:e._u([{key:"body",fn:function(t){var a=t.items;return[e._l(a,(function(t,a){return[s("tr",{key:e.$request.id+"-notifications-"+a},[e.columns.includes("Type")?s("td",[e._v(e._s(e._f("title")(t.type)))]):e._e(),s("td",[e._v(e._s(e._f("join")(t.to,", ")))]),s("td",{staticClass:"notification-subject"},[s("div",{staticClass:"subject-content"},[s("div",{staticClass:"content-text"},[e._v(" "+e._s(t.subject)+" ")]),s("stack-trace",{staticClass:"content-trace",attrs:{trace:t.trace,file:t.file,line:t.line}})],1)]),s("td",{staticClass:"notification-actions"},[t.content?s("a",{attrs:{href:"#",title:"Show message"},on:{click:function(s){s.preventDefault(),e.showNotification=t}}},[s("icon",{attrs:{name:"search"}})],1):e._e(),s("a",{attrs:{href:"#",title:"Show details"},on:{click:function(e){e.preventDefault(),t.isShowingDetails=!t.isShowingDetails}}},[s("icon",{attrs:{name:t.isShowingDetails?"chevron-up":"chevron-down"}})],1)])]),s("tr",{directives:[{name:"show",rawName:"v-show",value:t.isShowingDetails,expression:"notification.isShowingDetails"}],key:e.$request.id+"-notifications-details-"+a,staticClass:"notifications-details"},[s("td",{attrs:{colspan:e.columns.length}},[s("div",{staticClass:"details-row"},[t.to?s("div",{staticClass:"row-group"},[s("h4",[e._v("To")]),s("span",[e._v(e._s(e._f("join")(t.to,", ")))])]):e._e(),t.data.cc?s("div",{staticClass:"row-group"},[s("h4",[e._v("CC")]),s("span",[e._v(e._s(e._f("join")(t.data.cc,", ")))])]):e._e(),t.data.bcc?s("div",{staticClass:"row-group"},[s("h4",[e._v("BCC")]),s("span",[e._v(e._s(e._f("join")(t.data.bcc,", ")))])]):e._e(),t.from?s("div",{staticClass:"row-group"},[s("h4",[e._v("From")]),s("span",[e._v(e._s(e._f("join")(t.from,", ")))])]):e._e(),t.data.replyTo?s("div",{staticClass:"row-group"},[s("h4",[e._v("Reply To")]),s("span",[e._v(e._s(e._f("join")(t.data.replyTo,", ")))])]):e._e()]),s("div",{staticClass:"details-row"},[s("div",{staticClass:"row-group"},[s("h4",[e._v("Subject")]),s("pretty-print",{attrs:{data:t.subject}})],1)]),e._l(e.additionalData(t.data),(function(t,a){return t?s("div",{staticClass:"details-row"},[s("div",{staticClass:"row-group"},[s("h4",[e._v(e._s(e._f("title")(a)))]),s("pretty-print",{attrs:{data:t}})],1)]):e._e()}))],2)])]}))]}}])}),s("message-modal",{attrs:{message:e.showNotification},on:{"update:message":function(t){e.showNotification=t}}})],1)},os=[],ls=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("modal",{attrs:{icon:"mail",title:"Message",shown:e.messageLocal},on:{"update:shown":function(t){e.messageLocal=t}}},[s("div",{staticClass:"email-message"},[s("div",{staticClass:"message-info"},[e.message?s("div",{staticClass:"info-row"},[s("span",{staticClass:"row-label"},[e._v("To: ")]),s("span",{staticClass:"row-value"},[e._v(e._s(e.message.to.join(", ")))])]):e._e(),e.message?s("div",{staticClass:"info-row"},[s("span",{staticClass:"row-label"},[e._v("Subject: ")]),s("span",{staticClass:"row-value"},[e._v(e._s(e.message.subject))])]):e._e()]),s("div",{staticClass:"message-content"},[s("iframe",{ref:"content"})])])])},cs=[],us={name:"EmailMessageModal",components:{Modal:p},props:["message"],computed:{messageLocal:{get:function(){return this.message},set:function(e){this.$emit("update:message",e)}}},watch:{message:function(e){if(e){var t=this.$refs.content.contentWindow.document;t.open(),t.write(this.message.content),t.close()}}}},ds=us,hs=(s("337f"),Object(f["a"])(ds,ls,cs,!1,null,null,null)),vs=hs.exports,fs=s("57b8"),ms=s.n(fs),ps={name:"notificationsTab",components:{DetailsTable:ft,DetailsTableFilterToggle:Xe,MessageModal:vs,PrettyPrint:ut,StackTrace:z},props:["active"],data:function(){return{filter:new Ct([{tag:"to"}]),showNotification:null}},computed:{columns:function(){var e=["To","Subject",""],t=new Set(this.$request.notifications.map((function(e){return e.type}))).size>1;return t&&e.splice(1,0,"Type"),e}},methods:{additionalData:function(e){return ms()(e,["cc","bcc","replyTo"])}}},gs=ps,bs=(s("5518"),Object(f["a"])(gs,rs,os,!1,null,null,null)),ws=bs.exports,_s=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{directives:[{name:"show",rawName:"v-show",value:e.active,expression:"active"}]},[s("div",{staticClass:"command-output",domProps:{innerHTML:e._s(e.formattedOutput)}})])},ys=[],Cs=s("61ab"),qs=s.n(Cs),$s={name:"OutputTab",props:["active"],computed:{formattedOutput:function(){return this.ansiToHtml.toHtml(this.$request.commandOutput||"")}},created:function(){this.ansiToHtml=new qs.a({fg:"#c7c7c7",bg:"#000000",escapeXML:!0,colors:{0:"#000000",1:"#c91b00",2:"#00c200",3:"#c7c400",4:"#0225c7",5:"#c930c7",6:"#00c5c7",7:"#c7c7c7",8:"#676767",9:"#ff6d67",10:"#5ff967",11:"#fefb67",12:"#6871ff",13:"#ff76ff",14:"#5ffdff",15:"#feffff"}})}},ks=$s,xs=(s("288a"),Object(f["a"])(ks,_s,ys,!1,null,null,null)),Ts=xs.exports,Ss=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{directives:[{name:"show",rawName:"v-show",value:e.active,expression:"active"}]},[s("div",{staticClass:"counters-row performance-metrics"},[e.$request.responseDurationRounded?s("div",{staticClass:"counter"},[s("div",{staticClass:"counter-value"},[e._v(e._s(e.$request.responseDurationRounded)+" ms")]),s("div",{staticClass:"counter-title"},[e._v("Response time")])]):e._e(),e.$request.memoryUsage?s("div",{staticClass:"counter"},[s("div",{staticClass:"counter-value"},[e._v(e._s(e.$request.memoryUsageFormatted))]),s("div",{staticClass:"counter-title"},[e._v("Memory")])]):e._e(),s("div",{staticClass:"counters-group right-aligned"},e._l(e.$request.performanceMetrics,(function(t,a){return s("div",{key:e.$request.id+"-"+a,staticClass:"counter performance-chart-legend"},[s("div",{staticClass:"counter-value"},[e._v(e._s(t.value)+" ms")]),s("div",{staticClass:"counter-title has-mark",class:"mark-"+t.color},[e._v(e._s(t.name))])])})),0)]),s("performance-chart",{attrs:{metrics:e.$request.performanceMetrics}}),s("div",{attrs:{tabs:"performance"}},[s("div",{staticClass:"performance-tabs"},[e.databaseSlowQueries.length||e.performanceIssues.length?s("a",{staticClass:"performance-tab",class:{active:e.isTabActive("issues")},attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.showTab("issues")}}},[s("icon",{attrs:{name:"alert-triangle"}}),e._v(" Issues ")],1):e._e(),s("a",{staticClass:"performance-tab",class:{active:e.isTabActive("timeline")},attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.showTab("timeline")}}},[s("icon",{attrs:{name:"pie-chart"}}),e._v(" Timeline ")],1),e.isClientSideTabAvailable?s("a",{staticClass:"performance-tab",class:{active:e.isTabActive("client-side")},attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.showTab("client-side")}}},[s("icon",{attrs:{name:"smile"}}),e._v(" Client-side ")],1):e._e(),s("a",{directives:[{name:"show",rawName:"v-show",value:e.$platform.hasFeature("profiler"),expression:"$platform.hasFeature('profiler')"}],staticClass:"performance-tab",class:{active:e.isTabActive("profiler")},attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.showTab("profiler")}}},[s("icon",{attrs:{name:"clock"}}),e._v(" Profiler ")],1)]),s("performance-log",{directives:[{name:"show",rawName:"v-show",value:e.isTabActive("issues"),expression:"isTabActive('issues')"}],attrs:{issues:e.performanceIssues,"slow-queries":e.databaseSlowQueries}}),s("timeline",{directives:[{name:"show",rawName:"v-show",value:e.isTabActive("timeline"),expression:"isTabActive('timeline')"}],attrs:{name:"performance",timeline:e.$request.timeline,tags:e.timelineTags}}),s("performance-client-side",{directives:[{name:"show",rawName:"v-show",value:e.isTabActive("client-side"),expression:"isTabActive('client-side')"}],attrs:{metrics:e.$request.clientMetrics,vitals:e.$request.webVitals}}),s("profiler",{directives:[{name:"show",rawName:"v-show",value:e.isTabActive("profiler"),expression:"isTabActive('profiler')"}]})],1)],1)},js=[],Os=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"performance-chart"},e._l(e.sections,(function(e){return s("div",{staticClass:"chart-section",class:e.class,style:e.style})})),0)},Ps=[],Ds={name:"PerformanceChart",props:{metrics:{default:function(){return[]}}},data:function(){return{sections:[]}},methods:{refreshSections:function(){var e=this.$el.offsetWidth,t=this.metrics.reduce((function(e,t){return e+t.value}),0);this.sections=this.metrics.map((function(s){return{class:"section-".concat(s.color),style:"width: ".concat(e*s.value/t,"px")}}))}},mounted:function(){var e=this;this.refreshSections(),this.resizeObserver=new ResizeObserver(Ie()((function(t){return e.refreshSections()}),10)),this.resizeObserver.observe(this.$el)},watch:{metrics:function(){this.refreshSections()}}},Rs=Ds,Es=(s("6ff6"),Object(f["a"])(Rs,Os,Ps,!1,null,null,null)),Ns=Es.exports,As=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"performance-client-side"},[e.metrics.filter((function(e){return e.value})).length?s("div",{staticClass:"counters-row performance-metrics"},[e._l(e.metrics.filter((function(e){return!e.dom})),(function(t){return t.value?s("div",{staticClass:"counter performance-chart-legend"},[s("div",{staticClass:"counter-value"},[e._v(e._s(t.value)+" ms")]),s("div",{staticClass:"counter-title",class:t.color?"has-mark mark-"+t.color:""},[e._v(e._s(t.name))])]):e._e()})),s("div",{staticClass:"counters-group right-aligned"},e._l(e.metrics.filter((function(e){return e.dom})),(function(t){return t.value?s("div",{staticClass:"counter performance-chart-legend"},[s("div",{staticClass:"counter-value"},[e._v(e._s(t.value)+" ms")]),s("div",{staticClass:"counter-title",class:t.color?"has-mark mark-"+t.color:""},[e._v(e._s(t.name))])]):e._e()})),0)],2):e._e(),e.metrics.filter((function(e){return e.value&&e.onChart})).length?s("performance-chart",{attrs:{metrics:e.metrics.filter((function(e){return e.onChart}))}}):e._e(),Object.values(e.vitals).filter((function(e){return e.value})).length?s("details-table",{staticClass:"performance-vitals",attrs:{title:"Vitals",icon:"activity",items:[]}},[s("template",{slot:"toolbar"},[s("div",{staticClass:"header-group"},[s("a",{staticClass:"header-item",class:{active:e.showVitalsInfo},attrs:{href:"#",title:"Show info"},on:{click:function(t){return t.preventDefault(),e.toggleVitalsInfo.apply(null,arguments)}}},[s("icon",{attrs:{name:"help-circle"}})],1)])]),s("template",{slot:"body"},[s("tr",[s("td",[s("div",{staticClass:"vitals-row"},[s("div",{staticClass:"vitals-metric"},[s("div",{staticClass:"metric-name"},[e._v("Time To First Byte")]),e.vitals.ttfb.available?s("div",{staticClass:"metric-value",class:"value-"+e.vitals.ttfb.score},[e._v(" "+e._s(e._f("round")(e.vitals.ttfb.value))+" ms ")]):s("div",{staticClass:"metric-value value-unavailable"},[e._v("—")]),s("div",{directives:[{name:"show",rawName:"v-show",value:e.showVitalsInfo,expression:"showVitalsInfo"}],staticClass:"metric-info"},[e._v(" Time at which your server sends a response. "),s("a",{attrs:{href:"https://web.dev/time-to-first-byte/",target:"_blank"}},[e._v("Learn more")])])]),s("div",{staticClass:"vitals-metric"},[s("div",{staticClass:"metric-name"},[e._v("First Input Delay")]),e.vitals.fid.available?s("div",{staticClass:"metric-value",class:"value-"+e.vitals.fid.score},[e._v(" "+e._s(e._f("round")(e.vitals.fid.value))+" ms ")]):s("div",{staticClass:"metric-value value-unavailable"},[e._v("—")]),s("div",{directives:[{name:"show",rawName:"v-show",value:e.showVitalsInfo,expression:"showVitalsInfo"}],staticClass:"metric-info"},[e._v(" Time from when a user first interacts with a page to the time when the browser is actually able to respond to that interaction. "),s("a",{attrs:{href:"https://web.dev/fid/",target:"_blank"}},[e._v("Learn more")])])])])])]),s("tr",[s("td",[s("div",{staticClass:"vitals-row"},[s("div",{staticClass:"vitals-metric"},[s("div",{staticClass:"metric-name"},[e._v("First Contentful Paint")]),e.vitals.fcp.available?s("div",{staticClass:"metric-value",class:"value-"+e.vitals.fcp.score},[e._v(" "+e._s(e._f("round")(e.vitals.fcp.value))+" ms ")]):s("div",{staticClass:"metric-value value-unavailable"},[e._v("—")]),s("div",{directives:[{name:"show",rawName:"v-show",value:e.showVitalsInfo,expression:"showVitalsInfo"}],staticClass:"metric-info"},[e._v(" First Contentful Paint marks the time at which the first text or image is painted. "),s("a",{attrs:{href:"https://web.dev/first-contentful-paint/",target:"_blank"}},[e._v("Learn more")])])]),s("div",{staticClass:"vitals-metric"},[s("div",{staticClass:"metric-name"},[e._v("Largest Contentful Paint")]),e.vitals.lcp.available?s("div",{staticClass:"metric-value",class:"value-"+e.vitals.lcp.score},[e._v(" "+e._s(e._f("round")(e.vitals.lcp.value))+" ms ")]):s("div",{staticClass:"metric-value value-unavailable"},[e._v("—")]),s("div",{directives:[{name:"show",rawName:"v-show",value:e.showVitalsInfo,expression:"showVitalsInfo"}],staticClass:"metric-info"},[e._v(" Largest Contentful Paint marks the time at which the largest text or image is painted. "),s("a",{attrs:{href:"https://web.dev/lighthouse-largest-contentful-paint/",target:"_blank"}},[e._v("Learn more")])])])])])]),s("tr",[s("td",[s("div",{staticClass:"vitals-row"},[s("div",{staticClass:"vitals-metric"},[s("div",{staticClass:"metric-name"},[e._v("Cumulative Layout Shift")]),e.vitals.cls.available?s("div",{staticClass:"metric-value",class:"value-"+e.vitals.cls.score},[e._v(" "+e._s(e._f("round")(e.vitals.cls.value))+" ms ")]):s("div",{staticClass:"metric-value value-unavailable"},[e._v("—")]),s("div",{directives:[{name:"show",rawName:"v-show",value:e.showVitalsInfo,expression:"showVitalsInfo"}],staticClass:"metric-info"},[e._v(" Cumulative Layout Shift measures the movement of visible elements within the viewport. "),s("a",{attrs:{href:"https://web.dev/cls/",target:"_blank"}},[e._v("Learn more")])])]),s("div",{staticClass:"vitals-metric"},[s("div",{staticClass:"metric-name"},[e._v("Speed Index")]),e.vitals.si.available?s("div",{staticClass:"metric-value",class:"value-"+e.vitals.si.score},[e._v(" "+e._s(e._f("round")(e.vitals.si.value))+" ms ")]):s("div",{staticClass:"metric-value value-unavailable"},[e._v("—")]),s("div",{directives:[{name:"show",rawName:"v-show",value:e.showVitalsInfo,expression:"showVitalsInfo"}],staticClass:"metric-info"},[e._v(" Speed Index shows how quickly the contents of a page are visibly populated. "),s("a",{attrs:{href:"https://web.dev/speed-index/",target:"_blank"}},[e._v("Learn more")])])])])])])])],2):e._e()],1)},Is=[],Ms={name:"PerformanceClientSide",components:{DetailsTable:ft,PerformanceChart:Ns},props:["metrics","vitals"],computed:{showVitalsInfo:function(){return this.$settings.global.performanceVitalsInfoShown}},methods:{toggleVitalsInfo:function(){this.$settings.global.performanceVitalsInfoShown=!this.$settings.global.performanceVitalsInfoShown,this.$settings.save()}}},Ls=Ms,Qs=(s("5a57"),Object(f["a"])(Ls,As,Is,!1,null,null,null)),Us=Qs.exports,Fs=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"performance-log"},[e.issues.length?s("details-table",{attrs:{title:"Performance issues",icon:"alert-triangle",badge:e.issues.length,columns:["Message"],items:e.issues,filter:e.performanceLogFilter,"filter-example":"query failed file:Controller.php time:>13:08:29","no-table-head":!0},scopedSlots:e._u([{key:"body",fn:function(t){var a=t.items;return e._l(a,(function(t,a){return s("tr",{key:e.$request.id+"-"+a,staticClass:"log-row"},[s("td",[s("div",{staticClass:"log-message"},[s("div",{staticClass:"log-message-content"},[s("pretty-print",{attrs:{data:t.message}}),s("div",{directives:[{name:"show",rawName:"v-show",value:t.context&&t.context.length,expression:"message.context && message.context.length"}]},[s("pretty-print",{attrs:{data:t.context}})],1)],1),s("stack-trace",{staticClass:"log-message-path",attrs:{trace:t.trace,file:t.file,line:t.line}})],1)])])}))}}],null,!1,938518525)}):e._e(),e.slowQueries.length?s("details-table",{attrs:{title:"Slow database queries",icon:"database",badge:e.slowQueries.length,columns:e.databaseSlowQueriesColumns,items:e.slowQueries,filter:e.databaseSlowQueriesFilter,"filter-example":"where request_id model:request type:select file:Controller.php duration:>100"},scopedSlots:e._u([{key:"body",fn:function(t){var a=t.items;return e._l(a,(function(t,a){return s("tr",{key:e.$request.id+"-"+a},[s("td",[s("shortened-text",{attrs:{full:t.model}},[e._v(e._s(t.shortModel))])],1),e.databaseSlowQueriesColumns.includes("Connection")?s("td",[e._v(e._s(t.connection))]):e._e(),s("td",[s("div",{staticClass:"database-query"},[s("div",{staticClass:"database-query-content"},[s("highlighted-code",{attrs:{language:"sql",code:t.query}})],1),s("stack-trace",{staticClass:"database-query-path",attrs:{trace:t.trace,file:t.file,line:t.line}})],1)]),s("td",{staticClass:"database-duration"},[e._v(e._s(t.duration)+" ms")])])}))}}],null,!1,453533967)}):e._e()],1)},Js=[],Hs={name:"PerformanceLog",components:{DetailsTable:ft,DetailsTableFilterToggle:Xe,HighlightedCode:At,PrettyPrint:ut,ShortenedText:H,StackTrace:z},props:["issues","slowQueries"],data:function(){return{databaseSlowQueriesFilter:new Ct([{tag:"model"},{tag:"type",apply:function(e,t){if(["select","update","insert","delete"].includes(t.toLowerCase()))return e.query.match(new RegExp("^".concat(t.toLowerCase()),"i"))}},{tag:"file",map:function(e){return e.shortPath}},{tag:"duration",type:"number"}]),performanceLogFilter:new Ct([{tag:"time",type:"date"},{tag:"file",map:function(e){return e.shortPath}}],(function(e){return e.message}))}},computed:{databaseSlowQueriesColumns:function(){var e=["Model","Query","Duration"],t=new Set(this.slowQueries.map((function(e){return e.connection}))).size>1;return t&&e.splice(1,0,"Connection"),e}}},Vs=Hs,Ws=Object(f["a"])(Vs,Fs,Js,!1,null,null,null),Bs=Ws.exports,zs=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("details-table",{staticClass:"profiler",attrs:{title:"Profiler",icon:"clock",columns:["Self","Inclusive","Function"],items:e.$profiler.functions,filter:e.filter,"per-page":100},scopedSlots:e._u([{key:"toolbar",fn:function(t){var a=t.filter;return[s("div",{staticClass:"header-group"},[s("label",{staticClass:"header-toggle"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.enabled,expression:"enabled"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.enabled)?e._i(e.enabled,null)>-1:e.enabled},on:{change:function(t){var s=e.enabled,a=t.target,i=!!a.checked;if(Array.isArray(s)){var n=null,r=e._i(s,n);a.checked?r<0&&(e.enabled=s.concat([n])):r>-1&&(e.enabled=s.slice(0,r).concat(s.slice(r+1)))}else e.enabled=i}}}),e._v(" Enabled ")])]),s("div",{staticClass:"header-group"},[s("a",{staticClass:"header-item item-text",class:{active:!e.$profiler.percentual},attrs:{href:"#",title:"Exact"},on:{click:function(t){return t.preventDefault(),t.stopPropagation(),e.$profiler.showPercentual(!1)}}},[0==e.$profiler.metric?s("span",[e._v("ms")]):e._e(),1==e.$profiler.metric?s("span",[e._v("kB")]):e._e()]),s("a",{staticClass:"header-item",class:{active:e.$profiler.percentual},attrs:{href:"#",title:"Percentual"},on:{click:function(t){return t.preventDefault(),t.stopPropagation(),e.$profiler.showPercentual()}}},[s("icon",{attrs:{name:"percent"}})],1)]),s("div",{staticClass:"header-group"},[s("a",{staticClass:"header-item item-text",class:{active:.5==e.$profiler.shownFraction},attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),t.stopPropagation(),e.$profiler.setShownFraction(.5)}}},[e._v(" 50% ")]),s("a",{staticClass:"header-item item-text",class:{active:.9==e.$profiler.shownFraction},attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),t.stopPropagation(),e.$profiler.setShownFraction(.9)}}},[e._v(" 90% ")]),s("a",{staticClass:"header-item item-text",class:{active:1==e.$profiler.shownFraction},attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),t.stopPropagation(),e.$profiler.setShownFraction(1)}}},[e._v(" 100% ")])]),s("div",{staticClass:"header-group"},[s("div",{staticClass:"header-search"},[s("input",{directives:[{name:"model",rawName:"v-model",value:a.input,expression:"filter.input"}],attrs:{type:"search",placeholder:"Search..."},domProps:{value:a.input},on:{input:function(t){t.target.composing||e.$set(a,"input",t.target.value)}}}),s("icon",{attrs:{name:"search"}})],1)])]}},{key:"body",fn:function(t){var a=t.items;return[e._l(e.filterXdebug(a),(function(t,a){return e.$profiler.ready?s("tr",{key:e.$request.id+"-"+a},[s("td",{staticClass:"profiler-metric"},[e._v(e._s(e.$profiler.formatMetric(t.self)))]),s("td",{staticClass:"profiler-metric"},[e._v(e._s(e.$profiler.formatMetric(t.inclusive)))]),s("td",{staticClass:"profiler-function"},[s("div",{staticClass:"profiler-function-name"},[e._v(" "+e._s(t.name)+" ")]),s("div",{staticClass:"profiler-path"},[s("shortened-text",{attrs:{full:t.fullPath}},[e._v(e._s(t.shortPath))])],1)])]):e._e()})),e.$profiler.loading||e.$profiler.parsing?s("tr",[s("td",{attrs:{colspan:"3"}},[s("div",{staticClass:"profiler-content"},[s("spinner",{attrs:{name:"fading-circle","no-fade-in":!0,color:"dark"==e.$settings.appearance?"#f27e02":"#258cdb"}}),s("p",[e._v(" "+e._s(e.$profiler.loading?"Loading profile...":"Processing profile...")+" ")])],1)])]):e._e(),e.$profiler.available?e._e():s("tr",[s("td",{attrs:{colspan:"3"}},[s("div",{staticClass:"profiler-content"},[s("h1",[e._v(" Profile is not present for current request. ")]),s("p",[e._v(" Profiling requires the Xdebug php extension."),s("br"),s("a",{attrs:{href:"https://underground.works/clockwork/#docs-xdebug-profiler",target:"_blank"}},[e._v("Read more about how to set up Xdebug")])]),s("p",{staticClass:"content-actions"},[s("a",{directives:[{name:"show",rawName:"v-show",value:!e.$profiler.isProfiling,expression:"! $profiler.isProfiling"}],staticClass:"button",attrs:{href:"#"},on:{click:function(t){return e.$profiler.enableProfiling()}}},[e._v(" Enable profiler ")]),s("a",{directives:[{name:"show",rawName:"v-show",value:e.$profiler.isProfiling,expression:"$profiler.isProfiling"}],staticClass:"button",attrs:{href:"#"},on:{click:function(t){return e.$profiler.disableProfiling()}}},[e._v(" Disable profiler ")])])])])])]}}])})],1)},Gs=[],Ks={name:"Profiler",components:{DetailsTable:ft,ShortenedText:H},data:function(){return{filter:function(){var e=new Ct([{tag:"model"},{tag:"file",map:function(e){return e.shortPath}},{tag:"self",type:"number"},{tag:"inclusive",type:"number"}],(function(e){return e.name}));return e.sortedBy="self",e.sortedDesc=!0,e}()}},computed:{enabled:{get:function(){return this.$profiler.isProfiling},set:function(e){e?this.$profiler.enableProfiling():this.$profiler.disableProfiling()}}},methods:{filterXdebug:function(e){return e?this.filter.filter(e):[]}}},Xs=Ks,Zs=(s("2081"),Object(f["a"])(Xs,zs,Gs,!1,null,null,null)),Ys=Zs.exports,ea=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{ref:"timeline",staticClass:"timeline",class:{"show-details":e.showDetails}},[s("details-table",{attrs:{title:"Timeline",icon:"pie-chart",columns:e.columns,items:e.presentedEvents,filter:e.filter,"no-table-head":!e.showDetails,"filter-example":"database query duration:>50","per-page":100},scopedSlots:e._u([{key:"toolbar",fn:function(t){var a=t.filter;return[s("div",{staticClass:"header-group"},[s("label",{staticClass:"header-toggle"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.condense,expression:"condense"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.condense)?e._i(e.condense,null)>-1:e.condense},on:{change:function(t){var s=e.condense,a=t.target,i=!!a.checked;if(Array.isArray(s)){var n=null,r=e._i(s,n);a.checked?r<0&&(e.condense=s.concat([n])):r>-1&&(e.condense=s.slice(0,r).concat(s.slice(r+1)))}else e.condense=i}}}),e._v(" Condense ")])]),e.availableTags.length?s("div",{staticClass:"header-group"},e._l(e.availableTags,(function(t){return s("a",{staticClass:"header-item",class:{active:e.hiddenTags&&!e.hiddenTags.includes(t.tag)},attrs:{href:"#",title:t.title},on:{click:function(s){return e.toggleTag(t.tag)}}},[s("icon",{attrs:{name:t.icon}})],1)})),0):e._e(),s("div",{staticClass:"header-group"},[s("div",{staticClass:"header-search"},[s("input",{directives:[{name:"model",rawName:"v-model",value:a.input,expression:"filter.input"}],attrs:{type:"search",placeholder:"Search..."},domProps:{value:a.input},on:{input:function(t){t.target.composing||e.$set(a,"input",t.target.value)}}}),s("icon",{attrs:{name:"search"}})],1)]),s("div",{staticClass:"header-group"},[s("a",{staticClass:"header-item",class:{active:e.showDetails},attrs:{href:"#",title:"Toggle details"},on:{click:function(t){return t.preventDefault(),e.toggleDetails.apply(null,arguments)}}},[s("icon",{attrs:{name:"list"}})],1)])]}},{key:"body",fn:function(t){var a=t.items;return[e._l(a,(function(t,a){return s("tr",[s("td",{staticClass:"timeline-chart"},[s("div",{staticClass:"chart-event-group popover-container",style:t.groupStyle,on:{click:function(t){return e.showPopover(a)}}},[s("div",{staticClass:"group-label",class:t.labelClass,style:t.labelStyle},[t.tags?s("span",{staticClass:"label-tags"},e._l(e.resolveTags(t.tags),(function(e){return s("span",[s("icon",{attrs:{name:e.icon,title:e.title}})],1)})),0):e._e(),e._v(" "+e._s(t.name)+" "),t.condensed?e._e():s("span",[e._v(e._s(e._f("formatTiming")(t.duration)))])]),e._l(t.events,(function(t,a){return s("div",{staticClass:"group-event",class:t.eventClass,style:t.eventStyle},[s("div",{staticClass:"event-bar"},e._l(t.childrenSections,(function(e){return s("div",{staticClass:"bar-light",style:e.style})})),0)])})),s("popover",{ref:"popovers",refInFor:!0,staticClass:"timeline-popover"},e._l(t.events,(function(t){return s("div",{staticClass:"popover-event",class:t.eventClass},[s("div",{staticClass:"event-header"},[s("h1",[e._v(e._s(t.name))]),s("div",{staticClass:"header-tags"},e._l(e.resolveTags(t.tags),(function(e){return s("span",[s("icon",{attrs:{name:e.icon,title:e.title}})],1)})),0)]),t.description!=t.name?s("div",{staticClass:"event-description"},[t.tags&&t.tags.indexOf("databaseQueries")>-1?s("highlighted-code",{attrs:{language:"sql",code:t.description}}):s("div",[e._v(e._s(t.description))])],1):e._e(),s("div",{staticClass:"event-timings"},[s("div",{staticClass:"timings-timing timing-total"},[s("div",{staticClass:"timing-value"},[e._v(" "+e._s(e._f("formatTiming")(t.duration))+" ")]),s("div",{staticClass:"timing-label"},[e._v(" Total ")])]),s("div",{staticClass:"timings-timing timing-self"},[s("div",{staticClass:"timing-value"},[e._v(" "+e._s(e._f("formatTiming")(t.durationSelf))+" ")]),s("div",{staticClass:"timing-label"},[e._v(" Self ")])]),s("div",{staticClass:"timings-timing timing-children"},[s("div",{staticClass:"timing-value"},[e._v(" "+e._s(e._f("formatTiming")(t.durationChildren,"ms","–"))+" ")]),s("div",{staticClass:"timing-label"},[e._v(" Children ")])])])])})),0)],2)]),s("td",{staticClass:"timeline-description"},[e._t("table-description",(function(){return[s("div",{staticClass:"description-content"},[t.tags&&t.tags.length?s("span",{staticClass:"description-tags"},e._l(e.resolveTags(t.tags),(function(e){return s("span",[s("icon",{attrs:{name:e.icon,title:e.title}})],1)})),0):e._e(),t.tags&&t.tags.indexOf("databaseQueries")>-1?s("highlighted-code",{attrs:{language:"sql",code:t.description}}):s("div",[e._v(e._s(t.description))])],1)]}),{item:t})],2),s("td",{staticClass:"timeline-timing timing-total"},[e._v(e._s(e._f("formatTiming")(t.duration)))]),s("td",{staticClass:"timeline-timing"},[e._v(e._s(e._f("formatTiming")(t.durationSelf)))]),s("td",{staticClass:"timeline-timing"},[e._v(e._s(e._f("formatTiming")(t.durationChildren,"ms",t.condensed?"":"–")))])])})),s("tr",{staticClass:"timeline-size-monitor"},[s("td",{ref:"timelineChart",staticClass:"timeline-graph"}),s("td",{staticClass:"timeline-description"}),s("td",{staticClass:"timeline-timing"}),s("td",{staticClass:"timeline-timing"}),s("td",{staticClass:"timeline-timing"})])]}}],null,!0)})],1)},ta=[],sa=(s("a4d3"),s("e01a"),{name:"Timeline",components:{DetailsTable:ft,HighlightedCode:At,Popover:M},props:{name:{},timeline:{},tags:{default:function(){return[]}}},data:function(){return{condense:void 0,showDetails:!1,hiddenTags:void 0,presentedEvents:[],filter:new Ct([{tag:"duration",type:"number"}],(function(e){return e.description}))}},computed:{availableTags:function(){var e=this;return this.tags.filter((function(t){return e.timeline.events.find((function(e){return e.tags&&e.tags.includes(t.tag)}))}))},columns:function(){return this.showDetails?[{name:" ",sortBy:"start",class:"timeline-chart"},{name:"Event",sortBy:"name",class:"timeline-description"},{name:"Total",sortBy:"duration",class:"timeline-timing"},{name:"Self",sortBy:"durationSelf",class:"timeline-timing"},{name:"Child",sortBy:"durationChild",class:"timeline-timing"}]:[]}},methods:{toggleTag:function(e){this.hiddenTags.includes(e)?this.hiddenTags=this.hiddenTags.filter((function(t){return t!=e})):this.hiddenTags.push(e)},resolveTags:function(e){var t=this;return e.map((function(e){return t.tags.find((function(t){return t.tag==e}))})).filter((function(e){return e}))},toggleDetails:function(){this.showDetails=!this.showDetails},showPopover:function(e){this.$refs.popovers[e].toggle()},refreshEvents:function(e){var t=this;return Object(te["a"])(regeneratorRuntime.mark((function e(){var s,a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t.timeline&&t.$refs.timelineChart){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,t.$nextTick();case 4:if(s=t.$refs.timelineChart.offsetWidth-16,!(s<=0)){e.next=7;break}return e.abrupt("return");case 7:a=t.timeline.filter(t.filter,t.hiddenTags),t.condense&&(a=a.condense()),t.presentedEvents=a.present(s);case 10:case"end":return e.stop()}}),e)})))()},observeResizing:function(){var e=this,t=this.$refs.timeline.offsetWidth;this.resizeObserver=new ResizeObserver(Ie()((function(s){var i=Object(a["a"])(s,1),n=i[0];t!=n.contentRect.width&&(t=n.contentRect.width,e.refreshEvents(n))}),10)),this.resizeObserver.observe(this.$refs.timeline)}},filters:{formatTiming:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ms",s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return null===e||void 0===e?s:e<=0||e>1?"".concat(Math.round(e)," ").concat(t):"<1 ".concat(t)}},watch:{condense:function(e,t){void 0!==t&&(this.refreshEvents(),this.$settings.global.timelineCondensed[this.name]=this.condense,this.$settings.save())},hiddenTags:function(e,t){void 0!==t&&(this.refreshEvents(),this.$settings.global.timelineHiddenTags[this.name]=this.hiddenTags,this.$settings.save())},showDetails:function(){this.refreshEvents()},timeline:function(){this.refreshEvents()}},mounted:function(){var e=this;return Object(te["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.condense=e.$settings.global.timelineCondensed[e.name]||!1,e.hiddenTags=e.$settings.global.timelineHiddenTags[e.name]||[],t.next=4,e.refreshEvents();case 4:e.observeResizing();case 5:case"end":return t.stop()}}),t)})))()}}),aa=sa,ia=(s("8161"),Object(f["a"])(aa,ea,ta,!1,null,null,null)),na=ia.exports,ra=s("e0e5"),oa=s.n(ra),la={name:"PerformanceTab",components:{PerformanceChart:Ns,PerformanceClientSide:Us,PerformanceLog:Bs,Profiler:Ys,Timeline:na},props:["active"],data:function(){return{selectedPerformanceTab:null,timelineTags:[{tag:"events",icon:"zap",title:"Events"},{tag:"databaseQueries",icon:"database",title:"Database"},{tag:"cacheQueries",icon:"paperclip",title:"Cache"},{tag:"redisCommands",icon:"layers",title:"Redis"},{tag:"queueJobs",icon:"clock",title:"Queue"},{tag:"views",icon:"image",title:"Views"},{tag:"notifications",icon:"mail",title:"Notifications"}]}},computed:{activePerformanceTab:function(){var e=this.selectedPerformanceTab||"issues";return("issues"!=e||this.databaseSlowQueries.length||this.performanceIssues.length)&&("client-side"!=e||this.isClientSideTabAvailable)?e:"timeline"},databaseSlowQueries:function(){return this.$request.databaseQueries.filter((function(e){return e.tags.includes("slow")}))},isClientSideTabAvailable:function(){return this.$request.clientMetrics.filter((function(e){return e.value})).length||Object.values(this.$request.webVitals).filter((function(e){return e.value})).length},performanceIssues:function(){return this.$request.log.filter((function(e){var t;return null===(t=e.context)||void 0===t?void 0:t.performance})).map((function(e){return oa()({},e,{context:ms()(e.context,["performance","trace"])})}))}},methods:{isTabActive:function(e){return this.activePerformanceTab==e},showTab:function(e){this.selectedPerformanceTab=e,"profiler"==e&&this.$profiler.loadRequest(this.$request)},refreshRequest:function(){this.active&&this.$request&&(this.$platform.hasFeature("load-client-metrics")&&this.$request.loadClientMetrics(this.$requests),"profiler"==this.activePerformanceTab&&this.$profiler.loadRequest(this.$request))}},watch:{active:function(){this.refreshRequest()},$request:function(){this.refreshRequest()}}},ca=la,ua=(s("8e9b"),Object(f["a"])(ca,Ss,js,!1,null,null,null)),da=ua.exports,ha=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{directives:[{name:"show",rawName:"v-show",value:e.active,expression:"active"}]},[s("details-table",{attrs:{title:"Commands",icon:"layers",columns:e.columns,items:e.$request.redisCommands,filter:e.filter,"filter-example":"command:zrange connection:eshop file:StatsController.php duration:>50"},scopedSlots:e._u([{key:"body",fn:function(t){var a=t.items;return e._l(a,(function(t,a){return s("tr",{key:e.$request.id+"-"+a},[e.columns.includes("Connection")?s("td",[e._v(e._s(t.connection))]):e._e(),s("td",[e._v(e._s(t.command))]),s("td",[s("div",{staticClass:"database-query"},[s("div",{staticClass:"database-query-content"},[s("pretty-print",{attrs:{data:t.parameters}})],1),s("stack-trace",{staticClass:"database-query-path",attrs:{trace:t.trace,file:t.file,line:t.line}})],1)]),s("td",{staticClass:"database-duration"},[e._v(e._s(t.duration)+" ms")])])}))}}])})],1)},va=[],fa={name:"RedisTab",components:{DetailsTable:ft,PrettyPrint:ut,StackTrace:z},props:["active"],data:function(){return{filter:new Ct([{tag:"connection"},{tag:"command"},{tag:"file",map:function(e){return e.shortPath}},{tag:"duration",type:"number"}])}},computed:{columns:function(){var e=["Command","Parameters","Duration"],t=new Set(this.$request.redisCommands.map((function(e){return e.connection}))).size>1;return t&&e.splice(0,0,"Connection"),e}}},ma=fa,pa=Object(f["a"])(ma,ha,va,!1,null,null,null),ga=pa.exports,ba=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{directives:[{name:"show",rawName:"v-show",value:e.active,expression:"active"}]},[s("details-table",{attrs:{title:"Jobs",icon:"clock",columns:e.columns,items:e.queueJobs,filter:e.filter,"filter-example":"Underground.works name:GenerateInvoice queue:priority"},scopedSlots:e._u([{key:"body",fn:function(t){var a=t.items;return e._l(a,(function(t,a){return s("tr",{key:e.$request.id+"-"+a},[e.columns.includes("Queue")?s("td",[e._v(e._s(t.queue))]):e._e(),e.columns.includes("Connection")?s("td",[e._v(e._s(t.connection))]):e._e(),s("td",[s("shortened-text",{attrs:{full:t.name}},[e._v(e._s(t.shortName))])],1),s("td",[s("div",{staticClass:"database-query"},[s("div",{staticClass:"database-query-content"},[s("pretty-print",{attrs:{data:t.data}})],1),t.maxTries||t.timeout?s("div",{staticClass:"job-options"},[t.maxTries?s("span",[e._v(e._s(t.maxTries)+" tries")]):e._e(),t.timeout?s("span",[e._v(e._s(t.timeout)+"s timeout")]):e._e()]):e._e(),s("stack-trace",{staticClass:"database-query-path",attrs:{trace:t.trace,file:t.file,line:t.line}})],1)]),s("td",[s("span",{class:{"job-status-text":!0,"is-success":t.request&&"done"==t.request.jobStatus,"is-error":t.request&&"failed"==t.request.jobStatus}},[e._v(" "+e._s(t.request?t.request.jobStatus:"waiting")+" ")])]),s("td",[t.request?s("a",{attrs:{href:"#",title:"Show details"},on:{click:function(s){return s.preventDefault(),e.showJob(t)}}},[s("icon",{attrs:{name:"search"}})],1):e._e()])])}))}}])})],1)},wa=[],_a={name:"QueueTab",components:{DetailsTable:ft,PrettyPrint:ut,ShortenedText:H,StackTrace:z},props:["active"],data:function(){return{filter:new Ct([{tag:"connection"},{tag:"queue"},{tag:"name"}]),jobRequests:{}}},computed:{columns:function(){var e=["Name","Data"],t=new Set(this.$request.queueJobs.map((function(e){return e.queue}))).size>1,s=new Set(this.$request.queueJobs.map((function(e){return e.connection}))).size>1;return t&&e.splice(0,0,"Queue"),s&&e.splice(0,0,"Connection"),e.concat(["Status",""])},queueJobs:function(){var e=this;return this.$request?this.$request.queueJobs.map((function(t){return oa()({request:e.jobRequests[t.id]},t)})):[]}},methods:{showJob:function(e){this.global.$request=this.$requests.findId(e.id)},loadQueueJobRequest:function(e){var t=arguments,s=this;return Object(te["a"])(regeneratorRuntime.mark((function a(){var i,n;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:if(i=t.length>1&&void 0!==t[1]?t[1]:0,12!=i){a.next=3;break}return a.abrupt("return");case 3:if(!e.loadRequestTimeout){a.next=5;break}return a.abrupt("return");case 5:if(a.t0=s.$requests.findId(e.id),a.t0){a.next=10;break}return a.next=9,s.$requests.loadId(e.id,null,!1);case 9:a.t0=a.sent;case 10:if(n=a.t0,n){a.next=13;break}return a.abrupt("return",e.loadRequestTimeout=setTimeout((function(){e.loadRequestTimeout=null,s.loadQueueJobRequest(e,i+1)}),5e3));case 13:s.$set(s.jobRequests,e.id,n);case 14:case"end":return a.stop()}}),a)})))()}},watch:{active:function(e){var t=this;e&&this.$request.queueJobs.forEach((function(e){e.id&&t.loadQueueJobRequest(e)}))}}},ya=_a,Ca=(s("70b4"),Object(f["a"])(ya,ba,wa,!1,null,"51ab4b8e",null)),qa=Ca.exports,$a=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{directives:[{name:"show",rawName:"v-show",value:e.active,expression:"active"}]},[s("details-table",{attrs:{title:"Routes",icon:"map",columns:e.columns,items:e.$request.routes,filter:e.filter,"filter-example":"OrderController method:post uri:order"},scopedSlots:e._u([{key:"body",fn:function(t){var a=t.items;return e._l(a,(function(t,a){return s("tr",{key:e.$request.id+"-"+a},[s("td",[e._v(e._s(t.method))]),s("td",[e._v(e._s(t.uri))]),s("td",[e._v(e._s(t.action))]),e.columns.includes("Name")?s("td",[e._v(e._s(t.name))]):e._e(),e.columns.includes("Middleware")?s("td",e._l(t.middleware,(function(a,i){return s("span",[e._v(" "+e._s(a)+e._s(i==t.middleware.length-1?"":", ")+" ")])})),0):e._e(),e.columns.includes("Before")?s("td",[e._v(e._s(t.before))]):e._e(),e.columns.includes("After")?s("td",[e._v(e._s(t.after))]):e._e()])}))}}])})],1)},ka=[],xa={name:"RoutesTab",components:{DetailsTable:ft},props:["active"],data:function(){return{filter:new Ct([{tag:"method",apply:function(e,t){if(["get","post","put","delete","head","patch"].includes(t.toLowerCase()))return e.method.toLowerCase()==t.toLowerCase()}},{tag:"uri"}])}},computed:{columns:function(){var e=["Methods","URI","Action"];return this.$request.routes.some((function(e){return e.name}))&&e.push("Name"),this.$request.routes.some((function(e){return e.middleware}))&&e.push("Middleware"),this.$request.routes.some((function(e){return e.before}))&&e.push("Before"),this.$request.routes.some((function(e){return e.after}))&&e.push("After"),e}}},Ta=xa,Sa=Object(f["a"])(Ta,$a,ka,!1,null,null,null),ja=Sa.exports,Oa=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{directives:[{name:"show",rawName:"v-show",value:e.active,expression:"active"}]},e._l(e.userTab.sections,(function(t,a){return s("div",{key:e.$request.id+"-"+a},["counters"==t.showAs?s("div",{staticClass:"counters-row"},e._l(t.data,(function(t,a){return s("div",{key:e.$request.id+"-"+a,staticClass:"counter"},[s("div",{staticClass:"counter-value"},[e._v(e._s(t.value))]),s("div",{staticClass:"counter-title"},[e._v(e._s(t.key))])])})),0):e._e(),"table"==t.showAs?s("details-table",{attrs:{title:t.title,columns:t.data[0].map((function(e){return e.key})),items:t.data,filter:e.filters[a]},scopedSlots:e._u([{key:"body",fn:function(t){var a=t.items;return e._l(a,(function(t){return s("tr",e._l(t,(function(e){return s("td",[s("pretty-print",{attrs:{data:e.value}})],1)})),0)}))}}],null,!0)}):e._e()],1)})),0)},Pa=[],Da={name:"UserTab",components:{DetailsTable:ft,PrettyPrint:ut},props:["active","userTab"],data:function(){return{filters:[]}},watch:{userTab:{handler:function(e){this.filters=e.sections.map((function(e){if("table"==e.showAs)return new Ct(e.data[0].map((function(e){return{tag:e.key}})))}))},immediate:!0}}},Ra=Da,Ea=Object(f["a"])(Ra,Oa,Pa,!1,null,null,null),Na=Ea.exports,Aa=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{directives:[{name:"show",rawName:"v-show",value:e.active,expression:"active"}]},[s("timeline",{attrs:{name:"views",icon:"image",timeline:e.$request.viewsData},scopedSlots:e._u([{key:"table-description",fn:function(t){var a=t.item;return[s("div",{staticClass:"views-view-name"},[e._v(e._s(a.description))]),a.data?s("pretty-print",{attrs:{data:a.data}}):e._e()]}}])})],1)},Ia=[],Ma={name:"ViewsTab",components:{PrettyPrint:ut,Timeline:na},props:["active"]},La=Ma,Qa=(s("a5d3"),Object(f["a"])(La,Aa,Ia,!1,null,null,null)),Ua=Qa.exports,Fa=s("5817"),Ja=s.n(Fa),Ha={name:"RequestDetails",components:{CreditsModal:_,DetailsRequest:x,MessagesOverlay:ce,SettingsModal:me,SharingModal:ye,SharingDeleteModal:Te,TabBar:Ue,CacheTab:xt,DatabaseTab:Qt,EventsTab:Wt,LogTab:Zt,ModelsTab:ns,NotificationsTab:ws,OutputTab:Ts,PerformanceTab:da,RedisTab:ga,QueueTab:qa,RoutesTab:ja,UserTab:Na,ViewsTab:Ua},computed:{tabs:function(){var e,t;return[{text:"Performance",name:"performance",icon:"activity",shown:!0},{text:"Log",name:"log",icon:"edit-2",shown:this.shownTabs.log},{text:"Events",name:"events",icon:"zap",shown:this.shownTabs.events},{text:"Models",name:"models",icon:"disc",shown:this.shownTabs.models},{text:"Database",name:"database",icon:"database",shown:this.shownTabs.database},{text:"Cache",name:"cache",icon:"paperclip",shown:this.shownTabs.cache},{text:"Redis",name:"redis",icon:"layers",shown:this.shownTabs.redis},{text:"Queue",name:"queue",icon:"clock",shown:this.shownTabs.queue},{text:"Views",name:"views",icon:"image",shown:this.shownTabs.views},{text:"Notifications",name:"notifications",icon:"mail",shown:this.shownTabs.notifications},{text:"Routes",name:"routes",icon:"map",shown:this.shownTabs.routes}].concat(null===(e=this.$request)||void 0===e||null===(t=e.userData)||void 0===t?void 0:t.map((function(e){return{text:e.title,name:"user-".concat(e.key),icon:"menu",shown:!0}}))).concat([{text:"Output",name:"output",icon:"terminal",shown:this.shownTabs.output}]).filter(Boolean)},activeTab:function(){if(this.$request)return!1===this.shownTabs[this.global.activeDetailsTab]?"performance":this.global.activeDetailsTab},shownTabs:function(){var e,t,s,a,i,n,r,o,l,c,u,d,h,v,f,m,p,g,b,w,_,y=this;return{log:(null===(e=this.$request)||void 0===e||null===(t=e.log)||void 0===t?void 0:t.length)>0,models:["modelsRetrieved","modelsCreated","modelsUpdated","modelsDeleted"].some((function(e){var t;return!Ja()(null===(t=y.$request)||void 0===t?void 0:t[e])}))||(null===(s=this.$request)||void 0===s?void 0:s.modelsActions.length)>0,database:(null===(a=this.$request)||void 0===a?void 0:a.databaseQueriesCount)>0||(null===(i=this.$request)||void 0===i||null===(n=i.databaseQueries)||void 0===n?void 0:n.length)>0,cache:["cacheReads","cacheHits","cacheWrites","cacheDeletes","cacheTime"].some((function(e){var t;return null===(t=y.$request)||void 0===t?void 0:t[e]}))||(null===(r=this.$request)||void 0===r?void 0:r.cacheQueries.length)>0,redis:(null===(o=this.$request)||void 0===o||null===(l=o.redisCommands)||void 0===l?void 0:l.length)>0,queue:(null===(c=this.$request)||void 0===c||null===(u=c.queueJobs)||void 0===u?void 0:u.length)>0,events:(null===(d=this.$request)||void 0===d||null===(h=d.events)||void 0===h?void 0:h.length)>0,views:(null===(v=this.$request)||void 0===v||null===(f=v.viewsData)||void 0===f?void 0:f.events.length)>0,notifications:(null===(m=this.$request)||void 0===m||null===(p=m.notifications)||void 0===p?void 0:p.length)>0,routes:(null===(g=this.$request)||void 0===g||null===(b=g.routes)||void 0===b?void 0:b.length)>0,output:(null===(w=this.$request)||void 0===w||null===(_=w.commandOutput)||void 0===_?void 0:_.length)>0}}},methods:{showTab:function(e){this.global.activeDetailsTab=e,this.global.showIncomingRequests=!1},toggleRequestsList:function(){this.$settings.global.requestsListCollapsed=!this.$settings.global.requestsListCollapsed,this.$settings.save()},toggleRequestSidebar:function(){this.$settings.global.requestSidebarCollapsed=!this.$settings.global.requestSidebarCollapsed,this.$settings.save()},toggleSettingsModal:function(){this.$settings.toggle()}}},Va=Ha,Wa=(s("0f8a"),Object(f["a"])(Va,r,o,!1,null,null,null)),Ba=Wa.exports,za=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"popover-viewport",class:{"request-sidebar":!0,large:e.$settings.global.requestsListCollapsed}},[s("parent-request"),e.$request?s("div",{staticClass:"sidebar-header"},[s("div",{staticClass:"header-info",attrs:{title:e.$request.tooltip}},[s("div",{staticClass:"info-main"},[e.$request.isCommand()?[s("span",{staticClass:"type-text"},[e._v("CMD")]),e._v(" "+e._s(e.$request.commandName)+" ")]:e.$request.isQueueJob()?[s("span",{staticClass:"type-text"},[e._v("QUEUE")]),e._v(" "+e._s(e.$request.jobName)+" ")]:e.$request.isTest()?[s("span",{staticClass:"type-text"},[e._v("TEST")]),e._v(" "+e._s(e.$request.testGroup)+" ")]:[e.$request.isAjax()?s("span",{staticClass:"type-text"},[e._v("AJAX")]):e._e(),s("span",{staticClass:"method-text"},[e._v(e._s(e.$request.method))]),e._v(" "+e._s(e.$request.uri)+" ")],e.$request&&e.$request.url?s("a",{directives:[{name:"clipboard",rawName:"v-clipboard:copy",value:e.$request.url,expression:"$request.url",arg:"copy"}],staticClass:"info-copy",attrs:{href:"#",title:"Copy url"}},[s("icon",{attrs:{name:"link"}})],1):e._e()],2),s("div",{staticClass:"info-details"},[e.$request.isCommand()?[e._v(" "+e._s(e.$request.commandLine)+" ")]:e.$request.isQueueJob()?[e._v(" "+e._s(e.$request.jobDescription)+" ")]:e.$request.isTest()?[e._v(" "+e._s(e.$request.testName)+" ")]:[e._v(" "+e._s(e.$request.controller)+" ")]],2)]),e.$request.errorsCount?s("icon",{staticClass:"header-alert alert-errors",attrs:{name:"alert-circle"}}):e.$request.warningsCount?s("icon",{staticClass:"header-alert alert-warnings",attrs:{name:"alert-triangle"}}):e._e(),s("div",{staticClass:"header-status"},[e.$request.isCommand()?[s("span",{class:{"status-text":!0,"client-error":e.$request.isCommandWarning(),"server-error":e.$request.isCommandError()},attrs:{title:e.$request.commandExitCode}},[e._v(e._s(e.$request.commandExitCode))])]:e.$request.isQueueJob()?[s("span",{class:{"status-text":!0,"status-text-small":!0,"client-error":e.$request.isQueueJobWarning(),"server-error":e.$request.isQueueJobError()},attrs:{title:e.$request.jobStatus}},[e._v(e._s(e.$request.jobStatus))])]:e.$request.isTest()?[s("span",{class:{"status-text":!0,"status-text-small":!0,"client-error":e.$request.isTestWarning(),"server-error":e.$request.isTestError()},attrs:{title:e.$request.testStatus}},[e._v(e._s(e.$request.testStatus))])]:[s("span",{class:{"status-text":!0,"client-error":e.$request.isClientError(),"server-error":e.$request.isServerError()},attrs:{title:e.$request.responseStatus}},[e._v(e._s(e.$request.responseStatus))])]],2)],1):e._e(),s("exception-section"),s("div",{staticClass:"sidebar-content"},[e.$request&&e.$request.isCommand()?s("command-tab"):e._e(),e.$request&&e.$request.isQueueJob()?s("queue-job-tab"):e._e(),e.$request&&e.$request.isTest()?s("test-tab"):e.$request?s("request-tab"):e._e(),s("div",{staticClass:"content-actions"},[s("a",{directives:[{name:"show",rawName:"v-show",value:e.$platform.hasFeature("sharing"),expression:"$platform.hasFeature('sharing')"}],staticClass:"button",attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.$sharing.toggle()}}},[s("icon",{attrs:{name:"share"}}),e._v(" Share ")],1),s("a",{directives:[{name:"show",rawName:"v-show",value:e.$platform.hasFeature("delete-shared"),expression:"$platform.hasFeature('delete-shared')"}],staticClass:"button",attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.$sharing.toggleDelete()}}},[s("icon",{attrs:{name:"trash-2"}}),e._v(" Delete ")],1)]),s("div",{staticClass:"content-meta"},[e.$request&&e.$request.time?s("div",{staticClass:"meta-date"},[e._v(" "+e._s(e._f("date")(1e3*e.$request.time,"Y-MM-dd HH:mm:ss"))+" ")]):e._e(),e.$request?s("div",{staticClass:"meta-id"},[s("a",{attrs:{href:e.shareUrl}},[e._v(e._s(e.$request.id))])]):e._e()])],1)],1)},Ga=[],Ka=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"command-tab"},[s("sidebar-section",{directives:[{name:"show",rawName:"v-show",value:e.$request.commandArgumentsMerged.length,expression:"$request.commandArgumentsMerged.length"}],attrs:{title:"Arguments",name:"arguments",items:e.$request.commandArgumentsMerged,"filter-example":'"Mike Jones" name:name'}}),s("sidebar-section",{directives:[{name:"show",rawName:"v-show",value:e.$request.commandOptionsMerged.length,expression:"$request.commandOptionsMerged.length"}],attrs:{title:"Options",name:"options",items:e.$request.commandOptionsMerged,"filter-example":'"Mike Jones" name:name'}})],1)},Xa=[],Za=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"sidebar-section"},[s("div",{staticClass:"section-header"},[s("div",{staticClass:"header-title",on:{click:e.toggle}},[s("icon",{attrs:{name:e.expanded?"chevron-down":"chevron-up"}}),e._v(" "+e._s(e.title)+" ")],1),s("div",{staticClass:"header-group"},[e.expandedSearch?s("div",{staticClass:"header-search"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.filter.input,expression:"filter.input"}],ref:"searchInput",attrs:{type:"search",placeholder:"Search..."},domProps:{value:e.filter.input},on:{input:function(t){t.target.composing||e.$set(e.filter,"input",t.target.value)}}}),s("icon",{attrs:{name:"search"}})],1):s("a",{staticClass:"header-item",attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.expandSearch.apply(null,arguments)}}},[s("icon",{attrs:{name:"search"}})],1)])]),e._t("content",(function(){return[s("div",{directives:[{name:"show",rawName:"v-show",value:e.expanded,expression:"expanded"}]},[e._t("above-table")],2),e._t("table",(function(){return[s("details-table",{directives:[{name:"show",rawName:"v-show",value:e.expanded,expression:"expanded"}],attrs:{columns:["Key","Value"],items:e.items,filter:e.filter,"filter-example":e.filterExample,"no-header":!0,"no-table-head":!0},scopedSlots:e._u([{key:"body",fn:function(t){var a=t.items;return e._l(a,(function(t,a){return s("tr",{key:e.$request.id+"-"+a},[s("td",{attrs:{colspan:"2"}},[s("div",{staticClass:"key"},[e._v(e._s(t.name))]),s("div",{staticClass:"value"},[s("pretty-print",{attrs:{data:t.value}})],1)])])}))}}])})]}),{items:e.items,filter:e.filter,filterExample:e.filterExample,expanded:e.expanded})]}),{expanded:e.expanded})],2)},Ya=[],ei={name:"SidebarSection",components:{DetailsTable:ft,PrettyPrint:ut},props:["title","name","filterExample","items"],data:function(){return{filter:new Ct([{tag:"name"}]),expandedSearch:!1}},computed:{expanded:function(){return!1!==this.$settings.global.requestSidebarCollapsedSections[this.name]}},methods:{toggle:function(){this.$settings.global.requestSidebarCollapsedSections[this.name]=!this.expanded,this.$settings.save()},expandSearch:function(){var e=this;this.expandedSearch=!0,this.$nextTick((function(){return e.$refs.searchInput.focus()}))}}},ti=ei,si=(s("101e"),Object(f["a"])(ti,Za,Ya,!1,null,null,null)),ai=si.exports,ii={name:"CommandTab",components:{SidebarSection:ai}},ni=ii,ri=(s("ef62"),Object(f["a"])(ni,Ka,Xa,!1,null,null,null)),oi=ri.exports,li=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"queue-job-tab"},[e.$request.jobPayload?s("sidebar-section",{attrs:{title:"Payload",name:"payload"},scopedSlots:e._u([{key:"content",fn:function(t){var a=t.expanded;return[s("div",{directives:[{name:"show",rawName:"v-show",value:a,expression:"expanded"}],staticClass:"data-value"},[s("pretty-print",{attrs:{data:e.$request.jobPayload,expanded:!0}})],1)]}}],null,!1,1651862303)}):e._e(),e.$request.jobQueue?s("sidebar-section",{attrs:{title:"Queue",name:"queue"},scopedSlots:e._u([{key:"content",fn:function(t){var a=t.expanded;return[s("div",{directives:[{name:"show",rawName:"v-show",value:a,expression:"expanded"}],staticClass:"data-value"},[e._v(" "+e._s(e.$request.jobQueue)+" ")])]}}],null,!1,3453129276)}):e._e(),e.$request.jobConnection?s("sidebar-section",{attrs:{title:"Connection",name:"connection"},scopedSlots:e._u([{key:"content",fn:function(t){var a=t.expanded;return[s("div",{directives:[{name:"show",rawName:"v-show",value:a,expression:"expanded"}],staticClass:"data-value"},[e._v(" "+e._s(e.$request.jobConnection)+" ")])]}}],null,!1,2188469499)}):e._e(),e.$request.jobOptions.length?s("sidebar-section",{attrs:{title:"Options",name:"options",items:e.$request.jobOptions,"filter-example":'"Mike Jones" name:name'}}):e._e()],1)},ci=[],ui={name:"QueueJobTab",components:{PrettyPrint:ut,SidebarSection:ai}},di=ui,hi=(s("6b0a"),Object(f["a"])(di,li,ci,!1,null,null,null)),vi=hi.exports,fi=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"request-tab"},[s("sidebar-section",{directives:[{name:"show",rawName:"v-show",value:e.headers.length,expression:"headers.length"}],attrs:{title:"Headers",name:"headers",items:e.headers,"filter-example":"text/html name:Accept"}}),s("sidebar-section",{directives:[{name:"show",rawName:"v-show",value:e.$request.requestData,expression:"$request.requestData"}],attrs:{title:"Data",name:"data",items:e.$request.requestData,"filter-example":"420 name:price"},scopedSlots:e._u([e.$request.requestData instanceof Object?null:{key:"content",fn:function(t){var a=t.expanded;return[s("div",{directives:[{name:"show",rawName:"v-show",value:a,expression:"expanded"}],staticClass:"data-raw"},[e._v(" "+e._s(e.$request.requestData)+" ")])]}}],null,!0)}),s("sidebar-section",{directives:[{name:"show",rawName:"v-show",value:e.$request.getData.length,expression:"$request.getData.length"}],attrs:{title:"GET data",name:"getData",items:e.$request.getData,"filter-example":"created_at name:orderBy"}}),s("sidebar-section",{directives:[{name:"show",rawName:"v-show",value:e.$request.postData.length,expression:"$request.postData.length"}],attrs:{title:"POST data",name:"postData",items:e.$request.postData,"filter-example":'"Mike Jones" name:name'}}),s("sidebar-section",{directives:[{name:"show",rawName:"v-show",value:e.$request.cookies.length,expression:"$request.cookies.length"}],attrs:{title:"Cookies",name:"cookies",items:e.$request.cookies,"filter-example":'"Mike Jones" name:name'}}),s("sidebar-section",{directives:[{name:"show",rawName:"v-show",value:e.$request.middleware.length,expression:"$request.middleware.length"}],attrs:{title:"Middleware",name:"middleware",items:e.$request.middleware,"filter-example":"auth:admin"},scopedSlots:e._u([{key:"table",fn:function(t){var a=t.items,i=t.filter,n=t.filterExample,r=t.expanded;return[s("details-table",{directives:[{name:"show",rawName:"v-show",value:r,expression:"expanded"}],attrs:{columns:["Value"],items:a,filter:i,"filter-example":n,"no-header":!0,"no-table-head":!0},scopedSlots:e._u([{key:"header",fn:function(e){e.filter}},{key:"body",fn:function(t){var a=t.items;return e._l(a,(function(t,a){return s("tr",{key:e.$request.id+"-"+a},[s("td",{staticClass:"value"},[e._v(e._s(t))])])}))}}],null,!0)})]}}])}),s("sidebar-section",{directives:[{name:"show",rawName:"v-show",value:e.$request.sessionData.length||e.$request.authenticatedUser,expression:"$request.sessionData.length || $request.authenticatedUser"}],attrs:{title:"Session",name:"session",items:e.$request.sessionData,"filter-example":"registration successful name:_token"}},[s("template",{slot:"above-table"},[e.$request.authenticatedUser?s("div",{staticClass:"session-user"},[s("icon",{attrs:{name:"user"}}),s("div",[e.$request.authenticatedUser.name&&e.$request.authenticatedUser.name.trim()?s("span",{staticClass:"name"},[e._v(e._s(e.$request.authenticatedUser.name))]):e._e(),s("span",{class:e.$request.authenticatedUser.name&&e.$request.authenticatedUser.name.trim()?"dimmed":""},[e._v(e._s(e.$request.authenticatedUser.username))])]),e.$request.authenticatedUser.email||e.$request.authenticatedUser.id?s("span",{staticClass:"session-user-details"},[e.$request.authenticatedUser.id?s("span",{staticClass:"dimmed"},[e._v("#"+e._s(e.$request.authenticatedUser.id))]):e._e()]):e._e()],1):e._e()])],2)],1)},mi=[],pi={name:"RequestTab",components:{DetailsTable:ft,SidebarSection:ai},computed:{headers:function(){return this.$request.cookies.length?this.$request.headers.filter((function(e){return"Cookie"!=e.name})):this.$request.headers}}},gi=pi,bi=(s("9a64"),Object(f["a"])(gi,fi,mi,!1,null,null,null)),wi=bi.exports,_i=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"request-tab test-tab"},[e.$request.testStatusMessage?s("div",{staticClass:"test-status-message",class:{error:e.$request.isTestError(),warning:e.$request.isTestWarning()}},[e._v(" "+e._s(e.$request.testStatusMessage)+" ")]):e._e(),s("sidebar-section",{directives:[{name:"show",rawName:"v-show",value:e.asserts.length,expression:"asserts.length"}],attrs:{title:"Asserts",name:"asserts",items:e.asserts,"filter-example":"text/html name:Accept"},scopedSlots:e._u([{key:"table",fn:function(t){var a=t.items,i=t.filter,n=t.filterExample,r=t.expanded;return[s("details-table",{directives:[{name:"show",rawName:"v-show",value:r,expression:"expanded"}],attrs:{columns:["Assert"],items:a,filter:i,"filter-example":n,"no-header":!0,"no-table-head":!0},scopedSlots:e._u([{key:"body",fn:function(t){var a=t.items;return e._l(a,(function(t,a){return s("tr",{key:e.$request.id+"-"+a},[s("td",{staticClass:"value test-assert"},[s("div",{staticClass:"assert-name"},[s("div",{staticClass:"assert-name-content",class:{"assert-failed":!t.passed}},[s("span",{staticClass:"assert-name-text"},[e._v(e._s(t.name))])]),s("div",{staticClass:"assert-name-trace"},[s("stack-trace",{attrs:{trace:t.trace}})],1)]),s("pretty-print",{attrs:{data:t.arguments}})],1)])}))}}],null,!0)})]}}])})],1)},yi=[],Ci={name:"TestTab",components:{DetailsTable:ft,PrettyPrint:ut,SidebarSection:ai,StackTrace:z},computed:{asserts:function(){return this.$request.testAsserts.reverse()}}},qi=Ci,$i=(s("86a4"),Object(f["a"])(qi,_i,yi,!1,null,null,null)),ki=$i.exports,xi={name:"RequestSidebar",components:{CommandTab:oi,ExceptionSection:Z,ParentRequest:ne,QueueJobTab:vi,RequestTab:wi,TestTab:ki},computed:{shareUrl:function(){return this.$request?"".concat(window.location.origin,"#").concat(this.$request.id):"#"}}},Ti=xi,Si=(s("313b"),Object(f["a"])(Ti,za,Ga,!1,null,null,null)),ji=Si.exports,Oi=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"popover-viewport",class:{"split-view-pane split-view-requests":!0,large:e.$settings.global.requestSidebarCollapsed}},[s("div",{staticClass:"requests-header",attrs:{id:"requests-header"}},[s("table",[s("thead",[s("tr",[e._m(0),s("th",{staticClass:"status"},[e._v(" Status ")]),s("th",{staticClass:"duration"},[e._v(" Time"),s("br"),e.showDatabaseTime?s("small",[e._v("Database")]):e._e()])])])])]),s("div",{ref:"requestsContainer",staticClass:"requests-container"},[s("div",{staticClass:"requests-content"},[s("div",{ref:"contentAbove",staticClass:"content-above"},[s("div",{staticClass:"requests-search"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.$requestsSearch.input,expression:"$requestsSearch.input"}],attrs:{type:"search",placeholder:"Search..."},domProps:{value:e.$requestsSearch.input},on:{input:[function(t){t.target.composing||e.$set(e.$requestsSearch,"input",t.target.value)},e.$requestsSearch.searchDebounced]}}),s("icon",{attrs:{name:"search"}})],1),s("a",{staticClass:"button",attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.loadMoreRequests.apply(null,arguments)}}},[e._v(" "+e._s(e.loadingMoreRequests?"Loading...":"Load more")+" ")])]),s("div",{ref:"requestsTable",staticClass:"requests-table"},[s("table",{attrs:{id:"requests"}},e._l(e.requests,(function(t){return s("tr",{key:t.id,class:{selected:e.isActive(t.id)},on:{click:function(s){return e.showRequest(t)}}},[s("td",{staticClass:"controller",attrs:{title:t.tooltip}},[s("big",[t.errorsCount?s("icon",{staticClass:"request-alert alert-errors",attrs:{name:"alert-circle"}}):t.warningsCount?s("icon",{staticClass:"request-alert alert-warnings",attrs:{name:"alert-triangle"}}):e._e(),t.isCommand()?[s("span",{staticClass:"type-text"},[e._v("CMD")]),e._v(" "+e._s(t.commandName)+" ")]:t.isQueueJob()?[s("span",{staticClass:"type-text"},[e._v("QUEUE")]),e._v(" "+e._s(t.jobName)+" ")]:t.isTest()?[s("span",{staticClass:"type-text"},[e._v("TEST")]),e._v(" "+e._s(t.testGroup)+" ")]:[t.isAjax()?s("span",{staticClass:"type-text"},[e._v("AJAX")]):e._e(),s("span",{staticClass:"method-text"},[e._v(e._s(t.method))]),e._v(" "+e._s(t.uri)+" ")]],2),s("br"),t.isCommand()?[s("small",[e._v(e._s(t.commandLine))])]:t.isQueueJob()?[s("small",[e._v(e._s(t.jobDescription))])]:t.isTest()?[s("small",[e._v(e._s(t.testName))])]:[e.$settings.global.requestSidebarCollapsed?s("small",[e._v(e._s(t.controller))]):s("small",[e._v(e._s(e._f("shortClass")(t.controller)))])]],2),t.isCommand()?[s("td",{staticClass:"status",attrs:{title:t.commandExitCode}},[s("span",{class:{"status-text":!0,"client-error":t.isCommandWarning(),"server-error":t.isCommandError()}},[e._v(e._s(t.commandExitCode))])])]:t.isQueueJob()?[s("td",{staticClass:"status",attrs:{title:t.jobStatus}},[s("span",{class:{"status-text":!0,"status-text-small":!0,"client-error":t.isQueueJobWarning(),"server-error":t.isQueueJobError()}},[e._v(e._s(t.jobStatus))])])]:t.isTest()?[s("td",{staticClass:"status",attrs:{title:t.testStatus}},[s("span",{class:{"status-text":!0,"status-text-small":!0,"client-error":t.isTestWarning(),"server-error":t.isTestError()}},[e._v(e._s(t.testStatus))])])]:[s("td",{staticClass:"status",attrs:{title:t.responseStatus}},[s("span",{class:{"status-text":!0,"client-error":t.isClientError(),"server-error":t.isServerError()}},[e._v(e._s(t.responseStatus))])])],s("td",{staticClass:"duration",attrs:{title:t.responseDurationRounded+" ms ("+t.databaseDurationRounded+" ms)"}},[e._v(" "+e._s(t.responseDurationRounded)+" ms"),s("br"),e.showDatabaseTime?s("small",[e._v(e._s(t.databaseDurationRounded)+" ms")]):e._e()])],2)})),0)]),s("a",{staticClass:"button requests-clear",attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.clear.apply(null,arguments)}}},[s("icon",{attrs:{name:"slash"}}),e._v(" Clear ")],1)])])])},Pi=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("th",{staticClass:"controller"},[e._v(" Path"),s("br"),s("small",[e._v("Controller")])])}],Di={name:"RequestsList",components:{},data:function(){return{loadingMoreRequests:!1}},computed:{requests:function(){var e=this.$requests.items;return this.$settings.global.hideCommandTypeRequests&&(e=e.filter((function(e){return"command"!=e.type}))),this.$settings.global.hideQueueJobTypeRequests&&(e=e.filter((function(e){return"queue-job"!=e.type}))),this.$settings.global.hideTestTypeRequests&&(e=e.filter((function(e){return"test"!=e.type}))),e},showDatabaseTime:function(){return this.requests.find((function(e){return e.databaseDuration>0}))}},mounted:function(){this.$refs.requestsContainer.scrollTop=this.$refs.requestsTable.offsetTop},methods:{isActive:function(e){var t;return(null===(t=this.$request)||void 0===t?void 0:t.id)==e},showRequest:function(e){this.global.$request=e},loadMoreRequests:function(){var e=this;this.loadingMoreRequests=!0,this.$requests.loadPrevious(10).then((function(){e.loadingMoreRequests=!1}))},shouldShowFirstRequest:function(){return!this.$settings.global.preserveLog&&(!this.$request||!this.$requests.findId(this.$request.id))},shouldShowIncomingRequest:function(){return this.$settings.global.preserveLog&&(!this.$request||this.$settings.global.showIncomingRequests&&this.global.showIncomingRequests)},clear:function(){this.$requests.clear()}},watch:{requests:function(e){this.shouldShowFirstRequest()?this.showRequest(this.$requests.first()):this.shouldShowIncomingRequest()&&(this.showRequest(this.$requests.last((function(e){return!e.isAjax()}))||this.$requests.last()),this.$refs.requestsContainer.scrollTop=this.$refs.requestsTable.offsetHeight+this.$refs.requestsTable.offsetTop)},$request:{handler:function(e){var t,s;"requires-authentication"==(null===(t=this.$request)||void 0===t||null===(s=t.error)||void 0===s?void 0:s.error)&&this.$authentication.request(this.$request.error.message,this.$request.error.requires);var a=this.$requests.last((function(e){return!e.isAjax()}))||this.$requests.last(),i=this.$requests.all().indexOf(a);this.global.showIncomingRequests=this.$requests.all().slice(i).includes(e)}},"$request.loading":{handler:function(e){var t,s;e||"requires-authentication"==(null===(t=this.$request)||void 0===t||null===(s=t.error)||void 0===s?void 0:s.error)&&this.$authentication.request(this.$request.error.message,this.$request.error.requires)}}}},Ri=Di,Ei=(s("d852"),Object(f["a"])(Ri,Oi,Pi,!1,null,null,null)),Ni=Ei.exports,Ai=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("modal",{attrs:{icon:"star",title:"What's new",shown:e.$whatsNew.show,"on-close":e.close}},[s("div",{staticClass:"whats-new"},[s("div",{staticClass:"whats-new-content"},[s("h1",[e._v("Clockwork has just been updated!")]),e._l(e.release.notes,(function(t){return[s("div",{staticClass:"whats-new-section",class:"image-"+(t.imagePlacement||"bottom")},[t.image&&"bottom"!=(t.imagePlacement||"bottom")?s("img",{attrs:{src:"img/whats-new/"+e.release.version+"/"+t.image}}):e._e(),s("h2",[e._v(e._s(t.title))]),e._l(t.text,(function(t){return s("p",[e._v(e._s(t))])})),t.image&&"bottom"==(t.imagePlacement||"bottom")?s("img",{attrs:{src:"img/whats-new/"+e.release.version+"/"+t.image}}):e._e()],2)]})),s("div",{staticClass:"whats-new-actions"},[s("a",{staticClass:"actions-show-more",attrs:{href:e.release.url,target:"_blank"}},[e._v("Learn more")]),s("a",{staticClass:"actions-close",attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.close.apply(null,arguments)}}},[e._v("Close")]),s("p",[s("small",[e._v("Some of the new features might require server-side Clockwork library update.")])])])],2)])])},Ii=[],Mi=function(){function e(t,s){Object(tt["a"])(this,e),this.platform=t,this.settings=s}return Object(st["a"])(e,[{key:"show",get:function(){return this.settings.global.seenReleaseNotesVersion!=e.latestRelease.version&&this.settings.persistent&&this.settings.loaded&&this.platform.hasFeature("whats-new")}},{key:"seen",value:function(){this.settings.global.seenReleaseNotesVersion=e.latestRelease.version,this.settings.save()}}],[{key:"latestRelease",get:function(){return e.releases[0]}},{key:"releases",get:function(){return[{version:"5.1",url:"https://underground.works/blog/clockwork-5.1-released-with-database-queries-highlighting-and-more",notes:[{title:"Database Queries Highlighting",text:["Database queries are now easier to read with SQL syntax highlighting. You can also enable the prettify mode to reformat the queries for even more readibility."],image:"database-queries.png",imagePlacement:"top"},{title:"Server-side Library Updated",text:["The server-side library was also updated with support for Laravel Octane, collecting cache values and more.",'For the full list of improvements, changes, and fixes click on the "learn more" button.']}]},{version:"5.0",url:"https://underground.works/blog/clockwork-5.0-released-with-client-side-metrics-toolbar-and-more",notes:[{title:"UI refinements",text:["Almost every part of the Clockwork UI was touched up and improved. From simplified requests list, new tab bar, counters and tables to reworked dark theme colors.",'You will also find a new "credits" link in the settings modal. This opens a credits modal with a little shout-out to all contributors, sponsors and used third-party dependencies.'],image:"clockwork-5.png",imagePlacement:"top"},{title:"Timeline",text:["Timeline was rebuilt from the ground up in this release.","The new timeline makes it easier than ever before to figure out what's happening in your application.","The condense option makes the timeline more compact and clicking on an event now reveals a popover with more details."],image:"timeline.png",imagePlacement:"right"},{title:"Client-side metrics and Web Vitals",text:["Clockwork helps you to keep your server-side performance in check. Optimizing the backend is just half of the battle though.","Clockwork can now collect client-side performance metrics. Supported are both navigation timings and Web Vitals","Collecting these metrics requires installing a tiny javascript library from npm or via cdn. Check the docs for more details."],image:"client-metrics.png",imagePlacement:"left"},{title:"Models",text:["Models tab is a new tool in your toolbelt for dealing with database issues.","Models actions give you a different point of view at your database usage.","Models counts will show you how many of each model you've retrieved, created, updated and deleted."],image:"models-tab.png",imagePlacement:"right"},{title:"Notifications",text:["Notifications tab is a new tab replacing the emails tab.","This time we support not only emails, but all kinds of notifications, like SMS or Slack messages.","With details like subject, recipient, sender, but also notifiable, notified and mailable objects in Larvel."],image:"notifications-tab.png",imagePlacement:"left"},{title:"Sharing",text:["Have you ever wanted to share a Clockwork profile with someone else? Maybe you'd like to share details of a crash from a local environment with a co-worker. Or before and after optimisation metrics with your boss.","Sharing a request uploads the metadata to a Clockwork share service and gives you a public link to share with others. On this link you will find a fully working Clockwork app showing the request you shared.","The share service is free to use, click on the share button in the sidebar to start."]},{title:"Toolbar",text:["Clockwork now gives you an option to show basic request information in the form of a toolbar in your app.","A tiny browser component has to be installed from npm or via cdn. See the docs for full installation instructions."],image:"toolbar.png",imagePlacement:"top"}]}]}}]),e}(),Li={name:"WhatsNew",components:{Modal:p},computed:{release:function(){return Mi.latestRelease}},methods:{close:function(){this.$whatsNew.seen()}}},Qi=Li,Ui=(s("f407"),Object(f["a"])(Qi,Ai,Ii,!1,null,null,null)),Fi=Ui.exports,Ji={name:"App",components:{RequestDetails:Ba,RequestSidebar:ji,RequestsList:Ni,WhatsNew:Fi},computed:{appearance:function(){return this.$settings.appearance},showRequestsList:function(){return!this.$settings.global.requestsListCollapsed&&this.$platform.hasFeature("requests-list")},showRequestSidebar:function(){return!this.$settings.global.requestSidebarCollapsed&&this.$platform.hasFeature("request-sidebar")}}},Hi=Ji,Vi=(s("5c0b"),Object(f["a"])(Hi,i,n,!1,null,null,null)),Wi=Vi.exports,Bi=s("4eb5"),zi=s.n(Bi),Gi=s("f035"),Ki=s.n(Gi),Xi=s("c28b"),Zi=s.n(Xi),Yi=s("9b02"),en=s.n(Yi);yt["a"].config.devtools=!0,yt["a"].config.performance=!0,yt["a"].config.productionTip=!1,yt["a"].use(zi.a),yt["a"].use(Zi.a),yt["a"].component("spinner",Ki.a),yt["a"].mixin({methods:{$get:en.a}});s("498a"),s("a15b"),s("5db7"),s("73d9");var tn,sn=s("1160"),an=s.n(sn),nn=s("a501"),rn=s.n(nn),on=function(){function e(t,s,a){var i=this;Object(tt["a"])(this,e),this.startTime=s,this.endTime=a,this.events=[],t.map((function(e){return i.append(e)}))}return Object(st["a"])(e,[{key:"append",value:function(e){e.start=e.start||this.startTime,e.startthis.endTime&&(e.end=this.endTime),this.events.push(new ln(e)),this.sort()}},{key:"appendTotalEvent",value:function(){this.append({description:"Total time",start:this.startTime,duration:this.endTime-this.startTime,color:"grey"})}},{key:"merge",value:function(e){this.events=this.events.concat(e.events),this.sort()}},{key:"copy",value:function(){return new e(an()(this.events),this.startTime,this.endTime)}},{key:"sort",value:function(){return this.events=this.events.sort((function(e,t){return e.start-t.start})),this}},{key:"filter",value:function(e,t){var s=this.copy();return s.events=e.filter(s.events),s.events=s.events.filter((function(e){return!rn()(e.tags,t).length})),s}},{key:"condense",value:function(){var e=this.copy(),t=(e.endTime-e.startTime)/64;return e.events=e.events.reduce((function(e,s){if(s.duration>=t)return[].concat(Object(ts["a"])(e),[s]);var a=e[e.length-1];return a instanceof cn&&a.end<=s.start?(a.push(s),e):[].concat(Object(ts["a"])(e),[new cn(s)])}),[]),e}},{key:"present",value:function(e){var t=this;return this.events.map((function(s){return s instanceof cn||(s=new cn(s)),s.present(t,e)}))}},{key:"findChildren",value:function(e){return this.events.flatMap((function(e){return e instanceof cn?e.events:e})).reduce((function(t,s){return s!==e&&e.contains(s)&&t.every((function(e){return!e.contains(s)}))&&t.push(s),t}),[])}}]),e}(),ln=function(){function e(t){Object(tt["a"])(this,e),this.name=t.name||t.description,this.description=t.description||"",this.start=t.start instanceof Date?t.start.getTime()/1e3:t.start,this.duration=t.duration||0,this.color=t.color||"blue",this.end=this.start+this.duration/1e3,this.tags=t.tags||[],this.data=t.data}return Object(st["a"])(e,[{key:"present",value:function(e,t){var s=this;if(this.presented)return this;this.startRelative=1e3*(this.start-e.startTime)/(e.endTime-e.startTime),this.durationRelative=this.duration/(e.endTime-e.startTime),this.offset=this.startRelative*t,this.width=this.durationRelative*t,this.width<3&&(this.width=3),this.width>t&&(this.width=t),this.width+this.offset>t&&(this.offset=t-this.width),this.eventClass=this.color,this.eventStyle={left:"0px",width:"".concat(this.width,"px")},this.labelWidth=this.startRelative>.5?this.offset:t-this.width-this.offset,this.labelClass=this.startRelative>.5?["before",this.color]:["after",this.color],this.labelStyle={width:"".concat(this.labelWidth,"px")},this.width>200&&(this.labelClass=["inside",this.color]);var a=e.findChildren(this).map((function(s){return s.present(e,t)}));return this.childrenSections=a.map((function(e){return{style:{left:"".concat(e.offset-s.offset,"px"),width:"".concat(e.width,"px")}}})),this.durationChildren=a.length?a.reduce((function(e,t){return e+t.duration}),0):null,this.durationSelf=this.duration-this.durationChildren,this.presented=!0,this}},{key:"contains",value:function(e){return this.start1}},{key:"firstEvent",get:function(){return this.events[0]}},{key:"lastEvent",get:function(){return this.events[this.events.length-1]}},{key:"push",value:function(e){this.events.push(e),this.name=this.description="".concat(this.events.length," events"),this.duration=this.lastEvent.end-this.firstEvent.start,this.end=this.lastEvent.end}},{key:"present",value:function(e,t){var s=this;return this.events.forEach((function(a){a.present(e,t),a.eventStyle.left="".concat(a.offset-s.events[0].offset,"px")})),this.duration=this.condensed?null:this.firstEvent.duration,this.durationSelf=this.condensed?null:this.firstEvent.durationSelf,this.durationChildren=this.condensed?null:this.firstEvent.durationChildren,this.offset=this.firstEvent.offset,this.width=this.lastEvent.width+this.lastEvent.offset-this.firstEvent.offset,this.color=this.offset>t/2?this.firstEvent.color:this.lastEvent.color,this.labelWidth=this.offset>t/2?this.offset:t-this.width-this.offset,this.labelClass=this.offset>t/2?["before",this.color]:["after",this.color],this.labelStyle={width:"".concat(this.labelWidth,"px")},this.width>200&&!this.condensed&&(this.labelClass=["inside",this.color]),this.groupStyle={"margin-left":"".concat(this.offset,"px"),width:"".concat(this.width,"px")},this.tags=this.condensed?[]:this.firstEvent.tags,this.data=this.condensed?void 0:this.firstEvent.data,this}}]),e}(),un=s("f7c2"),dn=s.n(un),hn=s("e4c9"),vn=s.n(hn),fn=s("c909"),mn=s.n(fn),pn=function(){function e(t){Object(tt["a"])(this,e),Object.assign(this,t),this.original=t,this.time=parseFloat(this.time),this.responseDuration=parseFloat(this.responseDuration),this.responseDurationRounded=this.responseDuration?Math.round(this.responseDuration):0,this.databaseDurationRounded=this.databaseDuration?Math.round(this.databaseDuration):0,this.memoryUsageFormatted=this.memoryUsage?this.formatBytes(this.memoryUsage):void 0,this.processCacheStats(),this.cacheQueries=this.processCacheQueries(this.cacheQueries),this.cookies=this.createKeypairs(this.cookies),this.middleware=this.middleware instanceof Array?this.middleware:[],this.processDatabase(),this.processModels(),this.notifications=this.processNotifications(this.notifications,this.emailsData),this.events=this.processEvents(this.events),this.getData=this.createKeypairs(this.getData),this.requestData=this.requestData instanceof Object?this.createKeypairs(this.requestData,!1):this.requestData,this.headers=this.processHeaders(this.headers),this.log=this.processLog(this.log),this.postData=this.createKeypairs(this.postData),this.queueJobs=this.processQueueJobs(this.queueJobs),this.redisCommands=this.processRedisCommands(this.redisCommands),this.sessionData=this.createKeypairs(this.sessionData),this.performanceMetrics=this.processPerformanceMetrics(this.performanceMetrics),this.viewsData=this.processViews(this.viewsData),this.userData=this.processUserData(this.userData),this.timeline=this.processTimeline(this.timelineData),this.clientMetrics=this.processClientMetrics(this.clientMetrics),this.webVitals=this.processWebVitals(this.webVitals),this.processCommand(),this.processQueueJob(),this.processTest(),this.errorsCount=this.getErrorsCount(),this.warningsCount=this.getWarningsCount(),this.exceptions=this.processExceptions(),this.loadClientMetricsAttempts=0}return Object(st["a"])(e,[{key:"resolve",value:function(e,t){return Object.assign(this,t?dn()(e,t):e,{loading:!1,error:void 0,original:Object.assign(this.original,e.original)})}},{key:"resolveWithError",value:function(e){return Object.assign(this,{loading:!1,error:e})}},{key:"loadClientMetrics",value:function(e){var t=this;this.isRequest()&&(this.clientMetrics.some((function(e){return e.value}))&&Object.values(this.webVitals).some((function(e){return e.value}))||this.loadClientMetricsTimeout||++this.loadClientMetricsAttempts>4||(this.loadClientMetricsTimeout=setTimeout((function(){e.findId(t.id)&&e.loadId(t.id,["clientMetrics","webVitals"]).then((function(){t.loadClientMetricsTimeout=void 0,t.loadClientMetrics(e)}))}),2500)))}},{key:"isClientError",value:function(){return this.responseStatus>=400&&this.responseStatus<500}},{key:"isServerError",value:function(){return this.responseStatus>=500&&this.responseStatus<600}},{key:"isAjax",value:function(){return this.headers.find((function(e){return"X-Requested-With"==e.name&&"XMLHttpRequest"==e.value}))}},{key:"isRequest",value:function(){return"request"==this.type||!this.type}},{key:"isCommand",value:function(){return"command"==this.type}},{key:"isCommandError",value:function(){return 1==this.commandExitCode}},{key:"isCommandWarning",value:function(){return this.commandExitCode>1}},{key:"isQueueJob",value:function(){return"queue-job"==this.type}},{key:"isQueueJobError",value:function(){return"failed"==this.jobStatus}},{key:"isQueueJobWarning",value:function(){return"released"==this.jobStatus}},{key:"isTest",value:function(){return"test"==this.type}},{key:"isTestError",value:function(){return["failed","error"].includes(this.testStatus)}},{key:"isTestWarning",value:function(){return["warning"].includes(this.testStatus)}},{key:"tooltip",get:function(){return this.isCommand()?"[CMD] ".concat(this.commandName," (").concat(this.commandLine,")"):this.isQueueJob()?"[QUEUE] ".concat(this.jobName," (").concat(this.jobDescription,")"):this.isTest()?"[TEST] ".concat(this.testGroup," (").concat(this.testName,")"):"".concat(this.method," ").concat(this.uri," (").concat(this.controller,")")}},{key:"createKeypairs",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!(e instanceof Object))return[];var s=Object.keys(e).map((function(t){return{name:t,value:e[t]}}));return t&&(s=s.sort((function(e,t){return e.name.localeCompare(t.name)}))),s}},{key:"processCacheStats",value:function(){this.cacheDeletes&&(this.cacheDeletes=parseInt(this.cacheDeletes)),this.cacheHits&&(this.cacheHits=parseInt(this.cacheHits)),this.cacheReads&&(this.cacheReads=parseInt(this.cacheReads)),this.cacheWrites&&(this.cacheWrites=parseInt(this.cacheWrites)),this.cacheMisses=this.cacheReads&&this.cacheHits?this.cacheReads-this.cacheHits:null}},{key:"processCacheQueries",value:function(e){var t=this;return e instanceof Array?e.map((function(e){return e.expiration=e.expiration?t.formatTime(e.expiration):void 0,e.value=void 0!==e.value?e.value:"",e})):[]}},{key:"processClientMetrics",value:function(e){return e=this.enforceObject(e),[{name:"Redirect",value:e.redirect},{name:"DNS",value:e.dns,color:"purple",onChart:!0},{name:"Connection",value:e.connection,color:"blue",onChart:!0},{name:"Waiting",value:e.waiting,color:"red",onChart:!0},{name:"Receiving",value:e.receiving,color:"green",onChart:!0},{name:"To interactive",value:e.domInteractive,color:"blue",onChart:!0,dom:!0},{name:"To complete",value:e.domComplete,color:"purple",onChart:!0,dom:!0}]}},{key:"processDatabase",value:function(){this.databaseQueries=this.processDatabaseQueries(this.databaseQueries),this.databaseQueriesCount=parseInt(this.databaseQueriesCount)||this.databaseQueries.length,this.databaseSlowQueries=parseInt(this.databaseSlowQueries)||this.databaseQueries.filter((function(e){return e.tags.includes("slow")})).length,this.databaseSelects=parseInt(this.databaseSelects)||this.databaseQueries.filter((function(e){return e.query.match(/^select /i)})).length,this.databaseInserts=parseInt(this.databaseInserts)||this.databaseQueries.filter((function(e){return e.query.match(/^insert /i)})).length,this.databaseUpdates=parseInt(this.databaseUpdates)||this.databaseQueries.filter((function(e){return e.query.match(/^update /i)})).length,this.databaseDeletes=parseInt(this.databaseDeletes)||this.databaseQueries.filter((function(e){return e.query.match(/^delete /i)})).length,this.databaseOthers=parseInt(this.databaseOthers)||this.databaseQueries.filter((function(e){return!e.query.match(/^(select|insert|update|delete) /i)})).length}},{key:"processDatabaseQueries",value:function(e){var t=this;return e instanceof Array?e.map((function(e){e.model=e.model||"-",e.shortModel=e.model?e.model.split("\\").pop():"-",e.tags=e.tags instanceof Array?e.tags:[],e.bindings=t.optionalNonEmptyObject(e.bindings),e.prettifiedQuery=vn.a.format(e.query);var s,a=e.query.trim();return(s=a.match(/^SELECT\s[\s\S]*?\sFROM\s[^A-Za-z-_]?([A-Za-z-_]+)/i))?e.shortQuery="SELECT FROM ".concat(s[1]):(s=a.match(/^INSERT\s+INTO\s+[^A-Za-z-_]?([A-Za-z-_]+)/i))?e.shortQuery="INSERT INTO ".concat(s[1]):(s=a.match(/^UPDATE\s+[^A-Za-z-_]?([A-Za-z-_]+)/i))?e.shortQuery="UPDATE ".concat(s[1]):(s=a.match(/^DELETE\s+FROM\s+[^A-Za-z-_]?([A-Za-z-_]+)/i))?e.shortQuery="DELETE FROM ".concat(s[1]):e.shortQuery=a,e})):[]}},{key:"processNotifications",value:function(e,t){return t=Object.values(this.optionalNonEmptyObject(t,{})).filter((function(e){return e.data instanceof Object})).map((function(e){return{subject:e.data.subject,to:[e.data.to],from:[e.data.from],time:e.start,duration:e.duration,type:"mail",data:[]}})),this.enforceArray(e).concat(t).map((function(e){return e.isShowingDetails=!1,e}))}},{key:"processEvents",value:function(e){return e instanceof Array?e.map((function(e){return e.objectEvent=e.data instanceof Object&&e.event==e.data.__class__,e.time=e.time?new Date(1e3*e.time):void 0,e.listeners=e.listeners instanceof Array?e.listeners:[],e.listeners=e.listeners.map((function(e){var t,s;return t=(s=e.match(/Closure \(.*[\/\\](.+?:\d+)-\d+\)/))?"Closure ("+s[1]+")":e.split(/[\/\\]/).pop(),{name:e,shortName:t}})),e})):[]}},{key:"processExceptions",value:function(){var e=this.log.length?this.log[this.log.length-1].exception:null;if(this.isRequest()&&!this.isServerError()||!e)return[];e=an()(e);var t=e;do{t.trace=[{call:"".concat(t.type,"()"),file:t.file,line:t.line,isVendor:!1}].concat(Object(ts["a"])(t.trace))}while(t=t.previous);return[e]}},{key:"processHeaders",value:function(e){return e instanceof Object?Object.keys(e).map((function(t){var s=e[t];return t=t.split("-").map((function(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()})).join("-"),{name:t,value:s}})).reduce((function(e,t){return t=t.value instanceof Array?t.value.map((function(e){return{name:t.name,value:e}})):[t],e.concat(t)}),[]).sort((function(e,t){return e.name.localeCompare(t.name)})):[]}},{key:"processLog",value:function(e){return e instanceof Array?e.map((function(e){return e.exception&&(e.file=e.exception.file,e.line=e.exception.line,e.trace=e.exception.trace),e.time=new Date(1e3*e.time),e.context=e.context instanceof Object&&Object.keys(e.context).filter((function(e){return"__type__"!=e})).length?e.context:void 0,e})):[]}},{key:"processModels",value:function(){this.modelsActions=this.processModelsActions(this.modelsActions)}},{key:"processModelsActions",value:function(e){var t=this;return this.enforceArray(e).map((function(e){return e.shortModel=e.model?e.model.split("\\").pop():"",e.attributes=t.optionalNonEmptyObject(e.attributes),e.changes=t.optionalNonEmptyObject(e.changes),e.tags=t.enforceArray(e.tags),e.bindings=t.optionalNonEmptyObject(e.bindings),e.isShowingDetails=!1,e}))}},{key:"processPerformanceMetrics",value:function(e){if(!e)return[{name:"App",value:(this.responseDurationRounded||0)-(this.databaseDurationRounded||0)-(this.cacheTime||0),color:"blue"},{name:"DB",value:this.databaseDurationRounded,color:"red"},{name:"Cache",value:this.cacheTime,color:"green"}].filter((function(e){return e.value>0}));e=e.filter((function(e){return e instanceof Object})).map((function(e,t){return e.color=e.color||"purple",e}));var t=e.reduce((function(e,t){return e+t.value}),0);return e.push({name:"Other",value:this.responseDurationRounded-t,color:"purple"}),e}},{key:"processQueueJobs",value:function(e){return e instanceof Array?e.map((function(e){return e.shortName=e.name.split("\\").pop(),e})):[]}},{key:"processRedisCommands",value:function(e){return e instanceof Array?e:[]}},{key:"processTest",value:function(){if(this.testName){var e=this.testName.includes("::")?this.testName.split("::"):[this.testName,""],t=Object(a["a"])(e,2);this.testGroup=t[0],this.testName=t[1]}}},{key:"processTimeline",value:function(e){var t=new on(Object.values(this.optionalNonEmptyObject(e,{})),this.time,this.time+this.responseDuration);return e&&!e.total&&t.appendTotalEvent(),this.databaseQueries.forEach((function(e){return t.append({start:e.time,duration:e.duration,name:e.shortQuery,description:e.query,color:"red",tags:["databaseQueries"]})})),this.events.forEach((function(e){return t.append({start:e.time,duration:e.duration,description:e.event,color:"purple",tags:["events"]})})),this.cacheQueries.forEach((function(e){return t.append({start:e.time,duration:e.duration,description:"".concat(e.type.toUpperCase()," ").concat(e.key),color:"green",tags:["cacheQueries"]})})),this.redisCommands.forEach((function(e){return t.append({start:e.time,duration:e.duration,description:"".concat(e.command," ").concat(Object.values(e.parameters).join(" ")),color:"green",tags:["redisCommands"]})})),this.queueJobs.forEach((function(e){return t.append({start:e.time,duration:e.duration,description:e.name,color:"purple",tags:["queueJobs"]})})),this.notifications.forEach((function(e){return t.append({start:e.time,duration:e.duration,description:"".concat(e.to," - ").concat(e.subject),color:"purple",tags:["notifications"]})})),t.merge(this.viewsData),t}},{key:"processViews",value:function(e){var t=this,s=Object.values(this.optionalNonEmptyObject(e,{})).map((function(e){var s,a,i,n;return{start:e.start,duration:e.duration,name:(null===(s=e.data)||void 0===s?void 0:s.name)||e.description,description:((null===(a=e.data)||void 0===a?void 0:a.name)||e.description)+(null!==(i=e.data)&&void 0!==i&&i.memoryUsage?" (".concat(t.formatBytes(e.data.memoryUsage),")"):""),data:t.optionalNonEmptyObject(null===(n=e.data)||void 0===n?void 0:n.data),color:"purple",tags:["views"]}}));return new on(s,this.time,this.time+this.responseDuration)}},{key:"processUserData",value:function(e){if(!(e instanceof Object))return[];var t=function(e){var t=Object(a["a"])(e,2),s=t[0];t[1];return"__meta"!=s},s=function(e){return function(t){var s=Object(a["a"])(t,2),i=s[0],n=s[1];return{key:e[i]||i,value:n}}};return Object.entries(e).filter((function(e){var t=Object(a["a"])(e,2),s=(t[0],t[1]);return s instanceof Object||s.__meta||s.__meta.title})).map((function(e){var i=Object(a["a"])(e,2),n=i[0],r=i[1];return{key:n,title:r.__meta.title,sections:Object.entries(r).filter(t).map((function(e){var i=Object(a["a"])(e,2),n=(i[0],i[1]),r=n.__meta.labels||{},o="counters"==n.__meta.showAs?Object.entries(n).filter(t).map(s(r)):Object.entries(n).filter(t).map((function(e){var t=Object(a["a"])(e,2),i=(t[0],t[1]);return Object.entries(i).map(s(r))}));return{data:o,showAs:n.__meta.showAs,title:n.__meta.title}}))}}))}},{key:"processWebVitals",value:function(e){e=this.enforceObject(e);var t={cls:{slow:7300,moderate:3800},fid:{slow:300,moderate:100},lcp:{slow:4e3,moderate:2e3},fcp:{slow:4e3,moderate:2e3},ttfb:{slow:600,moderate:600},si:{slow:5800,moderate:4300}};return Object.keys(t).forEach((function(s){var a=e[s],i="fast",n=!isNaN(parseFloat(a));a>t[s].slow?i="slow":a>t[s].moderate&&(i="moderate"),e[s]={value:a,score:i,available:n}})),e}},{key:"processCommand",value:function(){this.commandLine="",this.commandLine+=Object.values(this.commandArguments||{}).filter((function(e){return e})).join(" "),this.commandLine+=Object.entries(this.commandOptions||{}).reduce((function(e,t){var s=Object(a["a"])(t,2),i=s[0],n=s[1];return e+(!0===n?" --".concat(i):" --".concat(i,"=").concat(n))}),""),this.commandArgumentsMerged=this.createKeypairs(Object.assign({},this.commandArgumentsDefaults||{},this.commandArguments||{}),!1),this.commandOptionsMerged=this.createKeypairs(Object.assign({},this.commandOptionsDefaults||{},this.commandOptions||{}),!1)}},{key:"processQueueJob",value:function(){this.jobOptions=this.createKeypairs(this.jobOptions)}},{key:"getErrorsCount",value:function(){return this.log.reduce((function(e,t){return"error"==t.level?e+1:e}),0)}},{key:"getWarningsCount",value:function(){return this.log.filter((function(e){return"warning"==e.level})).length+this.databaseSlowQueries}},{key:"formatTime",value:function(e){var t=Math.floor(e/60),s=Math.floor(t/60);e%=60,t%=60;var a=[];return s&&a.push(s+"h"),t&&a.push(t+"min"),e&&a.push(e+"sec"),a.join(" ")}},{key:"formatBytes",value:function(e){var t=["B","kB","MB","GB","TB","PB"],s=Math.floor(Math.log(e)/Math.log(1024));return"".concat(Math.round(e/Math.round(Math.pow(1024,s)))," ").concat(t[s])}},{key:"enforceArray",value:function(e){return e instanceof Array?e:[]}},{key:"enforceObject",value:function(e){return e instanceof Object&&Object.keys(e).filter((function(e){return"__type__"!=e})).length?e:{}}},{key:"optionalNonEmptyObject",value:function(e,t){return e instanceof Object&&Object.keys(e).filter((function(e){return"__type__"!=e})).length?e:t}}],[{key:"placeholder",value:function(t,s,a){return Object.assign(new e({loading:!0,id:t,uri:s?new mn.a(s.url).pathname():"/",controller:"Waiting...",method:s?s.method:"GET",responseStatus:"?",parent:a}),{responseDurationRounded:"?",databaseDurationRounded:"?"})}}]),e}(),gn=function(){function e(){Object(tt["a"])(this,e)}return Object(st["a"])(e,[{key:"api",get:function(){return chrome||browser}},{key:"init",value:function(e){this.global=e,this.requests=e.$requests,this.profiler=e.$profiler,this.settings=e.$settings,this.updateNotification=e.$updateNotification,this.lastPolledId=null,this.useProperTheme(),this.setMetadataUrl(),this.setMetadataClient(),this.listenToRequests(),this.throttlePolling(),this.loadLastRequest()}},{key:"useProperTheme",value:function(){"dark"===this.api.devtools.panels.themeName&&(this.settings.defaultAppearance="dark")}},{key:"setMetadataUrl",value:function(){var e=this;this.resolveTabUrl().then((function(t){return e.requests.setRemote(t)}))}},{key:"setMetadataClient",value:function(){var e=this;this.requests.setClient((function(t,s,a,i){return e.profiler.withoutProfiling((function(){return e.fetch(t,s,a,i).then((function(e){var t=e.response,s=e.data;if(403==t.status)throw{error:"requires-authentication",message:s.message,requires:s.requires};if(200!=t.status)throw{error:"error-response",message:"Server returned an error response."};if(!(s instanceof Array)&&(!(s instanceof Object)||!Object.keys(s).length))throw{error:"empty-response",message:"Server returned an empty metadata."};return s}))}))}))}},{key:"fetch",value:function(e,t){var s=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return new Promise((function(n,r){s.api.runtime.sendMessage({action:"fetch",method:e,url:t,data:a,headers:i},(function(e){return n(e)}))}))}},{key:"setCookie",value:function(e,t,s){var a=this;return this.resolveTabUrl().then((function(i){a.api.runtime.sendMessage({action:"setCookie",url:i,name:e,value:t,path:"/",expirationDate:Math.floor(Date.now()/1e3)+s})}))}},{key:"getCookie",value:function(e){var t=this;return this.resolveTabUrl().then((function(s){return new Promise((function(a,i){t.api.runtime.sendMessage({action:"setCookie",url:s,name:e},(function(e){return a(e)}))}))}))}},{key:"resolveTabUrl",value:function(){var e=this;return new Promise((function(t,s){e.api.runtime.sendMessage({action:"getTabUrl",tabId:e.api.devtools.inspectedWindow.tabId},(function(e){return t(e)}))}))}},{key:"listenToRequests",value:function(){var e=this;this.api.runtime.onMessage.addListener((function(t){if("requestCompleted"===t.action&&(-1!==navigator.userAgent.toLowerCase().indexOf("firefox/57.0")||t.request.tabId==e.api.devtools.inspectedWindow.tabId)){var s=e.parseHeaders(t.request.responseHeaders);if(s){e.updateNotification.serverVersion=s.version,e.requests.setRemote(t.request.url,s);var a=pn.placeholder(s.id,t.request);e.requests.loadId(s.id,null,a).then((function(){return e.retryLoading(a)})),s.subrequests.forEach((function(t){e.requests.setRemote(t.url,{path:t.path}),e.requests.loadId(t.id,null,pn.placeholder(t.id,t,a))})),e.requests.setRemote(t.request.url,s)}}})),this.settings.global.hideCommandTypeRequests&&this.settings.global.hideQueueJobTypeRequests&&this.settings.global.hideTestTypeRequests||this.startPollingRequests(),this.api.runtime.onMessage.addListener((function(t){"navigationStarted"===t.action&&(e.settings.global.preserveLog||t.details.tabId==e.api.devtools.inspectedWindow.tabId&&e.requests.clear())}))}},{key:"loadLastRequest",value:function(){var e=this;this.api.runtime.sendMessage({action:"getLastClockworkRequestInTab",tabId:this.api.devtools.inspectedWindow.tabId},(function(t){if(t){var s=e.parseHeaders(t.responseHeaders);e.updateNotification.serverVersion=s.version,e.requests.setRemote(t.url,s),e.requests.loadId(s.id,null,pn.placeholder(s.id,t)),e.settings.global.hideCommandTypeRequests&&e.settings.global.hideQueueJobTypeRequests&&e.settings.global.hideTestTypeRequests||e.startPollingRequests()}}))}},{key:"parseHeaders",value:function(e){var t,s=(t=e.find((function(e){return"x-clockwork-id"==e.name.toLowerCase()})))?t.value:void 0,a=(t=e.find((function(e){return"x-clockwork-path"==e.name.toLowerCase()})))?t.value:void 0,i=(t=e.find((function(e){return"x-clockwork-version"==e.name.toLowerCase()})))?t.value:void 0;if(s){var n={};e.forEach((function(e){if(0===e.name.toLowerCase().indexOf("x-clockwork-header-")){var t=e.name.replace(/^x-clockwork-header-/i,"");n[t]=e.value}}));var r=e.filter((function(e){return"x-clockwork-subrequest"==e.name.toLowerCase()})).reduce((function(e,t){return e.concat(t.value.split(",").map((function(e){var t=e.trim().split(";");return{id:t[0],url:decodeURIComponent(t[1]),path:decodeURIComponent(t[2])}})))}),[]);return{id:s,path:a,version:i,headers:n,subrequests:r}}}},{key:"retryLoading",value:function(e){var t=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;e.error&&(s>3||setTimeout((function(){return t.requests.loadId(e.id).then((function(){return t.retryLoading(e,s+1)}))}),(s+1)*(s+1)*100))}},{key:"startPollingRequests",value:function(){var e;this.pollingInterval=1e3,this.isPolling=!0,this.lastPolledId=null===(e=this.requests.last())||void 0===e?void 0:e.id,this.pollTimeout||this.pollRequests()}},{key:"stopPollingRequests",value:function(){this.isPolling=!1,clearTimeout(this.pollTimeout),this.pollTimeout=null}},{key:"pollRequests",value:function(){var e=this;clearTimeout(this.pollTimeout);var t=[this.settings.global.hideCommandTypeRequests?null:"command",this.settings.global.hideQueueJobTypeRequests?null:"queue-job",this.settings.global.hideTestTypeRequests?null:"test"].filter(Boolean);this.requests.withQuery({"type[]":t},(function(){e.requests.loadNext().then((function(t){var s;e.lastPolledId=(null===(s=e.requests.last())||void 0===s?void 0:s.id)||e.lastPolledId,e.isPolling&&(e.pollTimeout=setTimeout((function(){return e.pollRequests()}),e.updatePollingInterval(t.length)))})).catch((function(){e.isPolling&&(e.pollTimeout=setTimeout((function(){return e.pollRequests()}),e.updatePollingInterval(!1)))}))}))}},{key:"throttlePolling",value:function(){var e=this;document.addEventListener("visibilitychange",(function(){e.pollingInterval=document.hidden?6e4:1e3,!document.hidden&&e.isPolling&&e.pollRequests()}))}},{key:"updatePollingInterval",value:function(e){var t=(new Date).getTime();return!e&&this.pollingLastReceived||(this.pollingLastReceived=t),t-this.pollingLastReceived>6e4?this.pollingInterval=5e3:t-this.pollingLastReceived>3e4?this.pollingInterval=2500:this.pollingInterval=1e3}},{key:"hasFeature",value:function(e){var t=["delete-shared","details-request"];return!t.includes(e)}},{key:"settingsChanged",value:function(){this.settings.global.hideCommandTypeRequests&&this.settings.global.hideQueueJobTypeRequests&&this.settings.global.hideTestTypeRequests?this.stopPollingRequests():this.startPollingRequests()}}],[{key:"runningAsExtension",value:function(){return"object"==("undefined"===typeof chrome?"undefined":Object(et["a"])(chrome))&&chrome.devtools||"object"==("undefined"===typeof browser?"undefined":Object(et["a"])(browser))&&browser.devtools}}]),e}(),bn=function(){function e(){Object(tt["a"])(this,e)}return Object(st["a"])(e,[{key:"init",value:function(e){this.global=e,this.requests=e.$requests,this.authentication=e.$authentication,this.profiler=e.$profiler,this.settings=e.$settings,this.lastPolledId=null,this.useProperTheme(),this.setMetadataUrl(),this.setMetadataClient(),this.loadRequestFromUri(),this.startPollingRequests(),this.throttlePolling()}},{key:"useProperTheme",value:function(){window.matchMedia("(prefers-color-scheme: dark)").matches&&(this.settings.defaultAppearance="dark")}},{key:"setMetadataUrl",value:function(){if(this.settings.global.metadataPath)return this.requests.setRemote(window.location.href,{path:this.settings.global.metadataPath});this.requests.setRemote(window.location.href,{path:new mn.a(window.location.href).path().split("/").slice(0,-2).join("/")+"/__clockwork/"})}},{key:"setMetadataClient",value:function(){var e=this;this.requests.setClient((function(t,s,a,i){return e.profiler.withoutProfiling((function(){return e.fetch(t,s,a,i).then((function(e){var t=e.response,s=e.data;if(403==t.status)throw{error:"requires-authentication",message:s.message,requires:s.requires};if(200!=t.status)throw{error:"error-response",message:"Server returned an error response."};if(!(s instanceof Array)&&(!(s instanceof Object)||!Object.keys(s).length))throw{error:"empty-response",message:"Server returned an empty metadata."};return s}))}))}))}},{key:"fetch",value:function(e){function t(t,s){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e,t){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=new FormData;return Object.entries(s).forEach((function(e){var t=Object(a["a"])(e,2),s=t[0],i=t[1];return n.append(s,i)})),fetch(t,{method:e,body:Object.keys(s).length?n:null,headers:i}).then((function(e){return e.json().then((function(t){return{response:e,data:t}}))}))}))},{key:"setCookie",value:function(e,t,s){return document.cookie="".concat(e,"=").concat(t,";path=/;max-age=").concat(s),Promise.resolve()}},{key:"getCookie",value:function(e){var t=document.cookie.match(new RegExp("(?:^| )".concat(e,"=([^;]*)")));return Promise.resolve(t?t[1]:void 0)}},{key:"loadRequestFromUri",value:function(){var e=mn()(window.location.href).fragment();e&&this.requests.loadId(e,!1)}},{key:"startPollingRequests",value:function(){var e=this;this.pollingInterval=1e3,this.requests.loadLatest().then((function(){var t;if(!(e.lastPolledId=null===(t=e.requests.last())||void 0===t?void 0:t.id))throw new Error;e.pollRequests()})).catch((function(t){"requires-authentication"==t.error?e.authentication.request(t.message,t.requires).then((function(){e.startPollingRequests()})):setTimeout((function(){return e.startPollingRequests()}),e.pollingInterval)}))}},{key:"pollRequests",value:function(){var e,t=this;clearTimeout(this.pollTimeout),this.requests.loadNext(null,(null===(e=this.requests.last())||void 0===e?void 0:e.id)||this.lastPolledId).then((function(e){var s;if(!t.settings.global.preserveLog){var a=t.requests.last((function(e){return e.isRequest()&&!e.isAjax()})),i=t.requests.all().indexOf(a);t.requests.setItems(t.requests.all().slice(i))}t.lastPolledId=(null===(s=t.requests.last())||void 0===s?void 0:s.id)||t.lastPolledId,t.pollTimeout=setTimeout((function(){return t.pollRequests()}),t.updatePollingInterval(e.length))})).catch((function(){t.pollTimeout=setTimeout((function(){return t.pollRequests()}),t.updatePollingInterval(!1))}))}},{key:"throttlePolling",value:function(){var e=this;document.addEventListener("visibilitychange",(function(){e.pollingInterval=document.hidden?6e4:1e3,document.hidden||e.pollRequests()}))}},{key:"updatePollingInterval",value:function(e){var t=(new Date).getTime();return!e&&this.pollingLastReceived||(this.pollingLastReceived=t),t-this.pollingLastReceived>6e4?this.pollingInterval=5e3:t-this.pollingLastReceived>3e4?this.pollingInterval=2500:this.pollingInterval=1e3}},{key:"hasFeature",value:function(e){var t=["delete-shared","details-request"];return!t.includes(e)}},{key:"settingsChanged",value:function(){this.settings.global.metadataPath&&this.setMetadataUrl()}}]),e}(),wn=function(){function e(){Object(tt["a"])(this,e)}return Object(st["a"])(e,[{key:"init",value:function(e){this.global=e,this.requests=e.$requests,this.settings=e.$settings,this.useProperTheme(),this.setMetadataUrl("/data/"),this.setMetadataClient(),this.loadRequestFromUri(),this.isTakingScreenshot=Object.keys(mn()(window.location.href).query(!0)).includes("screenshot")}},{key:"loadRequest",value:function(e){this.requests.clear(),this.requests.loadId(e)}},{key:"useProperTheme",value:function(){window.matchMedia("(prefers-color-scheme: dark)").matches&&(this.settings.defaultAppearance="dark")}},{key:"setMetadataUrl",value:function(e){this.requests.setRemote(mn()(e).path("").toString(),{path:mn()(e).path()+"/"})}},{key:"setMetadataClient",value:function(){var e=this;this.requests.setClient((function(t,s,i,n){var r=new FormData;return Object.entries(i).forEach((function(e){var t=Object(a["a"])(e,2),s=t[0],i=t[1];return r.append(s,i)})),e.fetch(t,s,i,n).then((function(e){var t=e.response,s=e.data;if(403==t.status)throw{error:"requires-authentication",message:s.message,requires:s.requires};if(200!=t.status)throw{error:"error-response",message:"Server returned an error response."};if(!(s instanceof Object)||!Object.keys(s).length)throw{error:"empty-response",message:"Server returned an empty metadata."};return s}))}))}},{key:"fetch",value:function(e){function t(t,s){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e,t){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=new FormData;return Object.entries(s).forEach((function(e){var t=Object(a["a"])(e,2),s=t[0],i=t[1];return n.append(s,i)})),fetch(t,{method:e,body:Object.keys(s).length?n:null,headers:i}).then((function(e){return e.json().then((function(t){return{response:e,data:t}}))})).catch((function(e){throw{error:"empty-response",message:"Shared request was not found."}}))}))},{key:"setCookie",value:function(e,t,s){return document.cookie="".concat(e,"=").concat(t,";path=/;max-age=").concat(s),Promise.resolve()}},{key:"getCookie",value:function(e){var t=document.cookie.match(new RegExp("(?:^| )".concat(e,"=([^;]*)")));return Promise.resolve(t?t.groups[0]:void 0)}},{key:"loadRequestFromUri",value:function(){var e=mn()(window.location.href).path().split("/").slice(-1)[0];this.requests.loadId("".concat(e,".json"),!1)}},{key:"hasFeature",value:function(e){var t=["load-client-metrics","profiler","requests-list","sharing","whats-new"];return t=this.isTakingScreenshot?[].concat(Object(ts["a"])(t),["request-sidebar","tab-bar"]):[].concat(Object(ts["a"])(t),["details-request"]),!t.includes(e)}},{key:"settingsChanged",value:function(){}}]),e}(),_n=function(){function e(t){Object(tt["a"])(this,e),this.requests=t,this.username=this.password="",this.shown=!1,this.failed=!1,this.requires=[]}return Object(st["a"])(e,[{key:"attempt",value:function(){var e=this,t={username:this.username,password:this.password};return this.username=this.password="",this.failed=!1,this.requests.client("POST","".concat(this.requests.remoteUrl,"auth"),t).then((function(t){e.shown=!1,e.requests.setAuthenticationToken(t.token),e.requests.items.forEach((function(t){if(t.error&&"requires-authentication"==t.error.error)return e.requests.loadId(t.id)})),e.accept()})).catch((function(t){e.failed=!0}))}},{key:"request",value:function(e,t){var s=this;return this.shown=!0,this.requires=t,this.message=e,new Promise((function(e,t){s.accept=e,s.reject=t}))}}]),e}(),yn=function(){function e(t){Object(tt["a"])(this,e),this.platform=t,this.shown=!1,this.loaded=!1,this.version="5.1.0",this.credits={app:{contributors:[],dependencies:[],sponsors:[]},php:{contributors:[],dependencies:[],sponsors:[]}},this.authors=[{name:"its",avatarUrl:"https://avatars.githubusercontent.com/u/821582?v=3",twitterUrl:"https://twitter.com/itsgoingd",githubUrl:"https://github.com/itsgoingd",sponsorUrl:"https://github.com/sponsors/itsgoingd"}]}return Object(st["a"])(e,[{key:"toggle",value:function(){this.shown=!this.shown,this.load()}},{key:"load",value:function(){var e=this;if(!this.loaded){var t=["app","php"],s=["contributors","dependencies","sponsors"],a=[];t.forEach((function(t){s.forEach((function(s){a.push(e.platform.fetch("GET","".concat("https://meta.underground.works","/clockwork-").concat(t,"/").concat(s,".json")).then((function(a){var i=a.data;return e.credits[t][s]=i})))}))})),Promise.all(a).then((function(){return e.loaded=!0}))}}}]),e}(),Cn=function(){function e(t){Object(tt["a"])(this,e),this.settings=t}return Object(st["a"])(e,[{key:"register",value:function(){yt["a"].filter("editorLink",this.filter())}},{key:"filter",value:function(){var e=this;return function(t,s){var a={atom:function(e,t){return"atom://open?url=file://".concat(e,"&line=").concat(t)},phpstorm:function(e,t){return"phpstorm://open?file=".concat(e,"&line=").concat(t)},sublime:function(e,t){return"subl://open?url=file://".concat(e,"&line=").concat(t)},textmate:function(e,t){return"txmt://open?url=file://".concat(e,"&line=").concat(t)},"vs-code":function(e,t){return"vscode://file/".concat(e,":").concat(t)}},i=e.settings.global.editor;if(i&&a[i])return t&&e.settings.site.localPathMap.real&&(t=t.replace(e.settings.site.localPathMap.real,e.settings.site.localPathMap.local)),a[i](t,s)}}}]),e}(),qn=function(){function e(){Object(tt["a"])(this,e),this.backend=null,this.isLocalStorageAvailable()?this.backend="local-storage":this.isBrowserStorageAvailable()&&(this.backend="browser-storage"),this.persistent=!!this.backend,this.data=null,this.load()}return Object(st["a"])(e,[{key:"get",value:function(){var e=Object(te["a"])(regeneratorRuntime.mark((function e(t,s){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.load();case 2:if(void 0!=this.data[t]){e.next=5;break}return e.next=5,this.set(t,s);case 5:return e.abrupt("return",this.data[t]);case 6:case"end":return e.stop()}}),e,this)})));function t(t,s){return e.apply(this,arguments)}return t}()},{key:"set",value:function(){var e=Object(te["a"])(regeneratorRuntime.mark((function e(t,s){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.load();case 2:this.data[t]=s,this.save();case 4:case"end":return e.stop()}}),e,this)})));function t(t,s){return e.apply(this,arguments)}return t}()},{key:"load",value:function(){var e=this;return this.data?Promise.resolve():new Promise((function(t){"local-storage"==e.backend?e.loaded(t,localStorage.getItem("clockwork")):"browser-storage"==e.backend?(window.browser||window.chrome).storage.local.get(["clockwork"],(function(s){e.loaded(t,s.clockwork)})):e.loaded(t)}))}},{key:"loaded",value:function(e,t){try{this.data=JSON.parse(t)}catch(s){}this.data=this.data instanceof Object?this.data:{},e()}},{key:"save",value:function(){if("local-storage"==this.backend)try{localStorage.setItem("clockwork",JSON.stringify(this.data))}catch(e){}else"browser-storage"==this.backend&&(window.browser||window.chrome).storage.local.set({clockwork:JSON.stringify(this.data)})}},{key:"isLocalStorageAvailable",value:function(){try{localStorage}catch(e){return!1}return!0}},{key:"isBrowserStorageAvailable",value:function(){return window.browser&&browser.storage||window.chrome&&chrome.storage}}]),e}(),$n=function(){function e(t,s){Object(tt["a"])(this,e),this.platform=t,this.settings=s,this.enabled=!1,this.cookieLifetime=60}return Object(st["a"])(e,[{key:"enableProfiling",value:function(){var e=this;this.enabled=!0,this.platform.setCookie("clockwork-profile",this.settings.site.onDemandSecret,this.cookieLifetime),clearTimeout(this.timeout),this.timeout=setTimeout((function(){e.enabled&&e.enableProfiling()}),1e3*this.cookieLifetime)}},{key:"disableProfiling",value:function(){this.enabled=!1,clearTimeout(this.timeout)}}]),e}(),kn=(s("2ca0"),s("cb29"),function(){function e(t,s){Object(tt["a"])(this,e),this.metadata=t,this.functions=s}return Object(st["a"])(e,null,[{key:"parse",value:function(t){return new Promise((function(s,a){s(e.parseSync(t))}))}},{key:"parseSync",value:function(t){var s=this,i={},n=[],r={},o={};t=t.split("\n");var l,c,u,d,h=0;while(void 0!==(l=t[h++]))l.startsWith("fl=")?function(){var e=s.resolveCompressedName(l.match(/fl=(.+)/)[0],r),i=Object(a["a"])(e,2),c=(i[0],i[1]);l=t[h++];var d=s.resolveCompressedName(l.match(/fn=(.+)/)[0],o),v=Object(a["a"])(d,2),f=v[0],m=v[1];l=t[h++];var p=l.split(" ").map((function(e){return parseFloat(e)})),g=p.shift();u=n[f],u||(n[f]=u={name:m,file:c,line:g,invocations:0,self:new Array(p.length).fill(0),inclusive:new Array(p.length).fill(0),callers:[],subCalls:[]}),u.invocations++,u.self=u.self.map((function(e,t){return e+p[t]})),u.inclusive=u.inclusive.map((function(e,t){return e+p[t]}))}():l.startsWith("cfn=")?function(){var e=s.resolveCompressedName(l.match(/cfn=(.+)/)[0],o),i=Object(a["a"])(e,2),r=i[0],c=i[1];l=t[h++],l=t[h++];var v=l.split(" ").map((function(e){return parseFloat(e)})),f=v.shift(),m=n[r];u.inclusive=v.map((function(e,t){return e+(u.inclusive[t]||0)}));var p=m.callers[d];p||(m.callers[d]=p={name:u.name,line:f,calls:0,summed:new Array(v.length).fill(0)}),p.calls++,p.summed=p.summed.map((function(e,t){return e+v[t]}));var g=u.subCalls[r];g||(u.subCalls[r]=g={name:c,line:f,calls:0,summed:new Array(v.length).fill(0)}),g.calls++,g.summed=g.summed.map((function(e,t){return e+v[t]}))}():(c=l.match(/^(.+?): (.+)/))&&(i[c[1]]=c[2]);return new e(i,n.slice(1))}},{key:"resolveCompressedName",value:function(e,t){var s=e.match(/\((\d+)\)(?: (.*))?/),i=Object(a["a"])(s,3),n=(i[0],i[1]),r=i[2];return r&&(t[n]=r),[n,t[n]]}}]),e}()),xn=function(){function e(t,s){var a=this;Object(tt["a"])(this,e),this.requests=t,this.platform=s,this.available=!1,this.loading=!1,this.parsing=!1,this.ready=!1,this.isProfiling=!1,this.metric=0,this.percentual=!1,this.shownFraction=.9,this.request=void 0,this.functions=[],this.platform.getCookie("XDEBUG_PROFILE").then((function(e){return a.isProfiling=e}))}return Object(st["a"])(e,[{key:"enableProfiling",value:function(){var e=this;return this.platform.setCookie("XDEBUG_PROFILE","1",2592e3).then((function(){e.isProfiling=!0}))}},{key:"disableProfiling",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],s=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t&&this.clear(),this.platform.setCookie("XDEBUG_PROFILE","0",0).then((function(){s||(e.isProfiling=!1)}))}},{key:"withoutProfiling",value:function(e){if(!this.isProfiling)return e();this.disableProfiling(!1,!0);var t=e();return this.enableProfiling(),t}},{key:"loadRequest",value:function(e){var t=this;if(!this.request||this.request.id!=e.id){if(!e.xdebug||!e.xdebug.profile)return this.clear();if(this.request=e,this.available=this.loading=this.parsing=this.ready=!1,this.summary=this.metadata=this.functions=[],this.available=!0,e.xdebug.profileData)return this.parseProfile();this.loading=!0,this.requests.loadExtended(e.id,["xdebug"]).then((function(e){t.loading=!1,t.parseProfile()}))}}},{key:"parseProfile",value:function(){var e=this;if(!this.request.xdebug.profileData)return this.available=!1;this.ready=!1,this.parsing=!0,kn.parse(this.request.xdebug.profileData).then((function(t){if(!t.metadata.summary)return e.parsing=e.available=!1;e.metadata=t.metadata,e.summary=e.metadata.summary.split(" ");var s=e.metadata.events.includes("Time_(10ns)");e.functionsAll=t.functions.filter((function(e){return"{main}"!=e.name})).map((function(e){return e.selfAll=e.self,e.inclusiveAll=e.inclusive,e.fullPath="php:internal"==e.file?"internal":"".concat(e.file,":").concat(e.line),e.shortPath="internal"!=e.fullPath?e.fullPath.split(/[\/\\]/).pop():e.fullPath,s&&(e.selfAll[0]=e.selfAll[0]/100,e.inclusiveAll[0]=e.inclusiveAll[0]/100),e})),e.presentProfile(),e.parsing=!1,e.ready=!0}))}},{key:"presentProfile",value:function(){var e=this,t=this.shownFraction*this.summary[this.metric];this.functions=this.functionsAll.filter((function(s){return t-=s.selfAll[e.metric],t>0})).map((function(t){return t.self=e.percentual?t.selfAll[e.metric]/e.summary[e.metric]*100:t.selfAll[e.metric],t.inclusive=e.percentual?t.inclusiveAll[e.metric]/e.summary[e.metric]*100:t.inclusiveAll[e.metric],t}))}},{key:"clear",value:function(){this.available=this.loading=this.parsing=this.ready=!1,this.summary=this.metadata=this.functions=[],this.request=void 0}},{key:"showMetric",value:function(e){this.metric=e,this.presentProfile()}},{key:"showPercentual",value:function(e){this.percentual=!0===e||void 0===e,this.presentProfile()}},{key:"setShownFraction",value:function(e){this.shownFraction=e,this.presentProfile()}},{key:"formatMetric",value:function(e){return this.percentual?Math.round(e)+" %":1==this.metric?Math.round(e/1024)+" kB":Math.round(e/100)/10+" ms"}}]),e}(),Tn=function(){function e(){Object(tt["a"])(this,e),this.settings=null,this.items=[],this.query={},this.exclusive={}}return Object(st["a"])(e,[{key:"all",value:function(){return this.items}},{key:"findId",value:function(e){return this.items.find((function(t){return t.id==e}))}},{key:"loadId",value:function(e,t,s){var a=this,i=this.findId(e);return i?s=i:!1!==s&&(s=s||pn.placeholder(e),this.items.push(s)),s&&!t&&(s.loading=!0),this.withQuery(t?{only:t.join(",")}:{},(function(){return a.load(e,(function(e){return e.then((function(e){return s?s.resolve(e[0],t):a.items.push(e[0]),t||a.sort(),s||e[0]})).catch((function(e){s&&s.resolveWithError(e)}))}))}))}},{key:"loadExtended",value:function(e,t){var s=this,a=this.findId(e);return this.withQuery(t?{only:t.join(",")}:{},(function(){return s.load("".concat(e,"/extended"),(function(e){return e.then((function(e){return a.resolve(e[0],t)})).catch((function(e){}))}))}))}},{key:"loadLatest",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.load("latest",(function(s){return s.then((function(s){return t&&e.merge(s),s[0]}))}),t)}},{key:"returnLatest",value:function(){return this.loadLatest(!1)}},{key:"loadNext",value:function(e,t){var s,a=this,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return t=t||(null===(s=this.last((function(e){return!e.loading})))||void 0===s?void 0:s.id),t?this.load("".concat(t,"/next")+(e?"/".concat(e):""),(function(e){return e.then((function(e){return i&&a.merge(e),e})).catch((function(e){}))}),i):Promise.resolve([])}},{key:"returnNext",value:function(e,t){return this.loadNext(e,t,!1)}},{key:"loadPrevious",value:function(e,t){var s=this,a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return t||this.items.length?(t=t||this.first((function(e){return!e.loading})).id,this.load("".concat(t,"/previous")+(e?"/".concat(e):""),(function(e){return e.then((function(e){return a&&s.merge(e),e})).catch((function(e){}))}),a)):Promise.resolve([])}},{key:"returnPrevious",value:function(e,t){return this.loadPrevious(e,t,!1)}},{key:"clear",value:function(){this.items.splice(0)}},{key:"merge",value:function(e){var t=this;e=e.filter((function(e){return!t.findId(e.id)})),e.length&&(this.items=this.items.concat(e),this.sort())}},{key:"sort",value:function(){this.items=this.items.sort((function(e,t){return e.time-t.time}))}},{key:"first",value:function(e){return e?this.items.find(e):this.items[0]}},{key:"last",value:function(e){return e?this.items.slice().reverse().find(e):this.items[this.items.length-1]}},{key:"setClient",value:function(e){this.client=e}},{key:"setItems",value:function(e){this.items=e}},{key:"setRemote",value:function(e,t){t=t||{},t.path=t.path||"/__clockwork/",e=new mn.a(e);var s=t.path.split("?"),i=Object(a["a"])(s,2),n=i[0],r=i[1];e.pathname(n||""),e.query(r||""),e.hash(""),this.remoteUrl=e.toString(),this.remoteHeaders=t.headers||{}}},{key:"setAuthenticationToken",value:function(e){this.settings.site.authToken=e,this.settings.save()}},{key:"setQuery",value:function(e){this.query=e}},{key:"withQuery",value:function(e,t){var s=this.query;this.query=e;var a=t();return this.query=s,a}},{key:"load",value:function(e,t){var s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(s)return this.loadExclusive(e,t);var a=mn()("".concat(this.remoteUrl).concat(e)).addQuery(this.query).toString(),i=Object.assign({},this.remoteHeaders,{"X-Clockwork-Auth":this.settings.site.authToken});return t(this.client("GET",a,{},i).then((function(e){return e?(e instanceof Array?e:[e]).map((function(e){return new pn(e)})):[]})))}},{key:"loadExclusive",value:function(e,t){var s=this;return this.exclusive[e]?this.exclusive[e]:this.exclusive[e]=this.load(e,t).finally((function(){return s.exclusive[e]=null}))}}]),e}(),Sn=s("5530"),jn=(s("841c"),function(){function e(t){var s=this;Object(tt["a"])(this,e),this.requests=t,this.tags=[{tag:"controller"},{tag:"method",validate:function(e){return["get","post","put","patch","delete","head"].includes(e)}},{tag:"status",validate:function(e){return e>=100&&e<600}},{tag:"time"},{tag:"received",validate:function(e){return new Date(e)}},{tag:"type",validate:function(e){return["command","queue-job","request"].includes(e)}}],this.shown=!1,this.input="",this.searchDebounced=Ie()((function(){return s.search()}),500)}return Object(st["a"])(e,[{key:"toggle",value:function(){this.shown=!this.shown,this.shown?yt["a"].nextTick((function(){return document.querySelector(".requests-search input").focus()})):(this.input="",this.search())}},{key:"search",value:function(){var e=this,t=this.tokenize(this.input),s=t.terms,i=t.tags;i=Object.entries(i).filter((function(t){var s=Object(a["a"])(t,2),i=s[0],n=s[1];return i=e.tags.find((function(e){return e.tag==i})),i&&(!i.validate||n.every((function(e){return i.validate(e)})))})).reduce((function(e,t){var s=Object(a["a"])(t,2),i=s[0],n=s[1];return e["".concat(i,"[]")]=n,e}),{}),this.requests.setQuery(s.length||Object.keys(i).length?Object(Sn["a"])({"uri[]":s,"name[]":s},i):{}),this.requests.returnLatest().then((function(t){e.requests.returnPrevious(9,t.id).then((function(s){e.requests.setItems(s?[].concat(Object(ts["a"])(s),[t]):[t])}))})).catch((function(){e.requests.clear()}))}},{key:"tokenize",value:function(e){var t,s=[],a={},i=/(\w+:)?("[^"]*"|[^\s]+)/g;while(t=i.exec(e)){var n=t[1]?t[1].substr(0,t[1].length-1):void 0,r=t[2];(t=r.match(/^"(.+?)"$/))&&(r=t[1]),n?(a[n]||(a[n]=[]),a[n].push(r)):s.push(r)}return{terms:s,tags:a}}}]),e}()),On=s("5c9a"),Pn=s.n(On),Dn=function(){function e(t,s,a){Object(tt["a"])(this,e),this.store=t,this.requests=s,this.platform=a,this.requests.settings=this,this.shown=!1,this.loaded=!1,this.settings=this.defaults(),this.defaultAppearance="light",this.load()}return Object(st["a"])(e,[{key:"global",get:function(){return this.settings.global}},{key:"site",get:function(){return this.settings.site[this.requests.remoteUrl]||(this.settings.site[this.requests.remoteUrl]=oa()(!0,{},this.defaults().site)),this.settings.site[this.requests.remoteUrl]}},{key:"persistent",get:function(){return this.store.persistent}},{key:"appearance",get:function(){return"auto"!=this.global.appearance?this.global.appearance:this.defaultAppearance}},{key:"toggle",value:function(){this.shown=!this.shown}},{key:"save",value:function(){this.store.set("settings",this.settings),this.platform.settingsChanged()}},{key:"load",value:function(){var e=Object(te["a"])(regeneratorRuntime.mark((function e(){var t,s;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=this.defaults(),e.next=3,this.store.get("settings",{});case 3:s=e.sent,this.settings={global:oa()(!0,t.global,s.global||{}),site:Pn()(s.site||{},(function(e){return oa()(!0,{},t.site,e||{})}))},this.loaded=!0,this.platform.settingsChanged();case 7:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"defaults",value:function(){return{global:{appearance:"auto",databasePrettified:!1,editor:null,showIncomingRequests:!0,hideCommandTypeRequests:this.platform instanceof gn,hideQueueJobTypeRequests:this.platform instanceof gn,hideTestTypeRequests:this.platform instanceof gn,ignoredUpdateNotifications:{},metadataPath:null,performanceVitalsInfoShown:!0,preserveLog:!0,requestsListCollapsed:!1,requestSidebarCollapsed:!1,requestSidebarCollapsedSections:{headers:!1,data:!1,getData:!1,postData:!1,cookies:!1,middleware:!1,session:!1,arguments:!1,options:!1,payload:!1,queue:!1,connection:!1,asserts:!1},seenReleaseNotesVersion:null,shareTermsAccepted:!1,timelineCondensed:{performance:!0,views:!1},timelineHiddenTags:{}},site:{localPathMap:{real:null,local:null},onDemandSecret:null}}}}]),e}(),Rn=function(){function e(t,s){Object(tt["a"])(this,e),this.$platform=t,this.$settings=s,this.shown=!1,this.shownDelete=!1,this.inProgress=!1}return Object(st["a"])(e,[{key:"termsAccepted",get:function(){return this.$settings.global.shareTermsAccepted}},{key:"acceptTerms",value:function(){this.$settings.global.shareTermsAccepted=!0,this.$settings.save()}},{key:"toggle",value:function(){this.shown=!this.shown}},{key:"toggleDelete",value:function(){this.shownDelete=!this.shownDelete}},{key:"clear",value:function(e){e.shareId=e.shareUrl=e.shareImageUrl=null}},{key:"share",value:function(e,t){var s=this;return e.shareUrl?Promise.resolve():(this.inProgress=!0,this.$platform.fetch("POST","https://clockwork.underground.works/ingest",{data:this.resolveSharedData(e,t)}).then((function(t){var a=t.response,i=t.data;return s.inProgress=!1,500==a.status?{error:"server-error"}:(e.shareId=i.shareId,e.shareUrl=i.shareUrl,e.shareImageUrl=i.shareImageUrl,i)})).catch((function(){return s.inProgress=!1,{error:"server-error"}})))}},{key:"resolveSharedData",value:function(e,t){var s=an()(e.original);return t.log||(s.log=[]),t.events||(s.events=[]),t.models||(s.modelsActions=[],s.modelsRetrieved=s.modelsCreated=s.modelsUpdated=s.modelsDeleted=void 0),t.database||(s.databaseQueries=[],s.databaseQueriesCount=s.databaseSlowQueries=s.databaseSelects=s.databaseInserts=s.databaseUpdates=s.databaseDeletes=s.databaseOthers=void 0),t.cache||(s.cacheQueries=[],s.cacheReads=s.cacheHits=s.cacheWrites=s.cacheDeletes=void 0),t.redis||(s.redisCommands=[]),t.queue||(s.queueJobs=[]),t.views||(s.viewsData=[]),t.notifications||(s.notifications=s.emailsData=[]),t.routes||(s.routes=[]),t.output||(s.commandOutput=void 0),t.userData||(s.userData=[]),JSON.stringify(s)}},{key:"deleteShared",value:function(){mn()(window.location.href).path().split("/").slice(-1)[0];return this.$platform.fetch("POST",window.location,{_method:"delete"})}}]),e}(),En=(s("b680"),function(){function e(){Object(tt["a"])(this,e)}return Object(st["a"])(e,[{key:"register",value:function(){yt["a"].filter("date",this.date),yt["a"].filter("join",this.join),yt["a"].filter("round",this.round),yt["a"].filter("shortClass",this.shortClass),yt["a"].filter("title",this.title)}},{key:"date",value:function(e,t){return Object(bt["a"])(new Date(e),t)}},{key:"join",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:", ";return e instanceof Array?e.join(t):e}},{key:"round",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return parseFloat(parseFloat(e).toFixed(t))}},{key:"shortClass",value:function(e){return e?e.split("\\").pop():""}},{key:"title",value:function(e){return"string"!=typeof e?e:e.replace(/(\w)([A-Z])/,"$1 $2").split(" ").map((function(e){return e[0].toUpperCase()+e.substr(1).toLowerCase()})).join(" ")}}]),e}()),Nn=function(){function e(t){Object(tt["a"])(this,e),this.settings=t,this.serverVersion=null}return Object(st["a"])(e,[{key:"ignoredUpdates",get:function(){return this.settings.global.ignoredUpdateNotifications||{}}},{key:"latest",value:function(){return{version:"4.1.2",url:"https://underground.works/blog/clockwork-4.1-released-with-commands-queue-jobs-tests-profiling-and-more"}}},{key:"show",value:function(e){if(!this.ignoresUpdate(e)&&this.serverVersion)return 1==this.versionCompare(this.latest().version,this.serverVersion)?{version:this.latest().version,url:this.latest().url,currentVersion:this.serverVersion}:void 0}},{key:"ignoresUpdate",value:function(e){var t=this.ignoredUpdates[e];return t&&this.versionCompare(t,this.latest().version)>=0}},{key:"ignoreUpdate",value:function(e){var t=this.ignoredUpdates;t[e]=this.latest().version,this.store.set("update-notification.ignored-updates",t)}},{key:"versionCompare",value:function(e,t){e=e.split(".").map((function(e){return parseInt(e)})),t=t.split(".").map((function(e){return parseInt(e)}));for(var s=0;st[s])return 1;if(!e[s]&&t[s]||e[s]1))break;n.splice(0,1)}a[s]=n.join("")}var l=-1,u=0,f=0,d=-1,p=!1;for(s=0;su&&(l=d,u=f)):"0"===a[s]&&(p=!0,d=s,f=1);f>u&&(l=d,u=f),u>1&&a.splice(l,u,""),i=a.length;var h="";for(""===a[0]&&(h=":"),s=0;s1?p(t):t.charCodeAt(0)).toString(16).toUpperCase()+";"}function m(t,e){return function(n){return n.replace(e,(function(e){return t[e]})).replace(d,h)}}var v=new RegExp(o.source+"|"+d.source,"g");function g(t){return t.replace(v,h)}function b(t){return t.replace(o,h)}function y(t){return function(e){return e.replace(v,(function(e){return t[e]||h(e)}))}}e.escape=g,e.escapeUTF8=b},"057f":function(t,e,n){var r=n("fc6a"),a=n("241c").f,i={}.toString,o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(t){try{return a(t)}catch(e){return o.slice()}};t.exports.f=function(t){return o&&"[object Window]"==i.call(t)?s(t):a(r(t))}},"06c5":function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));n("fb6a"),n("d3b7"),n("b0c0"),n("a630"),n("3ca3");var r=n("6b75");function a(t,e){if(t){if("string"===typeof t)return Object(r["a"])(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r["a"])(t,e):void 0}}},"06cf":function(t,e,n){var r=n("83ab"),a=n("d1e7"),i=n("5c6c"),o=n("fc6a"),s=n("c04e"),c=n("5135"),l=n("0cfb"),u=Object.getOwnPropertyDescriptor;e.f=r?u:function(t,e){if(t=o(t),e=s(e,!0),l)try{return u(t,e)}catch(n){}if(c(t,e))return i(!a.f.call(t,e),t[e])}},"07ac":function(t,e,n){var r=n("23e7"),a=n("6f53").values;r({target:"Object",stat:!0},{values:function(t){return a(t)}})},"0b07":function(t,e,n){var r=n("34ac"),a=n("3698");function i(t,e){var n=a(t,e);return r(n)?n:void 0}t.exports=i},"0cb2":function(t,e,n){var r=n("7b0b"),a=Math.floor,i="".replace,o=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,s=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,n,c,l,u){var f=n+t.length,d=c.length,p=s;return void 0!==l&&(l=r(l),p=o),i.call(u,p,(function(r,i){var o;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,n);case"'":return e.slice(f);case"<":o=l[i.slice(1,-1)];break;default:var s=+i;if(0===s)return r;if(s>d){var u=a(s/10);return 0===u?r:u<=d?void 0===c[u-1]?i.charAt(1):c[u-1]+i.charAt(1):r}o=c[s-1]}return void 0===o?"":o}))}},"0cfb":function(t,e,n){var r=n("83ab"),a=n("d039"),i=n("cc12");t.exports=!r&&!a((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},"0fa7":function(t,e,n){"use strict";e.__esModule=!0;var r=n("bcb5"),a=p(r),i=n("f02d"),o=p(i),s=n("9f3d"),c=p(s),l=n("a733"),u=p(l),f=n("a096"),d=p(f);function p(t){return t&&t.__esModule?t:{default:t}}var h={HTML5NamedCharRefs:a.default,EntityParser:o.default,EventedTokenizer:c.default,Tokenizer:u.default,tokenize:d.default};e.default=h},"107c":function(t,e,n){var r=n("d039");t.exports=r((function(){var t=RegExp("(?b)","string".charAt(5));return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$c")}))},1148:function(t,e,n){"use strict";var r=n("a691"),a=n("1d80");t.exports=function(t){var e=String(a(this)),n="",i=r(t);if(i<0||i==1/0)throw RangeError("Wrong number of repetitions");for(;i>0;(i>>>=1)&&(e+=e))1&i&&(n+=e);return n}},1160:function(t,e){function n(t){if("function"==typeof t)return t;var e=Array.isArray(t)?[]:{};for(var a in t){var i=t[a],o={}.toString.call(i).slice(8,-1);e[a]="Array"==o||"Object"==o?n(i):"Date"==o?new Date(i.getTime()):"RegExp"==o?RegExp(i.source,r(i)):i}return e}function r(t){if("string"==typeof t.source.flags)return t.source.flags;var e=[];return t.global&&e.push("g"),t.ignoreCase&&e.push("i"),t.multiline&&e.push("m"),t.sticky&&e.push("y"),t.unicode&&e.push("u"),e.join("")}t.exports=n},1212:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n("fd3a"),a=n("8c86");function i(t,e){Object(a["a"])(2,arguments);var n=Object(r["a"])(t),i=Object(r["a"])(e);return n.getTime()>i.getTime()}},1276:function(t,e,n){"use strict";var r=n("d784"),a=n("44e7"),i=n("825a"),o=n("1d80"),s=n("4840"),c=n("8aa5"),l=n("50c4"),u=n("14c3"),f=n("9263"),d=n("9f7f"),p=n("d039"),h=d.UNSUPPORTED_Y,m=[].push,v=Math.min,g=4294967295,b=!p((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));r("split",(function(t,e,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,n){var r=String(o(this)),i=void 0===n?g:n>>>0;if(0===i)return[];if(void 0===t)return[r];if(!a(t))return e.call(r,t,i);var s,c,l,u=[],d=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),p=0,h=new RegExp(t.source,d+"g");while(s=f.call(h,r)){if(c=h.lastIndex,c>p&&(u.push(r.slice(p,s.index)),s.length>1&&s.index=i))break;h.lastIndex===s.index&&h.lastIndex++}return p===r.length?!l&&h.test("")||u.push(""):u.push(r.slice(p)),u.length>i?u.slice(0,i):u}:"0".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:e.call(this,t,n)}:e,[function(e,n){var a=o(this),i=void 0==e?void 0:e[t];return void 0!==i?i.call(e,a,n):r.call(String(a),e,n)},function(t,a){var o=n(r,this,t,a,r!==e);if(o.done)return o.value;var f=i(this),d=String(t),p=s(f,RegExp),m=f.unicode,b=(f.ignoreCase?"i":"")+(f.multiline?"m":"")+(f.unicode?"u":"")+(h?"g":"y"),y=new p(h?"^(?:"+f.source+")":f,b),E=void 0===a?g:a>>>0;if(0===E)return[];if(0===d.length)return null===u(y,d)?[d]:[];var w=0,k=0,T=[];while(k|>>|<<|==|<=|>=|!<|!>|\|\|\/|\|\/|\|\||~~\*|~~|!~~\*|!~~|~\*|!~\*|!~|:=|&&|@>|<@|#-|@|.)/u,this.NO_SPACE_OPERATOR_REGEX=/^(::|->>|->|#>>|#>)/u,this.BLOCK_COMMENT_REGEX=/^(\/\*[^]*?(?:\*\/|$))/u,this.LINE_COMMENT_REGEX=this.createLineCommentRegex(t.lineCommentTypes),this.RESERVED_TOP_LEVEL_REGEX=this.createReservedWordRegex(t.reservedTopLevelWords),this.RESERVED_TOP_LEVEL_NO_INDENT_REGEX=this.createReservedWordRegex(t.reservedTopLevelWordsNoIndent),this.RESERVED_NEWLINE_REGEX=this.createReservedWordRegex(t.reservedNewlineWords),this.RESERVED_PLAIN_REGEX=this.createReservedWordRegex(t.reservedWords),this.WORD_REGEX=this.createWordRegex(t.specialWordChars),this.STRING_REGEX=this.createStringRegex(t.stringTypes),this.OPEN_PAREN_REGEX=this.createParenRegex(t.openParens),this.CLOSE_PAREN_REGEX=this.createParenRegex(t.closeParens),this.INDEXED_PLACEHOLDER_REGEX=this.createPlaceholderRegex(t.indexedPlaceholderTypes,"[0-9]*"),this.IDENT_NAMED_PLACEHOLDER_REGEX=this.createPlaceholderRegex(t.namedPlaceholderTypes,"[a-zA-Z0-9._$]+"),this.STRING_NAMED_PLACEHOLDER_REGEX=this.createPlaceholderRegex(t.namedPlaceholderTypes,this.createStringPattern(t.stringTypes))}return t.prototype.createLineCommentRegex=function(t){return new RegExp("^((?:"+t.map((function(t){return a["default"](t)})).join("|")+")[^>]*?(?:\r\n|\r|\n|$))","u")},t.prototype.createReservedWordRegex=function(t){var e=t.join("|").replace(/ /gu,"\\s+");return new RegExp("^("+e+")\\b","iu")},t.prototype.createWordRegex=function(t){return new RegExp("^([\\p{Alphabetic}\\p{Mark}\\p{Decimal_Number}\\p{Connector_Punctuation}\\p{Join_Control}"+t.join("")+"]+)","u")},t.prototype.createStringRegex=function(t){return new RegExp("^("+this.createStringPattern(t)+")","u")},t.prototype.createStringPattern=function(t){var e={"``":"((`[^`]*($|`))+)","[]":"((\\[[^\\]]*($|\\]))(\\][^\\]]*($|\\]))*)",'""':'(("[^"\\\\]*(?:\\\\.[^"\\\\]*)*("|$))+)',"''":"(('[^'\\\\]*(?:\\\\.[^'\\\\]*)*('|$))+)","N''":"((N'[^N'\\\\]*(?:\\\\.[^N'\\\\]*)*('|$))+)"};return t.map((function(t){return e[t]})).join("|")},t.prototype.createParenRegex=function(t){var e=this;return new RegExp("^("+t.map((function(t){return e.escapeParen(t)})).join("|")+")","iu")},t.prototype.escapeParen=function(t){return 1===t.length?a["default"](t):"\\b"+t+"\\b"},t.prototype.createPlaceholderRegex=function(t,e){if(!t||0===t.length)return null;var n=t.map(a["default"]).join("|");return new RegExp("^((?:"+n+")(?:"+e+"))","u")},t.prototype.tokenize=function(t){if(!t)return[];var e,n=[];while(t.length)e=this.getNextToken(t,e),t=t.substring(e.value.length),n.push(e);return n},t.prototype.getNextToken=function(t,e){return this.getWhitespaceToken(t)||this.getCommentToken(t)||this.getStringToken(t)||this.getOpenParenToken(t)||this.getCloseParenToken(t)||this.getAmbiguosOperatorToken(t)||this.getNoSpaceOperatorToken(t)||this.getServerVariableToken(t)||this.getPlaceholderToken(t)||this.getNumberToken(t)||this.getReservedWordToken(t,e)||this.getWordToken(t)||this.getOperatorToken(t)},t.prototype.getWhitespaceToken=function(t){return this.getTokenOnFirstMatch({input:t,type:i.TokenTypes.WHITESPACE,regex:this.WHITESPACE_REGEX})},t.prototype.getCommentToken=function(t){return this.getLineCommentToken(t)||this.getBlockCommentToken(t)},t.prototype.getLineCommentToken=function(t){return this.getTokenOnFirstMatch({input:t,type:i.TokenTypes.LINE_COMMENT,regex:this.LINE_COMMENT_REGEX})},t.prototype.getBlockCommentToken=function(t){return this.getTokenOnFirstMatch({input:t,type:i.TokenTypes.BLOCK_COMMENT,regex:this.BLOCK_COMMENT_REGEX})},t.prototype.getStringToken=function(t){return this.getTokenOnFirstMatch({input:t,type:i.TokenTypes.STRING,regex:this.STRING_REGEX})},t.prototype.getOpenParenToken=function(t){return this.getTokenOnFirstMatch({input:t,type:i.TokenTypes.OPEN_PAREN,regex:this.OPEN_PAREN_REGEX})},t.prototype.getCloseParenToken=function(t){return this.getTokenOnFirstMatch({input:t,type:i.TokenTypes.CLOSE_PAREN,regex:this.CLOSE_PAREN_REGEX})},t.prototype.getPlaceholderToken=function(t){return this.getIdentNamedPlaceholderToken(t)||this.getStringNamedPlaceholderToken(t)||this.getIndexedPlaceholderToken(t)},t.prototype.getServerVariableToken=function(t){return this.getTokenOnFirstMatch({input:t,type:i.TokenTypes.SERVERVARIABLE,regex:/(^@@\w+)/iu})},t.prototype.getIdentNamedPlaceholderToken=function(t){return this.getPlaceholderTokenWithKey({input:t,regex:this.IDENT_NAMED_PLACEHOLDER_REGEX,parseKey:function(t){return t.slice(1)}})},t.prototype.getStringNamedPlaceholderToken=function(t){var e=this;return this.getPlaceholderTokenWithKey({input:t,regex:this.STRING_NAMED_PLACEHOLDER_REGEX,parseKey:function(t){return e.getEscapedPlaceholderKey({key:t.slice(2,-1),quoteChar:t.slice(-1)})}})},t.prototype.getIndexedPlaceholderToken=function(t){return this.getPlaceholderTokenWithKey({input:t,regex:this.INDEXED_PLACEHOLDER_REGEX,parseKey:function(t){return t.slice(1)}})},t.prototype.getPlaceholderTokenWithKey=function(t){var e=t.input,n=t.regex,r=t.parseKey,a=this.getTokenOnFirstMatch({input:e,regex:n,type:i.TokenTypes.PLACEHOLDER});return a&&(a.key=r(a.value)),a},t.prototype.getEscapedPlaceholderKey=function(t){var e=t.key,n=t.quoteChar;return e.replace(new RegExp(a["default"]("\\"+n),"gu"),n)},t.prototype.getNumberToken=function(t){return this.getTokenOnFirstMatch({input:t,type:i.TokenTypes.NUMBER,regex:this.NUMBER_REGEX})},t.prototype.getOperatorToken=function(t){return this.getTokenOnFirstMatch({input:t,type:i.TokenTypes.OPERATOR,regex:this.OPERATOR_REGEX})},t.prototype.getAmbiguosOperatorToken=function(t){return this.getTokenOnFirstMatch({input:t,type:i.TokenTypes.OPERATOR,regex:this.AMBIGUOS_OPERATOR_REGEX})},t.prototype.getNoSpaceOperatorToken=function(t){return this.getTokenOnFirstMatch({input:t,type:i.TokenTypes.NO_SPACE_OPERATOR,regex:this.NO_SPACE_OPERATOR_REGEX})},t.prototype.getReservedWordToken=function(t,e){if(!e||!e.value||"."!==e.value)return this.getToplevelReservedToken(t)||this.getNewlineReservedToken(t)||this.getTopLevelReservedTokenNoIndent(t)||this.getPlainReservedToken(t)},t.prototype.getToplevelReservedToken=function(t){return this.getTokenOnFirstMatch({input:t,type:i.TokenTypes.RESERVED_TOP_LEVEL,regex:this.RESERVED_TOP_LEVEL_REGEX})},t.prototype.getNewlineReservedToken=function(t){return this.getTokenOnFirstMatch({input:t,type:i.TokenTypes.RESERVED_NEWLINE,regex:this.RESERVED_NEWLINE_REGEX})},t.prototype.getPlainReservedToken=function(t){return this.getTokenOnFirstMatch({input:t,type:i.TokenTypes.RESERVED,regex:this.RESERVED_PLAIN_REGEX})},t.prototype.getTopLevelReservedTokenNoIndent=function(t){return this.getTokenOnFirstMatch({input:t,type:i.TokenTypes.RESERVED_TOP_LEVEL_NO_INDENT,regex:this.RESERVED_TOP_LEVEL_NO_INDENT_REGEX})},t.prototype.getWordToken=function(t){return this.getTokenOnFirstMatch({input:t,type:i.TokenTypes.WORD,regex:this.WORD_REGEX})},t.prototype.getTokenOnFirstMatch=function(t){var e=t.input,n=t.type,r=t.regex,a=e.match(r);if(a)return{type:n,value:a[1]}},t}();e["default"]=o},1368:function(t,e,n){var r=n("da03"),a=function(){var t=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function i(t){return!!a&&a in t}t.exports=i},"13b3":function(t,e){t.exports={functional:!0,render(t,e){const{_c:n,_v:r,data:a,children:i=[]}=e,{class:o,staticClass:s,style:c,staticStyle:l,attrs:u={},...f}=a;return n("svg",{class:["feather feather-menu",o,s],style:[c,l],attrs:Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},u),...f},i.concat([n("path",{attrs:{d:"M3 12h18M3 6h18M3 18h18"}})]))}}},"14c3":function(t,e,n){var r=n("c6b6"),a=n("9263");t.exports=function(t,e){var n=t.exec;if("function"===typeof n){var i=n.call(t,e);if("object"!==typeof i)throw TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(t))throw TypeError("RegExp#exec called on incompatible receiver");return a.call(t,e)}},"159b":function(t,e,n){var r=n("da84"),a=n("fdbc"),i=n("17c2"),o=n("9112");for(var s in a){var c=r[s],l=c&&c.prototype;if(l&&l.forEach!==i)try{o(l,"forEach",i)}catch(u){l.forEach=i}}},"159f":function(t,e){t.exports={functional:!0,render(t,e){const{_c:n,_v:r,data:a,children:i=[]}=e,{class:o,staticClass:s,style:c,staticStyle:l,attrs:u={},...f}=a;return n("svg",{class:["feather feather-alert-triangle",o,s],style:[c,l],attrs:Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},u),...f},i.concat([n("path",{attrs:{d:"M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0zM12 9v4M12 17h.01"}})]))}}},"15f4":function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};e.__esModule=!0;var i=a(n("d2dc")),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.getTokenizerConfig=function(){return{reservedWords:s,reservedTopLevelWords:c,reservedNewlineWords:u,reservedTopLevelWordsNoIndent:l,stringTypes:['""',"N''","''","``","[]"],openParens:["(","CASE"],closeParens:[")","END"],indexedPlaceholderTypes:["?"],namedPlaceholderTypes:["@",":","%","$"],lineCommentTypes:["#","--"],specialWordChars:[]}},e}(i["default"]);e["default"]=o;var s=["ACCESSIBLE","ACTION","AGAINST","AGGREGATE","ALGORITHM","ALL","ALTER","ANALYSE","ANALYZE","AS","ASC","AUTOCOMMIT","AUTO_INCREMENT","BACKUP","BEGIN","BETWEEN","BINLOG","BOTH","CASCADE","CASE","CHANGE","CHANGED","CHARACTER SET","CHARSET","CHECK","CHECKSUM","COLLATE","COLLATION","COLUMN","COLUMNS","COMMENT","COMMIT","COMMITTED","COMPRESSED","CONCURRENT","CONSTRAINT","CONTAINS","CONVERT","COUNT","CREATE","CROSS","CURRENT_TIMESTAMP","DATABASE","DATABASES","DAY_HOUR","DAY_MINUTE","DAY_SECOND","DAY","DEFAULT","DEFINER","DELAYED","DELETE","DESC","DESCRIBE","DETERMINISTIC","DISTINCT","DISTINCTROW","DIV","DO","DROP","DUMPFILE","DUPLICATE","DYNAMIC","ELSE","ENCLOSED","END","ENGINE","ENGINES","ENGINE_TYPE","ESCAPE","ESCAPED","EVENTS","EXEC","EXECUTE","EXISTS","EXPLAIN","EXTENDED","FAST","FETCH","FIELDS","FILE","FIRST","FIXED","FLUSH","FOR","FORCE","FOREIGN","FULL","FULLTEXT","FUNCTION","GLOBAL","GRANTS","GROUP_CONCAT","HEAP","HIGH_PRIORITY","HOSTS","HOUR","HOUR_MINUTE","HOUR_SECOND","IDENTIFIED","IF","IFNULL","IGNORE","IN","INDEX","INDEXES","INFILE","INSERT","INSERT_ID","INSERT_METHOD","INTERVAL","INTO","INVOKER","IS","ISOLATION","KEY","KEYS","KILL","LAST_INSERT_ID","LEADING","LEVEL","LIKE","LINEAR","LINES","LOAD","LOCAL","LOCK","LOCKS","LOGS","LOW_PRIORITY","MARIA","MASTER","MASTER_CONNECT_RETRY","MASTER_HOST","MASTER_LOG_FILE","MATCH","MAX_CONNECTIONS_PER_HOUR","MAX_QUERIES_PER_HOUR","MAX_ROWS","MAX_UPDATES_PER_HOUR","MAX_USER_CONNECTIONS","MEDIUM","MERGE","MINUTE","MINUTE_SECOND","MIN_ROWS","MODE","MONTH","MRG_MYISAM","MYISAM","NAMES","NATURAL","NOT","NOW()","NULL","OFFSET","ON DELETE","ON UPDATE","ON","ONLY","OPEN","OPTIMIZE","OPTION","OPTIONALLY","OUTFILE","PACK_KEYS","PAGE","PARTIAL","PARTITION","PARTITIONS","PASSWORD","PRIMARY","PRIVILEGES","PROCEDURE","PROCESS","PROCESSLIST","PURGE","QUICK","RAID0","RAID_CHUNKS","RAID_CHUNKSIZE","RAID_TYPE","RANGE","READ","READ_ONLY","READ_WRITE","REFERENCES","REGEXP","RELOAD","RENAME","REPAIR","REPEATABLE","REPLACE","REPLICATION","RESET","RESTORE","RESTRICT","RETURN","RETURNS","REVOKE","RLIKE","ROLLBACK","ROW","ROWS","ROW_FORMAT","SECOND","SECURITY","SEPARATOR","SERIALIZABLE","SESSION","SHARE","SHOW","SHUTDOWN","SLAVE","SONAME","SOUNDS","SQL","SQL_AUTO_IS_NULL","SQL_BIG_RESULT","SQL_BIG_SELECTS","SQL_BIG_TABLES","SQL_BUFFER_RESULT","SQL_CACHE","SQL_CALC_FOUND_ROWS","SQL_LOG_BIN","SQL_LOG_OFF","SQL_LOG_UPDATE","SQL_LOW_PRIORITY_UPDATES","SQL_MAX_JOIN_SIZE","SQL_NO_CACHE","SQL_QUOTE_SHOW_CREATE","SQL_SAFE_UPDATES","SQL_SELECT_LIMIT","SQL_SLAVE_SKIP_COUNTER","SQL_SMALL_RESULT","SQL_WARNINGS","START","STARTING","STATUS","STOP","STORAGE","STRAIGHT_JOIN","STRING","STRIPED","SUPER","TABLE","TABLES","TEMPORARY","TERMINATED","THEN","TO","TRAILING","TRANSACTIONAL","TRIGGER","TRUE","TRUNCATE","TYPE","TYPES","UNCOMMITTED","UNIQUE","UNLOCK","UNSIGNED","USAGE","USE","USING","VARIABLES","VIEW","WHEN","WITH","WORK","WRITE","YEAR_MONTH"],c=["ADD","AFTER","ALTER COLUMN","ALTER TABLE","CREATE OR REPLACE","DECLARE","DELETE FROM","EXCEPT","FETCH FIRST","FROM","GO","GRANT","GROUP BY","HAVING","INSERT INTO","INSERT","LIMIT","MODIFY","ORDER BY","RETURNING","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","UPDATE","VALUES","WHERE"],l=["INTERSECT ALL","INTERSECT","MINUS","UNION ALL","UNION"],u=["AND","CROSS APPLY","CROSS JOIN","ELSE","INNER JOIN","FULL JOIN","FULL OUTER JOIN","LEFT JOIN","LEFT OUTER JOIN","NATURAL JOIN","OR","OUTER APPLY","OUTER JOIN","RENAME","RIGHT JOIN","RIGHT OUTER JOIN","JOIN","WHEN","XOR"]},1652:function(t,e,n){"use strict";e.__esModule=!0,e.stateify=e.TokenState=e.CharacterState=void 0;var r=n("254c");function a(){return function(t){this.j=[],this.T=t||null}}var i=a();i.prototype={defaultTransition:!1,on:function(t,e){if(t instanceof Array){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:null,n=this.next(new t(""));return n===this.defaultTransition?(n=new this.constructor(e),this.on(t,n)):e&&(n.T=e),n},test:function(t,e){return t instanceof e}});function c(t,e,n,r){var a=0,i=t.length,s=e,c=[],l=void 0;while(a=i)return[];while(a1?arguments[1]:void 0)}},"183c":function(t,e){t.exports={functional:!0,render(t,e){const{_c:n,_v:r,data:a,children:i=[]}=e,{class:o,staticClass:s,style:c,staticStyle:l,attrs:u={},...f}=a;return n("svg",{class:["feather feather-users",o,s],style:[c,l],attrs:Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},u),...f},i.concat([n("path",{attrs:{d:"M17 21v-2a4 4 0 00-4-4H5a4 4 0 00-4 4v2"}}),n("circle",{attrs:{cx:"9",cy:"7",r:"4"}}),n("path",{attrs:{d:"M23 21v-2a4 4 0 00-3-3.87M16 3.13a4 4 0 010 7.75"}})]))}}},"18d8":function(t,e,n){var r=n("234d"),a=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,o=r((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(a,(function(t,n,r,a){e.push(r?a.replace(i,"$1"):n||t)})),e}));t.exports=o},1901:function(t,e,n){t.exports=n("7613").default},"19aa":function(t,e){t.exports=function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return t}},"1a78":function(t,e){t.exports={functional:!0,render(t,e){const{_c:n,_v:r,data:a,children:i=[]}=e,{class:o,staticClass:s,style:c,staticStyle:l,attrs:u={},...f}=a;return n("svg",{class:["feather feather-share",o,s],style:[c,l],attrs:Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},u),...f},i.concat([n("path",{attrs:{d:"M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13"}})]))}}},"1a8c":function(t,e){function n(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}t.exports=n},"1be4":function(t,e,n){var r=n("d066");t.exports=r("document","documentElement")},"1c0b":function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},"1c7e":function(t,e,n){var r=n("b622"),a=r("iterator"),i=!1;try{var o=0,s={next:function(){return{done:!!o++}},return:function(){i=!0}};s[a]=function(){return this},Array.from(s,(function(){throw 2}))}catch(c){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var r={};r[a]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(c){}return n}},"1cdc":function(t,e,n){var r=n("342f");t.exports=/(?:iphone|ipod|ipad).*applewebkit/i.test(r)},"1d80":function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},"1da1":function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));n("d3b7");function r(t,e,n,r,a,i,o){try{var s=t[i](o),c=s.value}catch(l){return void n(l)}s.done?e(c):Promise.resolve(c).then(r,a)}function a(t){return function(){var e=this,n=arguments;return new Promise((function(a,i){var o=t.apply(e,n);function s(t){r(o,a,i,s,c,"next",t)}function c(t){r(o,a,i,s,c,"throw",t)}s(void 0)}))}}},"1dde":function(t,e,n){var r=n("d039"),a=n("b622"),i=n("2d00"),o=a("species");t.exports=function(t){return i>=51||!r((function(){var e=[],n=e.constructor={};return n[o]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},"1efc":function(t,e){function n(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}t.exports=n},"1fc8":function(t,e,n){var r=n("4245");function a(t,e){var n=r(this,t),a=n.size;return n.set(t,e),this.size+=n.size==a?0:1,this}t.exports=a},2266:function(t,e,n){var r=n("825a"),a=n("e95a"),i=n("50c4"),o=n("0366"),s=n("35a1"),c=n("2a62"),l=function(t,e){this.stopped=t,this.result=e};t.exports=function(t,e,n){var u,f,d,p,h,m,v,g=n&&n.that,b=!(!n||!n.AS_ENTRIES),y=!(!n||!n.IS_ITERATOR),E=!(!n||!n.INTERRUPTED),w=o(e,g,1+b+E),k=function(t){return u&&c(u),new l(!0,t)},T=function(t){return b?(r(t),E?w(t[0],t[1],k):w(t[0],t[1])):E?w(t,k):w(t)};if(y)u=t;else{if(f=s(t),"function"!=typeof f)throw TypeError("Target is not iterable");if(a(f)){for(d=0,p=i(t.length);p>d;d++)if(h=T(t[d]),h&&h instanceof l)return h;return new l(!1)}u=f.call(t)}m=u.next;while(!(v=m.call(u)).done){try{h=T(v.value)}catch(x){throw c(u),x}if("object"==typeof h&&h&&h instanceof l)return h}return new l(!1)}},"234d":function(t,e,n){var r=n("e380"),a=500;function i(t){var e=r(t,(function(t){return n.size===a&&n.clear(),t})),n=e.cache;return e}t.exports=i},"23cb":function(t,e,n){var r=n("a691"),a=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?a(n+e,0):i(n,e)}},"23e7":function(t,e,n){var r=n("da84"),a=n("06cf").f,i=n("9112"),o=n("6eeb"),s=n("ce4e"),c=n("e893"),l=n("94ca");t.exports=function(t,e){var n,u,f,d,p,h,m=t.target,v=t.global,g=t.stat;if(u=v?r:g?r[m]||s(m,{}):(r[m]||{}).prototype,u)for(f in e){if(p=e[f],t.noTargetGet?(h=a(u,f),d=h&&h.value):d=u[f],n=l(v?f:m+(g?".":"#")+f,t.forced),!n&&void 0!==d){if(typeof p===typeof d)continue;c(p,d)}(t.sham||d&&d.sham)&&i(p,"sham",!0),o(u,f,p,t)}}},"241c":function(t,e,n){var r=n("ca84"),a=n("7839"),i=a.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},2478:function(t,e,n){var r=n("4245");function a(t){return r(this,t).get(t)}t.exports=a},2504:function(t){t.exports=JSON.parse('{"0":65533,"128":8364,"130":8218,"131":402,"132":8222,"133":8230,"134":8224,"135":8225,"136":710,"137":8240,"138":352,"139":8249,"140":338,"142":381,"145":8216,"146":8217,"147":8220,"148":8221,"149":8226,"150":8211,"151":8212,"152":732,"153":8482,"154":353,"155":8250,"156":339,"158":382,"159":376}')},2524:function(t,e,n){var r=n("6044"),a="__lodash_hash_undefined__";function i(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?a:e,this}t.exports=i},2532:function(t,e,n){"use strict";var r=n("23e7"),a=n("5a34"),i=n("1d80"),o=n("ab13");r({target:"String",proto:!0,forced:!o("includes")},{includes:function(t){return!!~String(i(this)).indexOf(a(t),arguments.length>1?arguments[1]:void 0)}})},"254c":function(t,e,n){"use strict";function r(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Object.create(t.prototype);for(var a in n)r[a]=n[a];return r.constructor=e,e.prototype=r,e}e.__esModule=!0,e.inherits=r},"25f0":function(t,e,n){"use strict";var r=n("6eeb"),a=n("825a"),i=n("d039"),o=n("ad6d"),s="toString",c=RegExp.prototype,l=c[s],u=i((function(){return"/a/b"!=l.call({source:"a",flags:"b"})})),f=l.name!=s;(u||f)&&r(RegExp.prototype,s,(function(){var t=a(this),e=String(t.source),n=t.flags,r=String(void 0===n&&t instanceof RegExp&&!("flags"in c)?o.call(t):n);return"/"+e+"/"+r}),{unsafe:!0})},2626:function(t,e,n){"use strict";var r=n("d066"),a=n("9bf2"),i=n("b622"),o=n("83ab"),s=i("species");t.exports=function(t){var e=r(t),n=a.f;o&&e&&!e[s]&&n(e,s,{configurable:!0,get:function(){return this}})}},2779:function(t,e){t.exports={functional:!0,render(t,e){const{_c:n,_v:r,data:a,children:i=[]}=e,{class:o,staticClass:s,style:c,staticStyle:l,attrs:u={},...f}=a;return n("svg",{class:["feather feather-alert-circle",o,s],style:[c,l],attrs:Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},u),...f},i.concat([n("circle",{attrs:{cx:"12",cy:"12",r:"10"}}),n("path",{attrs:{d:"M12 8v4M12 16h.01"}})]))}}},2877:function(t,e,n){"use strict";function r(t,e,n,r,a,i,o,s){var c,l="function"===typeof t?t.options:t;if(e&&(l.render=e,l.staticRenderFns=n,l._compiled=!0),r&&(l.functional=!0),i&&(l._scopeId="data-v-"+i),o?(c=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),a&&a.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},l._ssrRegister=c):a&&(c=s?function(){a.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:a),c)if(l.functional){l._injectStyles=c;var u=l.render;l.render=function(t,e){return c.call(e),u(t,e)}}else{var f=l.beforeCreate;l.beforeCreate=f?[].concat(f,c):[c]}return{exports:t,options:l}}n.d(e,"a",(function(){return r}))},2878:function(t,e){t.exports={functional:!0,render(t,e){const{_c:n,_v:r,data:a,children:i=[]}=e,{class:o,staticClass:s,style:c,staticStyle:l,attrs:u={},...f}=a;return n("svg",{class:["feather feather-database",o,s],style:[c,l],attrs:Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},u),...f},i.concat([n("ellipse",{attrs:{cx:"12",cy:"5",rx:"9",ry:"3"}}),n("path",{attrs:{d:"M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"}}),n("path",{attrs:{d:"M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"}})]))}}},"28c9":function(t,e){function n(){this.__data__=[],this.size=0}t.exports=n},2909:function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var r=n("6b75");function a(t){if(Array.isArray(t))return Object(r["a"])(t)}n("a4d3"),n("e01a"),n("d3b7"),n("d28b"),n("3ca3"),n("ddb0"),n("a630");function i(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}var o=n("06c5");function s(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function c(t){return a(t)||i(t)||Object(o["a"])(t)||s()}},2987:function(t,e,n){"use strict";e.__esModule=!0,e.TokenTypes=void 0,function(t){t["WHITESPACE"]="whitespace",t["WORD"]="word",t["STRING"]="string",t["RESERVED"]="reserved",t["RESERVED_TOP_LEVEL"]="reserved-top-level",t["RESERVED_TOP_LEVEL_NO_INDENT"]="reserved-top-level-no-indent",t["RESERVED_NEWLINE"]="reserved-newline",t["OPERATOR"]="operator",t["NO_SPACE_OPERATOR"]="no-space-operator",t["OPEN_PAREN"]="open-paren",t["CLOSE_PAREN"]="close-paren",t["LINE_COMMENT"]="line-comment",t["BLOCK_COMMENT"]="block-comment",t["NUMBER"]="number",t["PLACEHOLDER"]="placeholder",t["SERVERVARIABLE"]="servervariable"}(e.TokenTypes||(e.TokenTypes={}))},"29f3":function(t,e){var n=Object.prototype,r=n.toString;function a(t){return r.call(t)}t.exports=a},"2a62":function(t,e,n){var r=n("825a");t.exports=function(t){var e=t["return"];if(void 0!==e)return r(e.call(t)).value}},"2b0e":function(t,e,n){"use strict";(function(t){ -/*! - * Vue.js v2.6.14 - * (c) 2014-2021 Evan You - * Released under the MIT License. - */ -var n=Object.freeze({});function r(t){return void 0===t||null===t}function a(t){return void 0!==t&&null!==t}function i(t){return!0===t}function o(t){return!1===t}function s(t){return"string"===typeof t||"number"===typeof t||"symbol"===typeof t||"boolean"===typeof t}function c(t){return null!==t&&"object"===typeof t}var l=Object.prototype.toString;function u(t){return"[object Object]"===l.call(t)}function f(t){return"[object RegExp]"===l.call(t)}function d(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function p(t){return a(t)&&"function"===typeof t.then&&"function"===typeof t.catch}function h(t){return null==t?"":Array.isArray(t)||u(t)&&t.toString===l?JSON.stringify(t,null,2):String(t)}function m(t){var e=parseFloat(t);return isNaN(e)?t:e}function v(t,e){for(var n=Object.create(null),r=t.split(","),a=0;a-1)return t.splice(n,1)}}var y=Object.prototype.hasOwnProperty;function E(t,e){return y.call(t,e)}function w(t){var e=Object.create(null);return function(n){var r=e[n];return r||(e[n]=t(n))}}var k=/-(\w)/g,T=w((function(t){return t.replace(k,(function(t,e){return e?e.toUpperCase():""}))})),x=w((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})),A=/\B([A-Z])/g,O=w((function(t){return t.replace(A,"-$1").toLowerCase()}));function S(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n}function R(t,e){return t.bind(e)}var N=Function.prototype.bind?R:S;function C(t,e){e=e||0;var n=t.length-e,r=new Array(n);while(n--)r[n]=t[n+e];return r}function _(t,e){for(var n in e)t[n]=e[n];return t}function L(t){for(var e={},n=0;n0,nt=Z&&Z.indexOf("edge/")>0,rt=(Z&&Z.indexOf("android"),Z&&/iphone|ipad|ipod|ios/.test(Z)||"ios"===J),at=(Z&&/chrome\/\d+/.test(Z),Z&&/phantomjs/.test(Z),Z&&Z.match(/firefox\/(\d+)/)),it={}.watch,ot=!1;if(Q)try{var st={};Object.defineProperty(st,"passive",{get:function(){ot=!0}}),window.addEventListener("test-passive",null,st)}catch(xo){}var ct=function(){return void 0===X&&(X=!Q&&!K&&"undefined"!==typeof t&&(t["process"]&&"server"===t["process"].env.VUE_ENV)),X},lt=Q&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function ut(t){return"function"===typeof t&&/native code/.test(t.toString())}var ft,dt="undefined"!==typeof Symbol&&ut(Symbol)&&"undefined"!==typeof Reflect&&ut(Reflect.ownKeys);ft="undefined"!==typeof Set&&ut(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var pt=I,ht=0,mt=function(){this.id=ht++,this.subs=[]};mt.prototype.addSub=function(t){this.subs.push(t)},mt.prototype.removeSub=function(t){b(this.subs,t)},mt.prototype.depend=function(){mt.target&&mt.target.addDep(this)},mt.prototype.notify=function(){var t=this.subs.slice();for(var e=0,n=t.length;e-1)if(i&&!E(a,"default"))o=!1;else if(""===o||o===O(t)){var c=ee(String,a.type);(c<0||s0&&(o=Re(o,(e||"")+"_"+n),Se(o[0])&&Se(l)&&(u[c]=kt(l.text+o[0].text),o.shift()),u.push.apply(u,o)):s(o)?Se(l)?u[c]=kt(l.text+o):""!==o&&u.push(kt(o)):Se(o)&&Se(l)?u[c]=kt(l.text+o.text):(i(t._isVList)&&a(o.tag)&&r(o.key)&&a(e)&&(o.key="__vlist"+e+"_"+n+"__"),u.push(o)));return u}function Ne(t){var e=t.$options.provide;e&&(t._provided="function"===typeof e?e.call(t):e)}function Ce(t){var e=_e(t.$options.inject,t);e&&(Nt(!1),Object.keys(e).forEach((function(n){Dt(t,n,e[n])})),Nt(!0))}function _e(t,e){if(t){for(var n=Object.create(null),r=dt?Reflect.ownKeys(t):Object.keys(t),a=0;a0,o=t?!!t.$stable:!i,s=t&&t.$key;if(t){if(t._normalized)return t._normalized;if(o&&r&&r!==n&&s===r.$key&&!i&&!r.$hasNormal)return r;for(var c in a={},t)t[c]&&"$"!==c[0]&&(a[c]=Me(e,c,t[c]))}else a={};for(var l in e)l in a||(a[l]=Ue(e,l));return t&&Object.isExtensible(t)&&(t._normalized=a),Y(a,"$stable",o),Y(a,"$key",s),Y(a,"$hasNormal",i),a}function Me(t,e,n){var r=function(){var t=arguments.length?n.apply(null,arguments):n({});t=t&&"object"===typeof t&&!Array.isArray(t)?[t]:Oe(t);var e=t&&t[0];return t&&(!e||1===t.length&&e.isComment&&!De(e))?void 0:t};return n.proxy&&Object.defineProperty(t,e,{get:r,enumerable:!0,configurable:!0}),r}function Ue(t,e){return function(){return t[e]}}function je(t,e){var n,r,i,o,s;if(Array.isArray(t)||"string"===typeof t)for(n=new Array(t.length),r=0,i=t.length;r1?C(n):n;for(var r=C(arguments,1),a='event handler for "'+t+'"',i=0,o=n.length;idocument.createEvent("Event").timeStamp&&($n=function(){return Qn.now()})}function Kn(){var t,e;for(Xn=$n(),Yn=!0,Hn.sort((function(t,e){return t.id-e.id})),Vn=0;VnVn&&Hn[n].id>t.id)n--;Hn.splice(n+1,0,t)}else Hn.push(t);Gn||(Gn=!0,me(Kn))}}var nr=0,rr=function(t,e,n,r,a){this.vm=t,a&&(t._watcher=this),t._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++nr,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new ft,this.newDepIds=new ft,this.expression="","function"===typeof e?this.getter=e:(this.getter=W(e),this.getter||(this.getter=I)),this.value=this.lazy?void 0:this.get()};rr.prototype.get=function(){var t;gt(this);var e=this.vm;try{t=this.getter.call(e,e)}catch(xo){if(!this.user)throw xo;ne(xo,e,'getter for watcher "'+this.expression+'"')}finally{this.deep&&ge(t),bt(),this.cleanupDeps()}return t},rr.prototype.addDep=function(t){var e=t.id;this.newDepIds.has(e)||(this.newDepIds.add(e),this.newDeps.push(t),this.depIds.has(e)||t.addSub(this))},rr.prototype.cleanupDeps=function(){var t=this.deps.length;while(t--){var e=this.deps[t];this.newDepIds.has(e.id)||e.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},rr.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():er(this)},rr.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||c(t)||this.deep){var e=this.value;if(this.value=t,this.user){var n='callback for watcher "'+this.expression+'"';re(this.cb,this.vm,[t,e],this.vm,n)}else this.cb.call(this.vm,t,e)}}},rr.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},rr.prototype.depend=function(){var t=this.deps.length;while(t--)this.deps[t].depend()},rr.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||b(this.vm._watchers,this);var t=this.deps.length;while(t--)this.deps[t].removeSub(this);this.active=!1}};var ar={enumerable:!0,configurable:!0,get:I,set:I};function ir(t,e,n){ar.get=function(){return this[e][n]},ar.set=function(t){this[e][n]=t},Object.defineProperty(t,n,ar)}function or(t){t._watchers=[];var e=t.$options;e.props&&sr(t,e.props),e.methods&&mr(t,e.methods),e.data?cr(t):It(t._data={},!0),e.computed&&fr(t,e.computed),e.watch&&e.watch!==it&&vr(t,e.watch)}function sr(t,e){var n=t.$options.propsData||{},r=t._props={},a=t.$options._propKeys=[],i=!t.$parent;i||Nt(!1);var o=function(i){a.push(i);var o=Qt(i,e,n,t);Dt(r,i,o),i in t||ir(t,"_props",i)};for(var s in e)o(s);Nt(!0)}function cr(t){var e=t.$options.data;e=t._data="function"===typeof e?lr(e,t):e||{},u(e)||(e={});var n=Object.keys(e),r=t.$options.props,a=(t.$options.methods,n.length);while(a--){var i=n[a];0,r&&E(r,i)||G(i)||ir(t,"_data",i)}It(e,!0)}function lr(t,e){gt();try{return t.call(e,e)}catch(xo){return ne(xo,e,"data()"),{}}finally{bt()}}var ur={lazy:!0};function fr(t,e){var n=t._computedWatchers=Object.create(null),r=ct();for(var a in e){var i=e[a],o="function"===typeof i?i:i.get;0,r||(n[a]=new rr(t,o||I,I,ur)),a in t||dr(t,a,i)}}function dr(t,e,n){var r=!ct();"function"===typeof n?(ar.get=r?pr(e):hr(n),ar.set=I):(ar.get=n.get?r&&!1!==n.cache?pr(e):hr(n.get):I,ar.set=n.set||I),Object.defineProperty(t,e,ar)}function pr(t){return function(){var e=this._computedWatchers&&this._computedWatchers[t];if(e)return e.dirty&&e.evaluate(),mt.target&&e.depend(),e.value}}function hr(t){return function(){return t.call(this,this)}}function mr(t,e){t.$options.props;for(var n in e)t[n]="function"!==typeof e[n]?I:N(e[n],t)}function vr(t,e){for(var n in e){var r=e[n];if(Array.isArray(r))for(var a=0;a-1)return this;var n=C(arguments,1);return n.unshift(this),"function"===typeof t.install?t.install.apply(t,n):"function"===typeof t&&t.apply(null,n),e.push(t),this}}function Or(t){t.mixin=function(t){return this.options=Xt(this.options,t),this}}function Sr(t){t.cid=0;var e=1;t.extend=function(t){t=t||{};var n=this,r=n.cid,a=t._Ctor||(t._Ctor={});if(a[r])return a[r];var i=t.name||n.options.name;var o=function(t){this._init(t)};return o.prototype=Object.create(n.prototype),o.prototype.constructor=o,o.cid=e++,o.options=Xt(n.options,t),o["super"]=n,o.options.props&&Rr(o),o.options.computed&&Nr(o),o.extend=n.extend,o.mixin=n.mixin,o.use=n.use,B.forEach((function(t){o[t]=n[t]})),i&&(o.options.components[i]=o),o.superOptions=n.options,o.extendOptions=t,o.sealedOptions=_({},o.options),a[r]=o,o}}function Rr(t){var e=t.options.props;for(var n in e)ir(t.prototype,"_props",n)}function Nr(t){var e=t.options.computed;for(var n in e)dr(t.prototype,n,e[n])}function Cr(t){B.forEach((function(e){t[e]=function(t,n){return n?("component"===e&&u(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&"function"===typeof n&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}}))}function _r(t){return t&&(t.Ctor.options.name||t.tag)}function Lr(t,e){return Array.isArray(t)?t.indexOf(e)>-1:"string"===typeof t?t.split(",").indexOf(e)>-1:!!f(t)&&t.test(e)}function Ir(t,e){var n=t.cache,r=t.keys,a=t._vnode;for(var i in n){var o=n[i];if(o){var s=o.name;s&&!e(s)&&Dr(n,i,r,a)}}}function Dr(t,e,n,r){var a=t[e];!a||r&&a.tag===r.tag||a.componentInstance.$destroy(),t[e]=null,b(n,e)}Er(xr),br(xr),Cn(xr),Dn(xr),En(xr);var Pr=[String,RegExp,Array],Mr={name:"keep-alive",abstract:!0,props:{include:Pr,exclude:Pr,max:[String,Number]},methods:{cacheVNode:function(){var t=this,e=t.cache,n=t.keys,r=t.vnodeToCache,a=t.keyToCache;if(r){var i=r.tag,o=r.componentInstance,s=r.componentOptions;e[a]={name:_r(s),tag:i,componentInstance:o},n.push(a),this.max&&n.length>parseInt(this.max)&&Dr(e,n[0],n,this._vnode),this.vnodeToCache=null}}},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var t in this.cache)Dr(this.cache,t,this.keys)},mounted:function(){var t=this;this.cacheVNode(),this.$watch("include",(function(e){Ir(t,(function(t){return Lr(e,t)}))})),this.$watch("exclude",(function(e){Ir(t,(function(t){return!Lr(e,t)}))}))},updated:function(){this.cacheVNode()},render:function(){var t=this.$slots.default,e=xn(t),n=e&&e.componentOptions;if(n){var r=_r(n),a=this,i=a.include,o=a.exclude;if(i&&(!r||!Lr(i,r))||o&&r&&Lr(o,r))return e;var s=this,c=s.cache,l=s.keys,u=null==e.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):e.key;c[u]?(e.componentInstance=c[u].componentInstance,b(l,u),l.push(u)):(this.vnodeToCache=e,this.keyToCache=u),e.data.keepAlive=!0}return e||t&&t[0]}},Ur={KeepAlive:Mr};function jr(t){var e={get:function(){return z}};Object.defineProperty(t,"config",e),t.util={warn:pt,extend:_,mergeOptions:Xt,defineReactive:Dt},t.set=Pt,t.delete=Mt,t.nextTick=me,t.observable=function(t){return It(t),t},t.options=Object.create(null),B.forEach((function(e){t.options[e+"s"]=Object.create(null)})),t.options._base=t,_(t.options.components,Ur),Ar(t),Or(t),Sr(t),Cr(t)}jr(xr),Object.defineProperty(xr.prototype,"$isServer",{get:ct}),Object.defineProperty(xr.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(xr,"FunctionalRenderContext",{value:Ze}),xr.version="2.6.14";var Fr=v("style,class"),Br=v("input,textarea,option,select,progress"),Hr=function(t,e,n){return"value"===n&&Br(t)&&"button"!==e||"selected"===n&&"option"===t||"checked"===n&&"input"===t||"muted"===n&&"video"===t},zr=v("contenteditable,draggable,spellcheck"),qr=v("events,caret,typing,plaintext-only"),Gr=function(t,e){return $r(e)||"false"===e?"false":"contenteditable"===t&&qr(e)?e:"true"},Yr=v("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,truespeed,typemustmatch,visible"),Vr="http://www.w3.org/1999/xlink",Wr=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},Xr=function(t){return Wr(t)?t.slice(6,t.length):""},$r=function(t){return null==t||!1===t};function Qr(t){var e=t.data,n=t,r=t;while(a(r.componentInstance))r=r.componentInstance._vnode,r&&r.data&&(e=Kr(r.data,e));while(a(n=n.parent))n&&n.data&&(e=Kr(e,n.data));return Jr(e.staticClass,e.class)}function Kr(t,e){return{staticClass:Zr(t.staticClass,e.staticClass),class:a(t.class)?[t.class,e.class]:e.class}}function Jr(t,e){return a(t)||a(e)?Zr(t,ta(e)):""}function Zr(t,e){return t?e?t+" "+e:t:e||""}function ta(t){return Array.isArray(t)?ea(t):c(t)?na(t):"string"===typeof t?t:""}function ea(t){for(var e,n="",r=0,i=t.length;r-1?ca[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:ca[t]=/HTMLUnknownElement/.test(e.toString())}var ua=v("text,number,password,search,email,tel,url");function fa(t){if("string"===typeof t){var e=document.querySelector(t);return e||document.createElement("div")}return t}function da(t,e){var n=document.createElement(t);return"select"!==t||e.data&&e.data.attrs&&void 0!==e.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n}function pa(t,e){return document.createElementNS(ra[t],e)}function ha(t){return document.createTextNode(t)}function ma(t){return document.createComment(t)}function va(t,e,n){t.insertBefore(e,n)}function ga(t,e){t.removeChild(e)}function ba(t,e){t.appendChild(e)}function ya(t){return t.parentNode}function Ea(t){return t.nextSibling}function wa(t){return t.tagName}function ka(t,e){t.textContent=e}function Ta(t,e){t.setAttribute(e,"")}var xa=Object.freeze({createElement:da,createElementNS:pa,createTextNode:ha,createComment:ma,insertBefore:va,removeChild:ga,appendChild:ba,parentNode:ya,nextSibling:Ea,tagName:wa,setTextContent:ka,setStyleScope:Ta}),Aa={create:function(t,e){Oa(e)},update:function(t,e){t.data.ref!==e.data.ref&&(Oa(t,!0),Oa(e))},destroy:function(t){Oa(t,!0)}};function Oa(t,e){var n=t.data.ref;if(a(n)){var r=t.context,i=t.componentInstance||t.elm,o=r.$refs;e?Array.isArray(o[n])?b(o[n],i):o[n]===i&&(o[n]=void 0):t.data.refInFor?Array.isArray(o[n])?o[n].indexOf(i)<0&&o[n].push(i):o[n]=[i]:o[n]=i}}var Sa=new yt("",{},[]),Ra=["create","activate","update","remove","destroy"];function Na(t,e){return t.key===e.key&&t.asyncFactory===e.asyncFactory&&(t.tag===e.tag&&t.isComment===e.isComment&&a(t.data)===a(e.data)&&Ca(t,e)||i(t.isAsyncPlaceholder)&&r(e.asyncFactory.error))}function Ca(t,e){if("input"!==t.tag)return!0;var n,r=a(n=t.data)&&a(n=n.attrs)&&n.type,i=a(n=e.data)&&a(n=n.attrs)&&n.type;return r===i||ua(r)&&ua(i)}function _a(t,e,n){var r,i,o={};for(r=e;r<=n;++r)i=t[r].key,a(i)&&(o[i]=r);return o}function La(t){var e,n,o={},c=t.modules,l=t.nodeOps;for(e=0;em?(f=r(n[b+1])?null:n[b+1].elm,T(t,f,n,h,b,i)):h>b&&A(e,d,m)}function R(t,e,n,r){for(var i=n;i-1?qa(t,e,n):Yr(e)?$r(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):zr(e)?t.setAttribute(e,Gr(e,n)):Wr(e)?$r(n)?t.removeAttributeNS(Vr,Xr(e)):t.setAttributeNS(Vr,e,n):qa(t,e,n)}function qa(t,e,n){if($r(n))t.removeAttribute(e);else{if(tt&&!et&&"TEXTAREA"===t.tagName&&"placeholder"===e&&""!==n&&!t.__ieph){var r=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",r)};t.addEventListener("input",r),t.__ieph=!0}t.setAttribute(e,n)}}var Ga={create:Ha,update:Ha};function Ya(t,e){var n=e.elm,i=e.data,o=t.data;if(!(r(i.staticClass)&&r(i.class)&&(r(o)||r(o.staticClass)&&r(o.class)))){var s=Qr(e),c=n._transitionClasses;a(c)&&(s=Zr(s,ta(c))),s!==n._prevClass&&(n.setAttribute("class",s),n._prevClass=s)}}var Va,Wa={create:Ya,update:Ya},Xa="__r",$a="__c";function Qa(t){if(a(t[Xa])){var e=tt?"change":"input";t[e]=[].concat(t[Xa],t[e]||[]),delete t[Xa]}a(t[$a])&&(t.change=[].concat(t[$a],t.change||[]),delete t[$a])}function Ka(t,e,n){var r=Va;return function a(){var i=e.apply(null,arguments);null!==i&&ti(t,a,n,r)}}var Ja=se&&!(at&&Number(at[1])<=53);function Za(t,e,n,r){if(Ja){var a=Xn,i=e;e=i._wrapper=function(t){if(t.target===t.currentTarget||t.timeStamp>=a||t.timeStamp<=0||t.target.ownerDocument!==document)return i.apply(this,arguments)}}Va.addEventListener(t,e,ot?{capture:n,passive:r}:n)}function ti(t,e,n,r){(r||Va).removeEventListener(t,e._wrapper||e,n)}function ei(t,e){if(!r(t.data.on)||!r(e.data.on)){var n=e.data.on||{},a=t.data.on||{};Va=e.elm,Qa(n),we(n,a,Za,ti,Ka,e.context),Va=void 0}}var ni,ri={create:ei,update:ei};function ai(t,e){if(!r(t.data.domProps)||!r(e.data.domProps)){var n,i,o=e.elm,s=t.data.domProps||{},c=e.data.domProps||{};for(n in a(c.__ob__)&&(c=e.data.domProps=_({},c)),s)n in c||(o[n]="");for(n in c){if(i=c[n],"textContent"===n||"innerHTML"===n){if(e.children&&(e.children.length=0),i===s[n])continue;1===o.childNodes.length&&o.removeChild(o.childNodes[0])}if("value"===n&&"PROGRESS"!==o.tagName){o._value=i;var l=r(i)?"":String(i);ii(o,l)&&(o.value=l)}else if("innerHTML"===n&&ia(o.tagName)&&r(o.innerHTML)){ni=ni||document.createElement("div"),ni.innerHTML=""+i+"";var u=ni.firstChild;while(o.firstChild)o.removeChild(o.firstChild);while(u.firstChild)o.appendChild(u.firstChild)}else if(i!==s[n])try{o[n]=i}catch(xo){}}}}function ii(t,e){return!t.composing&&("OPTION"===t.tagName||oi(t,e)||si(t,e))}function oi(t,e){var n=!0;try{n=document.activeElement!==t}catch(xo){}return n&&t.value!==e}function si(t,e){var n=t.value,r=t._vModifiers;if(a(r)){if(r.number)return m(n)!==m(e);if(r.trim)return n.trim()!==e.trim()}return n!==e}var ci={create:ai,update:ai},li=w((function(t){var e={},n=/;(?![^(]*\))/g,r=/:(.+)/;return t.split(n).forEach((function(t){if(t){var n=t.split(r);n.length>1&&(e[n[0].trim()]=n[1].trim())}})),e}));function ui(t){var e=fi(t.style);return t.staticStyle?_(t.staticStyle,e):e}function fi(t){return Array.isArray(t)?L(t):"string"===typeof t?li(t):t}function di(t,e){var n,r={};if(e){var a=t;while(a.componentInstance)a=a.componentInstance._vnode,a&&a.data&&(n=ui(a.data))&&_(r,n)}(n=ui(t.data))&&_(r,n);var i=t;while(i=i.parent)i.data&&(n=ui(i.data))&&_(r,n);return r}var pi,hi=/^--/,mi=/\s*!important$/,vi=function(t,e,n){if(hi.test(e))t.style.setProperty(e,n);else if(mi.test(n))t.style.setProperty(O(e),n.replace(mi,""),"important");else{var r=bi(e);if(Array.isArray(n))for(var a=0,i=n.length;a-1?e.split(wi).forEach((function(e){return t.classList.add(e)})):t.classList.add(e);else{var n=" "+(t.getAttribute("class")||"")+" ";n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function Ti(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(wi).forEach((function(e){return t.classList.remove(e)})):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{var n=" "+(t.getAttribute("class")||"")+" ",r=" "+e+" ";while(n.indexOf(r)>=0)n=n.replace(r," ");n=n.trim(),n?t.setAttribute("class",n):t.removeAttribute("class")}}function xi(t){if(t){if("object"===typeof t){var e={};return!1!==t.css&&_(e,Ai(t.name||"v")),_(e,t),e}return"string"===typeof t?Ai(t):void 0}}var Ai=w((function(t){return{enterClass:t+"-enter",enterToClass:t+"-enter-to",enterActiveClass:t+"-enter-active",leaveClass:t+"-leave",leaveToClass:t+"-leave-to",leaveActiveClass:t+"-leave-active"}})),Oi=Q&&!et,Si="transition",Ri="animation",Ni="transition",Ci="transitionend",_i="animation",Li="animationend";Oi&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Ni="WebkitTransition",Ci="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(_i="WebkitAnimation",Li="webkitAnimationEnd"));var Ii=Q?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function Di(t){Ii((function(){Ii(t)}))}function Pi(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),ki(t,e))}function Mi(t,e){t._transitionClasses&&b(t._transitionClasses,e),Ti(t,e)}function Ui(t,e,n){var r=Fi(t,e),a=r.type,i=r.timeout,o=r.propCount;if(!a)return n();var s=a===Si?Ci:Li,c=0,l=function(){t.removeEventListener(s,u),n()},u=function(e){e.target===t&&++c>=o&&l()};setTimeout((function(){c0&&(n=Si,u=o,f=i.length):e===Ri?l>0&&(n=Ri,u=l,f=c.length):(u=Math.max(o,l),n=u>0?o>l?Si:Ri:null,f=n?n===Si?i.length:c.length:0);var d=n===Si&&ji.test(r[Ni+"Property"]);return{type:n,timeout:u,propCount:f,hasTransform:d}}function Bi(t,e){while(t.length1}function Vi(t,e){!0!==e.data.show&&zi(e)}var Wi=Q?{create:Vi,activate:Vi,remove:function(t,e){!0!==t.data.show?qi(t,e):e()}}:{},Xi=[Ga,Wa,ri,ci,Ei,Wi],$i=Xi.concat(Ba),Qi=La({nodeOps:xa,modules:$i});et&&document.addEventListener("selectionchange",(function(){var t=document.activeElement;t&&t.vmodel&&ao(t,"input")}));var Ki={inserted:function(t,e,n,r){"select"===n.tag?(r.elm&&!r.elm._vOptions?ke(n,"postpatch",(function(){Ki.componentUpdated(t,e,n)})):Ji(t,e,n.context),t._vOptions=[].map.call(t.options,eo)):("textarea"===n.tag||ua(t.type))&&(t._vModifiers=e.modifiers,e.modifiers.lazy||(t.addEventListener("compositionstart",no),t.addEventListener("compositionend",ro),t.addEventListener("change",ro),et&&(t.vmodel=!0)))},componentUpdated:function(t,e,n){if("select"===n.tag){Ji(t,e,n.context);var r=t._vOptions,a=t._vOptions=[].map.call(t.options,eo);if(a.some((function(t,e){return!M(t,r[e])}))){var i=t.multiple?e.value.some((function(t){return to(t,a)})):e.value!==e.oldValue&&to(e.value,a);i&&ao(t,"change")}}}};function Ji(t,e,n){Zi(t,e,n),(tt||nt)&&setTimeout((function(){Zi(t,e,n)}),0)}function Zi(t,e,n){var r=e.value,a=t.multiple;if(!a||Array.isArray(r)){for(var i,o,s=0,c=t.options.length;s-1,o.selected!==i&&(o.selected=i);else if(M(eo(o),r))return void(t.selectedIndex!==s&&(t.selectedIndex=s));a||(t.selectedIndex=-1)}}function to(t,e){return e.every((function(e){return!M(e,t)}))}function eo(t){return"_value"in t?t._value:t.value}function no(t){t.target.composing=!0}function ro(t){t.target.composing&&(t.target.composing=!1,ao(t.target,"input"))}function ao(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function io(t){return!t.componentInstance||t.data&&t.data.transition?t:io(t.componentInstance._vnode)}var oo={bind:function(t,e,n){var r=e.value;n=io(n);var a=n.data&&n.data.transition,i=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;r&&a?(n.data.show=!0,zi(n,(function(){t.style.display=i}))):t.style.display=r?i:"none"},update:function(t,e,n){var r=e.value,a=e.oldValue;if(!r!==!a){n=io(n);var i=n.data&&n.data.transition;i?(n.data.show=!0,r?zi(n,(function(){t.style.display=t.__vOriginalDisplay})):qi(n,(function(){t.style.display="none"}))):t.style.display=r?t.__vOriginalDisplay:"none"}},unbind:function(t,e,n,r,a){a||(t.style.display=t.__vOriginalDisplay)}},so={model:Ki,show:oo},co={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function lo(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?lo(xn(e.children)):t}function uo(t){var e={},n=t.$options;for(var r in n.propsData)e[r]=t[r];var a=n._parentListeners;for(var i in a)e[T(i)]=a[i];return e}function fo(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}function po(t){while(t=t.parent)if(t.data.transition)return!0}function ho(t,e){return e.key===t.key&&e.tag===t.tag}var mo=function(t){return t.tag||De(t)},vo=function(t){return"show"===t.name},go={name:"transition",props:co,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(mo),n.length)){0;var r=this.mode;0;var a=n[0];if(po(this.$vnode))return a;var i=lo(a);if(!i)return a;if(this._leaving)return fo(t,a);var o="__transition-"+this._uid+"-";i.key=null==i.key?i.isComment?o+"comment":o+i.tag:s(i.key)?0===String(i.key).indexOf(o)?i.key:o+i.key:i.key;var c=(i.data||(i.data={})).transition=uo(this),l=this._vnode,u=lo(l);if(i.data.directives&&i.data.directives.some(vo)&&(i.data.show=!0),u&&u.data&&!ho(i,u)&&!De(u)&&(!u.componentInstance||!u.componentInstance._vnode.isComment)){var f=u.data.transition=_({},c);if("out-in"===r)return this._leaving=!0,ke(f,"afterLeave",(function(){e._leaving=!1,e.$forceUpdate()})),fo(t,a);if("in-out"===r){if(De(i))return l;var d,p=function(){d()};ke(c,"afterEnter",p),ke(c,"enterCancelled",p),ke(f,"delayLeave",(function(t){d=t}))}}return a}}},bo=_({tag:String,moveClass:String},co);delete bo.mode;var yo={props:bo,beforeMount:function(){var t=this,e=this._update;this._update=function(n,r){var a=Ln(t);t.__patch__(t._vnode,t.kept,!1,!0),t._vnode=t.kept,a(),e.call(t,n,r)}},render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,a=this.$slots.default||[],i=this.children=[],o=uo(this),s=0;s1?arguments[1]:void 0,e.length)),r=String(t);return u?u.call(e,r,n):e.slice(n,n+r.length)===r}})},"2cf4":function(t,e,n){var r,a,i,o=n("da84"),s=n("d039"),c=n("0366"),l=n("1be4"),u=n("cc12"),f=n("1cdc"),d=n("605d"),p=o.location,h=o.setImmediate,m=o.clearImmediate,v=o.process,g=o.MessageChannel,b=o.Dispatch,y=0,E={},w="onreadystatechange",k=function(t){if(E.hasOwnProperty(t)){var e=E[t];delete E[t],e()}},T=function(t){return function(){k(t)}},x=function(t){k(t.data)},A=function(t){o.postMessage(t+"",p.protocol+"//"+p.host)};h&&m||(h=function(t){var e=[],n=1;while(arguments.length>n)e.push(arguments[n++]);return E[++y]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},r(y),y},m=function(t){delete E[t]},d?r=function(t){v.nextTick(T(t))}:b&&b.now?r=function(t){b.now(T(t))}:g&&!f?(a=new g,i=a.port2,a.port1.onmessage=x,r=c(i.postMessage,i,1)):o.addEventListener&&"function"==typeof postMessage&&!o.importScripts&&p&&"file:"!==p.protocol&&!s(A)?(r=A,o.addEventListener("message",x,!1)):r=w in u("script")?function(t){l.appendChild(u("script"))[w]=function(){l.removeChild(this),k(t)}}:function(t){setTimeout(T(t),0)}),t.exports={set:h,clear:m}},"2d00":function(t,e,n){var r,a,i=n("da84"),o=n("342f"),s=i.process,c=s&&s.versions,l=c&&c.v8;l?(r=l.split("."),a=r[0]<4?1:r[0]+r[1]):o&&(r=o.match(/Edge\/(\d+)/),(!r||r[1]>=74)&&(r=o.match(/Chrome\/(\d+)/),r&&(a=r[1]))),t.exports=a&&+a},"2d78":function(t,e){t.exports={functional:!0,render(t,e){const{_c:n,_v:r,data:a,children:i=[]}=e,{class:o,staticClass:s,style:c,staticStyle:l,attrs:u={},...f}=a;return n("svg",{class:["feather feather-link",o,s],style:[c,l],attrs:Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},u),...f},i.concat([n("path",{attrs:{d:"M10 13a5 5 0 007.54.54l3-3a5 5 0 00-7.07-7.07l-1.72 1.71"}}),n("path",{attrs:{d:"M14 11a5 5 0 00-7.54-.54l-3 3a5 5 0 007.07 7.07l1.71-1.71"}})]))}}},"2d78d":function(t,e,n){"use strict";e.__esModule=!0,e.tokenize=e.test=e.scanner=e.parser=e.options=e.inherits=e.find=void 0;var r=n("254c"),a=n("316e"),i=u(a),o=n("b7fe"),s=u(o),c=n("4128"),l=u(c);function u(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)});var f=function(t){return l.run(s.run(t))},d=function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=f(t),r=[],a=0;a1&&void 0!==arguments[1]?arguments[1]:null,n=f(t);return 1===n.length&&n[0].isLink&&(!e||n[0].type===e)};e.find=d,e.inherits=r.inherits,e.options=i,e.parser=l,e.scanner=s,e.test=p,e.tokenize=f},"2fd4":function(t,e){function n(t,e,n){var r=null,a=null,i=function(){r&&(clearTimeout(r),a=null,r=null)},o=function(){var t=a;i(),t&&t()},s=function(){if(!e)return t.apply(this,arguments);var o=this,s=arguments,c=n&&!r;return i(),a=function(){t.apply(o,s)},r=setTimeout((function(){if(r=null,!c){var t=a;return a=null,t()}}),e),c?a():void 0};return s.cancel=i,s.flush=o,s}t.exports=n},"316e":function(t,e,n){"use strict";e.__esModule=!0;var r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a={defaultProtocol:"http",events:null,format:s,formatHref:s,nl2br:!1,tagName:"a",target:c,validate:!0,ignoreTags:[],attributes:null,className:"linkified"};function i(t){t=t||{},this.defaultProtocol=t.hasOwnProperty("defaultProtocol")?t.defaultProtocol:a.defaultProtocol,this.events=t.hasOwnProperty("events")?t.events:a.events,this.format=t.hasOwnProperty("format")?t.format:a.format,this.formatHref=t.hasOwnProperty("formatHref")?t.formatHref:a.formatHref,this.nl2br=t.hasOwnProperty("nl2br")?t.nl2br:a.nl2br,this.tagName=t.hasOwnProperty("tagName")?t.tagName:a.tagName,this.target=t.hasOwnProperty("target")?t.target:a.target,this.validate=t.hasOwnProperty("validate")?t.validate:a.validate,this.ignoreTags=[],this.attributes=t.attributes||t.linkAttributes||a.attributes,this.className=t.hasOwnProperty("className")?t.className:t.linkClass||a.className;for(var e=t.hasOwnProperty("ignoreTags")?t.ignoreTags:a.ignoreTags,n=0;nc)a.f(t,n=r[c++],e[n]);return t}},3835:function(t,e,n){"use strict";function r(t){if(Array.isArray(t))return t}n.d(e,"a",(function(){return s}));n("a4d3"),n("e01a"),n("d3b7"),n("d28b"),n("3ca3"),n("ddb0");function a(t,e){var n=null==t?null:"undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,a,i=[],o=!0,s=!1;try{for(n=n.call(t);!(o=(r=n.next()).done);o=!0)if(i.push(r.value),e&&i.length===e)break}catch(c){s=!0,a=c}finally{try{o||null==n["return"]||n["return"]()}finally{if(s)throw a}}return i}}var i=n("06c5");function o(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(t,e){return r(t)||a(t,e)||Object(i["a"])(t,e)||o()}},"3bbe":function(t,e,n){var r=n("861d");t.exports=function(t){if(!r(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},"3c09":function(t,e){t.exports={functional:!0,render(t,e){const{_c:n,_v:r,data:a,children:i=[]}=e,{class:o,staticClass:s,style:c,staticStyle:l,attrs:u={},...f}=a;return n("svg",{class:["feather feather-trash-2",o,s],style:[c,l],attrs:Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},u),...f},i.concat([n("path",{attrs:{d:"M3 6h18M19 6v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6m3 0V4a2 2 0 012-2h4a2 2 0 012 2v2M10 11v6M14 11v6"}})]))}}},"3ca3":function(t,e,n){"use strict";var r=n("6547").charAt,a=n("69f3"),i=n("7dd0"),o="String Iterator",s=a.set,c=a.getterFor(o);i(String,"String",(function(t){s(this,{type:o,string:String(t),index:0})}),(function(){var t,e=c(this),n=e.string,a=e.index;return a>=n.length?{value:void 0,done:!0}:(t=r(n,a),e.index+=t.length,{value:t,done:!1})}))},"3f61":function(t,e){t.exports={functional:!0,render(t,e){const{_c:n,_v:r,data:a,children:i=[]}=e,{class:o,staticClass:s,style:c,staticStyle:l,attrs:u={},...f}=a;return n("svg",{class:["feather feather-check-circle",o,s],style:[c,l],attrs:Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},u),...f},i.concat([n("path",{attrs:{d:"M22 11.08V12a10 10 0 11-5.93-9.14"}}),n("path",{attrs:{d:"M22 4L12 14.01l-3-3"}})]))}}},"3f8c":function(t,e){t.exports={}},"408a":function(t,e,n){var r=n("c6b6");t.exports=function(t){if("number"!=typeof t&&"Number"!=r(t))throw TypeError("Incorrect invocation");return+t}},4128:function(t,e,n){"use strict";e.__esModule=!0,e.start=e.run=e.TOKENS=e.State=void 0;var r=n("1652"),a=n("bea1"),i=s(a),o=n("7656");function s(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}var c=function(t){return new r.TokenState(t)},l=c(),u=c(),f=c(),d=c(),p=c(),h=c(),m=c(),v=c(a.URL),g=c(),b=c(a.URL),y=c(a.URL),E=c(),w=c(),k=c(),T=c(),x=c(),A=c(a.URL),O=c(a.URL),S=c(a.URL),R=c(a.URL),N=c(),C=c(),_=c(),L=c(),I=c(),D=c(),P=c(a.EMAIL),M=c(),U=c(a.EMAIL),j=c(a.MAILTOEMAIL),F=c(),B=c(),H=c(),z=c(),q=c(a.NL);l.on(o.NL,q).on(o.PROTOCOL,u).on(o.MAILTO,f).on(o.SLASH,d),u.on(o.SLASH,d),d.on(o.SLASH,p),l.on(o.TLD,h).on(o.DOMAIN,h).on(o.LOCALHOST,v).on(o.NUM,h),p.on(o.TLD,y).on(o.DOMAIN,y).on(o.NUM,y).on(o.LOCALHOST,y),h.on(o.DOT,m),I.on(o.DOT,D),m.on(o.TLD,v).on(o.DOMAIN,h).on(o.NUM,h).on(o.LOCALHOST,h),D.on(o.TLD,P).on(o.DOMAIN,I).on(o.NUM,I).on(o.LOCALHOST,I),v.on(o.DOT,m),P.on(o.DOT,D),v.on(o.COLON,g).on(o.SLASH,y),g.on(o.NUM,b),b.on(o.SLASH,y),P.on(o.COLON,M),M.on(o.NUM,U);var G=[o.DOMAIN,o.AT,o.LOCALHOST,o.NUM,o.PLUS,o.POUND,o.PROTOCOL,o.SLASH,o.TLD,o.UNDERSCORE,o.SYM,o.AMPERSAND],Y=[o.COLON,o.DOT,o.QUERY,o.PUNCTUATION,o.CLOSEBRACE,o.CLOSEBRACKET,o.CLOSEANGLEBRACKET,o.CLOSEPAREN,o.OPENBRACE,o.OPENBRACKET,o.OPENANGLEBRACKET,o.OPENPAREN];y.on(o.OPENBRACE,w).on(o.OPENBRACKET,k).on(o.OPENANGLEBRACKET,T).on(o.OPENPAREN,x),E.on(o.OPENBRACE,w).on(o.OPENBRACKET,k).on(o.OPENANGLEBRACKET,T).on(o.OPENPAREN,x),w.on(o.CLOSEBRACE,y),k.on(o.CLOSEBRACKET,y),T.on(o.CLOSEANGLEBRACKET,y),x.on(o.CLOSEPAREN,y),A.on(o.CLOSEBRACE,y),O.on(o.CLOSEBRACKET,y),S.on(o.CLOSEANGLEBRACKET,y),R.on(o.CLOSEPAREN,y),N.on(o.CLOSEBRACE,y),C.on(o.CLOSEBRACKET,y),_.on(o.CLOSEANGLEBRACKET,y),L.on(o.CLOSEPAREN,y),w.on(G,A),k.on(G,O),T.on(G,S),x.on(G,R),w.on(Y,N),k.on(Y,C),T.on(Y,_),x.on(Y,L),A.on(G,A),O.on(G,O),S.on(G,S),R.on(G,R),A.on(Y,A),O.on(Y,O),S.on(Y,S),R.on(Y,R),N.on(G,A),C.on(G,O),_.on(G,S),L.on(G,R),N.on(Y,N),C.on(Y,C),_.on(Y,_),L.on(Y,L),y.on(G,y),E.on(G,y),y.on(Y,E),E.on(Y,E),f.on(o.TLD,j).on(o.DOMAIN,j).on(o.NUM,j).on(o.LOCALHOST,j),j.on(G,j).on(Y,F),F.on(G,j).on(Y,F);var V=[o.DOMAIN,o.NUM,o.PLUS,o.POUND,o.QUERY,o.UNDERSCORE,o.SYM,o.AMPERSAND,o.TLD];h.on(V,B).on(o.AT,H),v.on(V,B).on(o.AT,H),m.on(V,B),B.on(V,B).on(o.AT,H).on(o.DOT,z),z.on(V,B),H.on(o.TLD,I).on(o.DOMAIN,I).on(o.LOCALHOST,P);var W=function(t){var e=t.length,n=0,r=[],i=[];while(n=0&&d++,n++,u++;if(d<0)for(var p=n-u;p0&&(r.push(new a.TEXT(i)),i=[]),n-=d,u-=d;var h=f.emit();r.push(new h(t.slice(n-u,n)))}}return i.length>0&&r.push(new a.TEXT(i)),r};e.State=r.TokenState,e.TOKENS=i,e.run=W,e.start=l},4245:function(t,e,n){var r=n("1290");function a(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}t.exports=a},"428f":function(t,e,n){var r=n("da84");t.exports=r},4492:function(t,e){t.exports={functional:!0,render(t,e){const{_c:n,_v:r,data:a,children:i=[]}=e,{class:o,staticClass:s,style:c,staticStyle:l,attrs:u={},...f}=a;return n("svg",{class:["feather feather-github",o,s],style:[c,l],attrs:Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},u),...f},i.concat([n("path",{attrs:{d:"M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 00-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0020 4.77 5.07 5.07 0 0019.91 1S18.73.65 16 2.48a13.38 13.38 0 00-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 005 4.77a5.44 5.44 0 00-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 009 18.13V22"}})]))}}},"44ad":function(t,e,n){var r=n("d039"),a=n("c6b6"),i="".split;t.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==a(t)?i.call(t,""):Object(t)}:Object},"44d2":function(t,e,n){var r=n("b622"),a=n("7c73"),i=n("9bf2"),o=r("unscopables"),s=Array.prototype;void 0==s[o]&&i.f(s,o,{configurable:!0,value:a(null)}),t.exports=function(t){s[o][t]=!0}},"44de":function(t,e,n){var r=n("da84");t.exports=function(t,e){var n=r.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,e))}},"44e7":function(t,e,n){var r=n("861d"),a=n("c6b6"),i=n("b622"),o=i("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[o])?!!e:"RegExp"==a(t))}},"44f9":function(t,e){t.exports={functional:!0,render(t,e){const{_c:n,_v:r,data:a,children:i=[]}=e,{class:o,staticClass:s,style:c,staticStyle:l,attrs:u={},...f}=a;return n("svg",{class:["feather feather-chevron-down",o,s],style:[c,l],attrs:Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},u),...f},i.concat([n("path",{attrs:{d:"M6 9l6 6 6-6"}})]))}}},"460c":function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n("fe1f"),a=n("fd3a"),i=n("8c86");function o(t,e){Object(i["a"])(2,arguments);var n=Object(a["a"])(t),o=Object(r["a"])(e);return n.setMilliseconds(o),n}},"466d":function(t,e,n){"use strict";var r=n("d784"),a=n("825a"),i=n("50c4"),o=n("1d80"),s=n("8aa5"),c=n("14c3");r("match",(function(t,e,n){return[function(e){var n=o(this),r=void 0==e?void 0:e[t];return void 0!==r?r.call(e,n):new RegExp(e)[t](String(n))},function(t){var r=n(e,this,t);if(r.done)return r.value;var o=a(this),l=String(t);if(!o.global)return c(o,l);var u=o.unicode;o.lastIndex=0;var f,d=[],p=0;while(null!==(f=c(o,l))){var h=String(f[0]);d[p]=h,""===h&&(o.lastIndex=s(l,i(o.lastIndex),u)),p++}return 0===p?null:d}]}))},"46f3":function(t,e,n){"use strict";function r(){return function(t){t&&(this.v=t)}}e.__esModule=!0,e.createTokenClass=r},"47b3":function(t,e){t.exports={functional:!0,render(t,e){const{_c:n,_v:r,data:a,children:i=[]}=e,{class:o,staticClass:s,style:c,staticStyle:l,attrs:u={},...f}=a;return n("svg",{class:["feather feather-lock",o,s],style:[c,l],attrs:Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},u),...f},i.concat([n("rect",{attrs:{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"}}),n("path",{attrs:{d:"M7 11V7a5 5 0 0110 0v4"}})]))}}},4840:function(t,e,n){var r=n("825a"),a=n("1c0b"),i=n("b622"),o=i("species");t.exports=function(t,e){var n,i=r(t).constructor;return void 0===i||void 0==(n=r(i)[o])?e:a(n)}},4930:function(t,e,n){var r=n("2d00"),a=n("d039");t.exports=!!Object.getOwnPropertySymbols&&!a((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},"498a":function(t,e,n){"use strict";var r=n("23e7"),a=n("58a8").trim,i=n("c8d2");r({target:"String",proto:!0,forced:i("trim")},{trim:function(){return a(this)}})},"49f4":function(t,e,n){var r=n("6044");function a(){this.__data__=r?r(null):{},this.size=0}t.exports=a},"4d63":function(t,e,n){var r=n("83ab"),a=n("da84"),i=n("94ca"),o=n("7156"),s=n("9112"),c=n("9bf2").f,l=n("241c").f,u=n("44e7"),f=n("ad6d"),d=n("9f7f"),p=n("6eeb"),h=n("d039"),m=n("5135"),v=n("69f3").enforce,g=n("2626"),b=n("b622"),y=n("fce3"),E=n("107c"),w=b("match"),k=a.RegExp,T=k.prototype,x=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,A=/a/g,O=/a/g,S=new k(A)!==A,R=d.UNSUPPORTED_Y,N=r&&(!S||R||y||E||h((function(){return O[w]=!1,k(A)!=A||k(O)==O||"/a/i"!=k(A,"i")}))),C=function(t){for(var e,n=t.length,r=0,a="",i=!1;r<=n;r++)e=t.charAt(r),"\\"!==e?i||"."!==e?("["===e?i=!0:"]"===e&&(i=!1),a+=e):a+="[\\s\\S]":a+=e+t.charAt(++r);return a},_=function(t){for(var e,n=t.length,r=0,a="",i=[],o={},s=!1,c=!1,l=0,u="";r<=n;r++){if(e=t.charAt(r),"\\"===e)e+=t.charAt(++r);else if("]"===e)s=!1;else if(!s)switch(!0){case"["===e:s=!0;break;case"("===e:x.test(t.slice(r+1))&&(r+=2,c=!0),a+=e,l++;continue;case">"===e&&c:if(""===u||m(o,u))throw new SyntaxError("Invalid capture group name");o[u]=!0,i.push([u,l]),c=!1,u="";continue}c?u+=e:a+=e}return[a,i]};if(i("RegExp",N)){for(var L=function(t,e){var n,r,a,i,c,l,d=this instanceof L,p=u(t),h=void 0===e,m=[],g=t;if(!d&&p&&h&&t.constructor===L)return t;if((p||t instanceof L)&&(t=t.source,h&&(e="flags"in g?g.flags:f.call(g))),t=void 0===t?"":String(t),e=void 0===e?"":String(e),g=t,y&&"dotAll"in A&&(r=!!e&&e.indexOf("s")>-1,r&&(e=e.replace(/s/g,""))),n=e,R&&"sticky"in A&&(a=!!e&&e.indexOf("y")>-1,a&&(e=e.replace(/y/g,""))),E&&(i=_(t),t=i[0],m=i[1]),c=o(k(t,e),d?this:T,L),(r||a||m.length)&&(l=v(c),r&&(l.dotAll=!0,l.raw=L(C(t),n)),a&&(l.sticky=!0),m.length&&(l.groups=m)),t!==g)try{s(c,"source",""===g?"(?:)":g)}catch(b){}return c},I=function(t){t in L||c(L,t,{configurable:!0,get:function(){return k[t]},set:function(e){k[t]=e}})},D=l(k),P=0;D.length>P;)I(D[P++]);T.constructor=L,L.prototype=T,p(a,"RegExp",L)}g("RegExp")},"4d64":function(t,e,n){var r=n("fc6a"),a=n("50c4"),i=n("23cb"),o=function(t){return function(e,n,o){var s,c=r(e),l=a(c.length),u=i(o,l);if(t&&n!=n){while(l>u)if(s=c[u++],s!=s)return!0}else for(;l>u;u++)if((t||u in c)&&c[u]===n)return t||u||0;return!t&&-1}};t.exports={includes:o(!0),indexOf:o(!1)}},"4de4":function(t,e,n){"use strict";var r=n("23e7"),a=n("b727").filter,i=n("1dde"),o=i("filter");r({target:"Array",proto:!0,forced:!o},{filter:function(t){return a(this,t,arguments.length>1?arguments[1]:void 0)}})},"4df4":function(t,e,n){"use strict";var r=n("0366"),a=n("7b0b"),i=n("9bdd"),o=n("e95a"),s=n("50c4"),c=n("8418"),l=n("35a1");t.exports=function(t){var e,n,u,f,d,p,h=a(t),m="function"==typeof this?this:Array,v=arguments.length,g=v>1?arguments[1]:void 0,b=void 0!==g,y=l(h),E=0;if(b&&(g=r(g,v>2?arguments[2]:void 0,2)),void 0==y||m==Array&&o(y))for(e=s(h.length),n=new m(e);e>E;E++)p=b?g(h[E],E):h[E],c(n,E,p);else for(f=y.call(h),d=f.next,n=new m;!(u=d.call(f)).done;E++)p=b?i(f,g,[u.value,E],!0):u.value,c(n,E,p);return n.length=E,n}},"4e82":function(t,e,n){"use strict";var r=n("23e7"),a=n("1c0b"),i=n("7b0b"),o=n("50c4"),s=n("d039"),c=n("addb"),l=n("a640"),u=n("04d1"),f=n("d998"),d=n("2d00"),p=n("512c"),h=[],m=h.sort,v=s((function(){h.sort(void 0)})),g=s((function(){h.sort(null)})),b=l("sort"),y=!s((function(){if(d)return d<70;if(!(u&&u>3)){if(f)return!0;if(p)return p<603;var t,e,n,r,a="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)h.push({k:e+r,v:n})}for(h.sort((function(t,e){return e.v-t.v})),r=0;rString(n)?1:-1}};r({target:"Array",proto:!0,forced:E},{sort:function(t){void 0!==t&&a(t);var e=i(this);if(y)return void 0===t?m.call(e):m.call(e,t);var n,r,s=[],l=o(e.length);for(r=0;r0?a(r(t),9007199254740991):0}},"512c":function(t,e,n){var r=n("342f"),a=r.match(/AppleWebKit\/(\d+)\./);t.exports=!!a&&+a[1]},5135:function(t,e,n){var r=n("7b0b"),a={}.hasOwnProperty;t.exports=Object.hasOwn||function(t,e){return a.call(r(t),e)}},5319:function(t,e,n){"use strict";var r=n("d784"),a=n("d039"),i=n("825a"),o=n("50c4"),s=n("a691"),c=n("1d80"),l=n("8aa5"),u=n("0cb2"),f=n("14c3"),d=n("b622"),p=d("replace"),h=Math.max,m=Math.min,v=function(t){return void 0===t?t:String(t)},g=function(){return"$0"==="a".replace(/./,"$0")}(),b=function(){return!!/./[p]&&""===/./[p]("a","$0")}(),y=!a((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")}));r("replace",(function(t,e,n){var r=b?"$":"$0";return[function(t,n){var r=c(this),a=void 0==t?void 0:t[p];return void 0!==a?a.call(t,r,n):e.call(String(r),t,n)},function(t,a){if("string"===typeof a&&-1===a.indexOf(r)&&-1===a.indexOf("$<")){var c=n(e,this,t,a);if(c.done)return c.value}var d=i(this),p=String(t),g="function"===typeof a;g||(a=String(a));var b=d.global;if(b){var y=d.unicode;d.lastIndex=0}var E=[];while(1){var w=f(d,p);if(null===w)break;if(E.push(w),!b)break;var k=String(w[0]);""===k&&(d.lastIndex=l(p,o(d.lastIndex),y))}for(var T="",x=0,A=0;A=x&&(T+=p.slice(x,S)+L,x=S+O.length)}return T+p.slice(x)}]}),!y||!g||b)},"53ca":function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));n("a4d3"),n("e01a"),n("d3b7"),n("d28b"),n("3ca3"),n("ddb0");function r(t){return r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}},"54ed":function(t,e){t.exports={functional:!0,render(t,e){const{_c:n,_v:r,data:a,children:i=[]}=e,{class:o,staticClass:s,style:c,staticStyle:l,attrs:u={},...f}=a;return n("svg",{class:["feather feather-disc",o,s],style:[c,l],attrs:Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},u),...f},i.concat([n("circle",{attrs:{cx:"12",cy:"12",r:"10"}}),n("circle",{attrs:{cx:"12",cy:"12",r:"3"}})]))}}},5530:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));n("b64b"),n("a4d3"),n("4de4"),n("e439"),n("159b"),n("dbb4");function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function i(t){for(var e=1;e1?arguments[1]:void 0),e}})},"5e2e":function(t,e,n){var r=n("28c9"),a=n("69d5"),i=n("b4c0"),o=n("fba5"),s=n("67ca");function c(t){var e=-1,n=null==t?0:t.length;this.clear();while(++eu){var p,h=l(arguments[u++]),m=f?i(h).concat(f(h)):i(h),v=m.length,g=0;while(v>g)p=m[g++],r&&!d.call(h,p)||(n[p]=h[p])}return n}:u},"61ab":function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var n=0;n=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a,i=!0,o=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return i=t.done,t},e:function(t){o=!0,a=t},f:function(){try{i||null==r["return"]||r["return"]()}finally{if(o)throw a}}}}function s(t,e){if(t){if("string"===typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0?40*t+55:0,o=e>0?40*e+55:0,s=n>0?40*n+55:0;r[a]=h([i,o,s])}function p(t){var e=t.toString(16);while(e.length<2)e="0"+e;return e}function h(t){var e,n=[],r=o(t);try{for(r.s();!(e=r.n()).done;){var a=e.value;n.push(p(a))}}catch(i){r.e(i)}finally{r.f()}return"#"+n.join("")}function m(t,e,n,r){var a;return"text"===e?a=k(n,r):"display"===e?a=g(t,n,r):"xterm256"===e?a=A(t,r.colors[n]):"rgb"===e&&(a=v(t,n)),a}function v(t,e){e=e.substring(2).slice(0,-1);var n=+e.substr(0,2),r=e.substring(5).split(";"),a=r.map((function(t){return("0"+Number(t).toString(16)).substr(-2)})).join("");return x(t,(38===n?"color:#":"background-color:#")+a)}function g(t,e,n){e=parseInt(e,10);var r,a={"-1":function(){return"
    "},0:function(){return t.length&&b(t)},1:function(){return T(t,"b")},3:function(){return T(t,"i")},4:function(){return T(t,"u")},8:function(){return x(t,"display:none")},9:function(){return T(t,"strike")},22:function(){return x(t,"font-weight:normal;text-decoration:none;font-style:normal")},23:function(){return S(t,"i")},24:function(){return S(t,"u")},39:function(){return A(t,n.fg)},49:function(){return O(t,n.bg)},53:function(){return x(t,"text-decoration:overline")}};return a[e]?r=a[e]():4"})).join("")}function y(t,e){for(var n=[],r=t;r<=e;r++)n.push(r);return n}function E(t){return function(e){return(null===t||e.category!==t)&&"all"!==t}}function w(t){t=parseInt(t,10);var e=null;return 0===t?e="all":1===t?e="bold":2")}function x(t,e){return T(t,"span",e)}function A(t,e){return T(t,"span","color:"+e)}function O(t,e){return T(t,"span","background-color:"+e)}function S(t,e){var n;if(t.slice(-1)[0]===e&&(n=t.pop()),n)return""}function R(t,e,n){var r=!1,a=3;function i(){return""}function s(t,e){return n("xterm256",e),""}function c(t){return e.newline?n("display",-1):n("text",t),""}function l(t,e){r=!0,0===e.trim().length&&(e="0"),e=e.trimRight(";").split(";");var a,i=o(e);try{for(i.s();!(a=i.n()).done;){var s=a.value;n("display",s)}}catch(c){i.e(c)}finally{i.f()}return""}function u(t){return n("text",t),""}function f(t){return n("rgb",t),""}var d=[{pattern:/^\x08+/,sub:i},{pattern:/^\x1b\[[012]?K/,sub:i},{pattern:/^\x1b\[\(B/,sub:i},{pattern:/^\x1b\[[34]8;2;\d+;\d+;\d+m/,sub:f},{pattern:/^\x1b\[38;5;(\d+)m/,sub:s},{pattern:/^\n/,sub:c},{pattern:/^\r+\n/,sub:c},{pattern:/^\x1b\[((?:\d{1,3};?)+|)m/,sub:l},{pattern:/^\x1b\[\d?J/,sub:i},{pattern:/^\x1b\[\d{0,3};\d{0,3}f/,sub:i},{pattern:/^\x1b\[?[\d;]{0,3}/,sub:i},{pattern:/^(([^\x1b\x08\r\n])+)/,sub:u}];function p(e,n){n>a&&r||(r=!1,t=t.replace(e.pattern,e.sub))}var h=[],m=t,v=m.length;t:while(v>0){for(var g=0,b=0,y=d.length;b= 0x80 (not a basic code point)","invalid-input":"Invalid input"},w=l-u,k=Math.floor,T=String.fromCharCode;function x(t){throw new RangeError(E[t])}function A(t,e){var n=t.length,r=[];while(n--)r[n]=e(t[n]);return r}function O(t,e){var n=t.split("@"),r="";n.length>1&&(r=n[0]+"@",t=n[1]),t=t.replace(y,".");var a=t.split("."),i=A(a,e).join(".");return r+i}function S(t){var e,n,r=[],a=0,i=t.length;while(a=55296&&e<=56319&&a65535&&(t-=65536,e+=T(t>>>10&1023|55296),t=56320|1023&t),e+=T(t),e})).join("")}function N(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:l}function C(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function _(t,e,n){var r=0;for(t=n?k(t/p):t>>1,t+=k(t/e);t>w*f>>1;r+=l)t=k(t/w);return k(r+(w+1)*t/(t+d))}function L(t){var e,n,r,a,i,o,s,d,p,g,b=[],y=t.length,E=0,w=m,T=h;for(n=t.lastIndexOf(v),n<0&&(n=0),r=0;r=128&&x("not-basic"),b.push(t.charCodeAt(r));for(a=n>0?n+1:0;a=y&&x("invalid-input"),d=N(t.charCodeAt(a++)),(d>=l||d>k((c-E)/o))&&x("overflow"),E+=d*o,p=s<=T?u:s>=T+f?f:s-T,dk(c/g)&&x("overflow"),o*=g}e=b.length+1,T=_(E-i,e,0==i),k(E/e)>c-w&&x("overflow"),w+=k(E/e),E%=e,b.splice(E++,0,w)}return R(b)}function I(t){var e,n,r,a,i,o,s,d,p,g,b,y,E,w,A,O=[];for(t=S(t),y=t.length,e=m,n=0,i=h,o=0;o=e&&bk((c-n)/E)&&x("overflow"),n+=(s-e)*E,e=s,o=0;oc&&x("overflow"),b==e){for(d=n,p=l;;p+=l){if(g=p<=i?u:p>=i+f?f:p-i,d=l?t?"":void 0:(i=s.charCodeAt(c),i<55296||i>56319||c+1===l||(o=s.charCodeAt(c+1))<56320||o>57343?t?s.charAt(c):i:t?s.slice(c,c+2):o-56320+(i-55296<<10)+65536)}};t.exports={codeAt:i(!1),charAt:i(!0)}},6566:function(t,e,n){"use strict";var r=n("9bf2").f,a=n("7c73"),i=n("e2cc"),o=n("0366"),s=n("19aa"),c=n("2266"),l=n("7dd0"),u=n("2626"),f=n("83ab"),d=n("f183").fastKey,p=n("69f3"),h=p.set,m=p.getterFor;t.exports={getConstructor:function(t,e,n,l){var u=t((function(t,r){s(t,u,e),h(t,{type:e,index:a(null),first:void 0,last:void 0,size:0}),f||(t.size=0),void 0!=r&&c(r,t[l],{that:t,AS_ENTRIES:n})})),p=m(e),v=function(t,e,n){var r,a,i=p(t),o=g(t,e);return o?o.value=n:(i.last=o={index:a=d(e,!0),key:e,value:n,previous:r=i.last,next:void 0,removed:!1},i.first||(i.first=o),r&&(r.next=o),f?i.size++:t.size++,"F"!==a&&(i.index[a]=o)),t},g=function(t,e){var n,r=p(t),a=d(e);if("F"!==a)return r.index[a];for(n=r.first;n;n=n.next)if(n.key==e)return n};return i(u.prototype,{clear:function(){var t=this,e=p(t),n=e.index,r=e.first;while(r)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete n[r.index],r=r.next;e.first=e.last=void 0,f?e.size=0:t.size=0},delete:function(t){var e=this,n=p(e),r=g(e,t);if(r){var a=r.next,i=r.previous;delete n.index[r.index],r.removed=!0,i&&(i.next=a),a&&(a.previous=i),n.first==r&&(n.first=a),n.last==r&&(n.last=i),f?n.size--:e.size--}return!!r},forEach:function(t){var e,n=p(this),r=o(t,arguments.length>1?arguments[1]:void 0,3);while(e=e?e.next:n.first){r(e.value,e.key,this);while(e&&e.removed)e=e.previous}},has:function(t){return!!g(this,t)}}),i(u.prototype,n?{get:function(t){var e=g(this,t);return e&&e.value},set:function(t,e){return v(this,0===t?0:t,e)}}:{add:function(t){return v(this,t=0===t?0:t,t)}}),f&&r(u.prototype,"size",{get:function(){return p(this).size}}),u},setStrong:function(t,e,n){var r=e+" Iterator",a=m(e),i=m(r);l(t,e,(function(t,e){h(this,{type:r,target:t,state:a(t),kind:e,last:void 0})}),(function(){var t=i(this),e=t.kind,n=t.last;while(n&&n.removed)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?"keys"==e?{value:n.key,done:!1}:"values"==e?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),u(e)}}},"656b":function(t,e,n){var r=n("e2e4"),a=n("f4d6");function i(t,e){e=r(e,t);var n=0,i=e.length;while(null!=t&&nt.length)&&(e=t.length);for(var n=0,r=new Array(e);nu)n=c[u++],r&&!o.call(s,n)||f.push(t?[n,s[n]]:s[n]);return f}};t.exports={entries:s(!0),values:s(!1)}},7073:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=r(n("2504")),i=String.fromCodePoint||function(t){var e="";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|1023&t),e+=String.fromCharCode(t),e};function o(t){return t>=55296&&t<=57343||t>1114111?"�":(t in a.default&&(t=a.default[t]),i(t))}e.default=o},7156:function(t,e,n){var r=n("861d"),a=n("d2bb");t.exports=function(t,e,n){var i,o;return a&&"function"==typeof(i=e.constructor)&&i!==n&&r(o=i.prototype)&&o!==n.prototype&&a(t,o),t}},7268:function(t,e,n){"use strict";e.__esModule=!0,e.isSpace=o,e.isAlpha=s,e.preprocessInput=c;var r=/[\t\n\f ]/,a=/[A-Za-z]/,i=/\r\n?/g;function o(t){return r.test(t)}function s(t){return a.test(t)}function c(t){return t.replace(i,"\n")}},"72a2":function(t,e){t.exports={functional:!0,render(t,e){const{_c:n,_v:r,data:a,children:i=[]}=e,{class:o,staticClass:s,style:c,staticStyle:l,attrs:u={},...f}=a;return n("svg",{class:["feather feather-smile",o,s],style:[c,l],attrs:Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},u),...f},i.concat([n("circle",{attrs:{cx:"12",cy:"12",r:"10"}}),n("path",{attrs:{d:"M8 14s1.5 2 4 2 4-2 4-2M9 9h.01M15 9h.01"}})]))}}},"73d9":function(t,e,n){var r=n("44d2");r("flatMap")},7418:function(t,e){e.f=Object.getOwnPropertySymbols},"746f":function(t,e,n){var r=n("428f"),a=n("5135"),i=n("e538"),o=n("9bf2").f;t.exports=function(t){var e=r.Symbol||(r.Symbol={});a(e,t)||o(e,t,{value:i.f(t)})}},"74bb":function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};e.__esModule=!0;var i=a(n("d2dc")),o=n("2987"),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tokenOverride=function(t,e){if(t.type===o.TokenTypes.RESERVED_TOP_LEVEL&&e.value&&"SET"===t.value.toUpperCase()&&"BY"===e.value.toUpperCase())return t.type=o.TokenTypes.RESERVED,t},e}return r(e,t),e.prototype.getTokenizerConfig=function(){return{reservedWords:c,reservedTopLevelWords:l,reservedNewlineWords:f,reservedTopLevelWordsNoIndent:u,stringTypes:['""',"N''","''","``"],openParens:["(","CASE"],closeParens:[")","END"],indexedPlaceholderTypes:["?"],namedPlaceholderTypes:[":"],lineCommentTypes:["--"],specialWordChars:["_","$","#",".","@"]}},e}(i["default"]);e["default"]=s;var c=["A","ACCESSIBLE","AGENT","AGGREGATE","ALL","ALTER","ANY","ARRAY","AS","ASC","AT","ATTRIBUTE","AUTHID","AVG","BETWEEN","BFILE_BASE","BINARY_INTEGER","BINARY","BLOB_BASE","BLOCK","BODY","BOOLEAN","BOTH","BOUND","BREADTH","BULK","BY","BYTE","C","CALL","CALLING","CASCADE","CASE","CHAR_BASE","CHAR","CHARACTER","CHARSET","CHARSETFORM","CHARSETID","CHECK","CLOB_BASE","CLONE","CLOSE","CLUSTER","CLUSTERS","COALESCE","COLAUTH","COLLECT","COLUMNS","COMMENT","COMMIT","COMMITTED","COMPILED","COMPRESS","CONNECT","CONSTANT","CONSTRUCTOR","CONTEXT","CONTINUE","CONVERT","COUNT","CRASH","CREATE","CREDENTIAL","CURRENT","CURRVAL","CURSOR","CUSTOMDATUM","DANGLING","DATA","DATE_BASE","DATE","DAY","DECIMAL","DEFAULT","DEFINE","DELETE","DEPTH","DESC","DETERMINISTIC","DIRECTORY","DISTINCT","DO","DOUBLE","DROP","DURATION","ELEMENT","ELSIF","EMPTY","END","ESCAPE","EXCEPTIONS","EXCLUSIVE","EXECUTE","EXISTS","EXIT","EXTENDS","EXTERNAL","EXTRACT","FALSE","FETCH","FINAL","FIRST","FIXED","FLOAT","FOR","FORALL","FORCE","FROM","FUNCTION","GENERAL","GOTO","GRANT","GROUP","HASH","HEAP","HIDDEN","HOUR","IDENTIFIED","IF","IMMEDIATE","IN","INCLUDING","INDEX","INDEXES","INDICATOR","INDICES","INFINITE","INSTANTIABLE","INT","INTEGER","INTERFACE","INTERVAL","INTO","INVALIDATE","IS","ISOLATION","JAVA","LANGUAGE","LARGE","LEADING","LENGTH","LEVEL","LIBRARY","LIKE","LIKE2","LIKE4","LIKEC","LIMITED","LOCAL","LOCK","LONG","MAP","MAX","MAXLEN","MEMBER","MERGE","MIN","MINUTE","MLSLABEL","MOD","MODE","MONTH","MULTISET","NAME","NAN","NATIONAL","NATIVE","NATURAL","NATURALN","NCHAR","NEW","NEXTVAL","NOCOMPRESS","NOCOPY","NOT","NOWAIT","NULL","NULLIF","NUMBER_BASE","NUMBER","OBJECT","OCICOLL","OCIDATE","OCIDATETIME","OCIDURATION","OCIINTERVAL","OCILOBLOCATOR","OCINUMBER","OCIRAW","OCIREF","OCIREFCURSOR","OCIROWID","OCISTRING","OCITYPE","OF","OLD","ON","ONLY","OPAQUE","OPEN","OPERATOR","OPTION","ORACLE","ORADATA","ORDER","ORGANIZATION","ORLANY","ORLVARY","OTHERS","OUT","OVERLAPS","OVERRIDING","PACKAGE","PARALLEL_ENABLE","PARAMETER","PARAMETERS","PARENT","PARTITION","PASCAL","PCTFREE","PIPE","PIPELINED","PLS_INTEGER","PLUGGABLE","POSITIVE","POSITIVEN","PRAGMA","PRECISION","PRIOR","PRIVATE","PROCEDURE","PUBLIC","RAISE","RANGE","RAW","READ","REAL","RECORD","REF","REFERENCE","RELEASE","RELIES_ON","REM","REMAINDER","RENAME","RESOURCE","RESULT_CACHE","RESULT","RETURN","RETURNING","REVERSE","REVOKE","ROLLBACK","ROW","ROWID","ROWNUM","ROWTYPE","SAMPLE","SAVE","SAVEPOINT","SB1","SB2","SB4","SEARCH","SECOND","SEGMENT","SELF","SEPARATE","SEQUENCE","SERIALIZABLE","SHARE","SHORT","SIZE_T","SIZE","SMALLINT","SOME","SPACE","SPARSE","SQL","SQLCODE","SQLDATA","SQLERRM","SQLNAME","SQLSTATE","STANDARD","START","STATIC","STDDEV","STORED","STRING","STRUCT","STYLE","SUBMULTISET","SUBPARTITION","SUBSTITUTABLE","SUBTYPE","SUCCESSFUL","SUM","SYNONYM","SYSDATE","TABAUTH","TABLE","TDO","THE","THEN","TIME","TIMESTAMP","TIMEZONE_ABBR","TIMEZONE_HOUR","TIMEZONE_MINUTE","TIMEZONE_REGION","TO","TRAILING","TRANSACTION","TRANSACTIONAL","TRIGGER","TRUE","TRUSTED","TYPE","UB1","UB2","UB4","UID","UNDER","UNIQUE","UNPLUG","UNSIGNED","UNTRUSTED","USE","USER","USING","VALIDATE","VALIST","VALUE","VARCHAR","VARCHAR2","VARIABLE","VARIANCE","VARRAY","VARYING","VIEW","VIEWS","VOID","WHENEVER","WHILE","WITH","WORK","WRAPPED","WRITE","YEAR","ZONE"],l=["ADD","ALTER COLUMN","ALTER TABLE","BEGIN","CONNECT BY","DECLARE","DELETE FROM","DELETE","END","EXCEPT","EXCEPTION","FETCH FIRST","FROM","GROUP BY","HAVING","INSERT INTO","INSERT","LIMIT","LOOP","MODIFY","ORDER BY","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","START WITH","UPDATE","VALUES","WHERE"],u=["INTERSECT","INTERSECT ALL","MINUS","UNION","UNION ALL"],f=["AND","CROSS APPLY","CROSS JOIN","ELSE","END","INNER JOIN","JOIN","LEFT JOIN","LEFT OUTER JOIN","OR","OUTER APPLY","OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN","WHEN","XOR"]},7613:function(t,e,n){"use strict";e.__esModule=!0,e.default=m;var r=n("0fa7"),a=c(r),i=n("2d78d"),o=s(i);function s(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function c(t){return t&&t.__esModule?t:{default:t}}var l=o.options,u=l.Options,f="StartTag",d="EndTag",p="Chars",h="Comment";function m(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=a.default.tokenize(t),i=[],o=[];for(n=new u(n),e=0;e0){var x=E(k.attributes);T+=" "+x.join(" ")}T+=">",o.push(T);break;case d:o.push("");break;case p:o.push(b(k.chars));break;case h:o.push("\x3c!--"+b(k.chars)+"--\x3e");break}}return o.join("")}function v(t,e){for(var n=o.tokenize(t),r=[],a=0;a0){var i=e[n];i.type===f&&i.tagName.toUpperCase()===t?a++:i.type===d&&i.tagName.toUpperCase()===t&&a--,r.push(i),n++}return r}function b(t){return t}function y(t){return t.replace(/"/g,""")}function E(t){for(var e=[],n=0;n"),L=o(")"),I=o("&");e.Base=i,e.DOMAIN=s,e.AT=c,e.COLON=l,e.DOT=u,e.PUNCTUATION=f,e.LOCALHOST=d,e.NL=p,e.NUM=h,e.PLUS=m,e.POUND=v,e.QUERY=y,e.PROTOCOL=g,e.MAILTO=b,e.SLASH=E,e.UNDERSCORE=w,e.SYM=k,e.TLD=T,e.WS=x,e.OPENBRACE=A,e.OPENBRACKET=O,e.OPENANGLEBRACKET=S,e.OPENPAREN=R,e.CLOSEBRACE=N,e.CLOSEBRACKET=C,e.CLOSEANGLEBRACKET=_,e.CLOSEPAREN=L,e.AMPERSAND=I},7677:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n("fd3a"),a=n("8c86");function i(t,e){Object(a["a"])(2,arguments);var n=Object(r["a"])(t),i=Object(r["a"])(e);return n.getTime()",d="<",p="prototype",h="script",m=u("IE_PROTO"),v=function(){},g=function(t){return d+h+f+t+d+"/"+h+f},b=function(t){t.write(g("")),t.close();var e=t.parentWindow.Object;return t=null,e},y=function(){var t,e=l("iframe"),n="java"+h+":";return e.style.display="none",c.appendChild(e),e.src=String(n),t=e.contentWindow.document,t.open(),t.write(g("document.F=Object")),t.close(),t.F},E=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(e){}E=r?b(r):y();var t=o.length;while(t--)delete E[p][o[t]];return E()};s[m]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(v[p]=a(t),n=new v,v[p]=null,n[m]=t):n=E(),void 0===e?n:i(n,e)}},"7db0":function(t,e,n){"use strict";var r=n("23e7"),a=n("b727").find,i=n("44d2"),o="find",s=!0;o in[]&&Array(1)[o]((function(){s=!1})),r({target:"Array",proto:!0,forced:s},{find:function(t){return a(this,t,arguments.length>1?arguments[1]:void 0)}}),i(o)},"7dd0":function(t,e,n){"use strict";var r=n("23e7"),a=n("9ed3"),i=n("e163"),o=n("d2bb"),s=n("d44e"),c=n("9112"),l=n("6eeb"),u=n("b622"),f=n("c430"),d=n("3f8c"),p=n("ae93"),h=p.IteratorPrototype,m=p.BUGGY_SAFARI_ITERATORS,v=u("iterator"),g="keys",b="values",y="entries",E=function(){return this};t.exports=function(t,e,n,u,p,w,k){a(n,e,u);var T,x,A,O=function(t){if(t===p&&_)return _;if(!m&&t in N)return N[t];switch(t){case g:return function(){return new n(this,t)};case b:return function(){return new n(this,t)};case y:return function(){return new n(this,t)}}return function(){return new n(this)}},S=e+" Iterator",R=!1,N=t.prototype,C=N[v]||N["@@iterator"]||p&&N[p],_=!m&&C||O(p),L="Array"==e&&N.entries||C;if(L&&(T=i(L.call(new t)),h!==Object.prototype&&T.next&&(f||i(T)===h||(o?o(T,h):"function"!=typeof T[v]&&c(T,v,E)),s(T,S,!0,!0),f&&(d[S]=E))),p==b&&C&&C.name!==b&&(R=!0,_=function(){return C.call(this)}),f&&!k||N[v]===_||c(N,v,_),d[e]=_,p)if(x={values:O(b),keys:w?_:O(g),entries:O(y)},k)for(A in x)(m||R||!(A in N))&&l(N,A,x[A]);else r({target:e,proto:!0,forced:m||R},x);return x}},"7f9a":function(t,e,n){var r=n("da84"),a=n("8925"),i=r.WeakMap;t.exports="function"===typeof i&&/native code/.test(a(i))},"806d":function(t,e){t.exports={functional:!0,render(t,e){const{_c:n,_v:r,data:a,children:i=[]}=e,{class:o,staticClass:s,style:c,staticStyle:l,attrs:u={},...f}=a;return n("svg",{class:["feather feather-list",o,s],style:[c,l],attrs:Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},u),...f},i.concat([n("path",{attrs:{d:"M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01"}})]))}}},"81c8":function(t,e){t.exports={functional:!0,render(t,e){const{_c:n,_v:r,data:a,children:i=[]}=e,{class:o,staticClass:s,style:c,staticStyle:l,attrs:u={},...f}=a;return n("svg",{class:["feather feather-settings",o,s],style:[c,l],attrs:Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},u),...f},i.concat([n("circle",{attrs:{cx:"12",cy:"12",r:"3"}}),n("path",{attrs:{d:"M19.4 15a1.65 1.65 0 00.33 1.82l.06.06a2 2 0 010 2.83 2 2 0 01-2.83 0l-.06-.06a1.65 1.65 0 00-1.82-.33 1.65 1.65 0 00-1 1.51V21a2 2 0 01-2 2 2 2 0 01-2-2v-.09A1.65 1.65 0 009 19.4a1.65 1.65 0 00-1.82.33l-.06.06a2 2 0 01-2.83 0 2 2 0 010-2.83l.06-.06a1.65 1.65 0 00.33-1.82 1.65 1.65 0 00-1.51-1H3a2 2 0 01-2-2 2 2 0 012-2h.09A1.65 1.65 0 004.6 9a1.65 1.65 0 00-.33-1.82l-.06-.06a2 2 0 010-2.83 2 2 0 012.83 0l.06.06a1.65 1.65 0 001.82.33H9a1.65 1.65 0 001-1.51V3a2 2 0 012-2 2 2 0 012 2v.09a1.65 1.65 0 001 1.51 1.65 1.65 0 001.82-.33l.06-.06a2 2 0 012.83 0 2 2 0 010 2.83l-.06.06a1.65 1.65 0 00-.33 1.82V9a1.65 1.65 0 001.51 1H21a2 2 0 012 2 2 2 0 01-2 2h-.09a1.65 1.65 0 00-1.51 1z"}})]))}}},"81d5":function(t,e,n){"use strict";var r=n("7b0b"),a=n("23cb"),i=n("50c4");t.exports=function(t){var e=r(this),n=i(e.length),o=arguments.length,s=a(o>1?arguments[1]:void 0,n),c=o>2?arguments[2]:void 0,l=void 0===c?n:a(c,n);while(l>s)e[s++]=t;return e}},"825a":function(t,e,n){var r=n("861d");t.exports=function(t){if(!r(t))throw TypeError(String(t)+" is not an object");return t}},"83ab":function(t,e,n){var r=n("d039");t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},8418:function(t,e,n){"use strict";var r=n("c04e"),a=n("9bf2"),i=n("5c6c");t.exports=function(t,e,n){var o=r(e);o in t?a.f(t,o,i(0,n)):t[o]=n}},"841c":function(t,e,n){"use strict";var r=n("d784"),a=n("825a"),i=n("1d80"),o=n("129f"),s=n("14c3");r("search",(function(t,e,n){return[function(e){var n=i(this),r=void 0==e?void 0:e[t];return void 0!==r?r.call(e,n):new RegExp(e)[t](String(n))},function(t){var r=n(e,this,t);if(r.done)return r.value;var i=a(this),c=String(t),l=i.lastIndex;o(l,0)||(i.lastIndex=0);var u=s(i,c);return o(i.lastIndex,l)||(i.lastIndex=l),null===u?-1:u.index}]}))},8609:function(t,e,n){"use strict";e.__esModule=!0;var r=function(){function t(t){this.params=t,this.index=0,this.params=t}return t.prototype.get=function(t){var e=t.key,n=t.value;return this.params?e?this.params[e]:this.params[this.index++]:n},t}();e["default"]=r},"861d":function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},"876f":function(t,e){t.exports={functional:!0,render(t,e){const{_c:n,_v:r,data:a,children:i=[]}=e,{class:o,staticClass:s,style:c,staticStyle:l,attrs:u={},...f}=a;return n("svg",{class:["feather feather-twitter",o,s],style:[c,l],attrs:Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},u),...f},i.concat([n("path",{attrs:{d:"M23 3a10.9 10.9 0 01-3.14 1.53 4.48 4.48 0 00-7.86 3v1A10.66 10.66 0 013 4s-4 9 5 13a11.64 11.64 0 01-7 2c9 5 20 0 20-11.5a4.5 4.5 0 00-.08-.83A7.72 7.72 0 0023 3z"}})]))}}},"87f4":function(t,e){t.exports={functional:!0,render(t,e){const{_c:n,_v:r,data:a,children:i=[]}=e,{class:o,staticClass:s,style:c,staticStyle:l,attrs:u={},...f}=a;return n("svg",{class:["feather feather-clock",o,s],style:[c,l],attrs:Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},u),...f},i.concat([n("circle",{attrs:{cx:"12",cy:"12",r:"10"}}),n("path",{attrs:{d:"M12 6v6l4 2"}})]))}}},"87ff":function(t,e){t.exports={functional:!0,render(t,e){const{_c:n,_v:r,data:a,children:i=[]}=e,{class:o,staticClass:s,style:c,staticStyle:l,attrs:u={},...f}=a;return n("svg",{class:["feather feather-x-circle",o,s],style:[c,l],attrs:Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},u),...f},i.concat([n("circle",{attrs:{cx:"12",cy:"12",r:"10"}}),n("path",{attrs:{d:"M15 9l-6 6M9 9l6 6"}})]))}}},8925:function(t,e,n){var r=n("c6cd"),a=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(t){return a.call(t)}),t.exports=r.inspectSource},"89b6":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decodeXMLStrict=e.decodeHTML5Strict=e.decodeHTML4Strict=e.decodeHTML5=e.decodeHTML4=e.decodeHTMLStrict=e.decodeHTML=e.decodeXML=e.encodeHTML5=e.encodeHTML4=e.escapeUTF8=e.escape=e.encodeNonAsciiHTML=e.encodeHTML=e.encodeXML=e.encode=e.decodeStrict=e.decode=void 0;var r=n("a16e"),a=n("051a");function i(t,e){return(!e||e<=0?r.decodeXML:r.decodeHTML)(t)}function o(t,e){return(!e||e<=0?r.decodeXML:r.decodeHTMLStrict)(t)}function s(t,e){return(!e||e<=0?a.encodeXML:a.encodeHTML)(t)}e.decode=i,e.decodeStrict=o,e.encode=s;var c=n("051a");Object.defineProperty(e,"encodeXML",{enumerable:!0,get:function(){return c.encodeXML}}),Object.defineProperty(e,"encodeHTML",{enumerable:!0,get:function(){return c.encodeHTML}}),Object.defineProperty(e,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return c.encodeNonAsciiHTML}}),Object.defineProperty(e,"escape",{enumerable:!0,get:function(){return c.escape}}),Object.defineProperty(e,"escapeUTF8",{enumerable:!0,get:function(){return c.escapeUTF8}}),Object.defineProperty(e,"encodeHTML4",{enumerable:!0,get:function(){return c.encodeHTML}}),Object.defineProperty(e,"encodeHTML5",{enumerable:!0,get:function(){return c.encodeHTML}});var l=n("a16e");Object.defineProperty(e,"decodeXML",{enumerable:!0,get:function(){return l.decodeXML}}),Object.defineProperty(e,"decodeHTML",{enumerable:!0,get:function(){return l.decodeHTML}}),Object.defineProperty(e,"decodeHTMLStrict",{enumerable:!0,get:function(){return l.decodeHTMLStrict}}),Object.defineProperty(e,"decodeHTML4",{enumerable:!0,get:function(){return l.decodeHTML}}),Object.defineProperty(e,"decodeHTML5",{enumerable:!0,get:function(){return l.decodeHTML}}),Object.defineProperty(e,"decodeHTML4Strict",{enumerable:!0,get:function(){return l.decodeHTMLStrict}}),Object.defineProperty(e,"decodeHTML5Strict",{enumerable:!0,get:function(){return l.decodeHTMLStrict}}),Object.defineProperty(e,"decodeXMLStrict",{enumerable:!0,get:function(){return l.decodeXML}})},"8aa5":function(t,e,n){"use strict";var r=n("6547").charAt;t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},"8c7a":function(t,e,n){(function(e){var n="undefined"!==typeof window?window:"undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},r=function(t){var e=/\blang(?:uage)?-([\w-]+)\b/i,n=0,r={},a={manual:t.Prism&&t.Prism.manual,disableWorkerMessageHandler:t.Prism&&t.Prism.disableWorkerMessageHandler,util:{encode:function t(e){return e instanceof i?new i(e.type,t(e.content),e.alias):Array.isArray(e)?e.map(t):e.replace(/&/g,"&").replace(/=f.reach)break;var x=k.value;if(e.length>t.length)return;if(!(x instanceof i)){var A,O=1;if(b){if(A=o(w,T,t,g),!A)break;var S=A.index,R=A.index+A[0].length,N=T;N+=k.value.length;while(S>=N)k=k.next,N+=k.value.length;if(N-=k.value.length,T=N,k.value instanceof i)continue;for(var C=k;C!==e.tail&&(Nf.reach&&(f.reach=D);var P=k.prev;L&&(P=l(e,P,L),T+=L.length),u(e,P,O);var M=new i(d,v?a.tokenize(_,v):_,y,_);if(k=l(e,P,M),I&&l(e,k,I),O>1){var U={cause:d+","+h,reach:D};s(t,e,n,k.prev,T,U),f&&U.reach>f.reach&&(f.reach=U.reach)}}}}}}function c(){var t={value:null,prev:null,next:null},e={value:null,prev:t,next:null};t.next=e,this.head=t,this.tail=e,this.length=0}function l(t,e,n){var r=e.next,a={value:n,prev:e,next:r};return e.next=a,r.prev=a,t.length++,a}function u(t,e,n){for(var r=e.next,a=0;a"+i.content+""},!t.document)return t.addEventListener?(a.disableWorkerMessageHandler||t.addEventListener("message",(function(e){var n=JSON.parse(e.data),r=n.language,i=n.code,o=n.immediateClose;t.postMessage(a.highlight(i,a.languages[r],r)),o&&t.close()}),!1),a):a;var d=a.util.currentScript();function p(){a.manual||a.highlightAll()}if(d&&(a.filename=d.src,d.hasAttribute("data-manual")&&(a.manual=!0)),!a.manual){var h=document.readyState;"loading"===h||"interactive"===h&&d&&d.defer?document.addEventListener("DOMContentLoaded",p):window.requestAnimationFrame?window.requestAnimationFrame(p):window.setTimeout(p,16)}return a}(n); -/** - * Prism: Lightweight, robust, elegant syntax highlighting - * - * @license MIT - * @author Lea Verou - * @namespace - * @public - */t.exports&&(t.exports=r),"undefined"!==typeof e&&(e.Prism=r)}).call(this,n("c8ba"))},"8c86":function(t,e,n){"use strict";function r(t,e){if(e.length1?"s":"")+" required, but only "+e.length+" present")}n.d(e,"a",(function(){return r}))},"8ec9":function(t,e){t.exports={functional:!0,render(t,e){const{_c:n,_v:r,data:a,children:i=[]}=e,{class:o,staticClass:s,style:c,staticStyle:l,attrs:u={},...f}=a;return n("svg",{class:["feather feather-zap",o,s],style:[c,l],attrs:Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},u),...f},i.concat([n("path",{attrs:{d:"M13 2L3 14h9l-1 8 10-12h-9l1-8z"}})]))}}},"90e3":function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++n+r).toString(36)}},9112:function(t,e,n){var r=n("83ab"),a=n("9bf2"),i=n("5c6c");t.exports=r?function(t,e,n){return a.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},9263:function(t,e,n){"use strict";var r=n("ad6d"),a=n("9f7f"),i=n("5692"),o=n("7c73"),s=n("69f3").get,c=n("fce3"),l=n("107c"),u=RegExp.prototype.exec,f=i("native-string-replace",String.prototype.replace),d=u,p=function(){var t=/a/,e=/b*/g;return u.call(t,"a"),u.call(e,"a"),0!==t.lastIndex||0!==e.lastIndex}(),h=a.UNSUPPORTED_Y||a.BROKEN_CARET,m=void 0!==/()??/.exec("")[1],v=p||m||h||c||l;v&&(d=function(t){var e,n,a,i,c,l,v,g=this,b=s(g),y=b.raw;if(y)return y.lastIndex=g.lastIndex,e=d.call(y,t),g.lastIndex=y.lastIndex,e;var E=b.groups,w=h&&g.sticky,k=r.call(g),T=g.source,x=0,A=t;if(w&&(k=k.replace("y",""),-1===k.indexOf("g")&&(k+="g"),A=String(t).slice(g.lastIndex),g.lastIndex>0&&(!g.multiline||g.multiline&&"\n"!==t[g.lastIndex-1])&&(T="(?: "+T+")",A=" "+A,x++),n=new RegExp("^(?:"+T+")",k)),m&&(n=new RegExp("^"+T+"$(?!\\s)",k)),p&&(a=g.lastIndex),i=u.call(w?n:g,A),w?i?(i.input=i.input.slice(x),i[0]=i[0].slice(x),i.index=g.lastIndex,g.lastIndex+=i[0].length):g.lastIndex=0:p&&i&&(g.lastIndex=g.global?i.index+i[0].length:a),m&&i&&i.length>1&&f.call(i[0],n,(function(){for(c=1;c=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return a("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),R(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var a=r.arg;R(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:C(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}(t.exports);try{regeneratorRuntime=r}catch(a){Function("r","regeneratorRuntime = r")(r)}},9976:function(t,e){t.exports={functional:!0,render(t,e){const{_c:n,_v:r,data:a,children:i=[]}=e,{class:o,staticClass:s,style:c,staticStyle:l,attrs:u={},...f}=a;return n("svg",{class:["feather feather-chevron-left",o,s],style:[c,l],attrs:Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},u),...f},i.concat([n("path",{attrs:{d:"M15 18l-6-6 6-6"}})]))}}},"99af":function(t,e,n){"use strict";var r=n("23e7"),a=n("d039"),i=n("e8b5"),o=n("861d"),s=n("7b0b"),c=n("50c4"),l=n("8418"),u=n("65f0"),f=n("1dde"),d=n("b622"),p=n("2d00"),h=d("isConcatSpreadable"),m=9007199254740991,v="Maximum allowed index exceeded",g=p>=51||!a((function(){var t=[];return t[h]=!1,t.concat()[0]!==t})),b=f("concat"),y=function(t){if(!o(t))return!1;var e=t[h];return void 0!==e?!!e:i(t)},E=!g||!b;r({target:"Array",proto:!0,forced:E},{concat:function(t){var e,n,r,a,i,o=s(this),f=u(o,0),d=0;for(e=-1,r=arguments.length;em)throw TypeError(v);for(n=0;n=m)throw TypeError(v);l(f,d++,i)}return f.length=d,f}})},"9a87":function(t,e){t.exports={functional:!0,render(t,e){const{_c:n,_v:r,data:a,children:i=[]}=e,{class:o,staticClass:s,style:c,staticStyle:l,attrs:u={},...f}=a;return n("svg",{class:["feather feather-info",o,s],style:[c,l],attrs:Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},u),...f},i.concat([n("circle",{attrs:{cx:"12",cy:"12",r:"10"}}),n("path",{attrs:{d:"M12 16v-4M12 8h.01"}})]))}}},"9b02":function(t,e,n){var r=n("656b");function a(t,e,n){var a=null==t?void 0:r(t,e);return void 0===a?n:a}t.exports=a},"9bdd":function(t,e,n){var r=n("825a"),a=n("2a62");t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(o){throw a(t),o}}},"9bf2":function(t,e,n){var r=n("83ab"),a=n("0cfb"),i=n("825a"),o=n("c04e"),s=Object.defineProperty;e.f=r?s:function(t,e,n){if(i(t),e=o(e,!0),i(n),a)try{return s(t,e,n)}catch(r){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},"9e69":function(t,e,n){var r=n("2b3e"),a=r.Symbol;t.exports=a},"9ed3":function(t,e,n){"use strict";var r=n("ae93").IteratorPrototype,a=n("7c73"),i=n("5c6c"),o=n("d44e"),s=n("3f8c"),c=function(){return this};t.exports=function(t,e,n){var l=e+" Iterator";return t.prototype=a(r,{next:i(1,n)}),o(t,l,!1,!0),s[l]=c,t}},"9f3d":function(t,e,n){"use strict";e.__esModule=!0;var r=n("7268");function a(t,e){this.delegate=t,this.entityParser=e,this.state=null,this.input=null,this.index=-1,this.line=-1,this.column=-1,this.tagLine=-1,this.tagColumn=-1,this.reset()}a.prototype={reset:function(){this.state="beforeData",this.input="",this.index=0,this.line=1,this.column=0,this.tagLine=-1,this.tagColumn=-1,this.delegate.reset()},tokenize:function(t){this.reset(),this.tokenizePart(t),this.tokenizeEOF()},tokenizePart:function(t){this.input+=(0,r.preprocessInput)(t);while(this.index"===t?(this.delegate.finishComment(),this.state="beforeData"):(this.delegate.appendToCommentData(t),this.state="comment")},commentStartDash:function(){var t=this.consume();"-"===t?this.state="commentEnd":">"===t?(this.delegate.finishComment(),this.state="beforeData"):(this.delegate.appendToCommentData("-"),this.state="comment")},comment:function(){var t=this.consume();"-"===t?this.state="commentEndDash":this.delegate.appendToCommentData(t)},commentEndDash:function(){var t=this.consume();"-"===t?this.state="commentEnd":(this.delegate.appendToCommentData("-"+t),this.state="comment")},commentEnd:function(){var t=this.consume();">"===t?(this.delegate.finishComment(),this.state="beforeData"):(this.delegate.appendToCommentData("--"+t),this.state="comment")},tagName:function(){var t=this.consume();(0,r.isSpace)(t)?this.state="beforeAttributeName":"/"===t?this.state="selfClosingStartTag":">"===t?(this.delegate.finishTag(),this.state="beforeData"):this.delegate.appendToTagName(t)},beforeAttributeName:function(){var t=this.peek();(0,r.isSpace)(t)?this.consume():"/"===t?(this.state="selfClosingStartTag",this.consume()):">"===t?(this.consume(),this.delegate.finishTag(),this.state="beforeData"):(this.state="attributeName",this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(t))},attributeName:function(){var t=this.peek();(0,r.isSpace)(t)?(this.state="afterAttributeName",this.consume()):"/"===t?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.state="selfClosingStartTag"):"="===t?(this.state="beforeAttributeValue",this.consume()):">"===t?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.state="beforeData"):(this.consume(),this.delegate.appendToAttributeName(t))},afterAttributeName:function(){var t=this.peek();(0,r.isSpace)(t)?this.consume():"/"===t?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.state="selfClosingStartTag"):"="===t?(this.consume(),this.state="beforeAttributeValue"):">"===t?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.state="beforeData"):(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.state="attributeName",this.delegate.beginAttribute(),this.delegate.appendToAttributeName(t))},beforeAttributeValue:function(){var t=this.peek();(0,r.isSpace)(t)?this.consume():'"'===t?(this.state="attributeValueDoubleQuoted",this.delegate.beginAttributeValue(!0),this.consume()):"'"===t?(this.state="attributeValueSingleQuoted",this.delegate.beginAttributeValue(!0),this.consume()):">"===t?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.state="beforeData"):(this.state="attributeValueUnquoted",this.delegate.beginAttributeValue(!1),this.consume(),this.delegate.appendToAttributeValue(t))},attributeValueDoubleQuoted:function(){var t=this.consume();'"'===t?(this.delegate.finishAttributeValue(),this.state="afterAttributeValueQuoted"):"&"===t?this.delegate.appendToAttributeValue(this.consumeCharRef('"')||"&"):this.delegate.appendToAttributeValue(t)},attributeValueSingleQuoted:function(){var t=this.consume();"'"===t?(this.delegate.finishAttributeValue(),this.state="afterAttributeValueQuoted"):"&"===t?this.delegate.appendToAttributeValue(this.consumeCharRef("'")||"&"):this.delegate.appendToAttributeValue(t)},attributeValueUnquoted:function(){var t=this.peek();(0,r.isSpace)(t)?(this.delegate.finishAttributeValue(),this.consume(),this.state="beforeAttributeName"):"&"===t?(this.consume(),this.delegate.appendToAttributeValue(this.consumeCharRef(">")||"&")):">"===t?(this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.state="beforeData"):(this.consume(),this.delegate.appendToAttributeValue(t))},afterAttributeValueQuoted:function(){var t=this.peek();(0,r.isSpace)(t)?(this.consume(),this.state="beforeAttributeName"):"/"===t?(this.consume(),this.state="selfClosingStartTag"):">"===t?(this.consume(),this.delegate.finishTag(),this.state="beforeData"):this.state="beforeAttributeName"},selfClosingStartTag:function(){var t=this.peek();">"===t?(this.consume(),this.delegate.markTagAsSelfClosing(),this.delegate.finishTag(),this.state="beforeData"):this.state="beforeAttributeName"},endTagOpen:function(){var t=this.consume();(0,r.isAlpha)(t)&&(this.state="tagName",this.delegate.beginEndTag(),this.delegate.appendToTagName(t.toLowerCase()))}}},e.default=a},"9f7f":function(t,e,n){var r=n("d039"),a=function(t,e){return RegExp(t,e)};e.UNSUPPORTED_Y=r((function(){var t=a("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),e.BROKEN_CARET=r((function(){var t=a("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},a096:function(t,e,n){"use strict";e.__esModule=!0,e.default=u;var r=n("a733"),a=l(r),i=n("f02d"),o=l(i),s=n("bcb5"),c=l(s);function l(t){return t&&t.__esModule?t:{default:t}}function u(t,e){var n=new a.default(new o.default(c.default),e);return n.tokenize(t)}},a15b:function(t,e,n){"use strict";var r=n("23e7"),a=n("44ad"),i=n("fc6a"),o=n("a640"),s=[].join,c=a!=Object,l=o("join",",");r({target:"Array",proto:!0,forced:c||!l},{join:function(t){return s.call(i(this),void 0===t?",":t)}})},a16e:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.decodeHTML=e.decodeHTMLStrict=e.decodeXML=void 0;var a=r(n("c560")),i=r(n("b960")),o=r(n("f5f2")),s=r(n("7073")),c=/&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g;function l(t){var e=f(t);return function(t){return String(t).replace(c,e)}}e.decodeXML=l(o.default),e.decodeHTMLStrict=l(a.default);var u=function(t,e){return t0&&r(d))p=o(t,e,d,a(d.length),p,l-1)-1;else{if(p>=9007199254740991)throw TypeError("Exceed the acceptable array length");t[p]=d}p++}h++}return p};t.exports=o},a434:function(t,e,n){"use strict";var r=n("23e7"),a=n("23cb"),i=n("a691"),o=n("50c4"),s=n("7b0b"),c=n("65f0"),l=n("8418"),u=n("1dde"),f=u("splice"),d=Math.max,p=Math.min,h=9007199254740991,m="Maximum allowed length exceeded";r({target:"Array",proto:!0,forced:!f},{splice:function(t,e){var n,r,u,f,v,g,b=s(this),y=o(b.length),E=a(t,y),w=arguments.length;if(0===w?n=r=0:1===w?(n=0,r=y-E):(n=w-2,r=p(d(i(e),0),y-E)),y+n-r>h)throw TypeError(m);for(u=c(b,r),f=0;fy-r+n;f--)delete b[f-1]}else if(n>r)for(f=y-r;f>E;f--)v=f+r-1,g=f+n-1,v in b?b[g]=b[v]:delete b[g];for(f=0;fi)a.push(arguments[i++]);if(r=e,(p(e)||void 0!==t)&&!st(t))return d(e)||(e=function(t,e){if("function"==typeof r&&(e=r.call(this,t,e)),!st(e))return e}),a[1]=e,W.apply(null,a)}})}V[H][z]||S(V[H],z,V[H].valueOf),M(V,B),_[F]=!0},a501:function(t,e){function n(t,e){if(!Array.isArray(t)||!Array.isArray(e))throw new Error("expected both arguments to be arrays");for(var n=[],r=t.length,a=0;a-1&&-1==n.indexOf(i)&&n.push(i)}return n}t.exports=n},a524:function(t,e,n){var r=n("4245");function a(t){return r(this,t).has(t)}t.exports=a},a630:function(t,e,n){var r=n("23e7"),a=n("4df4"),i=n("1c7e"),o=!i((function(t){Array.from(t)}));r({target:"Array",stat:!0,forced:o},{from:a})},a640:function(t,e,n){"use strict";var r=n("d039");t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){throw 1},1)}))}},a691:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},a729:function(t,e){t.exports={functional:!0,render(t,e){const{_c:n,_v:r,data:a,children:i=[]}=e,{class:o,staticClass:s,style:c,staticStyle:l,attrs:u={},...f}=a;return n("svg",{class:["feather feather-cpu",o,s],style:[c,l],attrs:Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},u),...f},i.concat([n("rect",{attrs:{x:"4",y:"4",width:"16",height:"16",rx:"2",ry:"2"}}),n("path",{attrs:{d:"M9 9h6v6H9zM9 1v3M15 1v3M9 20v3M15 20v3M20 9h3M20 14h3M1 9h3M1 14h3"}})]))}}},a733:function(t,e,n){"use strict";e.__esModule=!0;var r=n("9f3d"),a=i(r);function i(t){return t&&t.__esModule?t:{default:t}}function o(t,e){this.token=null,this.startLine=1,this.startColumn=0,this.options=e||{},this.tokenizer=new a.default(this,t)}o.prototype={tokenize:function(t){return this.tokens=[],this.tokenizer.tokenize(t),this.tokens},tokenizePart:function(t){return this.tokens=[],this.tokenizer.tokenizePart(t),this.tokens},tokenizeEOF:function(){return this.tokens=[],this.tokenizer.tokenizeEOF(),this.tokens[0]},reset:function(){this.token=null,this.startLine=1,this.startColumn=0},addLocInfo:function(){this.options.loc&&(this.token.loc={start:{line:this.startLine,column:this.startColumn},end:{line:this.tokenizer.line,column:this.tokenizer.column}}),this.startLine=this.tokenizer.line,this.startColumn=this.tokenizer.column},beginData:function(){this.token={type:"Chars",chars:""},this.tokens.push(this.token)},appendToData:function(t){this.token.chars+=t},finishData:function(){this.addLocInfo()},beginComment:function(){this.token={type:"Comment",chars:""},this.tokens.push(this.token)},appendToCommentData:function(t){this.token.chars+=t},finishComment:function(){this.addLocInfo()},beginStartTag:function(){this.token={type:"StartTag",tagName:"",attributes:[],selfClosing:!1},this.tokens.push(this.token)},beginEndTag:function(){this.token={type:"EndTag",tagName:""},this.tokens.push(this.token)},finishTag:function(){this.addLocInfo()},markTagAsSelfClosing:function(){this.token.selfClosing=!0},appendToTagName:function(t){this.token.tagName+=t},beginAttribute:function(){this._currentAttribute=["","",null],this.token.attributes.push(this._currentAttribute)},appendToAttributeName:function(t){this._currentAttribute[0]+=t},beginAttributeValue:function(t){this._currentAttribute[2]=t},appendToAttributeValue:function(t){this._currentAttribute[1]=this._currentAttribute[1]||"",this._currentAttribute[1]+=t},finishAttributeValue:function(){}},e.default=o},a79d:function(t,e,n){"use strict";var r=n("23e7"),a=n("c430"),i=n("fea9"),o=n("d039"),s=n("d066"),c=n("4840"),l=n("cdf9"),u=n("6eeb"),f=!!i&&o((function(){i.prototype["finally"].call({then:function(){}},(function(){}))}));if(r({target:"Promise",proto:!0,real:!0,forced:f},{finally:function(t){var e=c(this,s("Promise")),n="function"==typeof t;return this.then(n?function(n){return l(e,t()).then((function(){return n}))}:t,n?function(n){return l(e,t()).then((function(){throw n}))}:t)}}),!a&&"function"==typeof i){var d=s("Promise").prototype["finally"];i.prototype["finally"]!==d&&u(i.prototype,"finally",d,{unsafe:!0})}},ab13:function(t,e,n){var r=n("b622"),a=r("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[a]=!1,"/./"[t](e)}catch(r){}}return!1}},ac1f:function(t,e,n){"use strict";var r=n("23e7"),a=n("9263");r({target:"RegExp",proto:!0,forced:/./.exec!==a},{exec:a})},acb2:function(t,e,n){"use strict";e.__esModule=!0;var r=function(t){return void 0===t&&(t=[]),t[t.length-1]};e["default"]=r},ad6d:function(t,e,n){"use strict";var r=n("825a");t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},addb:function(t,e){var n=Math.floor,r=function(t,e){var o=t.length,s=n(o/2);return o<8?a(t,e):i(r(t.slice(0,s),e),r(t.slice(s),e),e)},a=function(t,e){var n,r,a=t.length,i=1;while(i0)t[r]=t[--r];r!==i++&&(t[r]=n)}return t},i=function(t,e,n){var r=t.length,a=e.length,i=0,o=0,s=[];while(i?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|IN|ILIKE|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}},afab:function(t,e,n){var r,a; -/*! - * URI.js - Mutating URLs - * Second Level Domain (SLD) Support - * - * Version: 1.19.7 - * - * Author: Rodney Rehm - * Web: http://medialize.github.io/URI.js/ - * - * Licensed under - * MIT License http://www.opensource.org/licenses/mit-license - * - */(function(i,o){"use strict";t.exports?t.exports=o():(r=o,a="function"===typeof r?r.call(e,n,e,t):r,void 0===a||(t.exports=a))})(0,(function(t){"use strict";var e=t&&t.SecondLevelDomains,n={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",org:"ae",de:"com "},has:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return!1;var r=t.lastIndexOf(".",e-1);if(r<=0||r>=e-1)return!1;var a=n.list[t.slice(e+1)];return!!a&&a.indexOf(" "+t.slice(r+1,e)+" ")>=0},is:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return!1;var r=t.lastIndexOf(".",e-1);if(r>=0)return!1;var a=n.list[t.slice(e+1)];return!!a&&a.indexOf(" "+t.slice(0,e)+" ")>=0},get:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return null;var r=t.lastIndexOf(".",e-1);if(r<=0||r>=e-1)return null;var a=n.list[t.slice(e+1)];return a?a.indexOf(" "+t.slice(r+1,e)+" ")<0?null:t.slice(r+1):null},noConflict:function(){return t.SecondLevelDomains===this&&(t.SecondLevelDomains=e),this}};return n}))},b022:function(t,e,n){"use strict";e.__esModule=!0;var r=n("2987"),a=50,i=function(){function t(){this.level=0}return t.prototype.beginIfPossible=function(t,e){0===this.level&&this.isInlineBlock(t,e)?this.level=1:this.level>0?this.level++:this.level=0},t.prototype.end=function(){this.level--},t.prototype.isActive=function(){return this.level>0},t.prototype.isInlineBlock=function(t,e){for(var n=0,i=0,o=e;oa)return!1;if(s.type===r.TokenTypes.OPEN_PAREN)i++;else if(s.type===r.TokenTypes.CLOSE_PAREN&&(i--,0===i))return!0;if(this.isForbiddenToken(s))return!1}return!1},t.prototype.isForbiddenToken=function(t){var e=t.type,n=t.value;return e===r.TokenTypes.RESERVED_TOP_LEVEL||e===r.TokenTypes.RESERVED_NEWLINE||e===r.TokenTypes.LINE_COMMENT||e===r.TokenTypes.BLOCK_COMMENT||";"===n},t}();e["default"]=i},b041:function(t,e,n){"use strict";var r=n("00ee"),a=n("f5df");t.exports=r?{}.toString:function(){return"[object "+a(this)+"]"}},b0c0:function(t,e,n){var r=n("83ab"),a=n("9bf2").f,i=Function.prototype,o=i.toString,s=/^\s*function ([^ (]*)/,c="name";r&&!(c in i)&&a(i,c,{configurable:!0,get:function(){try{return o.call(this).match(s)[1]}catch(t){return""}}})},b166:function(t,e,n){"use strict";n.d(e,"a",(function(){return Lt}));var r=n("fd3a"),a=n("8c86");function i(t){Object(a["a"])(1,arguments);var e=Object(r["a"])(t);return!isNaN(e)}var o={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function s(t,e,n){var r;return n=n||{},r="string"===typeof o[t]?o[t]:1===e?o[t].one:o[t].other.replace("{{count}}",e),n.addSuffix?n.comparison>0?"in "+r:r+" ago":r}function c(t){return function(e){var n=e||{},r=n.width?String(n.width):t.defaultWidth,a=t.formats[r]||t.formats[t.defaultWidth];return a}}var l={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},u={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},f={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},d={date:c({formats:l,defaultWidth:"full"}),time:c({formats:u,defaultWidth:"full"}),dateTime:c({formats:f,defaultWidth:"full"})},p=d,h={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function m(t,e,n,r){return h[t]}function v(t){return function(e,n){var r,a=n||{},i=a.context?String(a.context):"standalone";if("formatting"===i&&t.formattingValues){var o=t.defaultFormattingWidth||t.defaultWidth,s=a.width?String(a.width):o;r=t.formattingValues[s]||t.formattingValues[o]}else{var c=t.defaultWidth,l=a.width?String(a.width):t.defaultWidth;r=t.values[l]||t.values[c]}var u=t.argumentCallback?t.argumentCallback(e):e;return r[u]}}var g={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},b={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},y={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},E={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},w={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},k={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}};function T(t,e){var n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"}var x={ordinalNumber:T,era:v({values:g,defaultWidth:"wide"}),quarter:v({values:b,defaultWidth:"wide",argumentCallback:function(t){return Number(t)-1}}),month:v({values:y,defaultWidth:"wide"}),day:v({values:E,defaultWidth:"wide"}),dayPeriod:v({values:w,defaultWidth:"wide",formattingValues:k,defaultFormattingWidth:"wide"})},A=x;function O(t){return function(e,n){var r=String(e),a=n||{},i=r.match(t.matchPattern);if(!i)return null;var o=i[0],s=r.match(t.parsePattern);if(!s)return null;var c=t.valueCallback?t.valueCallback(s[0]):s[0];return c=a.valueCallback?a.valueCallback(c):c,{value:c,rest:r.slice(o.length)}}}function S(t){return function(e,n){var r=String(e),a=n||{},i=a.width,o=i&&t.matchPatterns[i]||t.matchPatterns[t.defaultMatchWidth],s=r.match(o);if(!s)return null;var c,l=s[0],u=i&&t.parsePatterns[i]||t.parsePatterns[t.defaultParseWidth];return c="[object Array]"===Object.prototype.toString.call(u)?N(u,(function(t){return t.test(l)})):R(u,(function(t){return t.test(l)})),c=t.valueCallback?t.valueCallback(c):c,c=a.valueCallback?a.valueCallback(c):c,{value:c,rest:r.slice(l.length)}}}function R(t,e){for(var n in t)if(t.hasOwnProperty(n)&&e(t[n]))return n}function N(t,e){for(var n=0;n0?n:1-n;return $("yy"===e?r%100:r,e.length)},M:function(t,e){var n=t.getUTCMonth();return"M"===e?String(n+1):$(n+1,2)},d:function(t,e){return $(t.getUTCDate(),e.length)},a:function(t,e){var n=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return"am"===n?"a.m.":"p.m."}},h:function(t,e){return $(t.getUTCHours()%12||12,e.length)},H:function(t,e){return $(t.getUTCHours(),e.length)},m:function(t,e){return $(t.getUTCMinutes(),e.length)},s:function(t,e){return $(t.getUTCSeconds(),e.length)},S:function(t,e){var n=e.length,r=t.getUTCMilliseconds(),a=Math.floor(r*Math.pow(10,n-3));return $(a,e.length)}},K=Q,J=864e5;function Z(t){Object(a["a"])(1,arguments);var e=Object(r["a"])(t),n=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var i=e.getTime(),o=n-i;return Math.floor(o/J)+1}function tt(t){Object(a["a"])(1,arguments);var e=1,n=Object(r["a"])(t),i=n.getUTCDay(),o=(i=o.getTime()?n+1:e.getTime()>=c.getTime()?n:n-1}function nt(t){Object(a["a"])(1,arguments);var e=et(t),n=new Date(0);n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0);var r=tt(n);return r}var rt=6048e5;function at(t){Object(a["a"])(1,arguments);var e=Object(r["a"])(t),n=tt(e).getTime()-nt(e).getTime();return Math.round(n/rt)+1}function it(t,e){Object(a["a"])(1,arguments);var n=e||{},i=n.locale,o=i&&i.options&&i.options.weekStartsOn,s=null==o?0:Object(V["a"])(o),c=null==n.weekStartsOn?s:Object(V["a"])(n.weekStartsOn);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var l=Object(r["a"])(t),u=l.getUTCDay(),f=(u=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var f=new Date(0);f.setUTCFullYear(i+1,0,u),f.setUTCHours(0,0,0,0);var d=it(f,e),p=new Date(0);p.setUTCFullYear(i,0,u),p.setUTCHours(0,0,0,0);var h=it(p,e);return n.getTime()>=d.getTime()?i+1:n.getTime()>=h.getTime()?i:i-1}function st(t,e){Object(a["a"])(1,arguments);var n=e||{},r=n.locale,i=r&&r.options&&r.options.firstWeekContainsDate,o=null==i?1:Object(V["a"])(i),s=null==n.firstWeekContainsDate?o:Object(V["a"])(n.firstWeekContainsDate),c=ot(t,e),l=new Date(0);l.setUTCFullYear(c,0,s),l.setUTCHours(0,0,0,0);var u=it(l,e);return u}var ct=6048e5;function lt(t,e){Object(a["a"])(1,arguments);var n=Object(r["a"])(t),i=it(n,e).getTime()-st(n,e).getTime();return Math.round(i/ct)+1}var ut={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ft={G:function(t,e,n){var r=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if("yo"===e){var r=t.getUTCFullYear(),a=r>0?r:1-r;return n.ordinalNumber(a,{unit:"year"})}return K.y(t,e)},Y:function(t,e,n,r){var a=ot(t,r),i=a>0?a:1-a;if("YY"===e){var o=i%100;return $(o,2)}return"Yo"===e?n.ordinalNumber(i,{unit:"year"}):$(i,e.length)},R:function(t,e){var n=et(t);return $(n,e.length)},u:function(t,e){var n=t.getUTCFullYear();return $(n,e.length)},Q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return $(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return $(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){var r=t.getUTCMonth();switch(e){case"M":case"MM":return K.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){var r=t.getUTCMonth();switch(e){case"L":return String(r+1);case"LL":return $(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){var a=lt(t,r);return"wo"===e?n.ordinalNumber(a,{unit:"week"}):$(a,e.length)},I:function(t,e,n){var r=at(t);return"Io"===e?n.ordinalNumber(r,{unit:"week"}):$(r,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):K.d(t,e)},D:function(t,e,n){var r=Z(t);return"Do"===e?n.ordinalNumber(r,{unit:"dayOfYear"}):$(r,e.length)},E:function(t,e,n){var r=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){var a=t.getUTCDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return $(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){var a=t.getUTCDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return $(i,e.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(t,e,n){var r=t.getUTCDay(),a=0===r?7:r;switch(e){case"i":return String(a);case"ii":return $(a,e.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){var r=t.getUTCHours(),a=r/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,e,n){var r,a=t.getUTCHours();switch(r=12===a?ut.noon:0===a?ut.midnight:a/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,n){var r,a=t.getUTCHours();switch(r=a>=17?ut.evening:a>=12?ut.afternoon:a>=4?ut.morning:ut.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,n){if("ho"===e){var r=t.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return K.h(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):K.H(t,e)},K:function(t,e,n){var r=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):$(r,e.length)},k:function(t,e,n){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===e?n.ordinalNumber(r,{unit:"hour"}):$(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):K.m(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):K.s(t,e)},S:function(t,e){return K.S(t,e)},X:function(t,e,n,r){var a=r._originalDate||t,i=a.getTimezoneOffset();if(0===i)return"Z";switch(e){case"X":return pt(i);case"XXXX":case"XX":return ht(i);case"XXXXX":case"XXX":default:return ht(i,":")}},x:function(t,e,n,r){var a=r._originalDate||t,i=a.getTimezoneOffset();switch(e){case"x":return pt(i);case"xxxx":case"xx":return ht(i);case"xxxxx":case"xxx":default:return ht(i,":")}},O:function(t,e,n,r){var a=r._originalDate||t,i=a.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+dt(i,":");case"OOOO":default:return"GMT"+ht(i,":")}},z:function(t,e,n,r){var a=r._originalDate||t,i=a.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+dt(i,":");case"zzzz":default:return"GMT"+ht(i,":")}},t:function(t,e,n,r){var a=r._originalDate||t,i=Math.floor(a.getTime()/1e3);return $(i,e.length)},T:function(t,e,n,r){var a=r._originalDate||t,i=a.getTime();return $(i,e.length)}};function dt(t,e){var n=t>0?"-":"+",r=Math.abs(t),a=Math.floor(r/60),i=r%60;if(0===i)return n+String(a);var o=e||"";return n+String(a)+o+$(i,2)}function pt(t,e){if(t%60===0){var n=t>0?"-":"+";return n+$(Math.abs(t)/60,2)}return ht(t,e)}function ht(t,e){var n=e||"",r=t>0?"-":"+",a=Math.abs(t),i=$(Math.floor(a/60),2),o=$(a%60,2);return r+i+n+o}var mt=ft;function vt(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}}function gt(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}}function bt(t,e){var n,r=t.match(/(P+)(p+)?/),a=r[1],i=r[2];if(!i)return vt(t,e);switch(a){case"P":n=e.dateTime({width:"short"});break;case"PP":n=e.dateTime({width:"medium"});break;case"PPP":n=e.dateTime({width:"long"});break;case"PPPP":default:n=e.dateTime({width:"full"});break}return n.replace("{{date}}",vt(a,e)).replace("{{time}}",gt(i,e))}var yt={p:gt,P:bt},Et=yt;function wt(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}var kt=["D","DD"],Tt=["YY","YYYY"];function xt(t){return-1!==kt.indexOf(t)}function At(t){return-1!==Tt.indexOf(t)}function Ot(t,e,n){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"))}var St=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Rt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Nt=/^'([^]*?)'?$/,Ct=/''/g,_t=/[a-zA-Z]/;function Lt(t,e,n){Object(a["a"])(2,arguments);var o=String(e),s=n||{},c=s.locale||Y,l=c.options&&c.options.firstWeekContainsDate,u=null==l?1:Object(V["a"])(l),f=null==s.firstWeekContainsDate?u:Object(V["a"])(s.firstWeekContainsDate);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var d=c.options&&c.options.weekStartsOn,p=null==d?0:Object(V["a"])(d),h=null==s.weekStartsOn?p:Object(V["a"])(s.weekStartsOn);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!c.localize)throw new RangeError("locale must contain localize property");if(!c.formatLong)throw new RangeError("locale must contain formatLong property");var m=Object(r["a"])(t);if(!i(m))throw new RangeError("Invalid time value");var v=wt(m),g=X(m,v),b={firstWeekContainsDate:f,weekStartsOn:h,locale:c,_originalDate:m},y=o.match(Rt).map((function(t){var e=t[0];if("p"===e||"P"===e){var n=Et[e];return n(t,c.formatLong,b)}return t})).join("").match(St).map((function(n){if("''"===n)return"'";var r=n[0];if("'"===r)return It(n);var a=mt[r];if(a)return!s.useAdditionalWeekYearTokens&&At(n)&&Ot(n,e,t),!s.useAdditionalDayOfYearTokens&&xt(n)&&Ot(n,e,t),a(g,n,c.localize,b);if(r.match(_t))throw new RangeError("Format string contains an unescaped latin alphabet character `"+r+"`");return n})).join("");return y}function It(t){return t.match(Nt)[1].replace(Ct,"'")}},b4c0:function(t,e,n){var r=n("cb5a");function a(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}t.exports=a},b575:function(t,e,n){var r,a,i,o,s,c,l,u,f=n("da84"),d=n("06cf").f,p=n("2cf4").set,h=n("1cdc"),m=n("a4b4"),v=n("605d"),g=f.MutationObserver||f.WebKitMutationObserver,b=f.document,y=f.process,E=f.Promise,w=d(f,"queueMicrotask"),k=w&&w.value;k||(r=function(){var t,e;v&&(t=y.domain)&&t.exit();while(a){e=a.fn,a=a.next;try{e()}catch(n){throw a?o():i=void 0,n}}i=void 0,t&&t.enter()},h||v||m||!g||!b?E&&E.resolve?(l=E.resolve(void 0),l.constructor=E,u=l.then,o=function(){u.call(l,r)}):o=v?function(){y.nextTick(r)}:function(){p.call(f,r)}:(s=!0,c=b.createTextNode(""),new g(r).observe(c,{characterData:!0}),o=function(){c.data=s=!s})),t.exports=k||function(t){var e={fn:t,next:void 0};i&&(i.next=e),a||(a=e,o()),i=e}},b5ac:function(t,e){t.exports={functional:!0,render(t,e){const{_c:n,_v:r,data:a,children:i=[]}=e,{class:o,staticClass:s,style:c,staticStyle:l,attrs:u={},...f}=a;return n("svg",{class:["feather feather-terminal",o,s],style:[c,l],attrs:Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},u),...f},i.concat([n("path",{attrs:{d:"M4 17l6-6-6-6M12 19h8"}})]))}}},b622:function(t,e,n){var r=n("da84"),a=n("5692"),i=n("5135"),o=n("90e3"),s=n("4930"),c=n("fdbf"),l=a("wks"),u=r.Symbol,f=c?u:u&&u.withoutSetter||o;t.exports=function(t){return i(l,t)&&(s||"string"==typeof l[t])||(s&&i(u,t)?l[t]=u[t]:l[t]=f("Symbol."+t)),l[t]}},b64b:function(t,e,n){var r=n("23e7"),a=n("7b0b"),i=n("df75"),o=n("d039"),s=o((function(){i(1)}));r({target:"Object",stat:!0,forced:s},{keys:function(t){return i(a(t))}})},b680:function(t,e,n){"use strict";var r=n("23e7"),a=n("a691"),i=n("408a"),o=n("1148"),s=n("d039"),c=1..toFixed,l=Math.floor,u=function(t,e,n){return 0===e?n:e%2===1?u(t,e-1,n*t):u(t*t,e/2,n)},f=function(t){var e=0,n=t;while(n>=4096)e+=12,n/=4096;while(n>=2)e+=1,n/=2;return e},d=function(t,e,n){var r=-1,a=n;while(++r<6)a+=e*t[r],t[r]=a%1e7,a=l(a/1e7)},p=function(t,e){var n=6,r=0;while(--n>=0)r+=t[n],t[n]=l(r/e),r=r%e*1e7},h=function(t){var e=6,n="";while(--e>=0)if(""!==n||0===e||0!==t[e]){var r=String(t[e]);n=""===n?r:n+o.call("0",7-r.length)+r}return n},m=c&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!s((function(){c.call({})}));r({target:"Number",proto:!0,forced:m},{toFixed:function(t){var e,n,r,s,c=i(this),l=a(t),m=[0,0,0,0,0,0],v="",g="0";if(l<0||l>20)throw RangeError("Incorrect fraction digits");if(c!=c)return"NaN";if(c<=-1e21||c>=1e21)return String(c);if(c<0&&(v="-",c=-c),c>1e-21)if(e=f(c*u(2,69,1))-69,n=e<0?c*u(2,-e,1):c/u(2,e,1),n*=4503599627370496,e=52-e,e>0){d(m,0,n),r=l;while(r>=7)d(m,1e7,0),r-=7;d(m,u(10,r,1),0),r=e-1;while(r>=23)p(m,1<<23),r-=23;p(m,1<0?(s=g.length,g=v+(s<=l?"0."+o.call("0",l-s)+g:g.slice(0,s-l)+"."+g.slice(s-l))):g=v+g,g}})},b727:function(t,e,n){var r=n("0366"),a=n("44ad"),i=n("7b0b"),o=n("50c4"),s=n("65f0"),c=[].push,l=function(t){var e=1==t,n=2==t,l=3==t,u=4==t,f=6==t,d=7==t,p=5==t||f;return function(h,m,v,g){for(var b,y,E=i(h),w=a(E),k=r(m,v,3),T=o(w.length),x=0,A=g||s,O=e?A(h,T):n||d?A(h,0):void 0;T>x;x++)if((p||x in w)&&(b=w[x],y=k(b,x,E),t))if(e)O[x]=y;else if(y)switch(t){case 3:return!0;case 5:return b;case 6:return x;case 2:c.call(O,b)}else switch(t){case 4:return!1;case 7:c.call(O,b)}return f?-1:l||u?u:O}};t.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterOut:l(7)}},b7fe:function(t,e,n){"use strict";e.__esModule=!0,e.start=e.run=e.TOKENS=e.State=void 0;var r=n("1652"),a=n("7656"),i=o(a);function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}var s="aaa|aarp|abarth|abb|abbott|abbvie|abc|able|abogado|abudhabi|ac|academy|accenture|accountant|accountants|aco|active|actor|ad|adac|ads|adult|ae|aeg|aero|aetna|af|afamilycompany|afl|africa|ag|agakhan|agency|ai|aig|aigo|airbus|airforce|airtel|akdn|al|alfaromeo|alibaba|alipay|allfinanz|allstate|ally|alsace|alstom|am|americanexpress|americanfamily|amex|amfam|amica|amsterdam|analytics|android|anquan|anz|ao|aol|apartments|app|apple|aq|aquarelle|ar|arab|aramco|archi|army|arpa|art|arte|as|asda|asia|associates|at|athleta|attorney|au|auction|audi|audible|audio|auspost|author|auto|autos|avianca|aw|aws|ax|axa|az|azure|ba|baby|baidu|banamex|bananarepublic|band|bank|bar|barcelona|barclaycard|barclays|barefoot|bargains|baseball|basketball|bauhaus|bayern|bb|bbc|bbt|bbva|bcg|bcn|bd|be|beats|beauty|beer|bentley|berlin|best|bestbuy|bet|bf|bg|bh|bharti|bi|bible|bid|bike|bing|bingo|bio|biz|bj|black|blackfriday|blanco|blockbuster|blog|bloomberg|blue|bm|bms|bmw|bn|bnl|bnpparibas|bo|boats|boehringer|bofa|bom|bond|boo|book|booking|boots|bosch|bostik|boston|bot|boutique|box|br|bradesco|bridgestone|broadway|broker|brother|brussels|bs|bt|budapest|bugatti|build|builders|business|buy|buzz|bv|bw|by|bz|bzh|ca|cab|cafe|cal|call|calvinklein|cam|camera|camp|cancerresearch|canon|capetown|capital|capitalone|car|caravan|cards|care|career|careers|cars|cartier|casa|case|caseih|cash|casino|cat|catering|catholic|cba|cbn|cbre|cbs|cc|cd|ceb|center|ceo|cern|cf|cfa|cfd|cg|ch|chanel|channel|chase|chat|cheap|chintai|chloe|christmas|chrome|chrysler|church|ci|cipriani|circle|cisco|citadel|citi|citic|city|cityeats|ck|cl|claims|cleaning|click|clinic|clinique|clothing|cloud|club|clubmed|cm|cn|co|coach|codes|coffee|college|cologne|com|comcast|commbank|community|company|compare|computer|comsec|condos|construction|consulting|contact|contractors|cooking|cookingchannel|cool|coop|corsica|country|coupon|coupons|courses|cr|credit|creditcard|creditunion|cricket|crown|crs|cruise|cruises|csc|cu|cuisinella|cv|cw|cx|cy|cymru|cyou|cz|dabur|dad|dance|data|date|dating|datsun|day|dclk|dds|de|deal|dealer|deals|degree|delivery|dell|deloitte|delta|democrat|dental|dentist|desi|design|dev|dhl|diamonds|diet|digital|direct|directory|discount|discover|dish|diy|dj|dk|dm|dnp|do|docs|doctor|dodge|dog|doha|domains|dot|download|drive|dtv|dubai|duck|dunlop|duns|dupont|durban|dvag|dvr|dz|earth|eat|ec|eco|edeka|edu|education|ee|eg|email|emerck|energy|engineer|engineering|enterprises|epost|epson|equipment|er|ericsson|erni|es|esq|estate|esurance|et|etisalat|eu|eurovision|eus|events|everbank|exchange|expert|exposed|express|extraspace|fage|fail|fairwinds|faith|family|fan|fans|farm|farmers|fashion|fast|fedex|feedback|ferrari|ferrero|fi|fiat|fidelity|fido|film|final|finance|financial|fire|firestone|firmdale|fish|fishing|fit|fitness|fj|fk|flickr|flights|flir|florist|flowers|fly|fm|fo|foo|food|foodnetwork|football|ford|forex|forsale|forum|foundation|fox|fr|free|fresenius|frl|frogans|frontdoor|frontier|ftr|fujitsu|fujixerox|fun|fund|furniture|futbol|fyi|ga|gal|gallery|gallo|gallup|game|games|gap|garden|gb|gbiz|gd|gdn|ge|gea|gent|genting|george|gf|gg|ggee|gh|gi|gift|gifts|gives|giving|gl|glade|glass|gle|global|globo|gm|gmail|gmbh|gmo|gmx|gn|godaddy|gold|goldpoint|golf|goo|goodhands|goodyear|goog|google|gop|got|gov|gp|gq|gr|grainger|graphics|gratis|green|gripe|grocery|group|gs|gt|gu|guardian|gucci|guge|guide|guitars|guru|gw|gy|hair|hamburg|hangout|haus|hbo|hdfc|hdfcbank|health|healthcare|help|helsinki|here|hermes|hgtv|hiphop|hisamitsu|hitachi|hiv|hk|hkt|hm|hn|hockey|holdings|holiday|homedepot|homegoods|homes|homesense|honda|honeywell|horse|hospital|host|hosting|hot|hoteles|hotels|hotmail|house|how|hr|hsbc|ht|htc|hu|hughes|hyatt|hyundai|ibm|icbc|ice|icu|id|ie|ieee|ifm|ikano|il|im|imamat|imdb|immo|immobilien|in|industries|infiniti|info|ing|ink|institute|insurance|insure|int|intel|international|intuit|investments|io|ipiranga|iq|ir|irish|is|iselect|ismaili|ist|istanbul|it|itau|itv|iveco|iwc|jaguar|java|jcb|jcp|je|jeep|jetzt|jewelry|jio|jlc|jll|jm|jmp|jnj|jo|jobs|joburg|jot|joy|jp|jpmorgan|jprs|juegos|juniper|kaufen|kddi|ke|kerryhotels|kerrylogistics|kerryproperties|kfh|kg|kh|ki|kia|kim|kinder|kindle|kitchen|kiwi|km|kn|koeln|komatsu|kosher|kp|kpmg|kpn|kr|krd|kred|kuokgroup|kw|ky|kyoto|kz|la|lacaixa|ladbrokes|lamborghini|lamer|lancaster|lancia|lancome|land|landrover|lanxess|lasalle|lat|latino|latrobe|law|lawyer|lb|lc|lds|lease|leclerc|lefrak|legal|lego|lexus|lgbt|li|liaison|lidl|life|lifeinsurance|lifestyle|lighting|like|lilly|limited|limo|lincoln|linde|link|lipsy|live|living|lixil|lk|loan|loans|locker|locus|loft|lol|london|lotte|lotto|love|lpl|lplfinancial|lr|ls|lt|ltd|ltda|lu|lundbeck|lupin|luxe|luxury|lv|ly|ma|macys|madrid|maif|maison|makeup|man|management|mango|map|market|marketing|markets|marriott|marshalls|maserati|mattel|mba|mc|mckinsey|md|me|med|media|meet|melbourne|meme|memorial|men|menu|meo|merckmsd|metlife|mg|mh|miami|microsoft|mil|mini|mint|mit|mitsubishi|mk|ml|mlb|mls|mm|mma|mn|mo|mobi|mobile|mobily|moda|moe|moi|mom|monash|money|monster|mopar|mormon|mortgage|moscow|moto|motorcycles|mov|movie|movistar|mp|mq|mr|ms|msd|mt|mtn|mtr|mu|museum|mutual|mv|mw|mx|my|mz|na|nab|nadex|nagoya|name|nationwide|natura|navy|nba|nc|ne|nec|net|netbank|netflix|network|neustar|new|newholland|news|next|nextdirect|nexus|nf|nfl|ng|ngo|nhk|ni|nico|nike|nikon|ninja|nissan|nissay|nl|no|nokia|northwesternmutual|norton|now|nowruz|nowtv|np|nr|nra|nrw|ntt|nu|nyc|nz|obi|observer|off|office|okinawa|olayan|olayangroup|oldnavy|ollo|om|omega|one|ong|onl|online|onyourside|ooo|open|oracle|orange|org|organic|origins|osaka|otsuka|ott|ovh|pa|page|panasonic|panerai|paris|pars|partners|parts|party|passagens|pay|pccw|pe|pet|pf|pfizer|pg|ph|pharmacy|phd|philips|phone|photo|photography|photos|physio|piaget|pics|pictet|pictures|pid|pin|ping|pink|pioneer|pizza|pk|pl|place|play|playstation|plumbing|plus|pm|pn|pnc|pohl|poker|politie|porn|post|pr|pramerica|praxi|press|prime|pro|prod|productions|prof|progressive|promo|properties|property|protection|pru|prudential|ps|pt|pub|pw|pwc|py|qa|qpon|quebec|quest|qvc|racing|radio|raid|re|read|realestate|realtor|realty|recipes|red|redstone|redumbrella|rehab|reise|reisen|reit|reliance|ren|rent|rentals|repair|report|republican|rest|restaurant|review|reviews|rexroth|rich|richardli|ricoh|rightathome|ril|rio|rip|rmit|ro|rocher|rocks|rodeo|rogers|room|rs|rsvp|ru|rugby|ruhr|run|rw|rwe|ryukyu|sa|saarland|safe|safety|sakura|sale|salon|samsclub|samsung|sandvik|sandvikcoromant|sanofi|sap|sapo|sarl|sas|save|saxo|sb|sbi|sbs|sc|sca|scb|schaeffler|schmidt|scholarships|school|schule|schwarz|science|scjohnson|scor|scot|sd|se|search|seat|secure|security|seek|select|sener|services|ses|seven|sew|sex|sexy|sfr|sg|sh|shangrila|sharp|shaw|shell|shia|shiksha|shoes|shop|shopping|shouji|show|showtime|shriram|si|silk|sina|singles|site|sj|sk|ski|skin|sky|skype|sl|sling|sm|smart|smile|sn|sncf|so|soccer|social|softbank|software|sohu|solar|solutions|song|sony|soy|space|spiegel|spot|spreadbetting|sr|srl|srt|st|stada|staples|star|starhub|statebank|statefarm|statoil|stc|stcgroup|stockholm|storage|store|stream|studio|study|style|su|sucks|supplies|supply|support|surf|surgery|suzuki|sv|swatch|swiftcover|swiss|sx|sy|sydney|symantec|systems|sz|tab|taipei|talk|taobao|target|tatamotors|tatar|tattoo|tax|taxi|tc|tci|td|tdk|team|tech|technology|tel|telecity|telefonica|temasek|tennis|teva|tf|tg|th|thd|theater|theatre|tiaa|tickets|tienda|tiffany|tips|tires|tirol|tj|tjmaxx|tjx|tk|tkmaxx|tl|tm|tmall|tn|to|today|tokyo|tools|top|toray|toshiba|total|tours|town|toyota|toys|tr|trade|trading|training|travel|travelchannel|travelers|travelersinsurance|trust|trv|tt|tube|tui|tunes|tushu|tv|tvs|tw|tz|ua|ubank|ubs|uconnect|ug|uk|unicom|university|uno|uol|ups|us|uy|uz|va|vacations|vana|vanguard|vc|ve|vegas|ventures|verisign|versicherung|vet|vg|vi|viajes|video|vig|viking|villas|vin|vip|virgin|visa|vision|vista|vistaprint|viva|vivo|vlaanderen|vn|vodka|volkswagen|volvo|vote|voting|voto|voyage|vu|vuelos|wales|walmart|walter|wang|wanggou|warman|watch|watches|weather|weatherchannel|webcam|weber|website|wed|wedding|weibo|weir|wf|whoswho|wien|wiki|williamhill|win|windows|wine|winners|wme|wolterskluwer|woodside|work|works|world|wow|ws|wtc|wtf|xbox|xerox|xfinity|xihuan|xin|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--30rr7y|xn--3bst00m|xn--3ds443g|xn--3e0b707e|xn--3hcrj9c|xn--3oq18vl8pn36a|xn--3pxu8k|xn--42c2d9a|xn--45br5cyl|xn--45brj9c|xn--45q11c|xn--4gbrim|xn--54b7fta0cc|xn--55qw42g|xn--55qx5d|xn--5su34j936bgsg|xn--5tzm5g|xn--6frz82g|xn--6qq986b3xl|xn--80adxhks|xn--80ao21a|xn--80aqecdr1a|xn--80asehdb|xn--80aswg|xn--8y0a063a|xn--90a3ac|xn--90ae|xn--90ais|xn--9dbq2a|xn--9et52u|xn--9krt00a|xn--b4w605ferd|xn--bck1b9a5dre4c|xn--c1avg|xn--c2br7g|xn--cck2b3b|xn--cg4bki|xn--clchc0ea0b2g2a9gcd|xn--czr694b|xn--czrs0t|xn--czru2d|xn--d1acj3b|xn--d1alf|xn--e1a4c|xn--eckvdtc9d|xn--efvy88h|xn--estv75g|xn--fct429k|xn--fhbei|xn--fiq228c5hs|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--fjq720a|xn--flw351e|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--fzys8d69uvgm|xn--g2xx48c|xn--gckr3f0f|xn--gecrj9c|xn--gk3at1e|xn--h2breg3eve|xn--h2brj9c|xn--h2brj9c8c|xn--hxt814e|xn--i1b6b1a6a2e|xn--imr513n|xn--io0a7i|xn--j1aef|xn--j1amh|xn--j6w193g|xn--jlq61u9w7b|xn--jvr189m|xn--kcrx77d1x4a|xn--kprw13d|xn--kpry57d|xn--kpu716f|xn--kput3i|xn--l1acc|xn--lgbbat1ad8j|xn--mgb9awbf|xn--mgba3a3ejt|xn--mgba3a4f16a|xn--mgba7c0bbn0a|xn--mgbaakc7dvf|xn--mgbaam7a8h|xn--mgbab2bd|xn--mgbai9azgqp6j|xn--mgbayh7gpa|xn--mgbb9fbpob|xn--mgbbh1a|xn--mgbbh1a71e|xn--mgbc0a9azcg|xn--mgbca7dzdo|xn--mgberp4a5d4ar|xn--mgbgu82a|xn--mgbi4ecexp|xn--mgbpl2fh|xn--mgbt3dhd|xn--mgbtx2b|xn--mgbx4cd0ab|xn--mix891f|xn--mk1bu44c|xn--mxtq1m|xn--ngbc5azd|xn--ngbe9e0a|xn--ngbrx|xn--node|xn--nqv7f|xn--nqv7fs00ema|xn--nyqy26a|xn--o3cw4h|xn--ogbpf8fl|xn--p1acf|xn--p1ai|xn--pbt977c|xn--pgbs0dh|xn--pssy2u|xn--q9jyb4c|xn--qcka1pmc|xn--qxam|xn--rhqv96g|xn--rovu88b|xn--rvc1e0am3e|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--tckwe|xn--tiq49xqyj|xn--unup4y|xn--vermgensberater-ctb|xn--vermgensberatung-pwb|xn--vhquv|xn--vuq861b|xn--w4r85el8fhu5dnra|xn--w4rs40l|xn--wgbh1c|xn--wgbl6a|xn--xhq521b|xn--xkc2al3hye2a|xn--xkc2dl3a5ee0h|xn--y9a3aq|xn--yfro4i67o|xn--ygbi2ammx|xn--zfr164b|xperia|xxx|xyz|yachts|yahoo|yamaxun|yandex|ye|yodobashi|yoga|yokohama|you|youtube|yt|yun|za|zappos|zara|zero|zip|zippo|zm|zone|zuerich|zw".split("|"),c="0123456789".split(""),l="0123456789abcdefghijklmnopqrstuvwxyz".split(""),u=[" ","\f","\r","\t","\v"," "," ","᠎"],f=[],d=function(t){return new r.CharacterState(t)},p=d(),h=d(a.NUM),m=d(a.DOMAIN),v=d(),g=d(a.WS);p.on("@",d(a.AT)).on(".",d(a.DOT)).on("+",d(a.PLUS)).on("#",d(a.POUND)).on("?",d(a.QUERY)).on("/",d(a.SLASH)).on("_",d(a.UNDERSCORE)).on(":",d(a.COLON)).on("{",d(a.OPENBRACE)).on("[",d(a.OPENBRACKET)).on("<",d(a.OPENANGLEBRACKET)).on("(",d(a.OPENPAREN)).on("}",d(a.CLOSEBRACE)).on("]",d(a.CLOSEBRACKET)).on(">",d(a.CLOSEANGLEBRACKET)).on(")",d(a.CLOSEPAREN)).on("&",d(a.AMPERSAND)).on([",",";","!",'"',"'"],d(a.PUNCTUATION)),p.on("\n",d(a.NL)).on(u,g),g.on(u,g);for(var b=0;b=0&&l++,s++,a++;if(!(l<0)){a-=l,s-=l;var u=c.emit();r.push(new u(t.substr(a-s,s)))}}return r},D=p;e.State=r.CharacterState,e.TOKENS=i,e.run=I,e.start=D},b960:function(t){t.exports=JSON.parse('{"Aacute":"Á","aacute":"á","Acirc":"Â","acirc":"â","acute":"´","AElig":"Æ","aelig":"æ","Agrave":"À","agrave":"à","amp":"&","AMP":"&","Aring":"Å","aring":"å","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","brvbar":"¦","Ccedil":"Ç","ccedil":"ç","cedil":"¸","cent":"¢","copy":"©","COPY":"©","curren":"¤","deg":"°","divide":"÷","Eacute":"É","eacute":"é","Ecirc":"Ê","ecirc":"ê","Egrave":"È","egrave":"è","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","frac12":"½","frac14":"¼","frac34":"¾","gt":">","GT":">","Iacute":"Í","iacute":"í","Icirc":"Î","icirc":"î","iexcl":"¡","Igrave":"Ì","igrave":"ì","iquest":"¿","Iuml":"Ï","iuml":"ï","laquo":"«","lt":"<","LT":"<","macr":"¯","micro":"µ","middot":"·","nbsp":" ","not":"¬","Ntilde":"Ñ","ntilde":"ñ","Oacute":"Ó","oacute":"ó","Ocirc":"Ô","ocirc":"ô","Ograve":"Ò","ograve":"ò","ordf":"ª","ordm":"º","Oslash":"Ø","oslash":"ø","Otilde":"Õ","otilde":"õ","Ouml":"Ö","ouml":"ö","para":"¶","plusmn":"±","pound":"£","quot":"\\"","QUOT":"\\"","raquo":"»","reg":"®","REG":"®","sect":"§","shy":"­","sup1":"¹","sup2":"²","sup3":"³","szlig":"ß","THORN":"Þ","thorn":"þ","times":"×","Uacute":"Ú","uacute":"ú","Ucirc":"Û","ucirc":"û","Ugrave":"Ù","ugrave":"ù","uml":"¨","Uuml":"Ü","uuml":"ü","Yacute":"Ý","yacute":"ý","yen":"¥","yuml":"ÿ"}')},bb2f:function(t,e,n){var r=n("d039");t.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},bbc0:function(t,e,n){var r=n("6044"),a="__lodash_hash_undefined__",i=Object.prototype,o=i.hasOwnProperty;function s(t){var e=this.__data__;if(r){var n=e[t];return n===a?void 0:n}return o.call(e,t)?e[t]:void 0}t.exports=s},bbc2:function(t,e){t.exports={functional:!0,render(t,e){const{_c:n,_v:r,data:a,children:i=[]}=e,{class:o,staticClass:s,style:c,staticStyle:l,attrs:u={},...f}=a;return n("svg",{class:["feather feather-pie-chart",o,s],style:[c,l],attrs:Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},u),...f},i.concat([n("path",{attrs:{d:"M21.21 15.89A10 10 0 118 2.83M22 12A10 10 0 0012 2v10z"}})]))}}},bcb5:function(t,e,n){"use strict";e.__esModule=!0;var r={nbsp:" "};e.default=r},bcee:function(t,e){t.exports={functional:!0,render(t,e){const{_c:n,_v:r,data:a,children:i=[]}=e,{class:o,staticClass:s,style:c,staticStyle:l,attrs:u={},...f}=a;return n("svg",{class:["feather feather-arrow-down-circle",o,s],style:[c,l],attrs:Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},u),...f},i.concat([n("circle",{attrs:{cx:"12",cy:"12",r:"10"}}),n("path",{attrs:{d:"M8 12l4 4 4-4M12 8v8"}})]))}}},bea1:function(t,e,n){"use strict";e.__esModule=!0,e.URL=e.TEXT=e.NL=e.EMAIL=e.MAILTOEMAIL=e.Base=void 0;var r=n("46f3"),a=n("254c"),i=n("7656");function o(t){return t instanceof i.DOMAIN||t instanceof i.TLD}var s=(0,r.createTokenClass)();s.prototype={type:"token",isLink:!1,toString:function(){for(var t=[],e=0;e0&&void 0!==arguments[0]?arguments[0]:"http";return{type:this.type,value:this.toString(),href:this.toHref(t)}}};var c=(0,a.inherits)(s,(0,r.createTokenClass)(),{type:"email",isLink:!0}),l=(0,a.inherits)(s,(0,r.createTokenClass)(),{type:"email",isLink:!0,toHref:function(){return"mailto:"+this.toString()}}),u=(0,a.inherits)(s,(0,r.createTokenClass)(),{type:"text"}),f=(0,a.inherits)(s,(0,r.createTokenClass)(),{type:"nl"}),d=(0,a.inherits)(s,(0,r.createTokenClass)(),{type:"url",isLink:!0,toHref:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"http",e=!1,n=!1,r=this.v,a=[],s=0;while(r[s]instanceof i.PROTOCOL)e=!0,a.push(r[s].toString().toLowerCase()),s++;while(r[s]instanceof i.SLASH)n=!0,a.push(r[s].toString()),s++;while(o(r[s]))a.push(r[s].toString().toLowerCase()),s++;for(;s0)?["touchstart"]:["click"];function r(t){var e=t.event,n=t.handler;(0,t.middleware)(e)&&n(e)}function a(t,e){var a=function(t){var e="function"==typeof t;if(!e&&"object"!=typeof t)throw new Error("v-click-outside: Binding value must be a function or an object");return{handler:e?t:t.handler,middleware:t.middleware||function(t){return t},events:t.events||n,isActive:!(!1===t.isActive),detectIframe:!(!1===t.detectIframe)}}(e.value),i=a.handler,o=a.middleware,s=a.detectIframe;if(a.isActive){if(t["__v-click-outside"]=a.events.map((function(e){return{event:e,srcTarget:document.documentElement,handler:function(e){return function(t){var e=t.el,n=t.event,a=t.handler,i=t.middleware,o=n.path||n.composedPath&&n.composedPath();(o?o.indexOf(e)<0:!e.contains(n.target))&&r({event:n,handler:a,middleware:i})}({el:t,event:e,handler:i,middleware:o})}}})),s){var c={event:"blur",srcTarget:window,handler:function(e){return function(t){var e=t.el,n=t.event,a=t.handler,i=t.middleware;setTimeout((function(){var t=document.activeElement;t&&"IFRAME"===t.tagName&&!e.contains(t)&&r({event:n,handler:a,middleware:i})}),0)}({el:t,event:e,handler:i,middleware:o})}};t["__v-click-outside"]=[].concat(t["__v-click-outside"],[c])}t["__v-click-outside"].forEach((function(e){var n=e.event,r=e.srcTarget,a=e.handler;return setTimeout((function(){t["__v-click-outside"]&&r.addEventListener(n,a,!1)}),0)}))}}function i(t){(t["__v-click-outside"]||[]).forEach((function(t){return t.srcTarget.removeEventListener(t.event,t.handler,!1)})),delete t["__v-click-outside"]}var o=t?{bind:a,update:function(t,e){var n=e.value,r=e.oldValue;JSON.stringify(n)!==JSON.stringify(r)&&(i(t),a(t,{value:n}))},unbind:i}:{};return{install:function(t){t.directive("click-outside",o)},directive:o}}))},c430:function(t,e){t.exports=!1},c560:function(t){t.exports=JSON.parse('{"Aacute":"Á","aacute":"á","Abreve":"Ă","abreve":"ă","ac":"∾","acd":"∿","acE":"∾̳","Acirc":"Â","acirc":"â","acute":"´","Acy":"А","acy":"а","AElig":"Æ","aelig":"æ","af":"⁡","Afr":"𝔄","afr":"𝔞","Agrave":"À","agrave":"à","alefsym":"ℵ","aleph":"ℵ","Alpha":"Α","alpha":"α","Amacr":"Ā","amacr":"ā","amalg":"⨿","amp":"&","AMP":"&","andand":"⩕","And":"⩓","and":"∧","andd":"⩜","andslope":"⩘","andv":"⩚","ang":"∠","ange":"⦤","angle":"∠","angmsdaa":"⦨","angmsdab":"⦩","angmsdac":"⦪","angmsdad":"⦫","angmsdae":"⦬","angmsdaf":"⦭","angmsdag":"⦮","angmsdah":"⦯","angmsd":"∡","angrt":"∟","angrtvb":"⊾","angrtvbd":"⦝","angsph":"∢","angst":"Å","angzarr":"⍼","Aogon":"Ą","aogon":"ą","Aopf":"𝔸","aopf":"𝕒","apacir":"⩯","ap":"≈","apE":"⩰","ape":"≊","apid":"≋","apos":"\'","ApplyFunction":"⁡","approx":"≈","approxeq":"≊","Aring":"Å","aring":"å","Ascr":"𝒜","ascr":"𝒶","Assign":"≔","ast":"*","asymp":"≈","asympeq":"≍","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","awconint":"∳","awint":"⨑","backcong":"≌","backepsilon":"϶","backprime":"‵","backsim":"∽","backsimeq":"⋍","Backslash":"∖","Barv":"⫧","barvee":"⊽","barwed":"⌅","Barwed":"⌆","barwedge":"⌅","bbrk":"⎵","bbrktbrk":"⎶","bcong":"≌","Bcy":"Б","bcy":"б","bdquo":"„","becaus":"∵","because":"∵","Because":"∵","bemptyv":"⦰","bepsi":"϶","bernou":"ℬ","Bernoullis":"ℬ","Beta":"Β","beta":"β","beth":"ℶ","between":"≬","Bfr":"𝔅","bfr":"𝔟","bigcap":"⋂","bigcirc":"◯","bigcup":"⋃","bigodot":"⨀","bigoplus":"⨁","bigotimes":"⨂","bigsqcup":"⨆","bigstar":"★","bigtriangledown":"▽","bigtriangleup":"△","biguplus":"⨄","bigvee":"⋁","bigwedge":"⋀","bkarow":"⤍","blacklozenge":"⧫","blacksquare":"▪","blacktriangle":"▴","blacktriangledown":"▾","blacktriangleleft":"◂","blacktriangleright":"▸","blank":"␣","blk12":"▒","blk14":"░","blk34":"▓","block":"█","bne":"=⃥","bnequiv":"≡⃥","bNot":"⫭","bnot":"⌐","Bopf":"𝔹","bopf":"𝕓","bot":"⊥","bottom":"⊥","bowtie":"⋈","boxbox":"⧉","boxdl":"┐","boxdL":"╕","boxDl":"╖","boxDL":"╗","boxdr":"┌","boxdR":"╒","boxDr":"╓","boxDR":"╔","boxh":"─","boxH":"═","boxhd":"┬","boxHd":"╤","boxhD":"╥","boxHD":"╦","boxhu":"┴","boxHu":"╧","boxhU":"╨","boxHU":"╩","boxminus":"⊟","boxplus":"⊞","boxtimes":"⊠","boxul":"┘","boxuL":"╛","boxUl":"╜","boxUL":"╝","boxur":"└","boxuR":"╘","boxUr":"╙","boxUR":"╚","boxv":"│","boxV":"║","boxvh":"┼","boxvH":"╪","boxVh":"╫","boxVH":"╬","boxvl":"┤","boxvL":"╡","boxVl":"╢","boxVL":"╣","boxvr":"├","boxvR":"╞","boxVr":"╟","boxVR":"╠","bprime":"‵","breve":"˘","Breve":"˘","brvbar":"¦","bscr":"𝒷","Bscr":"ℬ","bsemi":"⁏","bsim":"∽","bsime":"⋍","bsolb":"⧅","bsol":"\\\\","bsolhsub":"⟈","bull":"•","bullet":"•","bump":"≎","bumpE":"⪮","bumpe":"≏","Bumpeq":"≎","bumpeq":"≏","Cacute":"Ć","cacute":"ć","capand":"⩄","capbrcup":"⩉","capcap":"⩋","cap":"∩","Cap":"⋒","capcup":"⩇","capdot":"⩀","CapitalDifferentialD":"ⅅ","caps":"∩︀","caret":"⁁","caron":"ˇ","Cayleys":"ℭ","ccaps":"⩍","Ccaron":"Č","ccaron":"č","Ccedil":"Ç","ccedil":"ç","Ccirc":"Ĉ","ccirc":"ĉ","Cconint":"∰","ccups":"⩌","ccupssm":"⩐","Cdot":"Ċ","cdot":"ċ","cedil":"¸","Cedilla":"¸","cemptyv":"⦲","cent":"¢","centerdot":"·","CenterDot":"·","cfr":"𝔠","Cfr":"ℭ","CHcy":"Ч","chcy":"ч","check":"✓","checkmark":"✓","Chi":"Χ","chi":"χ","circ":"ˆ","circeq":"≗","circlearrowleft":"↺","circlearrowright":"↻","circledast":"⊛","circledcirc":"⊚","circleddash":"⊝","CircleDot":"⊙","circledR":"®","circledS":"Ⓢ","CircleMinus":"⊖","CirclePlus":"⊕","CircleTimes":"⊗","cir":"○","cirE":"⧃","cire":"≗","cirfnint":"⨐","cirmid":"⫯","cirscir":"⧂","ClockwiseContourIntegral":"∲","CloseCurlyDoubleQuote":"”","CloseCurlyQuote":"’","clubs":"♣","clubsuit":"♣","colon":":","Colon":"∷","Colone":"⩴","colone":"≔","coloneq":"≔","comma":",","commat":"@","comp":"∁","compfn":"∘","complement":"∁","complexes":"ℂ","cong":"≅","congdot":"⩭","Congruent":"≡","conint":"∮","Conint":"∯","ContourIntegral":"∮","copf":"𝕔","Copf":"ℂ","coprod":"∐","Coproduct":"∐","copy":"©","COPY":"©","copysr":"℗","CounterClockwiseContourIntegral":"∳","crarr":"↵","cross":"✗","Cross":"⨯","Cscr":"𝒞","cscr":"𝒸","csub":"⫏","csube":"⫑","csup":"⫐","csupe":"⫒","ctdot":"⋯","cudarrl":"⤸","cudarrr":"⤵","cuepr":"⋞","cuesc":"⋟","cularr":"↶","cularrp":"⤽","cupbrcap":"⩈","cupcap":"⩆","CupCap":"≍","cup":"∪","Cup":"⋓","cupcup":"⩊","cupdot":"⊍","cupor":"⩅","cups":"∪︀","curarr":"↷","curarrm":"⤼","curlyeqprec":"⋞","curlyeqsucc":"⋟","curlyvee":"⋎","curlywedge":"⋏","curren":"¤","curvearrowleft":"↶","curvearrowright":"↷","cuvee":"⋎","cuwed":"⋏","cwconint":"∲","cwint":"∱","cylcty":"⌭","dagger":"†","Dagger":"‡","daleth":"ℸ","darr":"↓","Darr":"↡","dArr":"⇓","dash":"‐","Dashv":"⫤","dashv":"⊣","dbkarow":"⤏","dblac":"˝","Dcaron":"Ď","dcaron":"ď","Dcy":"Д","dcy":"д","ddagger":"‡","ddarr":"⇊","DD":"ⅅ","dd":"ⅆ","DDotrahd":"⤑","ddotseq":"⩷","deg":"°","Del":"∇","Delta":"Δ","delta":"δ","demptyv":"⦱","dfisht":"⥿","Dfr":"𝔇","dfr":"𝔡","dHar":"⥥","dharl":"⇃","dharr":"⇂","DiacriticalAcute":"´","DiacriticalDot":"˙","DiacriticalDoubleAcute":"˝","DiacriticalGrave":"`","DiacriticalTilde":"˜","diam":"⋄","diamond":"⋄","Diamond":"⋄","diamondsuit":"♦","diams":"♦","die":"¨","DifferentialD":"ⅆ","digamma":"ϝ","disin":"⋲","div":"÷","divide":"÷","divideontimes":"⋇","divonx":"⋇","DJcy":"Ђ","djcy":"ђ","dlcorn":"⌞","dlcrop":"⌍","dollar":"$","Dopf":"𝔻","dopf":"𝕕","Dot":"¨","dot":"˙","DotDot":"⃜","doteq":"≐","doteqdot":"≑","DotEqual":"≐","dotminus":"∸","dotplus":"∔","dotsquare":"⊡","doublebarwedge":"⌆","DoubleContourIntegral":"∯","DoubleDot":"¨","DoubleDownArrow":"⇓","DoubleLeftArrow":"⇐","DoubleLeftRightArrow":"⇔","DoubleLeftTee":"⫤","DoubleLongLeftArrow":"⟸","DoubleLongLeftRightArrow":"⟺","DoubleLongRightArrow":"⟹","DoubleRightArrow":"⇒","DoubleRightTee":"⊨","DoubleUpArrow":"⇑","DoubleUpDownArrow":"⇕","DoubleVerticalBar":"∥","DownArrowBar":"⤓","downarrow":"↓","DownArrow":"↓","Downarrow":"⇓","DownArrowUpArrow":"⇵","DownBreve":"̑","downdownarrows":"⇊","downharpoonleft":"⇃","downharpoonright":"⇂","DownLeftRightVector":"⥐","DownLeftTeeVector":"⥞","DownLeftVectorBar":"⥖","DownLeftVector":"↽","DownRightTeeVector":"⥟","DownRightVectorBar":"⥗","DownRightVector":"⇁","DownTeeArrow":"↧","DownTee":"⊤","drbkarow":"⤐","drcorn":"⌟","drcrop":"⌌","Dscr":"𝒟","dscr":"𝒹","DScy":"Ѕ","dscy":"ѕ","dsol":"⧶","Dstrok":"Đ","dstrok":"đ","dtdot":"⋱","dtri":"▿","dtrif":"▾","duarr":"⇵","duhar":"⥯","dwangle":"⦦","DZcy":"Џ","dzcy":"џ","dzigrarr":"⟿","Eacute":"É","eacute":"é","easter":"⩮","Ecaron":"Ě","ecaron":"ě","Ecirc":"Ê","ecirc":"ê","ecir":"≖","ecolon":"≕","Ecy":"Э","ecy":"э","eDDot":"⩷","Edot":"Ė","edot":"ė","eDot":"≑","ee":"ⅇ","efDot":"≒","Efr":"𝔈","efr":"𝔢","eg":"⪚","Egrave":"È","egrave":"è","egs":"⪖","egsdot":"⪘","el":"⪙","Element":"∈","elinters":"⏧","ell":"ℓ","els":"⪕","elsdot":"⪗","Emacr":"Ē","emacr":"ē","empty":"∅","emptyset":"∅","EmptySmallSquare":"◻","emptyv":"∅","EmptyVerySmallSquare":"▫","emsp13":" ","emsp14":" ","emsp":" ","ENG":"Ŋ","eng":"ŋ","ensp":" ","Eogon":"Ę","eogon":"ę","Eopf":"𝔼","eopf":"𝕖","epar":"⋕","eparsl":"⧣","eplus":"⩱","epsi":"ε","Epsilon":"Ε","epsilon":"ε","epsiv":"ϵ","eqcirc":"≖","eqcolon":"≕","eqsim":"≂","eqslantgtr":"⪖","eqslantless":"⪕","Equal":"⩵","equals":"=","EqualTilde":"≂","equest":"≟","Equilibrium":"⇌","equiv":"≡","equivDD":"⩸","eqvparsl":"⧥","erarr":"⥱","erDot":"≓","escr":"ℯ","Escr":"ℰ","esdot":"≐","Esim":"⩳","esim":"≂","Eta":"Η","eta":"η","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","euro":"€","excl":"!","exist":"∃","Exists":"∃","expectation":"ℰ","exponentiale":"ⅇ","ExponentialE":"ⅇ","fallingdotseq":"≒","Fcy":"Ф","fcy":"ф","female":"♀","ffilig":"ffi","fflig":"ff","ffllig":"ffl","Ffr":"𝔉","ffr":"𝔣","filig":"fi","FilledSmallSquare":"◼","FilledVerySmallSquare":"▪","fjlig":"fj","flat":"♭","fllig":"fl","fltns":"▱","fnof":"ƒ","Fopf":"𝔽","fopf":"𝕗","forall":"∀","ForAll":"∀","fork":"⋔","forkv":"⫙","Fouriertrf":"ℱ","fpartint":"⨍","frac12":"½","frac13":"⅓","frac14":"¼","frac15":"⅕","frac16":"⅙","frac18":"⅛","frac23":"⅔","frac25":"⅖","frac34":"¾","frac35":"⅗","frac38":"⅜","frac45":"⅘","frac56":"⅚","frac58":"⅝","frac78":"⅞","frasl":"⁄","frown":"⌢","fscr":"𝒻","Fscr":"ℱ","gacute":"ǵ","Gamma":"Γ","gamma":"γ","Gammad":"Ϝ","gammad":"ϝ","gap":"⪆","Gbreve":"Ğ","gbreve":"ğ","Gcedil":"Ģ","Gcirc":"Ĝ","gcirc":"ĝ","Gcy":"Г","gcy":"г","Gdot":"Ġ","gdot":"ġ","ge":"≥","gE":"≧","gEl":"⪌","gel":"⋛","geq":"≥","geqq":"≧","geqslant":"⩾","gescc":"⪩","ges":"⩾","gesdot":"⪀","gesdoto":"⪂","gesdotol":"⪄","gesl":"⋛︀","gesles":"⪔","Gfr":"𝔊","gfr":"𝔤","gg":"≫","Gg":"⋙","ggg":"⋙","gimel":"ℷ","GJcy":"Ѓ","gjcy":"ѓ","gla":"⪥","gl":"≷","glE":"⪒","glj":"⪤","gnap":"⪊","gnapprox":"⪊","gne":"⪈","gnE":"≩","gneq":"⪈","gneqq":"≩","gnsim":"⋧","Gopf":"𝔾","gopf":"𝕘","grave":"`","GreaterEqual":"≥","GreaterEqualLess":"⋛","GreaterFullEqual":"≧","GreaterGreater":"⪢","GreaterLess":"≷","GreaterSlantEqual":"⩾","GreaterTilde":"≳","Gscr":"𝒢","gscr":"ℊ","gsim":"≳","gsime":"⪎","gsiml":"⪐","gtcc":"⪧","gtcir":"⩺","gt":">","GT":">","Gt":"≫","gtdot":"⋗","gtlPar":"⦕","gtquest":"⩼","gtrapprox":"⪆","gtrarr":"⥸","gtrdot":"⋗","gtreqless":"⋛","gtreqqless":"⪌","gtrless":"≷","gtrsim":"≳","gvertneqq":"≩︀","gvnE":"≩︀","Hacek":"ˇ","hairsp":" ","half":"½","hamilt":"ℋ","HARDcy":"Ъ","hardcy":"ъ","harrcir":"⥈","harr":"↔","hArr":"⇔","harrw":"↭","Hat":"^","hbar":"ℏ","Hcirc":"Ĥ","hcirc":"ĥ","hearts":"♥","heartsuit":"♥","hellip":"…","hercon":"⊹","hfr":"𝔥","Hfr":"ℌ","HilbertSpace":"ℋ","hksearow":"⤥","hkswarow":"⤦","hoarr":"⇿","homtht":"∻","hookleftarrow":"↩","hookrightarrow":"↪","hopf":"𝕙","Hopf":"ℍ","horbar":"―","HorizontalLine":"─","hscr":"𝒽","Hscr":"ℋ","hslash":"ℏ","Hstrok":"Ħ","hstrok":"ħ","HumpDownHump":"≎","HumpEqual":"≏","hybull":"⁃","hyphen":"‐","Iacute":"Í","iacute":"í","ic":"⁣","Icirc":"Î","icirc":"î","Icy":"И","icy":"и","Idot":"İ","IEcy":"Е","iecy":"е","iexcl":"¡","iff":"⇔","ifr":"𝔦","Ifr":"ℑ","Igrave":"Ì","igrave":"ì","ii":"ⅈ","iiiint":"⨌","iiint":"∭","iinfin":"⧜","iiota":"℩","IJlig":"IJ","ijlig":"ij","Imacr":"Ī","imacr":"ī","image":"ℑ","ImaginaryI":"ⅈ","imagline":"ℐ","imagpart":"ℑ","imath":"ı","Im":"ℑ","imof":"⊷","imped":"Ƶ","Implies":"⇒","incare":"℅","in":"∈","infin":"∞","infintie":"⧝","inodot":"ı","intcal":"⊺","int":"∫","Int":"∬","integers":"ℤ","Integral":"∫","intercal":"⊺","Intersection":"⋂","intlarhk":"⨗","intprod":"⨼","InvisibleComma":"⁣","InvisibleTimes":"⁢","IOcy":"Ё","iocy":"ё","Iogon":"Į","iogon":"į","Iopf":"𝕀","iopf":"𝕚","Iota":"Ι","iota":"ι","iprod":"⨼","iquest":"¿","iscr":"𝒾","Iscr":"ℐ","isin":"∈","isindot":"⋵","isinE":"⋹","isins":"⋴","isinsv":"⋳","isinv":"∈","it":"⁢","Itilde":"Ĩ","itilde":"ĩ","Iukcy":"І","iukcy":"і","Iuml":"Ï","iuml":"ï","Jcirc":"Ĵ","jcirc":"ĵ","Jcy":"Й","jcy":"й","Jfr":"𝔍","jfr":"𝔧","jmath":"ȷ","Jopf":"𝕁","jopf":"𝕛","Jscr":"𝒥","jscr":"𝒿","Jsercy":"Ј","jsercy":"ј","Jukcy":"Є","jukcy":"є","Kappa":"Κ","kappa":"κ","kappav":"ϰ","Kcedil":"Ķ","kcedil":"ķ","Kcy":"К","kcy":"к","Kfr":"𝔎","kfr":"𝔨","kgreen":"ĸ","KHcy":"Х","khcy":"х","KJcy":"Ќ","kjcy":"ќ","Kopf":"𝕂","kopf":"𝕜","Kscr":"𝒦","kscr":"𝓀","lAarr":"⇚","Lacute":"Ĺ","lacute":"ĺ","laemptyv":"⦴","lagran":"ℒ","Lambda":"Λ","lambda":"λ","lang":"⟨","Lang":"⟪","langd":"⦑","langle":"⟨","lap":"⪅","Laplacetrf":"ℒ","laquo":"«","larrb":"⇤","larrbfs":"⤟","larr":"←","Larr":"↞","lArr":"⇐","larrfs":"⤝","larrhk":"↩","larrlp":"↫","larrpl":"⤹","larrsim":"⥳","larrtl":"↢","latail":"⤙","lAtail":"⤛","lat":"⪫","late":"⪭","lates":"⪭︀","lbarr":"⤌","lBarr":"⤎","lbbrk":"❲","lbrace":"{","lbrack":"[","lbrke":"⦋","lbrksld":"⦏","lbrkslu":"⦍","Lcaron":"Ľ","lcaron":"ľ","Lcedil":"Ļ","lcedil":"ļ","lceil":"⌈","lcub":"{","Lcy":"Л","lcy":"л","ldca":"⤶","ldquo":"“","ldquor":"„","ldrdhar":"⥧","ldrushar":"⥋","ldsh":"↲","le":"≤","lE":"≦","LeftAngleBracket":"⟨","LeftArrowBar":"⇤","leftarrow":"←","LeftArrow":"←","Leftarrow":"⇐","LeftArrowRightArrow":"⇆","leftarrowtail":"↢","LeftCeiling":"⌈","LeftDoubleBracket":"⟦","LeftDownTeeVector":"⥡","LeftDownVectorBar":"⥙","LeftDownVector":"⇃","LeftFloor":"⌊","leftharpoondown":"↽","leftharpoonup":"↼","leftleftarrows":"⇇","leftrightarrow":"↔","LeftRightArrow":"↔","Leftrightarrow":"⇔","leftrightarrows":"⇆","leftrightharpoons":"⇋","leftrightsquigarrow":"↭","LeftRightVector":"⥎","LeftTeeArrow":"↤","LeftTee":"⊣","LeftTeeVector":"⥚","leftthreetimes":"⋋","LeftTriangleBar":"⧏","LeftTriangle":"⊲","LeftTriangleEqual":"⊴","LeftUpDownVector":"⥑","LeftUpTeeVector":"⥠","LeftUpVectorBar":"⥘","LeftUpVector":"↿","LeftVectorBar":"⥒","LeftVector":"↼","lEg":"⪋","leg":"⋚","leq":"≤","leqq":"≦","leqslant":"⩽","lescc":"⪨","les":"⩽","lesdot":"⩿","lesdoto":"⪁","lesdotor":"⪃","lesg":"⋚︀","lesges":"⪓","lessapprox":"⪅","lessdot":"⋖","lesseqgtr":"⋚","lesseqqgtr":"⪋","LessEqualGreater":"⋚","LessFullEqual":"≦","LessGreater":"≶","lessgtr":"≶","LessLess":"⪡","lesssim":"≲","LessSlantEqual":"⩽","LessTilde":"≲","lfisht":"⥼","lfloor":"⌊","Lfr":"𝔏","lfr":"𝔩","lg":"≶","lgE":"⪑","lHar":"⥢","lhard":"↽","lharu":"↼","lharul":"⥪","lhblk":"▄","LJcy":"Љ","ljcy":"љ","llarr":"⇇","ll":"≪","Ll":"⋘","llcorner":"⌞","Lleftarrow":"⇚","llhard":"⥫","lltri":"◺","Lmidot":"Ŀ","lmidot":"ŀ","lmoustache":"⎰","lmoust":"⎰","lnap":"⪉","lnapprox":"⪉","lne":"⪇","lnE":"≨","lneq":"⪇","lneqq":"≨","lnsim":"⋦","loang":"⟬","loarr":"⇽","lobrk":"⟦","longleftarrow":"⟵","LongLeftArrow":"⟵","Longleftarrow":"⟸","longleftrightarrow":"⟷","LongLeftRightArrow":"⟷","Longleftrightarrow":"⟺","longmapsto":"⟼","longrightarrow":"⟶","LongRightArrow":"⟶","Longrightarrow":"⟹","looparrowleft":"↫","looparrowright":"↬","lopar":"⦅","Lopf":"𝕃","lopf":"𝕝","loplus":"⨭","lotimes":"⨴","lowast":"∗","lowbar":"_","LowerLeftArrow":"↙","LowerRightArrow":"↘","loz":"◊","lozenge":"◊","lozf":"⧫","lpar":"(","lparlt":"⦓","lrarr":"⇆","lrcorner":"⌟","lrhar":"⇋","lrhard":"⥭","lrm":"‎","lrtri":"⊿","lsaquo":"‹","lscr":"𝓁","Lscr":"ℒ","lsh":"↰","Lsh":"↰","lsim":"≲","lsime":"⪍","lsimg":"⪏","lsqb":"[","lsquo":"‘","lsquor":"‚","Lstrok":"Ł","lstrok":"ł","ltcc":"⪦","ltcir":"⩹","lt":"<","LT":"<","Lt":"≪","ltdot":"⋖","lthree":"⋋","ltimes":"⋉","ltlarr":"⥶","ltquest":"⩻","ltri":"◃","ltrie":"⊴","ltrif":"◂","ltrPar":"⦖","lurdshar":"⥊","luruhar":"⥦","lvertneqq":"≨︀","lvnE":"≨︀","macr":"¯","male":"♂","malt":"✠","maltese":"✠","Map":"⤅","map":"↦","mapsto":"↦","mapstodown":"↧","mapstoleft":"↤","mapstoup":"↥","marker":"▮","mcomma":"⨩","Mcy":"М","mcy":"м","mdash":"—","mDDot":"∺","measuredangle":"∡","MediumSpace":" ","Mellintrf":"ℳ","Mfr":"𝔐","mfr":"𝔪","mho":"℧","micro":"µ","midast":"*","midcir":"⫰","mid":"∣","middot":"·","minusb":"⊟","minus":"−","minusd":"∸","minusdu":"⨪","MinusPlus":"∓","mlcp":"⫛","mldr":"…","mnplus":"∓","models":"⊧","Mopf":"𝕄","mopf":"𝕞","mp":"∓","mscr":"𝓂","Mscr":"ℳ","mstpos":"∾","Mu":"Μ","mu":"μ","multimap":"⊸","mumap":"⊸","nabla":"∇","Nacute":"Ń","nacute":"ń","nang":"∠⃒","nap":"≉","napE":"⩰̸","napid":"≋̸","napos":"ʼn","napprox":"≉","natural":"♮","naturals":"ℕ","natur":"♮","nbsp":" ","nbump":"≎̸","nbumpe":"≏̸","ncap":"⩃","Ncaron":"Ň","ncaron":"ň","Ncedil":"Ņ","ncedil":"ņ","ncong":"≇","ncongdot":"⩭̸","ncup":"⩂","Ncy":"Н","ncy":"н","ndash":"–","nearhk":"⤤","nearr":"↗","neArr":"⇗","nearrow":"↗","ne":"≠","nedot":"≐̸","NegativeMediumSpace":"​","NegativeThickSpace":"​","NegativeThinSpace":"​","NegativeVeryThinSpace":"​","nequiv":"≢","nesear":"⤨","nesim":"≂̸","NestedGreaterGreater":"≫","NestedLessLess":"≪","NewLine":"\\n","nexist":"∄","nexists":"∄","Nfr":"𝔑","nfr":"𝔫","ngE":"≧̸","nge":"≱","ngeq":"≱","ngeqq":"≧̸","ngeqslant":"⩾̸","nges":"⩾̸","nGg":"⋙̸","ngsim":"≵","nGt":"≫⃒","ngt":"≯","ngtr":"≯","nGtv":"≫̸","nharr":"↮","nhArr":"⇎","nhpar":"⫲","ni":"∋","nis":"⋼","nisd":"⋺","niv":"∋","NJcy":"Њ","njcy":"њ","nlarr":"↚","nlArr":"⇍","nldr":"‥","nlE":"≦̸","nle":"≰","nleftarrow":"↚","nLeftarrow":"⇍","nleftrightarrow":"↮","nLeftrightarrow":"⇎","nleq":"≰","nleqq":"≦̸","nleqslant":"⩽̸","nles":"⩽̸","nless":"≮","nLl":"⋘̸","nlsim":"≴","nLt":"≪⃒","nlt":"≮","nltri":"⋪","nltrie":"⋬","nLtv":"≪̸","nmid":"∤","NoBreak":"⁠","NonBreakingSpace":" ","nopf":"𝕟","Nopf":"ℕ","Not":"⫬","not":"¬","NotCongruent":"≢","NotCupCap":"≭","NotDoubleVerticalBar":"∦","NotElement":"∉","NotEqual":"≠","NotEqualTilde":"≂̸","NotExists":"∄","NotGreater":"≯","NotGreaterEqual":"≱","NotGreaterFullEqual":"≧̸","NotGreaterGreater":"≫̸","NotGreaterLess":"≹","NotGreaterSlantEqual":"⩾̸","NotGreaterTilde":"≵","NotHumpDownHump":"≎̸","NotHumpEqual":"≏̸","notin":"∉","notindot":"⋵̸","notinE":"⋹̸","notinva":"∉","notinvb":"⋷","notinvc":"⋶","NotLeftTriangleBar":"⧏̸","NotLeftTriangle":"⋪","NotLeftTriangleEqual":"⋬","NotLess":"≮","NotLessEqual":"≰","NotLessGreater":"≸","NotLessLess":"≪̸","NotLessSlantEqual":"⩽̸","NotLessTilde":"≴","NotNestedGreaterGreater":"⪢̸","NotNestedLessLess":"⪡̸","notni":"∌","notniva":"∌","notnivb":"⋾","notnivc":"⋽","NotPrecedes":"⊀","NotPrecedesEqual":"⪯̸","NotPrecedesSlantEqual":"⋠","NotReverseElement":"∌","NotRightTriangleBar":"⧐̸","NotRightTriangle":"⋫","NotRightTriangleEqual":"⋭","NotSquareSubset":"⊏̸","NotSquareSubsetEqual":"⋢","NotSquareSuperset":"⊐̸","NotSquareSupersetEqual":"⋣","NotSubset":"⊂⃒","NotSubsetEqual":"⊈","NotSucceeds":"⊁","NotSucceedsEqual":"⪰̸","NotSucceedsSlantEqual":"⋡","NotSucceedsTilde":"≿̸","NotSuperset":"⊃⃒","NotSupersetEqual":"⊉","NotTilde":"≁","NotTildeEqual":"≄","NotTildeFullEqual":"≇","NotTildeTilde":"≉","NotVerticalBar":"∤","nparallel":"∦","npar":"∦","nparsl":"⫽⃥","npart":"∂̸","npolint":"⨔","npr":"⊀","nprcue":"⋠","nprec":"⊀","npreceq":"⪯̸","npre":"⪯̸","nrarrc":"⤳̸","nrarr":"↛","nrArr":"⇏","nrarrw":"↝̸","nrightarrow":"↛","nRightarrow":"⇏","nrtri":"⋫","nrtrie":"⋭","nsc":"⊁","nsccue":"⋡","nsce":"⪰̸","Nscr":"𝒩","nscr":"𝓃","nshortmid":"∤","nshortparallel":"∦","nsim":"≁","nsime":"≄","nsimeq":"≄","nsmid":"∤","nspar":"∦","nsqsube":"⋢","nsqsupe":"⋣","nsub":"⊄","nsubE":"⫅̸","nsube":"⊈","nsubset":"⊂⃒","nsubseteq":"⊈","nsubseteqq":"⫅̸","nsucc":"⊁","nsucceq":"⪰̸","nsup":"⊅","nsupE":"⫆̸","nsupe":"⊉","nsupset":"⊃⃒","nsupseteq":"⊉","nsupseteqq":"⫆̸","ntgl":"≹","Ntilde":"Ñ","ntilde":"ñ","ntlg":"≸","ntriangleleft":"⋪","ntrianglelefteq":"⋬","ntriangleright":"⋫","ntrianglerighteq":"⋭","Nu":"Ν","nu":"ν","num":"#","numero":"№","numsp":" ","nvap":"≍⃒","nvdash":"⊬","nvDash":"⊭","nVdash":"⊮","nVDash":"⊯","nvge":"≥⃒","nvgt":">⃒","nvHarr":"⤄","nvinfin":"⧞","nvlArr":"⤂","nvle":"≤⃒","nvlt":"<⃒","nvltrie":"⊴⃒","nvrArr":"⤃","nvrtrie":"⊵⃒","nvsim":"∼⃒","nwarhk":"⤣","nwarr":"↖","nwArr":"⇖","nwarrow":"↖","nwnear":"⤧","Oacute":"Ó","oacute":"ó","oast":"⊛","Ocirc":"Ô","ocirc":"ô","ocir":"⊚","Ocy":"О","ocy":"о","odash":"⊝","Odblac":"Ő","odblac":"ő","odiv":"⨸","odot":"⊙","odsold":"⦼","OElig":"Œ","oelig":"œ","ofcir":"⦿","Ofr":"𝔒","ofr":"𝔬","ogon":"˛","Ograve":"Ò","ograve":"ò","ogt":"⧁","ohbar":"⦵","ohm":"Ω","oint":"∮","olarr":"↺","olcir":"⦾","olcross":"⦻","oline":"‾","olt":"⧀","Omacr":"Ō","omacr":"ō","Omega":"Ω","omega":"ω","Omicron":"Ο","omicron":"ο","omid":"⦶","ominus":"⊖","Oopf":"𝕆","oopf":"𝕠","opar":"⦷","OpenCurlyDoubleQuote":"“","OpenCurlyQuote":"‘","operp":"⦹","oplus":"⊕","orarr":"↻","Or":"⩔","or":"∨","ord":"⩝","order":"ℴ","orderof":"ℴ","ordf":"ª","ordm":"º","origof":"⊶","oror":"⩖","orslope":"⩗","orv":"⩛","oS":"Ⓢ","Oscr":"𝒪","oscr":"ℴ","Oslash":"Ø","oslash":"ø","osol":"⊘","Otilde":"Õ","otilde":"õ","otimesas":"⨶","Otimes":"⨷","otimes":"⊗","Ouml":"Ö","ouml":"ö","ovbar":"⌽","OverBar":"‾","OverBrace":"⏞","OverBracket":"⎴","OverParenthesis":"⏜","para":"¶","parallel":"∥","par":"∥","parsim":"⫳","parsl":"⫽","part":"∂","PartialD":"∂","Pcy":"П","pcy":"п","percnt":"%","period":".","permil":"‰","perp":"⊥","pertenk":"‱","Pfr":"𝔓","pfr":"𝔭","Phi":"Φ","phi":"φ","phiv":"ϕ","phmmat":"ℳ","phone":"☎","Pi":"Π","pi":"π","pitchfork":"⋔","piv":"ϖ","planck":"ℏ","planckh":"ℎ","plankv":"ℏ","plusacir":"⨣","plusb":"⊞","pluscir":"⨢","plus":"+","plusdo":"∔","plusdu":"⨥","pluse":"⩲","PlusMinus":"±","plusmn":"±","plussim":"⨦","plustwo":"⨧","pm":"±","Poincareplane":"ℌ","pointint":"⨕","popf":"𝕡","Popf":"ℙ","pound":"£","prap":"⪷","Pr":"⪻","pr":"≺","prcue":"≼","precapprox":"⪷","prec":"≺","preccurlyeq":"≼","Precedes":"≺","PrecedesEqual":"⪯","PrecedesSlantEqual":"≼","PrecedesTilde":"≾","preceq":"⪯","precnapprox":"⪹","precneqq":"⪵","precnsim":"⋨","pre":"⪯","prE":"⪳","precsim":"≾","prime":"′","Prime":"″","primes":"ℙ","prnap":"⪹","prnE":"⪵","prnsim":"⋨","prod":"∏","Product":"∏","profalar":"⌮","profline":"⌒","profsurf":"⌓","prop":"∝","Proportional":"∝","Proportion":"∷","propto":"∝","prsim":"≾","prurel":"⊰","Pscr":"𝒫","pscr":"𝓅","Psi":"Ψ","psi":"ψ","puncsp":" ","Qfr":"𝔔","qfr":"𝔮","qint":"⨌","qopf":"𝕢","Qopf":"ℚ","qprime":"⁗","Qscr":"𝒬","qscr":"𝓆","quaternions":"ℍ","quatint":"⨖","quest":"?","questeq":"≟","quot":"\\"","QUOT":"\\"","rAarr":"⇛","race":"∽̱","Racute":"Ŕ","racute":"ŕ","radic":"√","raemptyv":"⦳","rang":"⟩","Rang":"⟫","rangd":"⦒","range":"⦥","rangle":"⟩","raquo":"»","rarrap":"⥵","rarrb":"⇥","rarrbfs":"⤠","rarrc":"⤳","rarr":"→","Rarr":"↠","rArr":"⇒","rarrfs":"⤞","rarrhk":"↪","rarrlp":"↬","rarrpl":"⥅","rarrsim":"⥴","Rarrtl":"⤖","rarrtl":"↣","rarrw":"↝","ratail":"⤚","rAtail":"⤜","ratio":"∶","rationals":"ℚ","rbarr":"⤍","rBarr":"⤏","RBarr":"⤐","rbbrk":"❳","rbrace":"}","rbrack":"]","rbrke":"⦌","rbrksld":"⦎","rbrkslu":"⦐","Rcaron":"Ř","rcaron":"ř","Rcedil":"Ŗ","rcedil":"ŗ","rceil":"⌉","rcub":"}","Rcy":"Р","rcy":"р","rdca":"⤷","rdldhar":"⥩","rdquo":"”","rdquor":"”","rdsh":"↳","real":"ℜ","realine":"ℛ","realpart":"ℜ","reals":"ℝ","Re":"ℜ","rect":"▭","reg":"®","REG":"®","ReverseElement":"∋","ReverseEquilibrium":"⇋","ReverseUpEquilibrium":"⥯","rfisht":"⥽","rfloor":"⌋","rfr":"𝔯","Rfr":"ℜ","rHar":"⥤","rhard":"⇁","rharu":"⇀","rharul":"⥬","Rho":"Ρ","rho":"ρ","rhov":"ϱ","RightAngleBracket":"⟩","RightArrowBar":"⇥","rightarrow":"→","RightArrow":"→","Rightarrow":"⇒","RightArrowLeftArrow":"⇄","rightarrowtail":"↣","RightCeiling":"⌉","RightDoubleBracket":"⟧","RightDownTeeVector":"⥝","RightDownVectorBar":"⥕","RightDownVector":"⇂","RightFloor":"⌋","rightharpoondown":"⇁","rightharpoonup":"⇀","rightleftarrows":"⇄","rightleftharpoons":"⇌","rightrightarrows":"⇉","rightsquigarrow":"↝","RightTeeArrow":"↦","RightTee":"⊢","RightTeeVector":"⥛","rightthreetimes":"⋌","RightTriangleBar":"⧐","RightTriangle":"⊳","RightTriangleEqual":"⊵","RightUpDownVector":"⥏","RightUpTeeVector":"⥜","RightUpVectorBar":"⥔","RightUpVector":"↾","RightVectorBar":"⥓","RightVector":"⇀","ring":"˚","risingdotseq":"≓","rlarr":"⇄","rlhar":"⇌","rlm":"‏","rmoustache":"⎱","rmoust":"⎱","rnmid":"⫮","roang":"⟭","roarr":"⇾","robrk":"⟧","ropar":"⦆","ropf":"𝕣","Ropf":"ℝ","roplus":"⨮","rotimes":"⨵","RoundImplies":"⥰","rpar":")","rpargt":"⦔","rppolint":"⨒","rrarr":"⇉","Rrightarrow":"⇛","rsaquo":"›","rscr":"𝓇","Rscr":"ℛ","rsh":"↱","Rsh":"↱","rsqb":"]","rsquo":"’","rsquor":"’","rthree":"⋌","rtimes":"⋊","rtri":"▹","rtrie":"⊵","rtrif":"▸","rtriltri":"⧎","RuleDelayed":"⧴","ruluhar":"⥨","rx":"℞","Sacute":"Ś","sacute":"ś","sbquo":"‚","scap":"⪸","Scaron":"Š","scaron":"š","Sc":"⪼","sc":"≻","sccue":"≽","sce":"⪰","scE":"⪴","Scedil":"Ş","scedil":"ş","Scirc":"Ŝ","scirc":"ŝ","scnap":"⪺","scnE":"⪶","scnsim":"⋩","scpolint":"⨓","scsim":"≿","Scy":"С","scy":"с","sdotb":"⊡","sdot":"⋅","sdote":"⩦","searhk":"⤥","searr":"↘","seArr":"⇘","searrow":"↘","sect":"§","semi":";","seswar":"⤩","setminus":"∖","setmn":"∖","sext":"✶","Sfr":"𝔖","sfr":"𝔰","sfrown":"⌢","sharp":"♯","SHCHcy":"Щ","shchcy":"щ","SHcy":"Ш","shcy":"ш","ShortDownArrow":"↓","ShortLeftArrow":"←","shortmid":"∣","shortparallel":"∥","ShortRightArrow":"→","ShortUpArrow":"↑","shy":"­","Sigma":"Σ","sigma":"σ","sigmaf":"ς","sigmav":"ς","sim":"∼","simdot":"⩪","sime":"≃","simeq":"≃","simg":"⪞","simgE":"⪠","siml":"⪝","simlE":"⪟","simne":"≆","simplus":"⨤","simrarr":"⥲","slarr":"←","SmallCircle":"∘","smallsetminus":"∖","smashp":"⨳","smeparsl":"⧤","smid":"∣","smile":"⌣","smt":"⪪","smte":"⪬","smtes":"⪬︀","SOFTcy":"Ь","softcy":"ь","solbar":"⌿","solb":"⧄","sol":"/","Sopf":"𝕊","sopf":"𝕤","spades":"♠","spadesuit":"♠","spar":"∥","sqcap":"⊓","sqcaps":"⊓︀","sqcup":"⊔","sqcups":"⊔︀","Sqrt":"√","sqsub":"⊏","sqsube":"⊑","sqsubset":"⊏","sqsubseteq":"⊑","sqsup":"⊐","sqsupe":"⊒","sqsupset":"⊐","sqsupseteq":"⊒","square":"□","Square":"□","SquareIntersection":"⊓","SquareSubset":"⊏","SquareSubsetEqual":"⊑","SquareSuperset":"⊐","SquareSupersetEqual":"⊒","SquareUnion":"⊔","squarf":"▪","squ":"□","squf":"▪","srarr":"→","Sscr":"𝒮","sscr":"𝓈","ssetmn":"∖","ssmile":"⌣","sstarf":"⋆","Star":"⋆","star":"☆","starf":"★","straightepsilon":"ϵ","straightphi":"ϕ","strns":"¯","sub":"⊂","Sub":"⋐","subdot":"⪽","subE":"⫅","sube":"⊆","subedot":"⫃","submult":"⫁","subnE":"⫋","subne":"⊊","subplus":"⪿","subrarr":"⥹","subset":"⊂","Subset":"⋐","subseteq":"⊆","subseteqq":"⫅","SubsetEqual":"⊆","subsetneq":"⊊","subsetneqq":"⫋","subsim":"⫇","subsub":"⫕","subsup":"⫓","succapprox":"⪸","succ":"≻","succcurlyeq":"≽","Succeeds":"≻","SucceedsEqual":"⪰","SucceedsSlantEqual":"≽","SucceedsTilde":"≿","succeq":"⪰","succnapprox":"⪺","succneqq":"⪶","succnsim":"⋩","succsim":"≿","SuchThat":"∋","sum":"∑","Sum":"∑","sung":"♪","sup1":"¹","sup2":"²","sup3":"³","sup":"⊃","Sup":"⋑","supdot":"⪾","supdsub":"⫘","supE":"⫆","supe":"⊇","supedot":"⫄","Superset":"⊃","SupersetEqual":"⊇","suphsol":"⟉","suphsub":"⫗","suplarr":"⥻","supmult":"⫂","supnE":"⫌","supne":"⊋","supplus":"⫀","supset":"⊃","Supset":"⋑","supseteq":"⊇","supseteqq":"⫆","supsetneq":"⊋","supsetneqq":"⫌","supsim":"⫈","supsub":"⫔","supsup":"⫖","swarhk":"⤦","swarr":"↙","swArr":"⇙","swarrow":"↙","swnwar":"⤪","szlig":"ß","Tab":"\\t","target":"⌖","Tau":"Τ","tau":"τ","tbrk":"⎴","Tcaron":"Ť","tcaron":"ť","Tcedil":"Ţ","tcedil":"ţ","Tcy":"Т","tcy":"т","tdot":"⃛","telrec":"⌕","Tfr":"𝔗","tfr":"𝔱","there4":"∴","therefore":"∴","Therefore":"∴","Theta":"Θ","theta":"θ","thetasym":"ϑ","thetav":"ϑ","thickapprox":"≈","thicksim":"∼","ThickSpace":"  ","ThinSpace":" ","thinsp":" ","thkap":"≈","thksim":"∼","THORN":"Þ","thorn":"þ","tilde":"˜","Tilde":"∼","TildeEqual":"≃","TildeFullEqual":"≅","TildeTilde":"≈","timesbar":"⨱","timesb":"⊠","times":"×","timesd":"⨰","tint":"∭","toea":"⤨","topbot":"⌶","topcir":"⫱","top":"⊤","Topf":"𝕋","topf":"𝕥","topfork":"⫚","tosa":"⤩","tprime":"‴","trade":"™","TRADE":"™","triangle":"▵","triangledown":"▿","triangleleft":"◃","trianglelefteq":"⊴","triangleq":"≜","triangleright":"▹","trianglerighteq":"⊵","tridot":"◬","trie":"≜","triminus":"⨺","TripleDot":"⃛","triplus":"⨹","trisb":"⧍","tritime":"⨻","trpezium":"⏢","Tscr":"𝒯","tscr":"𝓉","TScy":"Ц","tscy":"ц","TSHcy":"Ћ","tshcy":"ћ","Tstrok":"Ŧ","tstrok":"ŧ","twixt":"≬","twoheadleftarrow":"↞","twoheadrightarrow":"↠","Uacute":"Ú","uacute":"ú","uarr":"↑","Uarr":"↟","uArr":"⇑","Uarrocir":"⥉","Ubrcy":"Ў","ubrcy":"ў","Ubreve":"Ŭ","ubreve":"ŭ","Ucirc":"Û","ucirc":"û","Ucy":"У","ucy":"у","udarr":"⇅","Udblac":"Ű","udblac":"ű","udhar":"⥮","ufisht":"⥾","Ufr":"𝔘","ufr":"𝔲","Ugrave":"Ù","ugrave":"ù","uHar":"⥣","uharl":"↿","uharr":"↾","uhblk":"▀","ulcorn":"⌜","ulcorner":"⌜","ulcrop":"⌏","ultri":"◸","Umacr":"Ū","umacr":"ū","uml":"¨","UnderBar":"_","UnderBrace":"⏟","UnderBracket":"⎵","UnderParenthesis":"⏝","Union":"⋃","UnionPlus":"⊎","Uogon":"Ų","uogon":"ų","Uopf":"𝕌","uopf":"𝕦","UpArrowBar":"⤒","uparrow":"↑","UpArrow":"↑","Uparrow":"⇑","UpArrowDownArrow":"⇅","updownarrow":"↕","UpDownArrow":"↕","Updownarrow":"⇕","UpEquilibrium":"⥮","upharpoonleft":"↿","upharpoonright":"↾","uplus":"⊎","UpperLeftArrow":"↖","UpperRightArrow":"↗","upsi":"υ","Upsi":"ϒ","upsih":"ϒ","Upsilon":"Υ","upsilon":"υ","UpTeeArrow":"↥","UpTee":"⊥","upuparrows":"⇈","urcorn":"⌝","urcorner":"⌝","urcrop":"⌎","Uring":"Ů","uring":"ů","urtri":"◹","Uscr":"𝒰","uscr":"𝓊","utdot":"⋰","Utilde":"Ũ","utilde":"ũ","utri":"▵","utrif":"▴","uuarr":"⇈","Uuml":"Ü","uuml":"ü","uwangle":"⦧","vangrt":"⦜","varepsilon":"ϵ","varkappa":"ϰ","varnothing":"∅","varphi":"ϕ","varpi":"ϖ","varpropto":"∝","varr":"↕","vArr":"⇕","varrho":"ϱ","varsigma":"ς","varsubsetneq":"⊊︀","varsubsetneqq":"⫋︀","varsupsetneq":"⊋︀","varsupsetneqq":"⫌︀","vartheta":"ϑ","vartriangleleft":"⊲","vartriangleright":"⊳","vBar":"⫨","Vbar":"⫫","vBarv":"⫩","Vcy":"В","vcy":"в","vdash":"⊢","vDash":"⊨","Vdash":"⊩","VDash":"⊫","Vdashl":"⫦","veebar":"⊻","vee":"∨","Vee":"⋁","veeeq":"≚","vellip":"⋮","verbar":"|","Verbar":"‖","vert":"|","Vert":"‖","VerticalBar":"∣","VerticalLine":"|","VerticalSeparator":"❘","VerticalTilde":"≀","VeryThinSpace":" ","Vfr":"𝔙","vfr":"𝔳","vltri":"⊲","vnsub":"⊂⃒","vnsup":"⊃⃒","Vopf":"𝕍","vopf":"𝕧","vprop":"∝","vrtri":"⊳","Vscr":"𝒱","vscr":"𝓋","vsubnE":"⫋︀","vsubne":"⊊︀","vsupnE":"⫌︀","vsupne":"⊋︀","Vvdash":"⊪","vzigzag":"⦚","Wcirc":"Ŵ","wcirc":"ŵ","wedbar":"⩟","wedge":"∧","Wedge":"⋀","wedgeq":"≙","weierp":"℘","Wfr":"𝔚","wfr":"𝔴","Wopf":"𝕎","wopf":"𝕨","wp":"℘","wr":"≀","wreath":"≀","Wscr":"𝒲","wscr":"𝓌","xcap":"⋂","xcirc":"◯","xcup":"⋃","xdtri":"▽","Xfr":"𝔛","xfr":"𝔵","xharr":"⟷","xhArr":"⟺","Xi":"Ξ","xi":"ξ","xlarr":"⟵","xlArr":"⟸","xmap":"⟼","xnis":"⋻","xodot":"⨀","Xopf":"𝕏","xopf":"𝕩","xoplus":"⨁","xotime":"⨂","xrarr":"⟶","xrArr":"⟹","Xscr":"𝒳","xscr":"𝓍","xsqcup":"⨆","xuplus":"⨄","xutri":"△","xvee":"⋁","xwedge":"⋀","Yacute":"Ý","yacute":"ý","YAcy":"Я","yacy":"я","Ycirc":"Ŷ","ycirc":"ŷ","Ycy":"Ы","ycy":"ы","yen":"¥","Yfr":"𝔜","yfr":"𝔶","YIcy":"Ї","yicy":"ї","Yopf":"𝕐","yopf":"𝕪","Yscr":"𝒴","yscr":"𝓎","YUcy":"Ю","yucy":"ю","yuml":"ÿ","Yuml":"Ÿ","Zacute":"Ź","zacute":"ź","Zcaron":"Ž","zcaron":"ž","Zcy":"З","zcy":"з","Zdot":"Ż","zdot":"ż","zeetrf":"ℨ","ZeroWidthSpace":"​","Zeta":"Ζ","zeta":"ζ","zfr":"𝔷","Zfr":"ℨ","ZHcy":"Ж","zhcy":"ж","zigrarr":"⇝","zopf":"𝕫","Zopf":"ℤ","Zscr":"𝒵","zscr":"𝓏","zwj":"‍","zwnj":"‌"}')},c6b6:function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},c6cd:function(t,e,n){var r=n("da84"),a=n("ce4e"),i="__core-js_shared__",o=r[i]||a(i,{});t.exports=o},c7d2:function(t,e){t.exports={functional:!0,render(t,e){const{_c:n,_v:r,data:a,children:i=[]}=e,{class:o,staticClass:s,style:c,staticStyle:l,attrs:u={},...f}=a;return n("svg",{class:["feather feather-star",o,s],style:[c,l],attrs:Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},u),...f},i.concat([n("path",{attrs:{d:"M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"}})]))}}},c84b:function(t,e){t.exports={functional:!0,render(t,e){const{_c:n,_v:r,data:a,children:i=[]}=e,{class:o,staticClass:s,style:c,staticStyle:l,attrs:u={},...f}=a;return n("svg",{class:["feather feather-activity",o,s],style:[c,l],attrs:Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},u),...f},i.concat([n("path",{attrs:{d:"M22 12h-4l-3 9L9 3l-3 9H2"}})]))}}},c8ba:function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}t.exports=n},c8d2:function(t,e,n){var r=n("d039"),a=n("5899"),i="​…᠎";t.exports=function(t){return r((function(){return!!a[t]()||i[t]()!=i||a[t].name!==t}))}},c909:function(t,e,n){var r,a,i; -/*! - * URI.js - Mutating URLs - * - * Version: 1.19.7 - * - * Author: Rodney Rehm - * Web: http://medialize.github.io/URI.js/ - * - * Licensed under - * MIT License http://www.opensource.org/licenses/mit-license - * - */(function(o,s){"use strict";t.exports?t.exports=s(n("63c5"),n("0056"),n("afab")):(a=[n("63c5"),n("0056"),n("afab")],r=s,i="function"===typeof r?r.apply(e,a):r,void 0===i||(t.exports=i))})(0,(function(t,e,n,r){"use strict";var a=r&&r.URI;function i(t,e){var n=arguments.length>=1,r=arguments.length>=2;if(!(this instanceof i))return n?r?new i(t,e):new i(t):new i;if(void 0===t){if(n)throw new TypeError("undefined is not a valid argument for URI");t="undefined"!==typeof location?location.href+"":""}if(null===t&&n)throw new TypeError("null is not a valid argument for URI");return this.href(t),void 0!==e?this.absoluteTo(e):this}function o(t){return/^[0-9]+$/.test(t)}i.version="1.19.7";var s=i.prototype,c=Object.prototype.hasOwnProperty;function l(t){return t.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function u(t){return void 0===t?"Undefined":String(Object.prototype.toString.call(t)).slice(8,-1)}function f(t){return"Array"===u(t)}function d(t,e){var n,r,a={};if("RegExp"===u(e))a=null;else if(f(e))for(n=0,r=e.length;n]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/gi,i.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},i.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},i.hostProtocols=["http","https"],i.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,i.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},i.getDomAttribute=function(t){if(t&&t.nodeName){var e=t.nodeName.toLowerCase();if("input"!==e||"image"===t.type)return i.domAttributes[e]}},i.encode=g,i.decode=decodeURIComponent,i.iso8859=function(){i.encode=escape,i.decode=unescape},i.unicode=function(){i.encode=g,i.decode=decodeURIComponent},i.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},i.encodeQuery=function(t,e){var n=i.encode(t+"");return void 0===e&&(e=i.escapeQuerySpace),e?n.replace(/%20/g,"+"):n},i.decodeQuery=function(t,e){t+="",void 0===e&&(e=i.escapeQuerySpace);try{return i.decode(e?t.replace(/\+/g,"%20"):t)}catch(n){return t}};var b,y={encode:"encode",decode:"decode"},E=function(t,e){return function(n){try{return i[e](n+"").replace(i.characters[t][e].expression,(function(n){return i.characters[t][e].map[n]}))}catch(r){return n}}};for(b in y)i[b+"PathSegment"]=E("pathname",y[b]),i[b+"UrnPathSegment"]=E("urnpath",y[b]);var w=function(t,e,n){return function(r){var a;a=n?function(t){return i[e](i[n](t))}:i[e];for(var o=(r+"").split(t),s=0,c=o.length;s-1&&(e.fragment=t.substring(n+1)||null,t=t.substring(0,n)),n=t.indexOf("?"),n>-1&&(e.query=t.substring(n+1)||null,t=t.substring(0,n)),t=t.replace(/^(https?|ftp|wss?)?:[/\\]*/,"$1://"),"//"===t.substring(0,2)?(e.protocol=null,t=t.substring(2),t=i.parseAuthority(t,e)):(n=t.indexOf(":"),n>-1&&(e.protocol=t.substring(0,n)||null,e.protocol&&!e.protocol.match(i.protocol_expression)?e.protocol=void 0:"//"===t.substring(n+1,n+3).replace(/\\/g,"/")?(t=t.substring(n+3),t=i.parseAuthority(t,e)):(t=t.substring(n+1),e.urn=!0))),e.path=t,e},i.parseHost=function(t,e){t||(t=""),t=t.replace(/\\/g,"/");var n,r,a=t.indexOf("/");if(-1===a&&(a=t.length),"["===t.charAt(0))n=t.indexOf("]"),e.hostname=t.substring(1,n)||null,e.port=t.substring(n+2,a)||null,"/"===e.port&&(e.port=null);else{var o=t.indexOf(":"),s=t.indexOf("/"),c=t.indexOf(":",o+1);-1!==c&&(-1===s||c-1?o:t.length-1);return s>-1&&(-1===o||s-1?p.slice(0,h)+p.slice(h).replace(o,""):p.replace(o,""),!(p.length<=l[0].length)&&(!n.ignore||!n.ignore.test(p))){d=u+p.length;var g=e(p,u,d,t);void 0!==g?(g=String(g),t=t.slice(0,u)+g+t.slice(d),r.lastIndex=u+g.length):r.lastIndex=d}}return r.lastIndex=0,t},i.ensureValidHostname=function(e,n){var r=!!e,a=!!n,o=!1;if(a&&(o=p(i.hostProtocols,n)),o&&!r)throw new TypeError("Hostname cannot be empty, if protocol is "+n);if(e&&e.match(i.invalid_hostname_characters)){if(!t)throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(t.toASCII(e).match(i.invalid_hostname_characters))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-:_]')}},i.ensureValidPort=function(t){if(t){var e=Number(t);if(!(o(e)&&e>0&&e<65536))throw new TypeError('Port "'+t+'" is not a valid port')}},i.noConflict=function(t){if(t){var e={URI:this.noConflict()};return r.URITemplate&&"function"===typeof r.URITemplate.noConflict&&(e.URITemplate=r.URITemplate.noConflict()),r.IPv6&&"function"===typeof r.IPv6.noConflict&&(e.IPv6=r.IPv6.noConflict()),r.SecondLevelDomains&&"function"===typeof r.SecondLevelDomains.noConflict&&(e.SecondLevelDomains=r.SecondLevelDomains.noConflict()),e}return r.URI===this&&(r.URI=a),this},s.build=function(t){return!0===t?this._deferred_build=!0:(void 0===t||this._deferred_build)&&(this._string=i.build(this._parts),this._deferred_build=!1),this},s.clone=function(){return new i(this)},s.valueOf=s.toString=function(){return this.build(!1)._string},s.protocol=k("protocol"),s.username=k("username"),s.password=k("password"),s.hostname=k("hostname"),s.port=k("port"),s.query=T("query","?"),s.fragment=T("fragment","#"),s.search=function(t,e){var n=this.query(t,e);return"string"===typeof n&&n.length?"?"+n:n},s.hash=function(t,e){var n=this.fragment(t,e);return"string"===typeof n&&n.length?"#"+n:n},s.pathname=function(t,e){if(void 0===t||!0===t){var n=this._parts.path||(this._parts.hostname?"/":"");return t?(this._parts.urn?i.decodeUrnPath:i.decodePath)(n):n}return this._parts.urn?this._parts.path=t?i.recodeUrnPath(t):"":this._parts.path=t?i.recodePath(t):"/",this.build(!e),this},s.path=s.pathname,s.href=function(t,e){var n;if(void 0===t)return this.toString();this._string="",this._parts=i._parts();var r=t instanceof i,a="object"===typeof t&&(t.hostname||t.path||t.pathname);if(t.nodeName){var o=i.getDomAttribute(t);t=t[o]||"",a=!1}if(!r&&a&&void 0!==t.pathname&&(t=t.toString()),"string"===typeof t||t instanceof String)this._parts=i.parse(String(t),this._parts);else{if(!r&&!a)throw new TypeError("invalid input");var s=r?t._parts:t;for(n in s)"query"!==n&&c.call(this._parts,n)&&(this._parts[n]=s[n]);s.query&&this.query(s.query,!1)}return this.build(!e),this},s.is=function(t){var e=!1,r=!1,a=!1,o=!1,s=!1,c=!1,l=!1,u=!this._parts.urn;switch(this._parts.hostname&&(u=!1,r=i.ip4_expression.test(this._parts.hostname),a=i.ip6_expression.test(this._parts.hostname),e=r||a,o=!e,s=o&&n&&n.has(this._parts.hostname),c=o&&i.idn_expression.test(this._parts.hostname),l=o&&i.punycode_expression.test(this._parts.hostname)),t.toLowerCase()){case"relative":return u;case"absolute":return!u;case"domain":case"name":return o;case"sld":return s;case"ip":return e;case"ip4":case"ipv4":case"inet4":return r;case"ip6":case"ipv6":case"inet6":return a;case"idn":return c;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return l}return null};var x=s.protocol,A=s.port,O=s.hostname;s.protocol=function(t,e){if(t&&(t=t.replace(/:(\/\/)?$/,""),!t.match(i.protocol_expression)))throw new TypeError('Protocol "'+t+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return x.call(this,t,e)},s.scheme=s.protocol,s.port=function(t,e){return this._parts.urn?void 0===t?"":this:(void 0!==t&&(0===t&&(t=null),t&&(t+="",":"===t.charAt(0)&&(t=t.substring(1)),i.ensureValidPort(t))),A.call(this,t,e))},s.hostname=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0!==t){var n={preventInvalidHostname:this._parts.preventInvalidHostname},r=i.parseHost(t,n);if("/"!==r)throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');t=n.hostname,this._parts.preventInvalidHostname&&i.ensureValidHostname(t,this._parts.protocol)}return O.call(this,t,e)},s.origin=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){var n=this.protocol(),r=this.authority();return r?(n?n+"://":"")+this.authority():""}var a=i(t);return this.protocol(a.protocol()).authority(a.authority()).build(!e),this},s.host=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t)return this._parts.hostname?i.buildHost(this._parts):"";var n=i.parseHost(t,this._parts);if("/"!==n)throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');return this.build(!e),this},s.authority=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t)return this._parts.hostname?i.buildAuthority(this._parts):"";var n=i.parseAuthority(t,this._parts);if("/"!==n)throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');return this.build(!e),this},s.userinfo=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){var n=i.buildUserinfo(this._parts);return n?n.substring(0,n.length-1):n}return"@"!==t[t.length-1]&&(t+="@"),i.parseUserinfo(t,this._parts),this.build(!e),this},s.resource=function(t,e){var n;return void 0===t?this.path()+this.search()+this.hash():(n=i.parse(t),this._parts.path=n.path,this._parts.query=n.query,this._parts.fragment=n.fragment,this.build(!e),this)},s.subdomain=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,n)||""}var r=this._parts.hostname.length-this.domain().length,a=this._parts.hostname.substring(0,r),o=new RegExp("^"+l(a));if(t&&"."!==t.charAt(t.length-1)&&(t+="."),-1!==t.indexOf(":"))throw new TypeError("Domains cannot contain colons");return t&&i.ensureValidHostname(t,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(o,t),this.build(!e),this},s.domain=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("boolean"===typeof t&&(e=t,t=void 0),void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.match(/\./g);if(n&&n.length<2)return this._parts.hostname;var r=this._parts.hostname.length-this.tld(e).length-1;return r=this._parts.hostname.lastIndexOf(".",r-1)+1,this._parts.hostname.substring(r)||""}if(!t)throw new TypeError("cannot set domain empty");if(-1!==t.indexOf(":"))throw new TypeError("Domains cannot contain colons");if(i.ensureValidHostname(t,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=t;else{var a=new RegExp(l(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(a,t)}return this.build(!e),this},s.tld=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("boolean"===typeof t&&(e=t,t=void 0),void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.lastIndexOf("."),a=this._parts.hostname.substring(r+1);return!0!==e&&n&&n.list[a.toLowerCase()]&&n.get(this._parts.hostname)||a}var i;if(!t)throw new TypeError("cannot set TLD empty");if(t.match(/[^a-zA-Z0-9-]/)){if(!n||!n.is(t))throw new TypeError('TLD "'+t+'" contains characters other than [A-Z0-9]');i=new RegExp(l(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(i,t)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");i=new RegExp(l(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(i,t)}return this.build(!e),this},s.directory=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t||!0===t){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var n=this._parts.path.length-this.filename().length-1,r=this._parts.path.substring(0,n)||(this._parts.hostname?"/":"");return t?i.decodePath(r):r}var a=this._parts.path.length-this.filename().length,o=this._parts.path.substring(0,a),s=new RegExp("^"+l(o));return this.is("relative")||(t||(t="/"),"/"!==t.charAt(0)&&(t="/"+t)),t&&"/"!==t.charAt(t.length-1)&&(t+="/"),t=i.recodePath(t),this._parts.path=this._parts.path.replace(s,t),this.build(!e),this},s.filename=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("string"!==typeof t){if(!this._parts.path||"/"===this._parts.path)return"";var n=this._parts.path.lastIndexOf("/"),r=this._parts.path.substring(n+1);return t?i.decodePathSegment(r):r}var a=!1;"/"===t.charAt(0)&&(t=t.substring(1)),t.match(/\.?\//)&&(a=!0);var o=new RegExp(l(this.filename())+"$");return t=i.recodePath(t),this._parts.path=this._parts.path.replace(o,t),a?this.normalizePath(e):this.build(!e),this},s.suffix=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t||!0===t){if(!this._parts.path||"/"===this._parts.path)return"";var n,r,a=this.filename(),o=a.lastIndexOf(".");return-1===o?"":(n=a.substring(o+1),r=/^[a-z0-9%]+$/i.test(n)?n:"",t?i.decodePathSegment(r):r)}"."===t.charAt(0)&&(t=t.substring(1));var s,c=this.suffix();if(c)s=t?new RegExp(l(c)+"$"):new RegExp(l("."+c)+"$");else{if(!t)return this;this._parts.path+="."+i.recodePath(t)}return s&&(t=i.recodePath(t),this._parts.path=this._parts.path.replace(s,t)),this.build(!e),this},s.segment=function(t,e,n){var r=this._parts.urn?":":"/",a=this.path(),i="/"===a.substring(0,1),o=a.split(r);if(void 0!==t&&"number"!==typeof t&&(n=e,e=t,t=void 0),void 0!==t&&"number"!==typeof t)throw new Error('Bad segment "'+t+'", must be 0-based integer');if(i&&o.shift(),t<0&&(t=Math.max(o.length+t,0)),void 0===e)return void 0===t?o:o[t];if(null===t||void 0===o[t])if(f(e)){o=[];for(var s=0,c=e.length;sc)r(s,n=e[c++])&&(~i(l,n)||l.push(n));return l}},caad:function(t,e,n){"use strict";var r=n("23e7"),a=n("4d64").includes,i=n("44d2");r({target:"Array",proto:!0},{includes:function(t){return a(this,t,arguments.length>1?arguments[1]:void 0)}}),i("includes")},cb29:function(t,e,n){var r=n("23e7"),a=n("81d5"),i=n("44d2");r({target:"Array",proto:!0},{fill:a}),i("fill")},cb5a:function(t,e,n){var r=n("9638");function a(t,e){var n=t.length;while(n--)if(r(t[n][0],e))return n;return-1}t.exports=a},cc12:function(t,e,n){var r=n("da84"),a=n("861d"),i=r.document,o=a(i)&&a(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},cc73:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n("fd3a"),a=n("8c86");function i(t,e){Object(a["a"])(2,arguments);var n=Object(r["a"])(t),i=Object(r["a"])(e);return n.getTime()===i.getTime()}},cca6:function(t,e,n){var r=n("23e7"),a=n("60da");r({target:"Object",stat:!0,forced:Object.assign!==a},{assign:a})},cd61:function(t,e){t.exports={functional:!0,render(t,e){const{_c:n,_v:r,data:a,children:i=[]}=e,{class:o,staticClass:s,style:c,staticStyle:l,attrs:u={},...f}=a;return n("svg",{class:["feather feather-heart",o,s],style:[c,l],attrs:Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},u),...f},i.concat([n("path",{attrs:{d:"M20.84 4.61a5.5 5.5 0 00-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 00-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 000-7.78z"}})]))}}},cdf9:function(t,e,n){var r=n("825a"),a=n("861d"),i=n("f069");t.exports=function(t,e){if(r(t),a(e)&&e.constructor===t)return e;var n=i.f(t),o=n.resolve;return o(e),n.promise}},ce4e:function(t,e,n){var r=n("da84"),a=n("9112");t.exports=function(t,e){try{a(r,t,e)}catch(n){r[t]=e}return e}},ce86:function(t,e,n){var r=n("9e69"),a=n("7948"),i=n("6747"),o=n("ffd6"),s=1/0,c=r?r.prototype:void 0,l=c?c.toString:void 0;function u(t){if("string"==typeof t)return t;if(i(t))return a(t,u)+"";if(o(t))return l?l.call(t):"";var e=t+"";return"0"==e&&1/t==-s?"-0":e}t.exports=u},d012:function(t,e){t.exports={}},d039:function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},d056:function(t,e){t.exports={functional:!0,render(t,e){const{_c:n,_v:r,data:a,children:i=[]}=e,{class:o,staticClass:s,style:c,staticStyle:l,attrs:u={},...f}=a;return n("svg",{class:["feather feather-paperclip",o,s],style:[c,l],attrs:Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},u),...f},i.concat([n("path",{attrs:{d:"M21.44 11.05l-9.19 9.19a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48"}})]))}}},d066:function(t,e,n){var r=n("428f"),a=n("da84"),i=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?i(r[t])||i(a[t]):r[t]&&r[t][e]||a[t]&&a[t][e]}},d1c0:function(t,e){t.exports={functional:!0,render(t,e){const{_c:n,_v:r,data:a,children:i=[]}=e,{class:o,staticClass:s,style:c,staticStyle:l,attrs:u={},...f}=a;return n("svg",{class:["feather feather-chevron-up",o,s],style:[c,l],attrs:Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},u),...f},i.concat([n("path",{attrs:{d:"M18 15l-6-6-6 6"}})]))}}},d1e7:function(t,e,n){"use strict";var r={}.propertyIsEnumerable,a=Object.getOwnPropertyDescriptor,i=a&&!r.call({1:2},1);e.f=i?function(t){var e=a(this,t);return!!e&&e.enumerable}:r},d28b:function(t,e,n){var r=n("746f");r("iterator")},d2bb:function(t,e,n){var r=n("825a"),a=n("3bbe");t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,t.call(n,[]),e=n instanceof Array}catch(i){}return function(n,i){return r(n),a(i),e?t.call(n,i):n.__proto__=i,n}}():void 0)},d2c2:function(t,e){t.exports={functional:!0,render(t,e){const{_c:n,_v:r,data:a,children:i=[]}=e,{class:o,staticClass:s,style:c,staticStyle:l,attrs:u={},...f}=a;return n("svg",{class:["feather feather-chevron-right",o,s],style:[c,l],attrs:Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},u),...f},i.concat([n("path",{attrs:{d:"M9 18l6-6-6-6"}})]))}}},d2dc:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};e.__esModule=!0;var a=r(n("1339")),i=r(n("1768")),o=function(){function t(t){this.cfg=t}return t.prototype.format=function(t){return new i["default"](this.cfg,this.tokenizer(),this.tokenOverride).format(t)},t.prototype.tokenize=function(t){return this.tokenizer().tokenize(t)},t.prototype.tokenizer=function(){return new a["default"](this.getTokenizerConfig())},t}();e["default"]=o},d3b7:function(t,e,n){var r=n("00ee"),a=n("6eeb"),i=n("b041");r||a(Object.prototype,"toString",i,{unsafe:!0})},d44e:function(t,e,n){var r=n("9bf2").f,a=n("5135"),i=n("b622"),o=i("toStringTag");t.exports=function(t,e,n){t&&!a(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},d4bc:function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};e.__esModule=!0;var i=a(n("d2dc")),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.getTokenizerConfig=function(){return{reservedWords:s,reservedTopLevelWords:c,reservedNewlineWords:u,reservedTopLevelWordsNoIndent:l,stringTypes:['""',"''","``"],openParens:["(","[","{"],closeParens:[")","]","}"],namedPlaceholderTypes:["$"],lineCommentTypes:["#","--"],specialWordChars:[]}},e}(i["default"]);e["default"]=o;var s=["ALL","ALTER","ANALYZE","AND","ANY","ARRAY","AS","ASC","BEGIN","BETWEEN","BINARY","BOOLEAN","BREAK","BUCKET","BUILD","BY","CALL","CASE","CAST","CLUSTER","COLLATE","COLLECTION","COMMIT","CONNECT","CONTINUE","CORRELATE","COVER","CREATE","DATABASE","DATASET","DATASTORE","DECLARE","DECREMENT","DELETE","DERIVED","DESC","DESCRIBE","DISTINCT","DO","DROP","EACH","ELEMENT","ELSE","END","EVERY","EXCEPT","EXCLUDE","EXECUTE","EXISTS","EXPLAIN","FALSE","FETCH","FIRST","FLATTEN","FOR","FORCE","FROM","FUNCTION","GRANT","GROUP","GSI","HAVING","IF","IGNORE","ILIKE","IN","INCLUDE","INCREMENT","INDEX","INFER","INLINE","INNER","INSERT","INTERSECT","INTO","IS","JOIN","KEY","KEYS","KEYSPACE","KNOWN","LAST","LEFT","LET","LETTING","LIKE","LIMIT","LSM","MAP","MAPPING","MATCHED","MATERIALIZED","MERGE","MISSING","NAMESPACE","NEST","NOT","NULL","NUMBER","OBJECT","OFFSET","ON","OPTION","OR","ORDER","OUTER","OVER","PARSE","PARTITION","PASSWORD","PATH","POOL","PREPARE","PRIMARY","PRIVATE","PRIVILEGE","PROCEDURE","PUBLIC","RAW","REALM","REDUCE","RENAME","RETURN","RETURNING","REVOKE","RIGHT","ROLE","ROLLBACK","SATISFIES","SCHEMA","SELECT","SELF","SEMI","SET","SHOW","SOME","START","STATISTICS","STRING","SYSTEM","THEN","TO","TRANSACTION","TRIGGER","TRUE","TRUNCATE","UNDER","UNION","UNIQUE","UNKNOWN","UNNEST","UNSET","UPDATE","UPSERT","USE","USER","USING","VALIDATE","VALUE","VALUED","VALUES","VIA","VIEW","WHEN","WHERE","WHILE","WITH","WITHIN","WORK","XOR"],c=["DELETE FROM","EXCEPT ALL","EXCEPT","EXPLAIN DELETE FROM","EXPLAIN UPDATE","EXPLAIN UPSERT","FROM","GROUP BY","HAVING","INFER","INSERT INTO","LET","LIMIT","MERGE","NEST","ORDER BY","PREPARE","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","UNNEST","UPDATE","UPSERT","USE KEYS","VALUES","WHERE"],l=["INTERSECT","INTERSECT ALL","MINUS","UNION","UNION ALL"],u=["AND","INNER JOIN","JOIN","LEFT JOIN","LEFT OUTER JOIN","OR","OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN","XOR"]},d4ec:function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.d(e,"a",(function(){return r}))},d784:function(t,e,n){"use strict";n("ac1f");var r=n("6eeb"),a=n("9263"),i=n("d039"),o=n("b622"),s=n("9112"),c=o("species"),l=RegExp.prototype;t.exports=function(t,e,n,u){var f=o(t),d=!i((function(){var e={};return e[f]=function(){return 7},7!=""[t](e)})),p=d&&!i((function(){var e=!1,n=/a/;return"split"===t&&(n={},n.constructor={},n.constructor[c]=function(){return n},n.flags="",n[f]=/./[f]),n.exec=function(){return e=!0,null},n[f](""),!e}));if(!d||!p||n){var h=/./[f],m=e(f,""[t],(function(t,e,n,r,i){var o=e.exec;return o===a||o===l.exec?d&&!i?{done:!0,value:h.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}));r(String.prototype,t,m[0]),r(l,f,m[1])}u&&s(l[f],"sham",!0)}},d81d:function(t,e,n){"use strict";var r=n("23e7"),a=n("b727").map,i=n("1dde"),o=i("map");r({target:"Array",proto:!0,forced:!o},{map:function(t){return a(this,t,arguments.length>1?arguments[1]:void 0)}})},d998:function(t,e,n){var r=n("342f");t.exports=/MSIE|Trident/.test(r)},da03:function(t,e,n){var r=n("2b3e"),a=r["__core-js_shared__"];t.exports=a},da84:function(t,e,n){(function(e){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||function(){return this}()||Function("return this")()}).call(this,n("c8ba"))},db04:function(t,e){t.exports={functional:!0,render(t,e){const{_c:n,_v:r,data:a,children:i=[]}=e,{class:o,staticClass:s,style:c,staticStyle:l,attrs:u={},...f}=a;return n("svg",{class:["feather feather-slash",o,s],style:[c,l],attrs:Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},u),...f},i.concat([n("circle",{attrs:{cx:"12",cy:"12",r:"10"}}),n("path",{attrs:{d:"M4.93 4.93l14.14 14.14"}})]))}}},dbb4:function(t,e,n){var r=n("23e7"),a=n("83ab"),i=n("56ef"),o=n("fc6a"),s=n("06cf"),c=n("8418");r({target:"Object",stat:!0,sham:!a},{getOwnPropertyDescriptors:function(t){var e,n,r=o(t),a=s.f,l=i(r),u={},f=0;while(l.length>f)n=a(r,e=l[f++]),void 0!==n&&c(u,e,n);return u}})},dc57:function(t,e){var n=Function.prototype,r=n.toString;function a(t){if(null!=t){try{return r.call(t)}catch(e){}try{return t+""}catch(e){}}return""}t.exports=a},ddb0:function(t,e,n){var r=n("da84"),a=n("fdbc"),i=n("e260"),o=n("9112"),s=n("b622"),c=s("iterator"),l=s("toStringTag"),u=i.values;for(var f in a){var d=r[f],p=d&&d.prototype;if(p){if(p[c]!==u)try{o(p,c,u)}catch(m){p[c]=u}if(p[l]||o(p,l,f),a[f])for(var h in i)if(p[h]!==i[h])try{o(p,h,i[h])}catch(m){p[h]=i[h]}}}},df75:function(t,e,n){var r=n("ca84"),a=n("7839");t.exports=Object.keys||function(t){return r(t,a)}},e01a:function(t,e,n){"use strict";var r=n("23e7"),a=n("83ab"),i=n("da84"),o=n("5135"),s=n("861d"),c=n("9bf2").f,l=n("e893"),u=i.Symbol;if(a&&"function"==typeof u&&(!("description"in u.prototype)||void 0!==u().description)){var f={},d=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof d?new u(t):void 0===t?u():u(t);return""===t&&(f[e]=!0),e};l(d,u);var p=d.prototype=u.prototype;p.constructor=d;var h=p.toString,m="Symbol(test)"==String(u("test")),v=/^Symbol\((.*)\)[^)]+$/;c(p,"description",{configurable:!0,get:function(){var t=s(this)?this.valueOf():this,e=h.call(t);if(o(f,t))return"";var n=m?e.slice(7,-1):e.replace(v,"$1");return""===n?void 0:n}}),r({global:!0,forced:!0},{Symbol:d})}},e0e5:function(t,e){function n(){var t=[].slice.call(arguments),e=!1;"boolean"==typeof t[0]&&(e=t.shift());var i=t[0];if(a(i))throw new Error("extendee must be an object");for(var o=t.slice(1),s=o.length,c=0;c=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}}),"values"),i.Arguments=i.Array,a("keys"),a("values"),a("entries")},e2cc:function(t,e,n){var r=n("6eeb");t.exports=function(t,e,n){for(var a in e)r(t,a,e[a],n);return t}},e2e4:function(t,e,n){var r=n("6747"),a=n("f608"),i=n("18d8"),o=n("76dd");function s(t,e){return r(t)?t:a(t,e)?[t]:i(o(t))}t.exports=s},e380:function(t,e,n){var r=n("7b83"),a="Expected a function";function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(a);var n=function(){var r=arguments,a=e?e.apply(this,r):r[0],i=n.cache;if(i.has(a))return i.get(a);var o=t.apply(this,r);return n.cache=i.set(a,o)||i,o};return n.cache=new(i.Cache||r),n}i.Cache=r,t.exports=i},e3ee:function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var r=n("fe1f"),a=n("8c86"),i=36e5,o=6e4,s=2,c={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},l=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,u=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,f=/^([+-])(\d{2})(?::?(\d{2}))?$/;function d(t,e){Object(a["a"])(1,arguments);var n=e||{},i=null==n.additionalDigits?s:Object(r["a"])(n.additionalDigits);if(2!==i&&1!==i&&0!==i)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!==typeof t&&"[object String]"!==Object.prototype.toString.call(t))return new Date(NaN);var o,c=p(t);if(c.date){var l=h(c.date,i);o=m(l.restDateString,l.year)}if(isNaN(o)||!o)return new Date(NaN);var u,f=o.getTime(),d=0;if(c.time&&(d=g(c.time),isNaN(d)||null===d))return new Date(NaN);if(!c.timezone){var v=new Date(f+d),b=new Date(0);return b.setFullYear(v.getUTCFullYear(),v.getUTCMonth(),v.getUTCDate()),b.setHours(v.getUTCHours(),v.getUTCMinutes(),v.getUTCSeconds(),v.getUTCMilliseconds()),b}return u=y(c.timezone),isNaN(u)?new Date(NaN):new Date(f+d+u)}function p(t){var e,n={},r=t.split(c.dateTimeDelimiter);if(r.length>2)return n;if(/:/.test(r[0])?(n.date=null,e=r[0]):(n.date=r[0],e=r[1],c.timeZoneDelimiter.test(n.date)&&(n.date=t.split(c.timeZoneDelimiter)[0],e=t.substr(n.date.length,t.length))),e){var a=c.timezone.exec(e);a?(n.time=e.replace(a[1],""),n.timezone=a[1]):n.time=e}return n}function h(t,e){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),r=t.match(n);if(!r)return{year:null};var a=r[1]&&parseInt(r[1]),i=r[2]&&parseInt(r[2]);return{year:null==i?a:100*i,restDateString:t.slice((r[1]||r[2]).length)}}function m(t,e){if(null===e)return null;var n=t.match(l);if(!n)return null;var r=!!n[4],a=v(n[1]),i=v(n[2])-1,o=v(n[3]),s=v(n[4]),c=v(n[5])-1;if(r)return A(e,s,c)?E(e,s,c):new Date(NaN);var u=new Date(0);return T(e,i,o)&&x(e,a)?(u.setUTCFullYear(e,i,Math.max(a,o)),u):new Date(NaN)}function v(t){return t?parseInt(t):1}function g(t){var e=t.match(u);if(!e)return null;var n=b(e[1]),r=b(e[2]),a=b(e[3]);return O(n,r,a)?n*i+r*o+1e3*a:NaN}function b(t){return t&&parseFloat(t.replace(",","."))||0}function y(t){if("Z"===t)return 0;var e=t.match(f);if(!e)return 0;var n="+"===e[1]?-1:1,r=parseInt(e[2]),a=e[3]&&parseInt(e[3])||0;return S(r,a)?n*(r*i+a*o):NaN}function E(t,e,n){var r=new Date(0);r.setUTCFullYear(t,0,4);var a=r.getUTCDay()||7,i=7*(e-1)+n+1-a;return r.setUTCDate(r.getUTCDate()+i),r}var w=[31,null,31,30,31,30,31,31,30,31,30,31];function k(t){return t%400===0||t%4===0&&t%100}function T(t,e,n){return e>=0&&e<=11&&n>=1&&n<=(w[e]||(k(t)?29:28))}function x(t,e){return e>=1&&e<=(k(t)?366:365)}function A(t,e,n){return e>=1&&e<=53&&n>=0&&n<=6}function O(t,e,n){return 24===t?0===e&&0===n:n>=0&&n<60&&e>=0&&e<60&&t>=0&&t<25}function S(t,e){return e>=0&&e<=59}},e439:function(t,e,n){var r=n("23e7"),a=n("d039"),i=n("fc6a"),o=n("06cf").f,s=n("83ab"),c=a((function(){o(1)})),l=!s||c;r({target:"Object",stat:!0,forced:l,sham:!s},{getOwnPropertyDescriptor:function(t,e){return o(i(t),e)}})},e4c9:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};e.__esModule=!0,e.tokenize=e.format=void 0;var a=r(n("f4a9")),i=r(n("d4bc")),o=r(n("74bb")),s=r(n("15f4"));e.format=function(t,e){switch(void 0===e&&(e={}),e.language){case"db2":return new a["default"](e).format(t);case"n1ql":return new i["default"](e).format(t);case"pl/sql":return new o["default"](e).format(t);case"sql":default:return new s["default"](e).format(t)}},e.tokenize=function(t,e){return void 0===e&&(e={}),new s["default"](e).tokenize(t)},e["default"]={format:e.format,tokenize:e.tokenize}},e538:function(t,e,n){var r=n("b622");e.f=r},e667:function(t,e){t.exports=function(t){try{return{error:!1,value:t()}}catch(e){return{error:!0,value:e}}}},e6cf:function(t,e,n){"use strict";var r,a,i,o,s=n("23e7"),c=n("c430"),l=n("da84"),u=n("d066"),f=n("fea9"),d=n("6eeb"),p=n("e2cc"),h=n("d2bb"),m=n("d44e"),v=n("2626"),g=n("861d"),b=n("1c0b"),y=n("19aa"),E=n("8925"),w=n("2266"),k=n("1c7e"),T=n("4840"),x=n("2cf4").set,A=n("b575"),O=n("cdf9"),S=n("44de"),R=n("f069"),N=n("e667"),C=n("69f3"),_=n("94ca"),L=n("b622"),I=n("6069"),D=n("605d"),P=n("2d00"),M=L("species"),U="Promise",j=C.get,F=C.set,B=C.getterFor(U),H=f&&f.prototype,z=f,q=H,G=l.TypeError,Y=l.document,V=l.process,W=R.f,X=W,$=!!(Y&&Y.createEvent&&l.dispatchEvent),Q="function"==typeof PromiseRejectionEvent,K="unhandledrejection",J="rejectionhandled",Z=0,tt=1,et=2,nt=1,rt=2,at=!1,it=_(U,(function(){var t=E(z),e=t!==String(z);if(!e&&66===P)return!0;if(c&&!q["finally"])return!0;if(P>=51&&/native code/.test(t))return!1;var n=new z((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))},a=n.constructor={};return a[M]=r,at=n.then((function(){}))instanceof r,!at||!e&&I&&!Q})),ot=it||!k((function(t){z.all(t)["catch"]((function(){}))})),st=function(t){var e;return!(!g(t)||"function"!=typeof(e=t.then))&&e},ct=function(t,e){if(!t.notified){t.notified=!0;var n=t.reactions;A((function(){var r=t.value,a=t.state==tt,i=0;while(n.length>i){var o,s,c,l=n[i++],u=a?l.ok:l.fail,f=l.resolve,d=l.reject,p=l.domain;try{u?(a||(t.rejection===rt&&dt(t),t.rejection=nt),!0===u?o=r:(p&&p.enter(),o=u(r),p&&(p.exit(),c=!0)),o===l.promise?d(G("Promise-chain cycle")):(s=st(o))?s.call(o,f,d):f(o)):d(r)}catch(h){p&&!c&&p.exit(),d(h)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&ut(t)}))}},lt=function(t,e,n){var r,a;$?(r=Y.createEvent("Event"),r.promise=e,r.reason=n,r.initEvent(t,!1,!0),l.dispatchEvent(r)):r={promise:e,reason:n},!Q&&(a=l["on"+t])?a(r):t===K&&S("Unhandled promise rejection",n)},ut=function(t){x.call(l,(function(){var e,n=t.facade,r=t.value,a=ft(t);if(a&&(e=N((function(){D?V.emit("unhandledRejection",r,n):lt(K,n,r)})),t.rejection=D||ft(t)?rt:nt,e.error))throw e.value}))},ft=function(t){return t.rejection!==nt&&!t.parent},dt=function(t){x.call(l,(function(){var e=t.facade;D?V.emit("rejectionHandled",e):lt(J,e,t.value)}))},pt=function(t,e,n){return function(r){t(e,r,n)}},ht=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=et,ct(t,!0))},mt=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw G("Promise can't be resolved itself");var r=st(e);r?A((function(){var n={done:!1};try{r.call(e,pt(mt,n,t),pt(ht,n,t))}catch(a){ht(n,a,t)}})):(t.value=e,t.state=tt,ct(t,!1))}catch(a){ht({done:!1},a,t)}}};if(it&&(z=function(t){y(this,z,U),b(t),r.call(this);var e=j(this);try{t(pt(mt,e),pt(ht,e))}catch(n){ht(e,n)}},q=z.prototype,r=function(t){F(this,{type:U,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:Z,value:void 0})},r.prototype=p(q,{then:function(t,e){var n=B(this),r=W(T(this,z));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=D?V.domain:void 0,n.parent=!0,n.reactions.push(r),n.state!=Z&&ct(n,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),a=function(){var t=new r,e=j(t);this.promise=t,this.resolve=pt(mt,e),this.reject=pt(ht,e)},R.f=W=function(t){return t===z||t===i?new a(t):X(t)},!c&&"function"==typeof f&&H!==Object.prototype)){o=H.then,at||(d(H,"then",(function(t,e){var n=this;return new z((function(t,e){o.call(n,t,e)})).then(t,e)}),{unsafe:!0}),d(H,"catch",q["catch"],{unsafe:!0}));try{delete H.constructor}catch(vt){}h&&h(H,q)}s({global:!0,wrap:!0,forced:it},{Promise:z}),m(z,U,!1,!0),v(U),i=u(U),s({target:U,stat:!0,forced:it},{reject:function(t){var e=W(this);return e.reject.call(void 0,t),e.promise}}),s({target:U,stat:!0,forced:c||it},{resolve:function(t){return O(c&&this===i?z:this,t)}}),s({target:U,stat:!0,forced:ot},{all:function(t){var e=this,n=W(e),r=n.resolve,a=n.reject,i=N((function(){var n=b(e.resolve),i=[],o=0,s=1;w(t,(function(t){var c=o++,l=!1;i.push(void 0),s++,n.call(e,t).then((function(t){l||(l=!0,i[c]=t,--s||r(i))}),a)})),--s||r(i)}));return i.error&&a(i.value),n.promise},race:function(t){var e=this,n=W(e),r=n.reject,a=N((function(){var a=b(e.resolve);w(t,(function(t){a.call(e,t).then(n.resolve,r)}))}));return a.error&&r(a.value),n.promise}})},e78e:function(t,e){t.exports={functional:!0,render(t,e){const{_c:n,_v:r,data:a,children:i=[]}=e,{class:o,staticClass:s,style:c,staticStyle:l,attrs:u={},...f}=a;return n("svg",{class:["feather feather-edit-2",o,s],style:[c,l],attrs:Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},u),...f},i.concat([n("path",{attrs:{d:"M17 3a2.828 2.828 0 114 4L7.5 20.5 2 22l1.5-5.5L17 3z"}})]))}}},e893:function(t,e,n){var r=n("5135"),a=n("56ef"),i=n("06cf"),o=n("9bf2");t.exports=function(t,e){for(var n=a(e),s=o.f,c=i.f,l=0;l - * Released under the MIT License. - */ -!function(e,n){t.exports=n()}(0,(function(){"use strict";var t={circle:{className:"sk-circle",divCount:12},"cube-grid":{className:"sk-cube-grid",divCount:9},wave:{className:"sk-wave",divCount:5},"folding-cube":{className:"sk-folding-cube",divCount:4},"three-bounce":{className:"sk-three-bounce",divCount:3},"double-bounce":{className:"sk-double-bounce",divCount:2},"wandering-cubes":{className:"sk-wandering-cubes",divCount:2},"chasing-dots":{className:"sk-chasing-dots",divCount:2},"rotating-plane":{className:"sk-rotating-plane",divCount:1},pulse:{className:"sk-pulse",divCount:1},wordpress:{className:"sk-wordpress",divCount:1},"fading-circle":{className:"sk-fading-circle",divCount:12}},e={"ball-grid-beat":{divCount:9},"ball-grid-pulse":{divCount:9},"line-spin-fade-loader":{divCount:8},"ball-spin-fade-loader":{divCount:8},"ball-pulse-rise":{divCount:5},"line-scale":{divCount:5},"line-scale-pulse-out":{divCount:5},"line-scale-pulse-out-rapid":{divCount:5},pacman:{divCount:5},"line-scale-party":{divCount:4},"ball-triangle-path":{divCount:3},"ball-scale-multiple":{divCount:3},"ball-scale-ripple-multiple":{divCount:3},"ball-pulse-sync":{divCount:3},"ball-beat":{divCount:3},"ball-zig-zag":{divCount:2},"ball-zig-zag-deflect":{divCount:2},"ball-clip-rotate-pulse":{divCount:2},"ball-clip-rotate-multiple":{divCount:2},"ball-clip-rotate":{divCount:1},"ball-scale-ripple":{divCount:1},"triangle-skew-spin":{divCount:1}},n={spinkitSpinners:t,loadersCssSpinners:e,allSpinners:Object.assign({},t,e)};return function(){if("undefined"!=typeof document){var t=document.head||document.getElementsByTagName("head")[0],e=document.createElement("style"),n="/** * * All animations must live in their own file * in the animations directory and be included * here. * */ /** * Styles shared by multiple animations */ /** * Dots */ @-webkit-keyframes scale { 0% { -webkit-transform: scale(1); transform: scale(1); opacity: 1; } 45% { -webkit-transform: scale(0.1); transform: scale(0.1); opacity: 0.7; } 80% { -webkit-transform: scale(1); transform: scale(1); opacity: 1; } } @keyframes scale { 0% { -webkit-transform: scale(1); transform: scale(1); opacity: 1; } 45% { -webkit-transform: scale(0.1); transform: scale(0.1); opacity: 0.7; } 80% { -webkit-transform: scale(1); transform: scale(1); opacity: 1; } } .ball-pulse > div[data-v-39432f99]:nth-child(0) { -webkit-animation: scale 0.75s -0.36s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08); animation: scale 0.75s -0.36s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08); } .ball-pulse > div[data-v-39432f99]:nth-child(1) { -webkit-animation: scale 0.75s -0.24s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08); animation: scale 0.75s -0.24s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08); } .ball-pulse > div[data-v-39432f99]:nth-child(2) { -webkit-animation: scale 0.75s -0.12s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08); animation: scale 0.75s -0.12s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08); } .ball-pulse > div[data-v-39432f99]:nth-child(3) { -webkit-animation: scale 0.75s 0s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08); animation: scale 0.75s 0s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08); } .ball-pulse > div[data-v-39432f99] { background-color: #fff; width: 15px; height: 15px; border-radius: 100%; margin: 2px; -webkit-animation-fill-mode: both; animation-fill-mode: both; display: inline-block; } @-webkit-keyframes ball-pulse-sync { 33% { -webkit-transform: translateY(10px); transform: translateY(10px); } 66% { -webkit-transform: translateY(-10px); transform: translateY(-10px); } 100% { -webkit-transform: translateY(0); transform: translateY(0); } } @keyframes ball-pulse-sync { 33% { -webkit-transform: translateY(10px); transform: translateY(10px); } 66% { -webkit-transform: translateY(-10px); transform: translateY(-10px); } 100% { -webkit-transform: translateY(0); transform: translateY(0); } } .ball-pulse-sync > div[data-v-39432f99]:nth-child(0) { -webkit-animation: ball-pulse-sync 0.6s -0.21s infinite ease-in-out; animation: ball-pulse-sync 0.6s -0.21s infinite ease-in-out; } .ball-pulse-sync > div[data-v-39432f99]:nth-child(1) { -webkit-animation: ball-pulse-sync 0.6s -0.14s infinite ease-in-out; animation: ball-pulse-sync 0.6s -0.14s infinite ease-in-out; } .ball-pulse-sync > div[data-v-39432f99]:nth-child(2) { -webkit-animation: ball-pulse-sync 0.6s -0.07s infinite ease-in-out; animation: ball-pulse-sync 0.6s -0.07s infinite ease-in-out; } .ball-pulse-sync > div[data-v-39432f99]:nth-child(3) { -webkit-animation: ball-pulse-sync 0.6s 0s infinite ease-in-out; animation: ball-pulse-sync 0.6s 0s infinite ease-in-out; } .ball-pulse-sync > div[data-v-39432f99] { background-color: #fff; width: 15px; height: 15px; border-radius: 100%; margin: 2px; -webkit-animation-fill-mode: both; animation-fill-mode: both; display: inline-block; } @-webkit-keyframes ball-scale { 0% { -webkit-transform: scale(0); transform: scale(0); } 100% { -webkit-transform: scale(1); transform: scale(1); opacity: 0; } } @keyframes ball-scale { 0% { -webkit-transform: scale(0); transform: scale(0); } 100% { -webkit-transform: scale(1); transform: scale(1); opacity: 0; } } .ball-scale > div[data-v-39432f99] { background-color: #fff; width: 15px; height: 15px; border-radius: 100%; margin: 2px; -webkit-animation-fill-mode: both; animation-fill-mode: both; display: inline-block; height: 60px; width: 60px; -webkit-animation: ball-scale 1s 0s ease-in-out infinite; animation: ball-scale 1s 0s ease-in-out infinite; } @keyframes ball-scale { 0% { -webkit-transform: scale(0); transform: scale(0); } 100% { -webkit-transform: scale(1); transform: scale(1); opacity: 0; } } .ball-scale > div[data-v-39432f99] { background-color: #fff; width: 15px; height: 15px; border-radius: 100%; margin: 2px; -webkit-animation-fill-mode: both; animation-fill-mode: both; display: inline-block; height: 60px; width: 60px; -webkit-animation: ball-scale 1s 0s ease-in-out infinite; animation: ball-scale 1s 0s ease-in-out infinite; } .ball-scale-random[data-v-39432f99] { width: 37px; height: 40px; } .ball-scale-random > div[data-v-39432f99] { background-color: #fff; width: 15px; height: 15px; border-radius: 100%; margin: 2px; -webkit-animation-fill-mode: both; animation-fill-mode: both; position: absolute; display: inline-block; height: 30px; width: 30px; -webkit-animation: ball-scale 1s 0s ease-in-out infinite; animation: ball-scale 1s 0s ease-in-out infinite; } .ball-scale-random > div[data-v-39432f99]:nth-child(1) { margin-left: -7px; -webkit-animation: ball-scale 1s 0.2s ease-in-out infinite; animation: ball-scale 1s 0.2s ease-in-out infinite; } .ball-scale-random > div[data-v-39432f99]:nth-child(3) { margin-left: -2px; margin-top: 9px; -webkit-animation: ball-scale 1s 0.5s ease-in-out infinite; animation: ball-scale 1s 0.5s ease-in-out infinite; } @-webkit-keyframes rotate { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 50% { -webkit-transform: rotate(180deg); transform: rotate(180deg); } 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } @keyframes rotate { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 50% { -webkit-transform: rotate(180deg); transform: rotate(180deg); } 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } .ball-rotate[data-v-39432f99] { position: relative; } .ball-rotate > div[data-v-39432f99] { background-color: #fff; width: 15px; height: 15px; border-radius: 100%; margin: 2px; -webkit-animation-fill-mode: both; animation-fill-mode: both; position: relative; } .ball-rotate > div[data-v-39432f99]:first-child { -webkit-animation: rotate 1s 0s cubic-bezier(0.7, -0.13, 0.22, 0.86) infinite; animation: rotate 1s 0s cubic-bezier(0.7, -0.13, 0.22, 0.86) infinite; } .ball-rotate > div[data-v-39432f99]:before, .ball-rotate > div[data-v-39432f99]:after { background-color: #fff; width: 15px; height: 15px; border-radius: 100%; margin: 2px; content: \"\"; position: absolute; opacity: 0.8; } .ball-rotate > div[data-v-39432f99]:before { top: 0px; left: -28px; } .ball-rotate > div[data-v-39432f99]:after { top: 0px; left: 25px; } @keyframes rotate { 0% { -webkit-transform: rotate(0deg) scale(1); transform: rotate(0deg) scale(1); } 50% { -webkit-transform: rotate(180deg) scale(0.6); transform: rotate(180deg) scale(0.6); } 100% { -webkit-transform: rotate(360deg) scale(1); transform: rotate(360deg) scale(1); } } .ball-clip-rotate > div[data-v-39432f99] { background-color: #fff; width: 15px; height: 15px; border-radius: 100%; margin: 2px; -webkit-animation-fill-mode: both; animation-fill-mode: both; border: 2px solid #fff; border-bottom-color: transparent; height: 25px; width: 25px; background: transparent !important; display: inline-block; -webkit-animation: rotate 0.75s 0s linear infinite; animation: rotate 0.75s 0s linear infinite; } @keyframes rotate { 0% { -webkit-transform: rotate(0deg) scale(1); transform: rotate(0deg) scale(1); } 50% { -webkit-transform: rotate(180deg) scale(0.6); transform: rotate(180deg) scale(0.6); } 100% { -webkit-transform: rotate(360deg) scale(1); transform: rotate(360deg) scale(1); } } @keyframes scale { 30% { -webkit-transform: scale(0.3); transform: scale(0.3); } 100% { -webkit-transform: scale(1); transform: scale(1); } } .ball-clip-rotate-pulse[data-v-39432f99] { position: relative; -webkit-transform: translateY(-15px); transform: translateY(-15px); } .ball-clip-rotate-pulse > div[data-v-39432f99] { -webkit-animation-fill-mode: both; animation-fill-mode: both; position: absolute; top: 0px; left: 0px; border-radius: 100%; } .ball-clip-rotate-pulse > div[data-v-39432f99]:first-child { background: #fff; height: 16px; width: 16px; top: 7px; left: -7px; -webkit-animation: scale 1s 0s cubic-bezier(0.09, 0.57, 0.49, 0.9) infinite; animation: scale 1s 0s cubic-bezier(0.09, 0.57, 0.49, 0.9) infinite; } .ball-clip-rotate-pulse > div[data-v-39432f99]:last-child { position: absolute; border: 2px solid #fff; width: 30px; height: 30px; left: -16px; top: -2px; background: transparent; border: 2px solid; border-color: #fff transparent #fff transparent; -webkit-animation: rotate 1s 0s cubic-bezier(0.09, 0.57, 0.49, 0.9) infinite; animation: rotate 1s 0s cubic-bezier(0.09, 0.57, 0.49, 0.9) infinite; -webkit-animation-duration: 1s; animation-duration: 1s; } @keyframes rotate { 0% { -webkit-transform: rotate(0deg) scale(1); transform: rotate(0deg) scale(1); } 50% { -webkit-transform: rotate(180deg) scale(0.6); transform: rotate(180deg) scale(0.6); } 100% { -webkit-transform: rotate(360deg) scale(1); transform: rotate(360deg) scale(1); } } .ball-clip-rotate-multiple[data-v-39432f99] { position: relative; } .ball-clip-rotate-multiple > div[data-v-39432f99] { -webkit-animation-fill-mode: both; animation-fill-mode: both; position: absolute; left: -20px; top: -20px; border: 2px solid #fff; border-bottom-color: transparent; border-top-color: transparent; border-radius: 100%; height: 35px; width: 35px; -webkit-animation: rotate 1s 0s ease-in-out infinite; animation: rotate 1s 0s ease-in-out infinite; } .ball-clip-rotate-multiple > div[data-v-39432f99]:last-child { display: inline-block; top: -10px; left: -10px; width: 15px; height: 15px; -webkit-animation-duration: 0.5s; animation-duration: 0.5s; border-color: #fff transparent #fff transparent; -webkit-animation-direction: reverse; animation-direction: reverse; } @-webkit-keyframes ball-scale-ripple { 0% { -webkit-transform: scale(0.1); transform: scale(0.1); opacity: 1; } 70% { -webkit-transform: scale(1); transform: scale(1); opacity: 0.7; } 100% { opacity: 0.0; } } @keyframes ball-scale-ripple { 0% { -webkit-transform: scale(0.1); transform: scale(0.1); opacity: 1; } 70% { -webkit-transform: scale(1); transform: scale(1); opacity: 0.7; } 100% { opacity: 0.0; } } .ball-scale-ripple > div[data-v-39432f99] { -webkit-animation-fill-mode: both; animation-fill-mode: both; height: 50px; width: 50px; border-radius: 100%; border: 2px solid #fff; -webkit-animation: ball-scale-ripple 1s 0s infinite cubic-bezier(0.21, 0.53, 0.56, 0.8); animation: ball-scale-ripple 1s 0s infinite cubic-bezier(0.21, 0.53, 0.56, 0.8); } @-webkit-keyframes ball-scale-ripple-multiple { 0% { -webkit-transform: scale(0.1); transform: scale(0.1); opacity: 1; } 70% { -webkit-transform: scale(1); transform: scale(1); opacity: 0.7; } 100% { opacity: 0.0; } } @keyframes ball-scale-ripple-multiple { 0% { -webkit-transform: scale(0.1); transform: scale(0.1); opacity: 1; } 70% { -webkit-transform: scale(1); transform: scale(1); opacity: 0.7; } 100% { opacity: 0.0; } } .ball-scale-ripple-multiple[data-v-39432f99] { position: relative; -webkit-transform: translateY(-25px); transform: translateY(-25px); } .ball-scale-ripple-multiple > div[data-v-39432f99]:nth-child(0) { -webkit-animation-delay: -0.8s; animation-delay: -0.8s; } .ball-scale-ripple-multiple > div[data-v-39432f99]:nth-child(1) { -webkit-animation-delay: -0.6s; animation-delay: -0.6s; } .ball-scale-ripple-multiple > div[data-v-39432f99]:nth-child(2) { -webkit-animation-delay: -0.4s; animation-delay: -0.4s; } .ball-scale-ripple-multiple > div[data-v-39432f99]:nth-child(3) { -webkit-animation-delay: -0.2s; animation-delay: -0.2s; } .ball-scale-ripple-multiple > div[data-v-39432f99] { -webkit-animation-fill-mode: both; animation-fill-mode: both; position: absolute; top: -2px; left: -26px; width: 50px; height: 50px; border-radius: 100%; border: 2px solid #fff; -webkit-animation: ball-scale-ripple-multiple 1.25s 0s infinite cubic-bezier(0.21, 0.53, 0.56, 0.8); animation: ball-scale-ripple-multiple 1.25s 0s infinite cubic-bezier(0.21, 0.53, 0.56, 0.8); } @-webkit-keyframes ball-beat { 50% { opacity: 0.2; -webkit-transform: scale(0.75); transform: scale(0.75); } 100% { opacity: 1; -webkit-transform: scale(1); transform: scale(1); } } @keyframes ball-beat { 50% { opacity: 0.2; -webkit-transform: scale(0.75); transform: scale(0.75); } 100% { opacity: 1; -webkit-transform: scale(1); transform: scale(1); } } .ball-beat > div[data-v-39432f99] { background-color: #fff; width: 15px; height: 15px; border-radius: 100%; margin: 2px; -webkit-animation-fill-mode: both; animation-fill-mode: both; display: inline-block; -webkit-animation: ball-beat 0.7s 0s infinite linear; animation: ball-beat 0.7s 0s infinite linear; } .ball-beat > div[data-v-39432f99]:nth-child(2n-1) { -webkit-animation-delay: -0.35s !important; animation-delay: -0.35s !important; } @-webkit-keyframes ball-scale-multiple { 0% { -webkit-transform: scale(0); transform: scale(0); opacity: 0; } 5% { opacity: 1; } 100% { -webkit-transform: scale(1); transform: scale(1); opacity: 0; } } @keyframes ball-scale-multiple { 0% { -webkit-transform: scale(0); transform: scale(0); opacity: 0; } 5% { opacity: 1; } 100% { -webkit-transform: scale(1); transform: scale(1); opacity: 0; } } .ball-scale-multiple[data-v-39432f99] { position: relative; -webkit-transform: translateY(-30px); transform: translateY(-30px); } .ball-scale-multiple > div[data-v-39432f99]:nth-child(2) { -webkit-animation-delay: -0.4s; animation-delay: -0.4s; } .ball-scale-multiple > div[data-v-39432f99]:nth-child(3) { -webkit-animation-delay: -0.2s; animation-delay: -0.2s; } .ball-scale-multiple > div[data-v-39432f99] { background-color: #fff; width: 15px; height: 15px; border-radius: 100%; margin: 2px; -webkit-animation-fill-mode: both; animation-fill-mode: both; position: absolute; left: -30px; top: 0px; opacity: 0; margin: 0; width: 60px; height: 60px; -webkit-animation: ball-scale-multiple 1s 0s linear infinite; animation: ball-scale-multiple 1s 0s linear infinite; } @-webkit-keyframes ball-triangle-path-1 { 33% { -webkit-transform: translate(25px, -50px); transform: translate(25px, -50px); } 66% { -webkit-transform: translate(50px, 0px); transform: translate(50px, 0px); } 100% { -webkit-transform: translate(0px, 0px); transform: translate(0px, 0px); } } @keyframes ball-triangle-path-1 { 33% { -webkit-transform: translate(25px, -50px); transform: translate(25px, -50px); } 66% { -webkit-transform: translate(50px, 0px); transform: translate(50px, 0px); } 100% { -webkit-transform: translate(0px, 0px); transform: translate(0px, 0px); } } @-webkit-keyframes ball-triangle-path-2 { 33% { -webkit-transform: translate(25px, 50px); transform: translate(25px, 50px); } 66% { -webkit-transform: translate(-25px, 50px); transform: translate(-25px, 50px); } 100% { -webkit-transform: translate(0px, 0px); transform: translate(0px, 0px); } } @keyframes ball-triangle-path-2 { 33% { -webkit-transform: translate(25px, 50px); transform: translate(25px, 50px); } 66% { -webkit-transform: translate(-25px, 50px); transform: translate(-25px, 50px); } 100% { -webkit-transform: translate(0px, 0px); transform: translate(0px, 0px); } } @-webkit-keyframes ball-triangle-path-3 { 33% { -webkit-transform: translate(-50px, 0px); transform: translate(-50px, 0px); } 66% { -webkit-transform: translate(-25px, -50px); transform: translate(-25px, -50px); } 100% { -webkit-transform: translate(0px, 0px); transform: translate(0px, 0px); } } @keyframes ball-triangle-path-3 { 33% { -webkit-transform: translate(-50px, 0px); transform: translate(-50px, 0px); } 66% { -webkit-transform: translate(-25px, -50px); transform: translate(-25px, -50px); } 100% { -webkit-transform: translate(0px, 0px); transform: translate(0px, 0px); } } .ball-triangle-path[data-v-39432f99] { position: relative; -webkit-transform: translate(-29.994px, -37.50938px); transform: translate(-29.994px, -37.50938px); } .ball-triangle-path > div[data-v-39432f99]:nth-child(1) { -webkit-animation-name: ball-triangle-path-1; animation-name: ball-triangle-path-1; -webkit-animation-delay: 0; animation-delay: 0; -webkit-animation-duration: 2s; animation-duration: 2s; -webkit-animation-timing-function: ease-in-out; animation-timing-function: ease-in-out; -webkit-animation-iteration-count: infinite; animation-iteration-count: infinite; } .ball-triangle-path > div[data-v-39432f99]:nth-child(2) { -webkit-animation-name: ball-triangle-path-2; animation-name: ball-triangle-path-2; -webkit-animation-delay: 0; animation-delay: 0; -webkit-animation-duration: 2s; animation-duration: 2s; -webkit-animation-timing-function: ease-in-out; animation-timing-function: ease-in-out; -webkit-animation-iteration-count: infinite; animation-iteration-count: infinite; } .ball-triangle-path > div[data-v-39432f99]:nth-child(3) { -webkit-animation-name: ball-triangle-path-3; animation-name: ball-triangle-path-3; -webkit-animation-delay: 0; animation-delay: 0; -webkit-animation-duration: 2s; animation-duration: 2s; -webkit-animation-timing-function: ease-in-out; animation-timing-function: ease-in-out; -webkit-animation-iteration-count: infinite; animation-iteration-count: infinite; } .ball-triangle-path > div[data-v-39432f99] { -webkit-animation-fill-mode: both; animation-fill-mode: both; position: absolute; width: 10px; height: 10px; border-radius: 100%; border: 1px solid #fff; } .ball-triangle-path > div[data-v-39432f99]:nth-of-type(1) { top: 50px; } .ball-triangle-path > div[data-v-39432f99]:nth-of-type(2) { left: 25px; } .ball-triangle-path > div[data-v-39432f99]:nth-of-type(3) { top: 50px; left: 50px; } @-webkit-keyframes ball-pulse-rise-even { 0% { -webkit-transform: scale(1.1); transform: scale(1.1); } 25% { -webkit-transform: translateY(-30px); transform: translateY(-30px); } 50% { -webkit-transform: scale(0.4); transform: scale(0.4); } 75% { -webkit-transform: translateY(30px); transform: translateY(30px); } 100% { -webkit-transform: translateY(0); transform: translateY(0); -webkit-transform: scale(1); transform: scale(1); } } @keyframes ball-pulse-rise-even { 0% { -webkit-transform: scale(1.1); transform: scale(1.1); } 25% { -webkit-transform: translateY(-30px); transform: translateY(-30px); } 50% { -webkit-transform: scale(0.4); transform: scale(0.4); } 75% { -webkit-transform: translateY(30px); transform: translateY(30px); } 100% { -webkit-transform: translateY(0); transform: translateY(0); -webkit-transform: scale(1); transform: scale(1); } } @-webkit-keyframes ball-pulse-rise-odd { 0% { -webkit-transform: scale(0.4); transform: scale(0.4); } 25% { -webkit-transform: translateY(30px); transform: translateY(30px); } 50% { -webkit-transform: scale(1.1); transform: scale(1.1); } 75% { -webkit-transform: translateY(-30px); transform: translateY(-30px); } 100% { -webkit-transform: translateY(0); transform: translateY(0); -webkit-transform: scale(0.75); transform: scale(0.75); } } @keyframes ball-pulse-rise-odd { 0% { -webkit-transform: scale(0.4); transform: scale(0.4); } 25% { -webkit-transform: translateY(30px); transform: translateY(30px); } 50% { -webkit-transform: scale(1.1); transform: scale(1.1); } 75% { -webkit-transform: translateY(-30px); transform: translateY(-30px); } 100% { -webkit-transform: translateY(0); transform: translateY(0); -webkit-transform: scale(0.75); transform: scale(0.75); } } .ball-pulse-rise > div[data-v-39432f99] { background-color: #fff; width: 15px; height: 15px; border-radius: 100%; margin: 2px; -webkit-animation-fill-mode: both; animation-fill-mode: both; display: inline-block; -webkit-animation-duration: 1s; animation-duration: 1s; -webkit-animation-timing-function: cubic-bezier(0.15, 0.46, 0.9, 0.6); animation-timing-function: cubic-bezier(0.15, 0.46, 0.9, 0.6); -webkit-animation-iteration-count: infinite; animation-iteration-count: infinite; -webkit-animation-delay: 0; animation-delay: 0; } .ball-pulse-rise > div[data-v-39432f99]:nth-child(2n) { -webkit-animation-name: ball-pulse-rise-even; animation-name: ball-pulse-rise-even; } .ball-pulse-rise > div[data-v-39432f99]:nth-child(2n-1) { -webkit-animation-name: ball-pulse-rise-odd; animation-name: ball-pulse-rise-odd; } @-webkit-keyframes ball-grid-beat { 50% { opacity: 0.7; } 100% { opacity: 1; } } @keyframes ball-grid-beat { 50% { opacity: 0.7; } 100% { opacity: 1; } } .ball-grid-beat[data-v-39432f99] { width: 57px; } .ball-grid-beat > div[data-v-39432f99]:nth-child(1) { -webkit-animation-delay: 0.44s; animation-delay: 0.44s; -webkit-animation-duration: 1.27s; animation-duration: 1.27s; } .ball-grid-beat > div[data-v-39432f99]:nth-child(2) { -webkit-animation-delay: 0.2s; animation-delay: 0.2s; -webkit-animation-duration: 1.52s; animation-duration: 1.52s; } .ball-grid-beat > div[data-v-39432f99]:nth-child(3) { -webkit-animation-delay: 0.14s; animation-delay: 0.14s; -webkit-animation-duration: 0.61s; animation-duration: 0.61s; } .ball-grid-beat > div[data-v-39432f99]:nth-child(4) { -webkit-animation-delay: 0.15s; animation-delay: 0.15s; -webkit-animation-duration: 0.82s; animation-duration: 0.82s; } .ball-grid-beat > div[data-v-39432f99]:nth-child(5) { -webkit-animation-delay: -0.01s; animation-delay: -0.01s; -webkit-animation-duration: 1.24s; animation-duration: 1.24s; } .ball-grid-beat > div[data-v-39432f99]:nth-child(6) { -webkit-animation-delay: -0.07s; animation-delay: -0.07s; -webkit-animation-duration: 1.35s; animation-duration: 1.35s; } .ball-grid-beat > div[data-v-39432f99]:nth-child(7) { -webkit-animation-delay: 0.29s; animation-delay: 0.29s; -webkit-animation-duration: 1.44s; animation-duration: 1.44s; } .ball-grid-beat > div[data-v-39432f99]:nth-child(8) { -webkit-animation-delay: 0.63s; animation-delay: 0.63s; -webkit-animation-duration: 1.19s; animation-duration: 1.19s; } .ball-grid-beat > div[data-v-39432f99]:nth-child(9) { -webkit-animation-delay: -0.18s; animation-delay: -0.18s; -webkit-animation-duration: 1.48s; animation-duration: 1.48s; } .ball-grid-beat > div[data-v-39432f99] { background-color: #fff; width: 15px; height: 15px; border-radius: 100%; margin: 2px; -webkit-animation-fill-mode: both; animation-fill-mode: both; display: inline-block; float: left; -webkit-animation-name: ball-grid-beat; animation-name: ball-grid-beat; -webkit-animation-iteration-count: infinite; animation-iteration-count: infinite; -webkit-animation-delay: 0; animation-delay: 0; } @-webkit-keyframes ball-grid-pulse { 0% { -webkit-transform: scale(1); transform: scale(1); } 50% { -webkit-transform: scale(0.5); transform: scale(0.5); opacity: 0.7; } 100% { -webkit-transform: scale(1); transform: scale(1); opacity: 1; } } @keyframes ball-grid-pulse { 0% { -webkit-transform: scale(1); transform: scale(1); } 50% { -webkit-transform: scale(0.5); transform: scale(0.5); opacity: 0.7; } 100% { -webkit-transform: scale(1); transform: scale(1); opacity: 1; } } .ball-grid-pulse[data-v-39432f99] { width: 57px; } .ball-grid-pulse > div[data-v-39432f99]:nth-child(1) { -webkit-animation-delay: 0.58s; animation-delay: 0.58s; -webkit-animation-duration: 0.9s; animation-duration: 0.9s; } .ball-grid-pulse > div[data-v-39432f99]:nth-child(2) { -webkit-animation-delay: 0.01s; animation-delay: 0.01s; -webkit-animation-duration: 0.94s; animation-duration: 0.94s; } .ball-grid-pulse > div[data-v-39432f99]:nth-child(3) { -webkit-animation-delay: 0.25s; animation-delay: 0.25s; -webkit-animation-duration: 1.43s; animation-duration: 1.43s; } .ball-grid-pulse > div[data-v-39432f99]:nth-child(4) { -webkit-animation-delay: -0.03s; animation-delay: -0.03s; -webkit-animation-duration: 0.74s; animation-duration: 0.74s; } .ball-grid-pulse > div[data-v-39432f99]:nth-child(5) { -webkit-animation-delay: 0.21s; animation-delay: 0.21s; -webkit-animation-duration: 0.68s; animation-duration: 0.68s; } .ball-grid-pulse > div[data-v-39432f99]:nth-child(6) { -webkit-animation-delay: 0.25s; animation-delay: 0.25s; -webkit-animation-duration: 1.17s; animation-duration: 1.17s; } .ball-grid-pulse > div[data-v-39432f99]:nth-child(7) { -webkit-animation-delay: 0.46s; animation-delay: 0.46s; -webkit-animation-duration: 1.41s; animation-duration: 1.41s; } .ball-grid-pulse > div[data-v-39432f99]:nth-child(8) { -webkit-animation-delay: 0.02s; animation-delay: 0.02s; -webkit-animation-duration: 1.56s; animation-duration: 1.56s; } .ball-grid-pulse > div[data-v-39432f99]:nth-child(9) { -webkit-animation-delay: 0.13s; animation-delay: 0.13s; -webkit-animation-duration: 0.78s; animation-duration: 0.78s; } .ball-grid-pulse > div[data-v-39432f99] { background-color: #fff; width: 15px; height: 15px; border-radius: 100%; margin: 2px; -webkit-animation-fill-mode: both; animation-fill-mode: both; display: inline-block; float: left; -webkit-animation-name: ball-grid-pulse; animation-name: ball-grid-pulse; -webkit-animation-iteration-count: infinite; animation-iteration-count: infinite; -webkit-animation-delay: 0; animation-delay: 0; } @-webkit-keyframes ball-spin-fade-loader { 50% { opacity: 0.3; -webkit-transform: scale(0.4); transform: scale(0.4); } 100% { opacity: 1; -webkit-transform: scale(1); transform: scale(1); } } @keyframes ball-spin-fade-loader { 50% { opacity: 0.3; -webkit-transform: scale(0.4); transform: scale(0.4); } 100% { opacity: 1; -webkit-transform: scale(1); transform: scale(1); } } .ball-spin-fade-loader[data-v-39432f99] { position: relative; top: -10px; left: -10px; } .ball-spin-fade-loader > div[data-v-39432f99]:nth-child(1) { top: 25px; left: 0; -webkit-animation: ball-spin-fade-loader 1s -0.96s infinite linear; animation: ball-spin-fade-loader 1s -0.96s infinite linear; } .ball-spin-fade-loader > div[data-v-39432f99]:nth-child(2) { top: 17.04545px; left: 17.04545px; -webkit-animation: ball-spin-fade-loader 1s -0.84s infinite linear; animation: ball-spin-fade-loader 1s -0.84s infinite linear; } .ball-spin-fade-loader > div[data-v-39432f99]:nth-child(3) { top: 0; left: 25px; -webkit-animation: ball-spin-fade-loader 1s -0.72s infinite linear; animation: ball-spin-fade-loader 1s -0.72s infinite linear; } .ball-spin-fade-loader > div[data-v-39432f99]:nth-child(4) { top: -17.04545px; left: 17.04545px; -webkit-animation: ball-spin-fade-loader 1s -0.6s infinite linear; animation: ball-spin-fade-loader 1s -0.6s infinite linear; } .ball-spin-fade-loader > div[data-v-39432f99]:nth-child(5) { top: -25px; left: 0; -webkit-animation: ball-spin-fade-loader 1s -0.48s infinite linear; animation: ball-spin-fade-loader 1s -0.48s infinite linear; } .ball-spin-fade-loader > div[data-v-39432f99]:nth-child(6) { top: -17.04545px; left: -17.04545px; -webkit-animation: ball-spin-fade-loader 1s -0.36s infinite linear; animation: ball-spin-fade-loader 1s -0.36s infinite linear; } .ball-spin-fade-loader > div[data-v-39432f99]:nth-child(7) { top: 0; left: -25px; -webkit-animation: ball-spin-fade-loader 1s -0.24s infinite linear; animation: ball-spin-fade-loader 1s -0.24s infinite linear; } .ball-spin-fade-loader > div[data-v-39432f99]:nth-child(8) { top: 17.04545px; left: -17.04545px; -webkit-animation: ball-spin-fade-loader 1s -0.12s infinite linear; animation: ball-spin-fade-loader 1s -0.12s infinite linear; } .ball-spin-fade-loader > div[data-v-39432f99] { background-color: #fff; width: 15px; height: 15px; border-radius: 100%; margin: 2px; -webkit-animation-fill-mode: both; animation-fill-mode: both; position: absolute; } @-webkit-keyframes ball-spin-loader { 75% { opacity: 0.2; } 100% { opacity: 1; } } @keyframes ball-spin-loader { 75% { opacity: 0.2; } 100% { opacity: 1; } } .ball-spin-loader[data-v-39432f99] { position: relative; } .ball-spin-loader > span[data-v-39432f99]:nth-child(1) { top: 45px; left: 0; -webkit-animation: ball-spin-loader 2s 0.9s infinite linear; animation: ball-spin-loader 2s 0.9s infinite linear; } .ball-spin-loader > span[data-v-39432f99]:nth-child(2) { top: 30.68182px; left: 30.68182px; -webkit-animation: ball-spin-loader 2s 1.8s infinite linear; animation: ball-spin-loader 2s 1.8s infinite linear; } .ball-spin-loader > span[data-v-39432f99]:nth-child(3) { top: 0; left: 45px; -webkit-animation: ball-spin-loader 2s 2.7s infinite linear; animation: ball-spin-loader 2s 2.7s infinite linear; } .ball-spin-loader > span[data-v-39432f99]:nth-child(4) { top: -30.68182px; left: 30.68182px; -webkit-animation: ball-spin-loader 2s 3.6s infinite linear; animation: ball-spin-loader 2s 3.6s infinite linear; } .ball-spin-loader > span[data-v-39432f99]:nth-child(5) { top: -45px; left: 0; -webkit-animation: ball-spin-loader 2s 4.5s infinite linear; animation: ball-spin-loader 2s 4.5s infinite linear; } .ball-spin-loader > span[data-v-39432f99]:nth-child(6) { top: -30.68182px; left: -30.68182px; -webkit-animation: ball-spin-loader 2s 5.4s infinite linear; animation: ball-spin-loader 2s 5.4s infinite linear; } .ball-spin-loader > span[data-v-39432f99]:nth-child(7) { top: 0; left: -45px; -webkit-animation: ball-spin-loader 2s 6.3s infinite linear; animation: ball-spin-loader 2s 6.3s infinite linear; } .ball-spin-loader > span[data-v-39432f99]:nth-child(8) { top: 30.68182px; left: -30.68182px; -webkit-animation: ball-spin-loader 2s 7.2s infinite linear; animation: ball-spin-loader 2s 7.2s infinite linear; } .ball-spin-loader > div[data-v-39432f99] { -webkit-animation-fill-mode: both; animation-fill-mode: both; position: absolute; width: 15px; height: 15px; border-radius: 100%; background: green; } @-webkit-keyframes ball-zig { 33% { -webkit-transform: translate(-15px, -30px); transform: translate(-15px, -30px); } 66% { -webkit-transform: translate(15px, -30px); transform: translate(15px, -30px); } 100% { -webkit-transform: translate(0, 0); transform: translate(0, 0); } } @keyframes ball-zig { 33% { -webkit-transform: translate(-15px, -30px); transform: translate(-15px, -30px); } 66% { -webkit-transform: translate(15px, -30px); transform: translate(15px, -30px); } 100% { -webkit-transform: translate(0, 0); transform: translate(0, 0); } } @-webkit-keyframes ball-zag { 33% { -webkit-transform: translate(15px, 30px); transform: translate(15px, 30px); } 66% { -webkit-transform: translate(-15px, 30px); transform: translate(-15px, 30px); } 100% { -webkit-transform: translate(0, 0); transform: translate(0, 0); } } @keyframes ball-zag { 33% { -webkit-transform: translate(15px, 30px); transform: translate(15px, 30px); } 66% { -webkit-transform: translate(-15px, 30px); transform: translate(-15px, 30px); } 100% { -webkit-transform: translate(0, 0); transform: translate(0, 0); } } .ball-zig-zag[data-v-39432f99] { position: relative; -webkit-transform: translate(-15px, -15px); transform: translate(-15px, -15px); } .ball-zig-zag > div[data-v-39432f99] { background-color: #fff; width: 15px; height: 15px; border-radius: 100%; margin: 2px; -webkit-animation-fill-mode: both; animation-fill-mode: both; position: absolute; margin-left: 15px; top: 4px; left: -7px; } .ball-zig-zag > div[data-v-39432f99]:first-child { -webkit-animation: ball-zig 0.7s 0s infinite linear; animation: ball-zig 0.7s 0s infinite linear; } .ball-zig-zag > div[data-v-39432f99]:last-child { -webkit-animation: ball-zag 0.7s 0s infinite linear; animation: ball-zag 0.7s 0s infinite linear; } @-webkit-keyframes ball-zig-deflect { 17% { -webkit-transform: translate(-15px, -30px); transform: translate(-15px, -30px); } 34% { -webkit-transform: translate(15px, -30px); transform: translate(15px, -30px); } 50% { -webkit-transform: translate(0, 0); transform: translate(0, 0); } 67% { -webkit-transform: translate(15px, -30px); transform: translate(15px, -30px); } 84% { -webkit-transform: translate(-15px, -30px); transform: translate(-15px, -30px); } 100% { -webkit-transform: translate(0, 0); transform: translate(0, 0); } } @keyframes ball-zig-deflect { 17% { -webkit-transform: translate(-15px, -30px); transform: translate(-15px, -30px); } 34% { -webkit-transform: translate(15px, -30px); transform: translate(15px, -30px); } 50% { -webkit-transform: translate(0, 0); transform: translate(0, 0); } 67% { -webkit-transform: translate(15px, -30px); transform: translate(15px, -30px); } 84% { -webkit-transform: translate(-15px, -30px); transform: translate(-15px, -30px); } 100% { -webkit-transform: translate(0, 0); transform: translate(0, 0); } } @-webkit-keyframes ball-zag-deflect { 17% { -webkit-transform: translate(15px, 30px); transform: translate(15px, 30px); } 34% { -webkit-transform: translate(-15px, 30px); transform: translate(-15px, 30px); } 50% { -webkit-transform: translate(0, 0); transform: translate(0, 0); } 67% { -webkit-transform: translate(-15px, 30px); transform: translate(-15px, 30px); } 84% { -webkit-transform: translate(15px, 30px); transform: translate(15px, 30px); } 100% { -webkit-transform: translate(0, 0); transform: translate(0, 0); } } @keyframes ball-zag-deflect { 17% { -webkit-transform: translate(15px, 30px); transform: translate(15px, 30px); } 34% { -webkit-transform: translate(-15px, 30px); transform: translate(-15px, 30px); } 50% { -webkit-transform: translate(0, 0); transform: translate(0, 0); } 67% { -webkit-transform: translate(-15px, 30px); transform: translate(-15px, 30px); } 84% { -webkit-transform: translate(15px, 30px); transform: translate(15px, 30px); } 100% { -webkit-transform: translate(0, 0); transform: translate(0, 0); } } .ball-zig-zag-deflect[data-v-39432f99] { position: relative; -webkit-transform: translate(-15px, -15px); transform: translate(-15px, -15px); } .ball-zig-zag-deflect > div[data-v-39432f99] { background-color: #fff; width: 15px; height: 15px; border-radius: 100%; margin: 2px; -webkit-animation-fill-mode: both; animation-fill-mode: both; position: absolute; margin-left: 15px; top: 4px; left: -7px; } .ball-zig-zag-deflect > div[data-v-39432f99]:first-child { -webkit-animation: ball-zig-deflect 1.5s 0s infinite linear; animation: ball-zig-deflect 1.5s 0s infinite linear; } .ball-zig-zag-deflect > div[data-v-39432f99]:last-child { -webkit-animation: ball-zag-deflect 1.5s 0s infinite linear; animation: ball-zag-deflect 1.5s 0s infinite linear; } /** * Lines */ @-webkit-keyframes line-scale { 0% { -webkit-transform: scaley(1); transform: scaley(1); } 50% { -webkit-transform: scaley(0.4); transform: scaley(0.4); } 100% { -webkit-transform: scaley(1); transform: scaley(1); } } @keyframes line-scale { 0% { -webkit-transform: scaley(1); transform: scaley(1); } 50% { -webkit-transform: scaley(0.4); transform: scaley(0.4); } 100% { -webkit-transform: scaley(1); transform: scaley(1); } } .line-scale > div[data-v-39432f99]:nth-child(1) { -webkit-animation: line-scale 1s -0.4s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08); animation: line-scale 1s -0.4s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08); } .line-scale > div[data-v-39432f99]:nth-child(2) { -webkit-animation: line-scale 1s -0.3s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08); animation: line-scale 1s -0.3s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08); } .line-scale > div[data-v-39432f99]:nth-child(3) { -webkit-animation: line-scale 1s -0.2s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08); animation: line-scale 1s -0.2s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08); } .line-scale > div[data-v-39432f99]:nth-child(4) { -webkit-animation: line-scale 1s -0.1s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08); animation: line-scale 1s -0.1s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08); } .line-scale > div[data-v-39432f99]:nth-child(5) { -webkit-animation: line-scale 1s 0s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08); animation: line-scale 1s 0s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08); } .line-scale > div[data-v-39432f99] { background-color: #fff; width: 4px; height: 35px; border-radius: 2px; margin: 2px; -webkit-animation-fill-mode: both; animation-fill-mode: both; display: inline-block; } @-webkit-keyframes line-scale-party { 0% { -webkit-transform: scale(1); transform: scale(1); } 50% { -webkit-transform: scale(0.5); transform: scale(0.5); } 100% { -webkit-transform: scale(1); transform: scale(1); } } @keyframes line-scale-party { 0% { -webkit-transform: scale(1); transform: scale(1); } 50% { -webkit-transform: scale(0.5); transform: scale(0.5); } 100% { -webkit-transform: scale(1); transform: scale(1); } } .line-scale-party > div[data-v-39432f99]:nth-child(1) { -webkit-animation-delay: -0.09s; animation-delay: -0.09s; -webkit-animation-duration: 0.83s; animation-duration: 0.83s; } .line-scale-party > div[data-v-39432f99]:nth-child(2) { -webkit-animation-delay: 0.33s; animation-delay: 0.33s; -webkit-animation-duration: 0.64s; animation-duration: 0.64s; } .line-scale-party > div[data-v-39432f99]:nth-child(3) { -webkit-animation-delay: 0.32s; animation-delay: 0.32s; -webkit-animation-duration: 0.39s; animation-duration: 0.39s; } .line-scale-party > div[data-v-39432f99]:nth-child(4) { -webkit-animation-delay: 0.47s; animation-delay: 0.47s; -webkit-animation-duration: 0.52s; animation-duration: 0.52s; } .line-scale-party > div[data-v-39432f99] { background-color: #fff; width: 4px; height: 35px; border-radius: 2px; margin: 2px; -webkit-animation-fill-mode: both; animation-fill-mode: both; display: inline-block; -webkit-animation-name: line-scale-party; animation-name: line-scale-party; -webkit-animation-iteration-count: infinite; animation-iteration-count: infinite; -webkit-animation-delay: 0; animation-delay: 0; } @-webkit-keyframes line-scale-pulse-out { 0% { -webkit-transform: scaley(1); transform: scaley(1); } 50% { -webkit-transform: scaley(0.4); transform: scaley(0.4); } 100% { -webkit-transform: scaley(1); transform: scaley(1); } } @keyframes line-scale-pulse-out { 0% { -webkit-transform: scaley(1); transform: scaley(1); } 50% { -webkit-transform: scaley(0.4); transform: scaley(0.4); } 100% { -webkit-transform: scaley(1); transform: scaley(1); } } .line-scale-pulse-out > div[data-v-39432f99] { background-color: #fff; width: 4px; height: 35px; border-radius: 2px; margin: 2px; -webkit-animation-fill-mode: both; animation-fill-mode: both; display: inline-block; -webkit-animation: line-scale-pulse-out 0.9s -0.6s infinite cubic-bezier(0.85, 0.25, 0.37, 0.85); animation: line-scale-pulse-out 0.9s -0.6s infinite cubic-bezier(0.85, 0.25, 0.37, 0.85); } .line-scale-pulse-out > div[data-v-39432f99]:nth-child(2), .line-scale-pulse-out > div[data-v-39432f99]:nth-child(4) { -webkit-animation-delay: -0.4s !important; animation-delay: -0.4s !important; } .line-scale-pulse-out > div[data-v-39432f99]:nth-child(1), .line-scale-pulse-out > div[data-v-39432f99]:nth-child(5) { -webkit-animation-delay: -0.2s !important; animation-delay: -0.2s !important; } @-webkit-keyframes line-scale-pulse-out-rapid { 0% { -webkit-transform: scaley(1); transform: scaley(1); } 80% { -webkit-transform: scaley(0.3); transform: scaley(0.3); } 90% { -webkit-transform: scaley(1); transform: scaley(1); } } @keyframes line-scale-pulse-out-rapid { 0% { -webkit-transform: scaley(1); transform: scaley(1); } 80% { -webkit-transform: scaley(0.3); transform: scaley(0.3); } 90% { -webkit-transform: scaley(1); transform: scaley(1); } } .line-scale-pulse-out-rapid > div[data-v-39432f99] { background-color: #fff; width: 4px; height: 35px; border-radius: 2px; margin: 2px; -webkit-animation-fill-mode: both; animation-fill-mode: both; display: inline-block; -webkit-animation: line-scale-pulse-out-rapid 0.9s -0.5s infinite cubic-bezier(0.11, 0.49, 0.38, 0.78); animation: line-scale-pulse-out-rapid 0.9s -0.5s infinite cubic-bezier(0.11, 0.49, 0.38, 0.78); } .line-scale-pulse-out-rapid > div[data-v-39432f99]:nth-child(2), .line-scale-pulse-out-rapid > div[data-v-39432f99]:nth-child(4) { -webkit-animation-delay: -0.25s !important; animation-delay: -0.25s !important; } .line-scale-pulse-out-rapid > div[data-v-39432f99]:nth-child(1), .line-scale-pulse-out-rapid > div[data-v-39432f99]:nth-child(5) { -webkit-animation-delay: 0s !important; animation-delay: 0s !important; } @-webkit-keyframes line-spin-fade-loader { 50% { opacity: 0.3; } 100% { opacity: 1; } } @keyframes line-spin-fade-loader { 50% { opacity: 0.3; } 100% { opacity: 1; } } .line-spin-fade-loader[data-v-39432f99] { position: relative; top: -10px; left: -4px; } .line-spin-fade-loader > div[data-v-39432f99]:nth-child(1) { top: 20px; left: 0; -webkit-animation: line-spin-fade-loader 1.2s -0.84s infinite ease-in-out; animation: line-spin-fade-loader 1.2s -0.84s infinite ease-in-out; } .line-spin-fade-loader > div[data-v-39432f99]:nth-child(2) { top: 13.63636px; left: 13.63636px; -webkit-transform: rotate(-45deg); transform: rotate(-45deg); -webkit-animation: line-spin-fade-loader 1.2s -0.72s infinite ease-in-out; animation: line-spin-fade-loader 1.2s -0.72s infinite ease-in-out; } .line-spin-fade-loader > div[data-v-39432f99]:nth-child(3) { top: 0; left: 20px; -webkit-transform: rotate(90deg); transform: rotate(90deg); -webkit-animation: line-spin-fade-loader 1.2s -0.6s infinite ease-in-out; animation: line-spin-fade-loader 1.2s -0.6s infinite ease-in-out; } .line-spin-fade-loader > div[data-v-39432f99]:nth-child(4) { top: -13.63636px; left: 13.63636px; -webkit-transform: rotate(45deg); transform: rotate(45deg); -webkit-animation: line-spin-fade-loader 1.2s -0.48s infinite ease-in-out; animation: line-spin-fade-loader 1.2s -0.48s infinite ease-in-out; } .line-spin-fade-loader > div[data-v-39432f99]:nth-child(5) { top: -20px; left: 0; -webkit-animation: line-spin-fade-loader 1.2s -0.36s infinite ease-in-out; animation: line-spin-fade-loader 1.2s -0.36s infinite ease-in-out; } .line-spin-fade-loader > div[data-v-39432f99]:nth-child(6) { top: -13.63636px; left: -13.63636px; -webkit-transform: rotate(-45deg); transform: rotate(-45deg); -webkit-animation: line-spin-fade-loader 1.2s -0.24s infinite ease-in-out; animation: line-spin-fade-loader 1.2s -0.24s infinite ease-in-out; } .line-spin-fade-loader > div[data-v-39432f99]:nth-child(7) { top: 0; left: -20px; -webkit-transform: rotate(90deg); transform: rotate(90deg); -webkit-animation: line-spin-fade-loader 1.2s -0.12s infinite ease-in-out; animation: line-spin-fade-loader 1.2s -0.12s infinite ease-in-out; } .line-spin-fade-loader > div[data-v-39432f99]:nth-child(8) { top: 13.63636px; left: -13.63636px; -webkit-transform: rotate(45deg); transform: rotate(45deg); -webkit-animation: line-spin-fade-loader 1.2s 0s infinite ease-in-out; animation: line-spin-fade-loader 1.2s 0s infinite ease-in-out; } .line-spin-fade-loader > div[data-v-39432f99] { background-color: #fff; width: 4px; height: 35px; border-radius: 2px; margin: 2px; -webkit-animation-fill-mode: both; animation-fill-mode: both; position: absolute; width: 5px; height: 15px; } /** * Misc */ @-webkit-keyframes triangle-skew-spin { 25% { -webkit-transform: perspective(100px) rotateX(180deg) rotateY(0); transform: perspective(100px) rotateX(180deg) rotateY(0); } 50% { -webkit-transform: perspective(100px) rotateX(180deg) rotateY(180deg); transform: perspective(100px) rotateX(180deg) rotateY(180deg); } 75% { -webkit-transform: perspective(100px) rotateX(0) rotateY(180deg); transform: perspective(100px) rotateX(0) rotateY(180deg); } 100% { -webkit-transform: perspective(100px) rotateX(0) rotateY(0); transform: perspective(100px) rotateX(0) rotateY(0); } } @keyframes triangle-skew-spin { 25% { -webkit-transform: perspective(100px) rotateX(180deg) rotateY(0); transform: perspective(100px) rotateX(180deg) rotateY(0); } 50% { -webkit-transform: perspective(100px) rotateX(180deg) rotateY(180deg); transform: perspective(100px) rotateX(180deg) rotateY(180deg); } 75% { -webkit-transform: perspective(100px) rotateX(0) rotateY(180deg); transform: perspective(100px) rotateX(0) rotateY(180deg); } 100% { -webkit-transform: perspective(100px) rotateX(0) rotateY(0); transform: perspective(100px) rotateX(0) rotateY(0); } } .triangle-skew-spin > div[data-v-39432f99] { -webkit-animation-fill-mode: both; animation-fill-mode: both; width: 0; height: 0; border-left: 20px solid transparent; border-right: 20px solid transparent; border-bottom: 20px solid #fff; -webkit-animation: triangle-skew-spin 3s 0s cubic-bezier(0.09, 0.57, 0.49, 0.9) infinite; animation: triangle-skew-spin 3s 0s cubic-bezier(0.09, 0.57, 0.49, 0.9) infinite; } @-webkit-keyframes square-spin { 25% { -webkit-transform: perspective(100px) rotateX(180deg) rotateY(0); transform: perspective(100px) rotateX(180deg) rotateY(0); } 50% { -webkit-transform: perspective(100px) rotateX(180deg) rotateY(180deg); transform: perspective(100px) rotateX(180deg) rotateY(180deg); } 75% { -webkit-transform: perspective(100px) rotateX(0) rotateY(180deg); transform: perspective(100px) rotateX(0) rotateY(180deg); } 100% { -webkit-transform: perspective(100px) rotateX(0) rotateY(0); transform: perspective(100px) rotateX(0) rotateY(0); } } @keyframes square-spin { 25% { -webkit-transform: perspective(100px) rotateX(180deg) rotateY(0); transform: perspective(100px) rotateX(180deg) rotateY(0); } 50% { -webkit-transform: perspective(100px) rotateX(180deg) rotateY(180deg); transform: perspective(100px) rotateX(180deg) rotateY(180deg); } 75% { -webkit-transform: perspective(100px) rotateX(0) rotateY(180deg); transform: perspective(100px) rotateX(0) rotateY(180deg); } 100% { -webkit-transform: perspective(100px) rotateX(0) rotateY(0); transform: perspective(100px) rotateX(0) rotateY(0); } } .square-spin > div[data-v-39432f99] { -webkit-animation-fill-mode: both; animation-fill-mode: both; width: 50px; height: 50px; background: #fff; border: 1px solid red; -webkit-animation: square-spin 3s 0s cubic-bezier(0.09, 0.57, 0.49, 0.9) infinite; animation: square-spin 3s 0s cubic-bezier(0.09, 0.57, 0.49, 0.9) infinite; } @-webkit-keyframes rotate_pacman_half_up { 0% { -webkit-transform: rotate(270deg); transform: rotate(270deg); } 50% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } 100% { -webkit-transform: rotate(270deg); transform: rotate(270deg); } } @keyframes rotate_pacman_half_up { 0% { -webkit-transform: rotate(270deg); transform: rotate(270deg); } 50% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } 100% { -webkit-transform: rotate(270deg); transform: rotate(270deg); } } @-webkit-keyframes rotate_pacman_half_down { 0% { -webkit-transform: rotate(90deg); transform: rotate(90deg); } 50% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(90deg); transform: rotate(90deg); } } @keyframes rotate_pacman_half_down { 0% { -webkit-transform: rotate(90deg); transform: rotate(90deg); } 50% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(90deg); transform: rotate(90deg); } } @-webkit-keyframes pacman-balls { 75% { opacity: 0.7; } 100% { -webkit-transform: translate(-100px, -6.25px); transform: translate(-100px, -6.25px); } } @keyframes pacman-balls { 75% { opacity: 0.7; } 100% { -webkit-transform: translate(-100px, -6.25px); transform: translate(-100px, -6.25px); } } .pacman[data-v-39432f99] { position: relative; } .pacman > div[data-v-39432f99]:nth-child(2) { -webkit-animation: pacman-balls 1s -0.99s infinite linear; animation: pacman-balls 1s -0.99s infinite linear; } .pacman > div[data-v-39432f99]:nth-child(3) { -webkit-animation: pacman-balls 1s -0.66s infinite linear; animation: pacman-balls 1s -0.66s infinite linear; } .pacman > div[data-v-39432f99]:nth-child(4) { -webkit-animation: pacman-balls 1s -0.33s infinite linear; animation: pacman-balls 1s -0.33s infinite linear; } .pacman > div[data-v-39432f99]:nth-child(5) { -webkit-animation: pacman-balls 1s 0s infinite linear; animation: pacman-balls 1s 0s infinite linear; } .pacman > div[data-v-39432f99]:first-of-type { width: 0px; height: 0px; border-right: 25px solid transparent; border-top: 25px solid #fff; border-left: 25px solid #fff; border-bottom: 25px solid #fff; border-radius: 25px; -webkit-animation: rotate_pacman_half_up 0.5s 0s infinite; animation: rotate_pacman_half_up 0.5s 0s infinite; position: relative; left: -30px; } .pacman > div[data-v-39432f99]:nth-child(2) { width: 0px; height: 0px; border-right: 25px solid transparent; border-top: 25px solid #fff; border-left: 25px solid #fff; border-bottom: 25px solid #fff; border-radius: 25px; -webkit-animation: rotate_pacman_half_down 0.5s 0s infinite; animation: rotate_pacman_half_down 0.5s 0s infinite; margin-top: -50px; position: relative; left: -30px; } .pacman > div[data-v-39432f99]:nth-child(3), .pacman > div[data-v-39432f99]:nth-child(4), .pacman > div[data-v-39432f99]:nth-child(5), .pacman > div[data-v-39432f99]:nth-child(6) { background-color: #fff; width: 15px; height: 15px; border-radius: 100%; margin: 2px; width: 10px; height: 10px; position: absolute; -webkit-transform: translate(0, -6.25px); transform: translate(0, -6.25px); top: 25px; left: 70px; } @-webkit-keyframes cube-transition { 25% { -webkit-transform: translateX(50px) scale(0.5) rotate(-90deg); transform: translateX(50px) scale(0.5) rotate(-90deg); } 50% { -webkit-transform: translate(50px, 50px) rotate(-180deg); transform: translate(50px, 50px) rotate(-180deg); } 75% { -webkit-transform: translateY(50px) scale(0.5) rotate(-270deg); transform: translateY(50px) scale(0.5) rotate(-270deg); } 100% { -webkit-transform: rotate(-360deg); transform: rotate(-360deg); } } @keyframes cube-transition { 25% { -webkit-transform: translateX(50px) scale(0.5) rotate(-90deg); transform: translateX(50px) scale(0.5) rotate(-90deg); } 50% { -webkit-transform: translate(50px, 50px) rotate(-180deg); transform: translate(50px, 50px) rotate(-180deg); } 75% { -webkit-transform: translateY(50px) scale(0.5) rotate(-270deg); transform: translateY(50px) scale(0.5) rotate(-270deg); } 100% { -webkit-transform: rotate(-360deg); transform: rotate(-360deg); } } .cube-transition[data-v-39432f99] { position: relative; -webkit-transform: translate(-25px, -25px); transform: translate(-25px, -25px); } .cube-transition > div[data-v-39432f99] { -webkit-animation-fill-mode: both; animation-fill-mode: both; width: 10px; height: 10px; position: absolute; top: -5px; left: -5px; background-color: #fff; -webkit-animation: cube-transition 1.6s 0s infinite ease-in-out; animation: cube-transition 1.6s 0s infinite ease-in-out; } .cube-transition > div[data-v-39432f99]:last-child { -webkit-animation-delay: -0.8s; animation-delay: -0.8s; } @-webkit-keyframes spin-rotate { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 50% { -webkit-transform: rotate(180deg); transform: rotate(180deg); } 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } @keyframes spin-rotate { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 50% { -webkit-transform: rotate(180deg); transform: rotate(180deg); } 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } .semi-circle-spin[data-v-39432f99] { position: relative; width: 35px; height: 35px; overflow: hidden; } .semi-circle-spin > div[data-v-39432f99] { position: absolute; border-width: 0px; border-radius: 100%; -webkit-animation: spin-rotate 0.6s 0s infinite linear; animation: spin-rotate 0.6s 0s infinite linear; background-image: -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(70%, transparent), color-stop(30%, #fff), to(#fff)); background-image: linear-gradient(transparent 0%, transparent 70%, #fff 30%, #fff 100%); width: 100%; height: 100%; } @-webkit-keyframes bar-progress { 0% { -webkit-transform: scaleY(20%); transform: scaleY(20%); opacity: 1; } 25% { -webkit-transform: translateX(6%) scaleY(10%); transform: translateX(6%) scaleY(10%); opacity: 0.7; } 50% { -webkit-transform: translateX(20%) scaleY(20%); transform: translateX(20%) scaleY(20%); opacity: 1; } 75% { -webkit-transform: translateX(6%) scaleY(10%); transform: translateX(6%) scaleY(10%); opacity: 0.7; } 100% { -webkit-transform: scaleY(20%); transform: scaleY(20%); opacity: 1; } } @keyframes bar-progress { 0% { -webkit-transform: scaleY(20%); transform: scaleY(20%); opacity: 1; } 25% { -webkit-transform: translateX(6%) scaleY(10%); transform: translateX(6%) scaleY(10%); opacity: 0.7; } 50% { -webkit-transform: translateX(20%) scaleY(20%); transform: translateX(20%) scaleY(20%); opacity: 1; } 75% { -webkit-transform: translateX(6%) scaleY(10%); transform: translateX(6%) scaleY(10%); opacity: 0.7; } 100% { -webkit-transform: scaleY(20%); transform: scaleY(20%); opacity: 1; } } .bar-progress[data-v-39432f99] { width: 30%; height: 12px; } .bar-progress > div[data-v-39432f99] { position: relative; width: 20%; height: 12px; border-radius: 10px; background-color: #fff; -webkit-animation: bar-progress 3s cubic-bezier(0.57, 0.1, 0.44, 0.93) infinite; animation: bar-progress 3s cubic-bezier(0.57, 0.1, 0.44, 0.93) infinite; opacity: 1; } @-webkit-keyframes bar-swing { 0% { left: 0; } 50% { left: 70%; } 100% { left: 0; } } @keyframes bar-swing { 0% { left: 0; } 50% { left: 70%; } 100% { left: 0; } } .bar-swing[data-v-39432f99] { width: 30%; height: 8px; } .bar-swing > div[data-v-39432f99] { position: relative; width: 30%; height: 8px; border-radius: 10px; background-color: #fff; -webkit-animation: bar-swing 1.5s infinite; animation: bar-swing 1.5s infinite; } @-webkit-keyframes bar-swing-container { 0% { left: 0; -webkit-transform: translateX(0); transform: translateX(0); } 50% { left: 70%; -webkit-transform: translateX(-4px); transform: translateX(-4px); } 100% { left: 0; -webkit-transform: translateX(0); transform: translateX(0); } } @keyframes bar-swing-container { 0% { left: 0; -webkit-transform: translateX(0); transform: translateX(0); } 50% { left: 70%; -webkit-transform: translateX(-4px); transform: translateX(-4px); } 100% { left: 0; -webkit-transform: translateX(0); transform: translateX(0); } } .bar-swing-container[data-v-39432f99] { width: 20%; height: 8px; position: relative; } .bar-swing-container div[data-v-39432f99]:nth-child(1) { position: absolute; width: 100%; background-color: rgba(255, 255, 255, 0.2); height: 12px; border-radius: 10px; } .bar-swing-container div[data-v-39432f99]:nth-child(2) { position: absolute; width: 30%; height: 8px; border-radius: 10px; background-color: #fff; -webkit-animation: bar-swing-container 2s cubic-bezier(0.91, 0.35, 0.12, 0.6) infinite; animation: bar-swing-container 2s cubic-bezier(0.91, 0.35, 0.12, 0.6) infinite; margin: 2px 2px 0; } .sk-spinner[data-v-39432f99] { color: #333; } .sk-spinner > div[data-v-39432f99] { background-color: currentColor; } @-webkit-keyframes sk-fade-in { 0% { opacity: 0; } 50% { opacity: 0; } 100% { opacity: 1; } } @keyframes sk-fade-in { 0% { opacity: 0; } 50% { opacity: 0; } 100% { opacity: 1; } } .sk-fade-in[data-v-39432f99] { -webkit-animation: sk-fade-in 2s; animation: sk-fade-in 2s; } .sk-fade-in-half-second[data-v-39432f99] { -webkit-animation: sk-fade-in 1s; animation: sk-fade-in 1s; } .sk-fade-in-quarter-second[data-v-39432f99] { -webkit-animation: sk-fade-in 0.5s; animation: sk-fade-in 0.5s; } .sk-rotating-plane > div[data-v-39432f99] { width: 27px; height: 27px; background-color: currentColor; -webkit-animation: sk-rotateplane 1.2s infinite ease-in-out; animation: sk-rotateplane 1.2s infinite ease-in-out; } @-webkit-keyframes sk-rotateplane { 0% { -webkit-transform: perspective(120px) } 50% { -webkit-transform: perspective(120px) rotateY(180deg) } 100% { -webkit-transform: perspective(120px) rotateY(180deg) rotateX(180deg) } } @keyframes sk-rotateplane { 0% { transform: perspective(120px) rotateX(0deg) rotateY(0deg); -webkit-transform: perspective(120px) rotateX(0deg) rotateY(0deg); } 50% { transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg); -webkit-transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg); } 100% { transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg); -webkit-transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg); } } .sk-double-bounce[data-v-39432f99] { width: 27px; height: 27px; position: relative; } .sk-double-bounce > div[data-v-39432f99] { width: 100%; height: 100%; border-radius: 50%; background-color: currentColor; opacity: 0.6; position: absolute; top: 0; left: 0; -webkit-animation: sk-bounce 2.0s infinite ease-in-out; animation: sk-bounce 2.0s infinite ease-in-out; } .sk-double-bounce > div[data-v-39432f99]:last-child { -webkit-animation-delay: -1.0s; animation-delay: -1.0s; } @-webkit-keyframes sk-bounce { 0%, 100% { -webkit-transform: scale(0.0) } 50% { -webkit-transform: scale(1.0) } } @keyframes sk-bounce { 0%, 100% { transform: scale(0.0); -webkit-transform: scale(0.0); } 50% { transform: scale(1.0); -webkit-transform: scale(1.0); } } .sk-wave[data-v-39432f99] { width: 50px; height: 40px; text-align: center; font-size: 10px; } .sk-wave > div[data-v-39432f99] { background-color: currentColor; height: 100%; width: 6px; margin: 0 3px 0 0; display: inline-block; -webkit-animation: sk-stretchdelay 1.2s infinite ease-in-out; animation: sk-stretchdelay 1.2s infinite ease-in-out; } .sk-wave > div[data-v-39432f99]:nth-child(2) { -webkit-animation-delay: -1.1s; animation-delay: -1.1s; } .sk-wave > div[data-v-39432f99]:nth-child(3) { -webkit-animation-delay: -1.0s; animation-delay: -1.0s; } .sk-wave > div[data-v-39432f99]:nth-child(4) { -webkit-animation-delay: -0.9s; animation-delay: -0.9s; } .sk-wave > div[data-v-39432f99]:nth-child(5) { -webkit-animation-delay: -0.8s; animation-delay: -0.8s; } @-webkit-keyframes sk-stretchdelay { 0%, 40%, 100% { -webkit-transform: scaleY(0.4) } 20% { -webkit-transform: scaleY(1.0) } } @keyframes sk-stretchdelay { 0%, 40%, 100% { transform: scaleY(0.4); -webkit-transform: scaleY(0.4); } 20% { transform: scaleY(1.0); -webkit-transform: scaleY(1.0); } } .sk-wandering-cubes[data-v-39432f99] { width: 52px; height: 52px; position: relative; } .sk-wandering-cubes > div[data-v-39432f99] { background-color: currentColor; width: 10px; height: 10px; position: absolute; top: 0; left: 0; -webkit-animation: sk-cubemove 1.8s infinite ease-in-out; animation: sk-cubemove 1.8s infinite ease-in-out; } .sk-wandering-cubes > div[data-v-39432f99]:last-child { -webkit-animation-delay: -0.9s; animation-delay: -0.9s; } @-webkit-keyframes sk-cubemove { 25% { -webkit-transform: translateX(42px) rotate(-90deg) scale(0.5) } 50% { -webkit-transform: translateX(42px) translateY(42px) rotate(-180deg) } 75% { -webkit-transform: translateX(0px) translateY(42px) rotate(-270deg) scale(0.5) } 100% { -webkit-transform: rotate(-360deg) } } @keyframes sk-cubemove { 25% { transform: translateX(42px) rotate(-90deg) scale(0.5); -webkit-transform: translateX(42px) rotate(-90deg) scale(0.5); } 50% { /* Hack to make FF rotate in the right direction */ transform: translateX(42px) translateY(42px) rotate(-179deg); -webkit-transform: translateX(42px) translateY(42px) rotate(-179deg); } 50.1%[data-v-39432f99] { transform: translateX(42px) translateY(42px) rotate(-180deg); -webkit-transform: translateX(42px) translateY(42px) rotate(-180deg); } 75% { transform: translateX(0px) translateY(42px) rotate(-270deg) scale(0.5); -webkit-transform: translateX(0px) translateY(42px) rotate(-270deg) scale(0.5); } 100% { transform: rotate(-360deg); -webkit-transform: rotate(-360deg); } } .sk-pulse > div[data-v-39432f99] { width: 27px; height: 27px; background-color: currentColor; border-radius: 100%; -webkit-animation: sk-scaleout 1.0s infinite ease-in-out; animation: sk-scaleout 1.0s infinite ease-in-out; } @-webkit-keyframes sk-scaleout { 0% { -webkit-transform: scale(0.0) } 100% { -webkit-transform: scale(1.0); opacity: 0; } } @keyframes sk-scaleout { 0% { transform: scale(0.0); -webkit-transform: scale(0.0); } 100% { transform: scale(1.0); -webkit-transform: scale(1.0); opacity: 0; } } .sk-chasing-dots[data-v-39432f99] { width: 27px; height: 27px; position: relative; -webkit-animation: sk-rotate 2.0s infinite linear; animation: sk-rotate 2.0s infinite linear; } .sk-chasing-dots > div[data-v-39432f99] { width: 60%; height: 60%; display: inline-block; position: absolute; top: 0; background-color: currentColor; border-radius: 100%; -webkit-animation: sk-bounce 2.0s infinite ease-in-out; animation: sk-bounce 2.0s infinite ease-in-out; } .sk-chasing-dots > div[data-v-39432f99]:last-child { top: auto; bottom: 0; -webkit-animation-delay: -1.0s; animation-delay: -1.0s; } @-webkit-keyframes sk-rotate { 100% { -webkit-transform: rotate(360deg) }} @keyframes sk-rotate { 100% { transform: rotate(360deg); -webkit-transform: rotate(360deg); } } @-webkit-keyframes sk-bounce { 0%, 100% { -webkit-transform: scale(0.0) } 50% { -webkit-transform: scale(1.0) } } @keyframes sk-bounce { 0%, 100% { transform: scale(0.0); -webkit-transform: scale(0.0); } 50% { transform: scale(1.0); -webkit-transform: scale(1.0); } } .sk-three-bounce[data-v-39432f99] { height: 18px; } .sk-three-bounce > div[data-v-39432f99] { width: 18px; height: 18px; background-color: currentColor; border-radius: 100%; display: inline-block; -webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out; animation: sk-bouncedelay 1.4s infinite ease-in-out; /* Prevent first frame from flickering when animation starts */ -webkit-animation-fill-mode: both; animation-fill-mode: both; } .sk-three-bounce > div[data-v-39432f99]:first-child { -webkit-animation-delay: -0.32s; animation-delay: -0.32s; } .sk-three-bounce > div[data-v-39432f99]:nth-child(2) { -webkit-animation-delay: -0.16s; animation-delay: -0.16s; } @-webkit-keyframes sk-bouncedelay { 0%, 80%, 100% { -webkit-transform: scale(0.0) } 40% { -webkit-transform: scale(1.0) } } @keyframes sk-bouncedelay { 0%, 80%, 100% { transform: scale(0.0); -webkit-transform: scale(0.0); } 40% { transform: scale(1.0); -webkit-transform: scale(1.0); } } .sk-circle[data-v-39432f99] { width: 40px; height: 40px; position: relative; } .sk-circle > div[data-v-39432f99] { background-color: initial; width: 100%; height: 100%; position: absolute; left: 0; top: 0; } .sk-circle > div[data-v-39432f99]::before { content: ''; display: block; margin: 0 auto; width: 20%; height: 20%; background-color: currentColor; border-radius: 100%; -webkit-animation: sk-bouncedelay 1.2s infinite ease-in-out; animation: sk-bouncedelay 1.2s infinite ease-in-out; /* Prevent first frame from flickering when animation starts */ -webkit-animation-fill-mode: both; animation-fill-mode: both; } .sk-circle > div[data-v-39432f99]:nth-child(2) { -webkit-transform: rotate(30deg); transform: rotate(30deg) } .sk-circle > div[data-v-39432f99]:nth-child(3) { -webkit-transform: rotate(60deg); transform: rotate(60deg) } .sk-circle > div[data-v-39432f99]:nth-child(4) { -webkit-transform: rotate(90deg); transform: rotate(90deg) } .sk-circle > div[data-v-39432f99]:nth-child(5) { -webkit-transform: rotate(120deg); transform: rotate(120deg) } .sk-circle > div[data-v-39432f99]:nth-child(6) { -webkit-transform: rotate(150deg); transform: rotate(150deg) } .sk-circle > div[data-v-39432f99]:nth-child(7) { -webkit-transform: rotate(180deg); transform: rotate(180deg) } .sk-circle > div[data-v-39432f99]:nth-child(8) { -webkit-transform: rotate(210deg); transform: rotate(210deg) } .sk-circle > div[data-v-39432f99]:nth-child(9) { -webkit-transform: rotate(240deg); transform: rotate(240deg) } .sk-circle > div[data-v-39432f99]:nth-child(10) { -webkit-transform: rotate(270deg); transform: rotate(270deg) } .sk-circle > div[data-v-39432f99]:nth-child(11) { -webkit-transform: rotate(300deg); transform: rotate(300deg) } .sk-circle > div[data-v-39432f99]:nth-child(12) { -webkit-transform: rotate(330deg); transform: rotate(330deg) } .sk-circle > div[data-v-39432f99]:nth-child(2)::before { -webkit-animation-delay: -1.1s; animation-delay: -1.1s } .sk-circle > div[data-v-39432f99]:nth-child(3)::before { -webkit-animation-delay: -1.0s; animation-delay: -1.0s } .sk-circle > div[data-v-39432f99]:nth-child(4)::before { -webkit-animation-delay: -0.9s; animation-delay: -0.9s } .sk-circle > div[data-v-39432f99]:nth-child(5)::before { -webkit-animation-delay: -0.8s; animation-delay: -0.8s } .sk-circle > div[data-v-39432f99]:nth-child(6)::before { -webkit-animation-delay: -0.7s; animation-delay: -0.7s } .sk-circle > div[data-v-39432f99]:nth-child(7)::before { -webkit-animation-delay: -0.6s; animation-delay: -0.6s } .sk-circle > div[data-v-39432f99]:nth-child(8)::before { -webkit-animation-delay: -0.5s; animation-delay: -0.5s } .sk-circle > div[data-v-39432f99]:nth-child(9)::before { -webkit-animation-delay: -0.4s; animation-delay: -0.4s } .sk-circle > div[data-v-39432f99]:nth-child(10)::before { -webkit-animation-delay: -0.3s; animation-delay: -0.3s } .sk-circle > div[data-v-39432f99]:nth-child(11)::before { -webkit-animation-delay: -0.2s; animation-delay: -0.2s } .sk-circle > div[data-v-39432f99]:nth-child(12)::before { -webkit-animation-delay: -0.1s; animation-delay: -0.1s } @-webkit-keyframes sk-bouncedelay { 0%, 80%, 100% { -webkit-transform: scale(0.0) } 40% { -webkit-transform: scale(1.0) } } @keyframes sk-bouncedelay { 0%, 80%, 100% { -webkit-transform: scale(0.0); transform: scale(0.0); } 40% { -webkit-transform: scale(1.0); transform: scale(1.0); } } .sk-cube-grid[data-v-39432f99] { width: 40px; height: 40px; } .sk-cube-grid > div[data-v-39432f99] { width: 33%; height: 33%; background-color: currentColor; float: left; -webkit-animation: sk-scaleDelay 1.3s infinite ease-in-out; animation: sk-scaleDelay 1.3s infinite ease-in-out; } /* * Spinner positions * 1 2 3 * 4 5 6 * 7 8 9 */ .sk-cube-grid > div[data-v-39432f99]:nth-child(1) { -webkit-animation-delay: 0.2s; animation-delay: 0.2s } .sk-cube-grid > div[data-v-39432f99]:nth-child(2) { -webkit-animation-delay: 0.3s; animation-delay: 0.3s } .sk-cube-grid > div[data-v-39432f99]:nth-child(3) { -webkit-animation-delay: 0.4s; animation-delay: 0.4s } .sk-cube-grid > div[data-v-39432f99]:nth-child(4) { -webkit-animation-delay: 0.1s; animation-delay: 0.1s } .sk-cube-grid > div[data-v-39432f99]:nth-child(5) { -webkit-animation-delay: 0.2s; animation-delay: 0.2s } .sk-cube-grid > div[data-v-39432f99]:nth-child(6) { -webkit-animation-delay: 0.3s; animation-delay: 0.3s } .sk-cube-grid > div[data-v-39432f99]:nth-child(7) { -webkit-animation-delay: 0.0s; animation-delay: 0.0s } .sk-cube-grid > div[data-v-39432f99]:nth-child(8) { -webkit-animation-delay: 0.1s; animation-delay: 0.1s } .sk-cube-grid > div[data-v-39432f99]:nth-child(9) { -webkit-animation-delay: 0.2s; animation-delay: 0.2s } @-webkit-keyframes sk-scaleDelay { 0%, 70%, 100% { -webkit-transform:scale3D(1.0, 1.0, 1.0) } 35% { -webkit-transform:scale3D(0.0, 0.0, 1.0) } } @keyframes sk-scaleDelay { 0%, 70%, 100% { -webkit-transform:scale3D(1.0, 1.0, 1.0); transform:scale3D(1.0, 1.0, 1.0) } 35% { -webkit-transform:scale3D(0.0, 0.0, 1.0); transform:scale3D(0.0, 0.0, 1.0) } } .sk-fading-circle[data-v-39432f99] { width: 40px; height: 40px; position: relative; } .sk-fading-circle > div[data-v-39432f99] { background-color: initial; width: 100%; height: 100%; position: absolute; left: 0; top: 0; } .sk-fading-circle > div[data-v-39432f99]::before { content: ''; display: block; margin: 0 auto; width: 15%; height: 15%; background-color: currentColor; border-radius: 100%; -webkit-animation: sk-circleFadeDelay 1.2s infinite ease-in-out both; animation: sk-circleFadeDelay 1.2s infinite ease-in-out both; } .sk-fading-circle > div[data-v-39432f99]:nth-child(2) { -webkit-transform: rotate(30deg); transform: rotate(30deg); } .sk-fading-circle > div[data-v-39432f99]:nth-child(3) { -webkit-transform: rotate(60deg); transform: rotate(60deg); } .sk-fading-circle > div[data-v-39432f99]:nth-child(4) { -webkit-transform: rotate(90deg); transform: rotate(90deg); } .sk-fading-circle > div[data-v-39432f99]:nth-child(5) { -webkit-transform: rotate(120deg); transform: rotate(120deg); } .sk-fading-circle > div[data-v-39432f99]:nth-child(6) { -webkit-transform: rotate(150deg); transform: rotate(150deg); } .sk-fading-circle > div[data-v-39432f99]:nth-child(7) { -webkit-transform: rotate(180deg); transform: rotate(180deg); } .sk-fading-circle > div[data-v-39432f99]:nth-child(8) { -webkit-transform: rotate(210deg); transform: rotate(210deg); } .sk-fading-circle > div[data-v-39432f99]:nth-child(9) { -webkit-transform: rotate(240deg); transform: rotate(240deg); } .sk-fading-circle > div[data-v-39432f99]:nth-child(10) { -webkit-transform: rotate(270deg); transform: rotate(270deg); } .sk-fading-circle > div[data-v-39432f99]:nth-child(11) { -webkit-transform: rotate(300deg); transform: rotate(300deg); } .sk-fading-circle > div[data-v-39432f99]:nth-child(12) { -webkit-transform: rotate(330deg); transform: rotate(330deg); } .sk-fading-circle > div[data-v-39432f99]:nth-child(2)::before { -webkit-animation-delay: -1.1s; animation-delay: -1.1s; } .sk-fading-circle > div[data-v-39432f99]:nth-child(3)::before { -webkit-animation-delay: -1s; animation-delay: -1s; } .sk-fading-circle > div[data-v-39432f99]:nth-child(4)::before { -webkit-animation-delay: -0.9s; animation-delay: -0.9s; } .sk-fading-circle > div[data-v-39432f99]:nth-child(5)::before { -webkit-animation-delay: -0.8s; animation-delay: -0.8s; } .sk-fading-circle > div[data-v-39432f99]:nth-child(6)::before { -webkit-animation-delay: -0.7s; animation-delay: -0.7s; } .sk-fading-circle > div[data-v-39432f99]:nth-child(7)::before { -webkit-animation-delay: -0.6s; animation-delay: -0.6s; } .sk-fading-circle > div[data-v-39432f99]:nth-child(8)::before { -webkit-animation-delay: -0.5s; animation-delay: -0.5s; } .sk-fading-circle > div[data-v-39432f99]:nth-child(9)::before { -webkit-animation-delay: -0.4s; animation-delay: -0.4s; } .sk-fading-circle > div[data-v-39432f99]:nth-child(10)::before { -webkit-animation-delay: -0.3s; animation-delay: -0.3s; } .sk-fading-circle > div[data-v-39432f99]:nth-child(11)::before { -webkit-animation-delay: -0.2s; animation-delay: -0.2s; } .sk-fading-circle > div[data-v-39432f99]:nth-child(12)::before { -webkit-animation-delay: -0.1s; animation-delay: -0.1s; } @-webkit-keyframes sk-circleFadeDelay { 0%, 39%, 100% { opacity: 0; } 40% { opacity: 1; } } @keyframes sk-circleFadeDelay { 0%, 39%, 100% { opacity: 0; } 40% { opacity: 1; } } .sk-folding-cube[data-v-39432f99] { width: 40px; height: 40px; position: relative; -webkit-transform: rotateZ(45deg); transform: rotateZ(45deg); } .sk-folding-cube > div[data-v-39432f99] { background-color: initial; float: left; width: 50%; height: 50%; position: relative; -webkit-transform: scale(1.1); transform: scale(1.1); } .sk-folding-cube > div[data-v-39432f99]::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: currentColor; -webkit-animation: sk-foldCubeAngle 2.4s infinite linear both; animation: sk-foldCubeAngle 2.4s infinite linear both; -webkit-transform-origin: 100% 100%; transform-origin: 100% 100%; } .sk-folding-cube > div[data-v-39432f99]:nth-child(2) { -webkit-transform: scale(1.1) rotateZ(90deg); transform: scale(1.1) rotateZ(90deg); } .sk-folding-cube > div[data-v-39432f99]:nth-child(4) { -webkit-transform: scale(1.1) rotateZ(180deg); transform: scale(1.1) rotateZ(180deg); } .sk-folding-cube > div[data-v-39432f99]:nth-child(3) { -webkit-transform: scale(1.1) rotateZ(270deg); transform: scale(1.1) rotateZ(270deg); } .sk-folding-cube > div[data-v-39432f99]:nth-child(2)::before { -webkit-animation-delay: 0.3s; animation-delay: 0.3s; } .sk-folding-cube > div[data-v-39432f99]:nth-child(4)::before { -webkit-animation-delay: 0.6s; animation-delay: 0.6s; } .sk-folding-cube > div[data-v-39432f99]:nth-child(3)::before { -webkit-animation-delay: 0.9s; animation-delay: 0.9s; } @-webkit-keyframes sk-foldCubeAngle { 0%, 10% { -webkit-transform: perspective(140px) rotateX(-180deg); transform: perspective(140px) rotateX(-180deg); opacity: 0; } 25%, 75% { -webkit-transform: perspective(140px) rotateX(0deg); transform: perspective(140px) rotateX(0deg); opacity: 1; } 90%, 100% { -webkit-transform: perspective(140px) rotateY(180deg); transform: perspective(140px) rotateY(180deg); opacity: 0; } } @keyframes sk-foldCubeAngle { 0%, 10% { -webkit-transform: perspective(140px) rotateX(-180deg); transform: perspective(140px) rotateX(-180deg); opacity: 0; } 25%, 75% { -webkit-transform: perspective(140px) rotateX(0deg); transform: perspective(140px) rotateX(0deg); opacity: 1; } 90%, 100% { -webkit-transform: perspective(140px) rotateY(180deg); transform: perspective(140px) rotateY(180deg); opacity: 0; } } .sk-wordpress > div[data-v-39432f99] { width: 27px; height: 27px; background-color: currentColor; display: inline-block; border-radius: 27px; position: relative; -webkit-animation: sk-inner-circle 1s linear infinite; animation: sk-inner-circle 1s linear infinite; } .sk-wordpress > div[data-v-39432f99]::after { content: ''; display: block; background-color: #fff; width: 8px; height: 8px; position: absolute; border-radius: 8px; top: 5px; left: 5px; } @-webkit-keyframes sk-inner-circle { 0% { -webkit-transform: rotate(0); } 100% { -webkit-transform: rotate(360deg); } } @keyframes sk-inner-circle { 0% { transform: rotate(0); -webkit-transform:rotate(0); } 100% { transform: rotate(360deg); -webkit-transform:rotate(360deg); } } .ball-triangle-path > div[data-v-39432f99], .ball-scale-ripple-multiple > div[data-v-39432f99], .ball-scale-ripple > div[data-v-39432f99] { background-color: initial; border-color: currentColor; } .ball-clip-rotate > div[data-v-39432f99] { background-color: initial; border-top-color: currentColor; border-right-color: currentColor; border-left-color: currentColor; } .ball-clip-rotate-pulse > div[data-v-39432f99]:first-child { background-color: currentColor; } .ball-clip-rotate-pulse > div[data-v-39432f99]:last-child { background-color: initial; border-top-color: currentColor; border-bottom-color: currentColor; } .ball-clip-rotate-multiple > div[data-v-39432f99]:first-child { background-color: initial; border-right-color: currentColor; border-left-color: currentColor; } .ball-clip-rotate-multiple > div[data-v-39432f99]:last-child { background-color: initial; border-top-color: currentColor; border-bottom-color: currentColor; } .triangle-skew-spin > div[data-v-39432f99] { background-color: initial; border-bottom-color: currentColor; } .pacman > div[data-v-39432f99]:nth-child(1), .pacman > div[data-v-39432f99]:nth-child(2) { background-color: initial; border-top-color: currentColor; border-left-color: currentColor; border-bottom-color: currentColor; } .pacman > div[data-v-39432f99]:nth-child(3), .pacman > div[data-v-39432f99]:nth-child(4), .pacman > div[data-v-39432f99]:nth-child(5) { background-color: currentColor; } /*# sourceMappingURL=Spinner.vue.map */";e.type="text/css",e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n)),t.appendChild(e)}}(),{render:function(){var t,e,n,r=this,a=r.$createElement,i=r._self._c||a;return""!==r.loading.className?i("div",{class:[(t={"sk-fade-in":"full"===r.fadeIn&&!r.noFadeIn,"sk-fade-in-half-second":"half"===r.fadeIn&&!r.noFadeIn,"sk-fade-in-quarter-second":"quarter"===r.fadeIn&&!r.noFadeIn},e=r.className,n=!!r.className,e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t),"sk-spinner",r.loading.className],style:r.style},r._l(r.loading.divCount,(function(t,e){return i("div",{key:e})}))):r._e()},staticRenderFns:[],_scopeId:"data-v-39432f99",name:"Spinner",props:{name:{type:String,default:"three-bounce"},color:{type:String,default:""},noFadeIn:{type:Boolean,default:!1},fadeIn:{type:String,default:"full"},className:{type:String,default:""},width:{type:String,default:""},height:{type:String,default:""}},data:function(){return{allSpinners:n.allSpinners}},computed:{loading:function(){var t=this.allSpinners[this.name];if(void 0!==t){var e=void 0!==t.className?t.className:this.name;return Object.assign({},t,{className:e})}return{className:"",divCount:0}},style:function(){return(""!==this.color?"color: "+this.color+";":"")+(""!==this.width?"width: "+this.width+"px;":"")+(""!==this.height?"height: "+this.height+"px;":"")}}}}))},f069:function(t,e,n){"use strict";var r=n("1c0b"),a=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)};t.exports.f=function(t){return new a(t)}},f183:function(t,e,n){var r=n("d012"),a=n("861d"),i=n("5135"),o=n("9bf2").f,s=n("90e3"),c=n("bb2f"),l=s("meta"),u=0,f=Object.isExtensible||function(){return!0},d=function(t){o(t,l,{value:{objectID:"O"+u++,weakData:{}}})},p=function(t,e){if(!a(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,l)){if(!f(t))return"F";if(!e)return"E";d(t)}return t[l].objectID},h=function(t,e){if(!i(t,l)){if(!f(t))return!0;if(!e)return!1;d(t)}return t[l].weakData},m=function(t){return c&&v.REQUIRED&&f(t)&&!i(t,l)&&d(t),t},v=t.exports={REQUIRED:!1,fastKey:p,getWeakData:h,onFreeze:m};r[l]=!0},f4a9:function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};e.__esModule=!0;var i=a(n("d2dc")),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.getTokenizerConfig=function(){return{reservedWords:s,reservedTopLevelWords:c,reservedNewlineWords:u,reservedTopLevelWordsNoIndent:l,stringTypes:['""',"''","``","[]"],openParens:["("],closeParens:[")"],indexedPlaceholderTypes:["?"],namedPlaceholderTypes:[":"],lineCommentTypes:["--"],specialWordChars:["#","@"]}},e}(i["default"]);e["default"]=o;var s=["ABS","ACTIVATE","ALIAS","ALL","ALLOCATE","ALLOW","ALTER","ANY","ARE","ARRAY","AS","ASC","ASENSITIVE","ASSOCIATE","ASUTIME","ASYMMETRIC","AT","ATOMIC","ATTRIBUTES","AUDIT","AUTHORIZATION","AUX","AUXILIARY","AVG","BEFORE","BEGIN","BETWEEN","BIGINT","BINARY","BLOB","BOOLEAN","BOTH","BUFFERPOOL","BY","CACHE","CALL","CALLED","CAPTURE","CARDINALITY","CASCADED","CASE","CAST","CCSID","CEIL","CEILING","CHAR","CHARACTER","CHARACTER_LENGTH","CHAR_LENGTH","CHECK","CLOB","CLONE","CLOSE","CLUSTER","COALESCE","COLLATE","COLLECT","COLLECTION","COLLID","COLUMN","COMMENT","COMMIT","CONCAT","CONDITION","CONNECT","CONNECTION","CONSTRAINT","CONTAINS","CONTINUE","CONVERT","CORR","CORRESPONDING","COUNT","COUNT_BIG","COVAR_POP","COVAR_SAMP","CREATE","CROSS","CUBE","CUME_DIST","CURRENT","CURRENT_DATE","CURRENT_DEFAULT_TRANSFORM_GROUP","CURRENT_LC_CTYPE","CURRENT_PATH","CURRENT_ROLE","CURRENT_SCHEMA","CURRENT_SERVER","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_TIMEZONE","CURRENT_TRANSFORM_GROUP_FOR_TYPE","CURRENT_USER","CURSOR","CYCLE","DATA","DATABASE","DATAPARTITIONNAME","DATAPARTITIONNUM","DATE","DAY","DAYS","DB2GENERAL","DB2GENRL","DB2SQL","DBINFO","DBPARTITIONNAME","DBPARTITIONNUM","DEALLOCATE","DEC","DECIMAL","DECLARE","DEFAULT","DEFAULTS","DEFINITION","DELETE","DENSERANK","DENSE_RANK","DEREF","DESCRIBE","DESCRIPTOR","DETERMINISTIC","DIAGNOSTICS","DISABLE","DISALLOW","DISCONNECT","DISTINCT","DO","DOCUMENT","DOUBLE","DROP","DSSIZE","DYNAMIC","EACH","EDITPROC","ELEMENT","ELSE","ELSEIF","ENABLE","ENCODING","ENCRYPTION","END","END-EXEC","ENDING","ERASE","ESCAPE","EVERY","EXCEPTION","EXCLUDING","EXCLUSIVE","EXEC","EXECUTE","EXISTS","EXIT","EXP","EXPLAIN","EXTENDED","EXTERNAL","EXTRACT","FALSE","FENCED","FETCH","FIELDPROC","FILE","FILTER","FINAL","FIRST","FLOAT","FLOOR","FOR","FOREIGN","FREE","FULL","FUNCTION","FUSION","GENERAL","GENERATED","GET","GLOBAL","GOTO","GRANT","GRAPHIC","GROUP","GROUPING","HANDLER","HASH","HASHED_VALUE","HINT","HOLD","HOUR","HOURS","IDENTITY","IF","IMMEDIATE","IN","INCLUDING","INCLUSIVE","INCREMENT","INDEX","INDICATOR","INDICATORS","INF","INFINITY","INHERIT","INNER","INOUT","INSENSITIVE","INSERT","INT","INTEGER","INTEGRITY","INTERSECTION","INTERVAL","INTO","IS","ISOBID","ISOLATION","ITERATE","JAR","JAVA","KEEP","KEY","LABEL","LANGUAGE","LARGE","LATERAL","LC_CTYPE","LEADING","LEAVE","LEFT","LIKE","LINKTYPE","LN","LOCAL","LOCALDATE","LOCALE","LOCALTIME","LOCALTIMESTAMP","LOCATOR","LOCATORS","LOCK","LOCKMAX","LOCKSIZE","LONG","LOOP","LOWER","MAINTAINED","MATCH","MATERIALIZED","MAX","MAXVALUE","MEMBER","MERGE","METHOD","MICROSECOND","MICROSECONDS","MIN","MINUTE","MINUTES","MINVALUE","MOD","MODE","MODIFIES","MODULE","MONTH","MONTHS","MULTISET","NAN","NATIONAL","NATURAL","NCHAR","NCLOB","NEW","NEW_TABLE","NEXTVAL","NO","NOCACHE","NOCYCLE","NODENAME","NODENUMBER","NOMAXVALUE","NOMINVALUE","NONE","NOORDER","NORMALIZE","NORMALIZED","NOT","NULL","NULLIF","NULLS","NUMERIC","NUMPARTS","OBID","OCTET_LENGTH","OF","OFFSET","OLD","OLD_TABLE","ON","ONLY","OPEN","OPTIMIZATION","OPTIMIZE","OPTION","ORDER","OUT","OUTER","OVER","OVERLAPS","OVERLAY","OVERRIDING","PACKAGE","PADDED","PAGESIZE","PARAMETER","PART","PARTITION","PARTITIONED","PARTITIONING","PARTITIONS","PASSWORD","PATH","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","PIECESIZE","PLAN","POSITION","POWER","PRECISION","PREPARE","PREVVAL","PRIMARY","PRIQTY","PRIVILEGES","PROCEDURE","PROGRAM","PSID","PUBLIC","QUERY","QUERYNO","RANGE","RANK","READ","READS","REAL","RECOVERY","RECURSIVE","REF","REFERENCES","REFERENCING","REFRESH","REGR_AVGX","REGR_AVGY","REGR_COUNT","REGR_INTERCEPT","REGR_R2","REGR_SLOPE","REGR_SXX","REGR_SXY","REGR_SYY","RELEASE","RENAME","REPEAT","RESET","RESIGNAL","RESTART","RESTRICT","RESULT","RESULT_SET_LOCATOR","RETURN","RETURNS","REVOKE","RIGHT","ROLE","ROLLBACK","ROLLUP","ROUND_CEILING","ROUND_DOWN","ROUND_FLOOR","ROUND_HALF_DOWN","ROUND_HALF_EVEN","ROUND_HALF_UP","ROUND_UP","ROUTINE","ROW","ROWNUMBER","ROWS","ROWSET","ROW_NUMBER","RRN","RUN","SAVEPOINT","SCHEMA","SCOPE","SCRATCHPAD","SCROLL","SEARCH","SECOND","SECONDS","SECQTY","SECURITY","SENSITIVE","SEQUENCE","SESSION","SESSION_USER","SIGNAL","SIMILAR","SIMPLE","SMALLINT","SNAN","SOME","SOURCE","SPECIFIC","SPECIFICTYPE","SQL","SQLEXCEPTION","SQLID","SQLSTATE","SQLWARNING","SQRT","STACKED","STANDARD","START","STARTING","STATEMENT","STATIC","STATMENT","STAY","STDDEV_POP","STDDEV_SAMP","STOGROUP","STORES","STYLE","SUBMULTISET","SUBSTRING","SUM","SUMMARY","SYMMETRIC","SYNONYM","SYSFUN","SYSIBM","SYSPROC","SYSTEM","SYSTEM_USER","TABLE","TABLESAMPLE","TABLESPACE","THEN","TIME","TIMESTAMP","TIMEZONE_HOUR","TIMEZONE_MINUTE","TO","TRAILING","TRANSACTION","TRANSLATE","TRANSLATION","TREAT","TRIGGER","TRIM","TRUE","TRUNCATE","TYPE","UESCAPE","UNDO","UNIQUE","UNKNOWN","UNNEST","UNTIL","UPPER","USAGE","USER","USING","VALIDPROC","VALUE","VARCHAR","VARIABLE","VARIANT","VARYING","VAR_POP","VAR_SAMP","VCAT","VERSION","VIEW","VOLATILE","VOLUMES","WHEN","WHENEVER","WHILE","WIDTH_BUCKET","WINDOW","WITH","WITHIN","WITHOUT","WLM","WRITE","XMLELEMENT","XMLEXISTS","XMLNAMESPACES","YEAR","YEARS"],c=["ADD","AFTER","ALTER COLUMN","ALTER TABLE","DELETE FROM","EXCEPT","FETCH FIRST","FROM","GROUP BY","GO","HAVING","INSERT INTO","INTERSECT","LIMIT","ORDER BY","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","UPDATE","VALUES","WHERE"],l=["INTERSECT","INTERSECT ALL","MINUS","UNION","UNION ALL"],u=["AND","CROSS JOIN","INNER JOIN","JOIN","LEFT JOIN","LEFT OUTER JOIN","OR","OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN"]},f4d6:function(t,e,n){var r=n("ffd6"),a=1/0;function i(t){if("string"==typeof t||r(t))return t;var e=t+"";return"0"==e&&1/t==-a?"-0":e}t.exports=i},f5df:function(t,e,n){var r=n("00ee"),a=n("c6b6"),i=n("b622"),o=i("toStringTag"),s="Arguments"==a(function(){return arguments}()),c=function(t,e){try{return t[e]}catch(n){}};t.exports=r?a:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=c(e=Object(t),o))?n:s?a(e):"Object"==(r=a(e))&&"function"==typeof e.callee?"Arguments":r}},f5f2:function(t){t.exports=JSON.parse('{"amp":"&","apos":"\'","gt":">","lt":"<","quot":"\\""}')},f608:function(t,e,n){var r=n("6747"),a=n("ffd6"),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;function s(t,e){if(r(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!a(t))||(o.test(t)||!i.test(t)||null!=e&&t in Object(e))}t.exports=s},f772:function(t,e,n){var r=n("5692"),a=n("90e3"),i=r("keys");t.exports=function(t){return i[t]||(i[t]=a(t))}},f7c2:function(t,e){function n(t,e){var n={};"string"===typeof e&&(e=[].slice.call(arguments,1));for(var r=e.length,a=0;a-1}t.exports=a},fc6a:function(t,e,n){var r=n("44ad"),a=n("1d80");t.exports=function(t){return r(a(t))}},fce3:function(t,e,n){var r=n("d039");t.exports=r((function(){var t=RegExp(".","string".charAt(0));return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)}))},fd03:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};e.__esModule=!0;var a=r(n("acb2")),i="top-level",o="block-level",s=function(){function t(t){this.indent=t,this.indentTypes=[],this.indent=t||" "}return t.prototype.getIndent=function(){return new Array(this.indentTypes.length).fill(this.indent).join("")},t.prototype.increaseTopLevel=function(){this.indentTypes.push(i)},t.prototype.increaseBlockLevel=function(){this.indentTypes.push(o)},t.prototype.decreaseTopLevel=function(){a["default"](this.indentTypes)===i&&this.indentTypes.pop()},t.prototype.decreaseBlockLevel=function(){while(this.indentTypes.length>0){var t=this.indentTypes.pop();if(t!==i)break}},t.prototype.resetIndentation=function(){this.indentTypes=[]},t}();e["default"]=s},fd3a:function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n("8c86");function a(t){Object(r["a"])(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===typeof t&&"[object Date]"===e?new Date(t.getTime()):"number"===typeof t||"[object Number]"===e?new Date(t):("string"!==typeof t&&"[object String]"!==e||"undefined"===typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn((new Error).stack)),new Date(NaN))}},fdbc:function(t,e){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},fdbf:function(t,e,n){var r=n("4930");t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},fe1f:function(t,e,n){"use strict";function r(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}n.d(e,"a",(function(){return r}))},fea9:function(t,e,n){var r=n("da84");t.exports=r.Promise},ffd6:function(t,e,n){var r=n("3729"),a=n("1310"),i="[object Symbol]";function o(t){return"symbol"==typeof t||a(t)&&r(t)==i}t.exports=o}}]); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoianMvY2h1bmstdmVuZG9ycy5hN2Y2MjlhNC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy9qcy9jaHVuay12ZW5kb3JzLmE3ZjYyOWE0LmpzIl0sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7OztBQXFEQTs7Ozs7O0FBMDNHQTs7Ozs7OztBQXlwWUE7Ozs7Ozs7O0FBeThHQTs7Ozs7Ozs7Ozs7OztBQXVnR0E7Ozs7Ozs7Ozs7OztBQWczSEE7Ozs7OztBQWtzSkEiLCJzb3VyY2VSb290IjoiIn0= \ No newline at end of file diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/manifest.json b/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/manifest.json deleted file mode 100644 index fad59a7..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/manifest.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"Clockwork","short_name":"Clockwork","theme_color":"#2786f3","icons":[{"src":"img/icons/apple-touch-icon-180x180.png","sizes":"180x180","type":"image/png"}],"start_url":"/","display":"standalone","background_color":"#fff"} \ No newline at end of file diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/precache-manifest.84f394233edb6bbf15637db0e9e4acd5.js b/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/precache-manifest.84f394233edb6bbf15637db0e9e4acd5.js deleted file mode 100644 index 8bb39e3..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/precache-manifest.84f394233edb6bbf15637db0e9e4acd5.js +++ /dev/null @@ -1,62 +0,0 @@ -self.__precacheManifest = (self.__precacheManifest || []).concat([ - { - "revision": "8d099129fa5ea5174496", - "url": "css/app.515e4027.css" - }, - { - "revision": "611a8f3ac0aa856f4018f676d719c67f", - "url": "img/appearance-auto-icon.png" - }, - { - "revision": "4a9a5b7dee3fc2c7d2a684e63c447b55", - "url": "img/appearance-dark-icon.png" - }, - { - "revision": "2439692fa652a49e5c3d820fd67cdc27", - "url": "img/appearance-light-icon.png" - }, - { - "revision": "bb5196d7b075e39fd6a661ba44aa6a92", - "url": "img/whats-new/5.0/client-metrics.png" - }, - { - "revision": "d78cafd4b6be96deda3eb2e9954b77ab", - "url": "img/whats-new/5.0/clockwork-5.png" - }, - { - "revision": "81a43ef164ad401de937091824436e75", - "url": "img/whats-new/5.0/models-tab.png" - }, - { - "revision": "8289742997480ce6748e3f819b68ca0e", - "url": "img/whats-new/5.0/notifications-tab.png" - }, - { - "revision": "942ad4031f62aac1061c257428b9ad40", - "url": "img/whats-new/5.0/timeline.png" - }, - { - "revision": "6c9e98b21595855028a29014642fee4c", - "url": "img/whats-new/5.0/toolbar.png" - }, - { - "revision": "a403ddd6fac00289df60a70163f8aca5", - "url": "img/whats-new/5.1/database-queries.png" - }, - { - "revision": "5f78ccbaa09abbd6ce825683b6950605", - "url": "index.html" - }, - { - "revision": "8d099129fa5ea5174496", - "url": "js/app.1b17e5e6.js" - }, - { - "revision": "70804b62af80bfb6fd7b", - "url": "js/chunk-vendors.a7f629a4.js" - }, - { - "revision": "7bcaca7d628e3fabb246a02425e072dd", - "url": "manifest.json" - } -]); \ No newline at end of file diff --git a/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/service-worker.js b/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/service-worker.js deleted file mode 100644 index 4ff9b4e..0000000 --- a/source/vendor/itsgoingd/clockwork/Clockwork/Web/public/service-worker.js +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Welcome to your Workbox-powered service worker! - * - * You'll need to register this file in your web app and you should - * disable HTTP caching for this file too. - * See https://goo.gl/nhQhGp - * - * The rest of the code is auto-generated. Please don't update this file - * directly; instead, make changes to your Workbox build configuration - * and re-run your build process. - * See https://goo.gl/2aRDsh - */ - -importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js"); - -importScripts( - "precache-manifest.84f394233edb6bbf15637db0e9e4acd5.js" -); - -workbox.core.setCacheNameDetails({prefix: "Clockwork"}); - -self.addEventListener('message', (event) => { - if (event.data && event.data.type === 'SKIP_WAITING') { - self.skipWaiting(); - } -}); - -/** - * The workboxSW.precacheAndRoute() method efficiently caches and responds to - * requests for URLs in the manifest. - * See https://goo.gl/S9QRab - */ -self.__precacheManifest = [].concat(self.__precacheManifest || []); -workbox.precaching.precacheAndRoute(self.__precacheManifest, {}); diff --git a/source/vendor/itsgoingd/clockwork/LICENSE b/source/vendor/itsgoingd/clockwork/LICENSE deleted file mode 100644 index 54ead01..0000000 --- a/source/vendor/itsgoingd/clockwork/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2013 Miroslav Rigler - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/source/vendor/itsgoingd/clockwork/README.md b/source/vendor/itsgoingd/clockwork/README.md deleted file mode 100644 index 8fd5975..0000000 --- a/source/vendor/itsgoingd/clockwork/README.md +++ /dev/null @@ -1,144 +0,0 @@ -

    - - -

    - -> Clockwork is a development tool for PHP available right in your browser. Clockwork gives you an insight into your application runtime - including request data, performance metrics, log entries, database queries, cache queries, redis commands, dispatched events, queued jobs, rendered views and more - for HTTP requests, commands, queue jobs and tests. - -> *This repository contains the server-side component of Clockwork.* - -> Check out on the [Clockwork website](https://underground.works/clockwork) for details. - -

    - - - - - - - - - - - - - - - - - - - - - - - - -

    - -### Installation - -Install the Clockwork library via [Composer](https://getcomposer.org/). - -``` -$ composer require itsgoingd/clockwork -``` - -Congratulations, you are done! To enable more features like commands or queue jobs profiling, publish the configuration file via the `vendor:publish` Artisan command. - -**Note:** If you are using the Laravel route cache, you will need to refresh it using the route:cache Artisan command. - -Read [full installation instructions](https://underground.works/clockwork/#docs-installation) on the Clockwork website. - -### Features - -#### Collecting data - -The Clockwork server-side component collects and stores data about your application. - -Clockwork is only active when your app is in debug mode by default. You can choose to explicitly enable or disable Clockwork, or even set Clockwork to always collect data without exposing them for further analysis. - -We collect a whole bunch of useful data by default, but you can enable more features or disable features you don't need in the config file. - -Some features might allow for advanced options, eg. for database queries you can set a slow query threshold or enable detecting of duplicate (N+1) queries. Check out the config file to see all what Clockwork can do. - -There are several options that allow you to choose for which requests Clockwork is active. - -On-demand mode will collect data only when Clockwork app is open. You can even specify a secret to be set in the app settings to collect request. Errors only will record only requests ending with 4xx and 5xx responses. Slow only will collect only requests with responses above the set slow threshold. You can also filter the collected and recorded requests by a custom closure. CORS pre-flight requests will not be collected by default. - -New in Clockwork 4.1, artisan commands, queue jobs and tests can now also be collected, you need to enable this in the config file. - -Clockwork also collects stack traces for data like log messages or database queries. Last 10 frames of the trace are collected by default. You can change the frames limit or disable this feature in the configuration file. - -#### Viewing data - -##### Web interface - -Open `your.app/clockwork` to view and interact with the collected data. - -The app will show all executed requests, which is useful when the request is not made by browser, but for example a mobile application you are developing an API for. - -##### Browser extension - -A browser dev tools extension is also available for Chrome and Firefox: - -- [Chrome Web Store](https://chrome.google.com/webstore/detail/clockwork/dmggabnehkmmfmdffgajcflpdjlnoemp) -- [Firefox Addons](https://addons.mozilla.org/en-US/firefox/addon/clockwork-dev-tools/) - -##### Toolbar - -Clockwork now gives you an option to show basic request information in the form of a toolbar in your app. - -The toolbar is fully rendered client-side and requires installing a tiny javascript library. - -[Learn more](https://underground.works/clockwork/#docs-viewing-data) on the Clockwork website. - -#### Logging - -You can log any variable via the clock() helper, from a simple string to an array or object, even multiple values: - -```php -clock(User::first(), auth()->user(), $username) -``` - -The `clock()` helper function returns it's first argument, so you can easily add inline debugging statements to your code: - -```php -User::create(clock($request->all())) -``` - -If you want to specify a log level, you can use the long-form call: - -```php -clock()->info("User {$username} logged in!") -``` - -#### Timeline - -Timeline gives you a visual representation of your application runtime. - -To add an event to the timeline - start it with a description, execute the tracked code and finish the event. A fluent api is available to further configure the event. - -```php -// using timeline api with begin/end and fluent configuration -clock()->event('Importing tweets')->color('purple')->begin(); - ... -clock()->event('Importing tweets')->end(); -``` - -Alternatively you can execute the tracked code block as a closure. You can also choose to use an array based configuration instead of the fluent api. - -```php -// using timeline api with run and array-based configuration -clock()->event('Updating cache', [ 'color' => 'green' ])->run(function () { - ... -}); -``` - -Read more about available features on the [Clockwork website](https://underground.works/clockwork). - -

    - - - -

    diff --git a/source/vendor/league/climate/LICENSE.md b/source/vendor/league/climate/LICENSE.md deleted file mode 100644 index f35299c..0000000 --- a/source/vendor/league/climate/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Joe Tannenbaum - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/source/vendor/league/climate/README.md b/source/vendor/league/climate/README.md deleted file mode 100644 index 3481c88..0000000 --- a/source/vendor/league/climate/README.md +++ /dev/null @@ -1,44 +0,0 @@ -

    CLImate

    - -[![Latest Version](https://img.shields.io/github/tag/thephpleague/climate.svg?style=flat&label=release)](https://github.com/thephpleague/climate/tags) -[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](LICENSE.md) -[![Build Status](https://github.com/thephpleague/climate/workflows/.github/workflows/buildcheck.yml/badge.svg?branch=master)](https://github.com/thephpleague/climate/actions?query=branch%3Amaster+workflow%3Abuildcheck) -[![Coverage Status](https://img.shields.io/scrutinizer/coverage/g/thephpleague/climate.svg?style=flat)](https://scrutinizer-ci.com/g/thephpleague/climate/code-structure) -[![Quality Score](https://img.shields.io/scrutinizer/g/thephpleague/climate.svg?style=flat)](https://scrutinizer-ci.com/g/thephpleague/climate) -[![Total Downloads](https://img.shields.io/packagist/dt/league/climate.svg?style=flat)](https://packagist.org/packages/league/climate) - -Running PHP from the command line? CLImate is your new best bud. - -CLImate allows you to easily output colored text, special formats, and more. - - -## Installation - -The recommended method of installing this library is via [Composer](https://getcomposer.org/). - -Run the following command from your project root: - -```bash -$ composer require league/climate -``` - - -## Usage - -```php -require_once __DIR__ . "/vendor/autoload.php"; - -$climate = new \League\CLImate\CLImate; - -$climate->red('Whoa now this text is red.'); -$climate->blue('Blue? Wow!'); -``` - -_Read more at https://climate.thephpleague.com/_ - - -## Credits - -This library was created by [Joe Tannenbaum](https://joe.codes/). -It is currently maintained and developed by [Craig Duncan](https://twitter.com/duncan3dc). -Much love to [Damian Makki](https://dribbble.com/damianmakki) for the logo. diff --git a/source/vendor/league/climate/src/ASCII/404.txt b/source/vendor/league/climate/src/ASCII/404.txt deleted file mode 100644 index 25cd067..0000000 --- a/source/vendor/league/climate/src/ASCII/404.txt +++ /dev/null @@ -1,6 +0,0 @@ - _ _ ___ _ _ - | || | / _ \| || | - | || |_| | | | || |_ - |__ _| | | |__ _| - | | | |_| | | | - |_| \___/ |_| \ No newline at end of file diff --git a/source/vendor/league/climate/src/ASCII/bender.txt b/source/vendor/league/climate/src/ASCII/bender.txt deleted file mode 100644 index 760c3e3..0000000 --- a/source/vendor/league/climate/src/ASCII/bender.txt +++ /dev/null @@ -1,17 +0,0 @@ - ( ) - H - H - _H_ - .-'-.-'-. - / \ -| | -| .-------'._ -| / / '.' '. \ -| \ \ @ @ / / -| '---------' -| _______| -| .'-+-+-+| -| '.-+-+-+| -| """""" | -'-.__ __.-' - """ \ No newline at end of file diff --git a/source/vendor/league/climate/src/ASCII/failed.txt b/source/vendor/league/climate/src/ASCII/failed.txt deleted file mode 100644 index 19187b6..0000000 --- a/source/vendor/league/climate/src/ASCII/failed.txt +++ /dev/null @@ -1,6 +0,0 @@ - ______ _____ _ ______ _____ - | ____/\ |_ _| | | ____| __ \ - | |__ / \ | | | | | |__ | | | | - | __/ /\ \ | | | | | __| | | | | - | | / ____ \ _| |_| |____| |____| |__| | - |_|/_/ \_\_____|______|______|_____/ \ No newline at end of file diff --git a/source/vendor/league/climate/src/ASCII/fancy-bender.txt b/source/vendor/league/climate/src/ASCII/fancy-bender.txt deleted file mode 100644 index b8e7f8a..0000000 --- a/source/vendor/league/climate/src/ASCII/fancy-bender.txt +++ /dev/null @@ -1,17 +0,0 @@ - ( ) - H - H - _H_ - .-'-.-'-. - / \ -| | -| .-------'._ -| // '.' '. \ -| \\ @ @ / / -| '---------' -| _______| -| .'-+-+-+| -| '.-+-+-+| -| """""" | -'-.__ __.-' - """ \ No newline at end of file diff --git a/source/vendor/league/climate/src/ASCII/passed.txt b/source/vendor/league/climate/src/ASCII/passed.txt deleted file mode 100644 index 0cbc03b..0000000 --- a/source/vendor/league/climate/src/ASCII/passed.txt +++ /dev/null @@ -1,6 +0,0 @@ - _____ _____ _____ ______ _____ - | __ \ /\ / ____/ ____| ____| __ \ - | |__) / \ | (___| (___ | |__ | | | | - | ___/ /\ \ \___ \\___ \| __| | | | | - | | / ____ \ ____) |___) | |____| |__| | - |_| /_/ \_\_____/_____/|______|_____/ \ No newline at end of file diff --git a/source/vendor/league/climate/src/ASCII/php b/source/vendor/league/climate/src/ASCII/php deleted file mode 100644 index 3129ab7..0000000 --- a/source/vendor/league/climate/src/ASCII/php +++ /dev/null @@ -1,6 +0,0 @@ - __ - ____ / /_ ____ - / __ \/ __ \/ __ \ - / /_/ / / / / /_/ / - / .___/_/ /_/ .___/ -/_/ /_/ \ No newline at end of file diff --git a/source/vendor/league/climate/src/ASCII/the-league-big.txt b/source/vendor/league/climate/src/ASCII/the-league-big.txt deleted file mode 100644 index 6515d12..0000000 --- a/source/vendor/league/climate/src/ASCII/the-league-big.txt +++ /dev/null @@ -1,102 +0,0 @@ -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyyyyyyyyyyyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyssoo+/:--...`````````````..--:/++ossyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyso/:-.``` ```.-:/osyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyso/-.`` ``.-/+syhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhso/-`` ``-:osyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhs+:.` `.:+syhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyo:.` `.:oyhhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhy+-` ```.` `:::` `....` `-+yhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhy+-` `+++///. .o+-/o- -o+://++` .:` `-+shhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyo:` :: `oo.``` .o+` /s- `+o` ``. +s` ./. `:oyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhy/. /s. :s+/++. -s/:::/s/ .s/ `/+/` -s: +s` -/-`` ./shhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhys:` ``-//` `o+` .s/````` -s/----o+ .s/` .+o``o+` -s: :s/:++/- `-oyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyo- `:++:-` -s: ``. oo//++/`.+. `/: -++++++- -s/` `o+` -so.```-. .oyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyo. `-` :s:`.:+` /s//++/`.-.``` ```` :+++/+s. -s/:/+/` .oyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhho. .oo- :oo+:. ` `-.`` ``..` .so-` `` `/+++-` .oyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhs- `:` `/s:` -s/`./++. ```..........``` .-/++/ -o+.`-+o/ .shhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhy: ` .oo-`-/o/+o. -o+/-` ``.-/+ossyyyhhyyyyyyhhyyysso+/:.`` `. `+s- `os` -yhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh+` .o+` `:oo+-` `:s: ` `.:+syhhyyso+/::--........--::/+osyyhhys+/.` -y: .oo- -+- `/hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhy- .os/` .+o- ` .:+shhys+/-.` `.-:+syhhso:. `/o+:-/s/` :oo:oo- -shhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhho` `+o--oo-` :o- `-+shhs+:.` ``.` ...` `... `` `.:+shhs+-` -//:.`:ooo- .o/ `+hhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhh: ` -oo-` `:oyhyo:. ``` `.--` `--.` .--.` .--.` .--. ` `:oyhho:` -o+-`-oo` -hhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhy- -o+` -oyhy+-` `.` `.--` `.--` `--.` `--.` .--.` .--. .-.` `-/yhyo-` `. ` .shhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhs` ` `:yhyo-` `.` `.--` `.--` `.--` `--.` `--.` .--.` .--.` .--. `.+yhy/. `ohhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhh+` .+yhs/` `..``.--. `.--` `.--` `.--` `---` `--.` .--.` .--.` .--. ` `:shh+. `+hhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhho .+hho- ``` .--.``.--. `.--` `.--` `.--` `.--` `--.` `--.` .--.` .--.` `.` -ohh+. +hhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhh+` `/yho- ` `--.``.--.``.--.``.--` `.--` `.--` `.--` `--.` `--.` .--.` .--.``..` -ohh/` /hhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhho -yhs: .-.` `--.` .--.``.--.``.--` `... `..````..` `.-.` `--.` .--.` .--.``..` -shy: +hhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhho` `ohy/` `.` `--.` `--.` .--.``.-.` ``...-:://++++++++++//:-..`` `--.` `--.` .--.``.-` `/yho` `ohhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhy` -shs. ` `--.` `--.` `--.``.-. `.-:/++ooooooooooooooooooooooooo+:-```--.` `-.` `.` ..` .shy: `yhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhy- /hh+` `--` `.-.` `--.` `--. `-/+oooooooooooooooooooooooooooooooooso+-``.``````.....--` `.. `/hh/` -yhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhh/ +hy: `` `.--` `.-.` `--.` ``-osoooooooooooooooooooooooooooooooooo+/:--..--::/:::---... ..```` :yho` :hhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhs `+hy- .--. `.--` `.-.` `-- `+soooooooooooooooooooooooooooooooooo/--:--:/+/-..` .` `...` `--.` .yho` shhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhh- ohy- ..``.--` `..` ``...` ``+soooooooooooooooooooooooooooooooo+:-::-:+o:.`.:+o/``.-` `--.` `--.` .yho` -yhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhh+ -/ /hh- .--. ```-/++++++/:-. /soooooooooooooooooooooooooooooooo--/:-/oo-``-+oooooo:``--` `--.` `--.` .yh+` -/ +hhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhh. -ss: :hh: ..``.` -osooooooooos+ -sooooooooooooooooooooooooooooooo/./+.:os:``-osooooooos+-`.--` `.--` `--. :hh/ -ss/` `hhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhho ..---/ooos/.```` `hh+ .--. -sooooooooooo+`.oooooooooooooooooooooooooooooooo--o:.+so- .+sooooooooooos:``.--` `.--` `-. /hh. ..---/ooos/.```` ohhhhhhhhhhhhhhh -hhhhhhhhhhhhhhh: -osssoooooosooo:` `ohy` `.` .` `ooooooooooooo` osoooooooooooooooooooooooooooos+.:s--oso` :ooooooooooooooos+` `.--` `.--` `` sho` -osssoooooosooo:` -hhhhhhhhhhhhhhh -hhhhhhhhhhhhhhy` -oooooooooo:. -hh: `--.` .sooooooooooo- +sooooooooooooooooooooooooooos/`+s-.ss+` :soooooooooooooooos+` `.--` `.--` -hh: -oooooooooo:. `shhhhhhhhhhhhhh -hhhhhhhhhhhhhh+ /sooooooo. shs` `` `-- .sooooooooos- :`.oooooooooooooooooooooooooooo:`:s-.oso` :soooooooooooooooooos+ `. `.--` `.--` `ohs /sooooooo. /hhhhhhhhhhhhhh -hhhhhhhhhhhhhd- .sooo/+oos- .hd: .--` ` `+oooooooos: -+/``+soooooooooooooooooooooooo.`:..`:/+- -soooooooooooooooooooos- --` `.--` `.-` -dh- `sooo/+oos- -dhhhhhhhhhhhhh -hhhhhhhhhhhhhh. -/-` .-+/ /dh` `---` .soooooos/ -////-`-ooooooooooooooooooooooo.`.::::---``oooooooooooooooooooooos/ `.--` `.--` `` yh+ -/-` .-+/ `hhhhhhhhhhhhhh -hhhhhhhhhhhhhy `ohs .-` `.-- ` .oooooos- ///////.`:ooooooooooooooooooso`-+:``..---`/sooooooooooooooooooooos: ` `.--. `.--` ohs` yhhhhhhhhhhhhh -hhhhhhhhhhhhhs .yh+ `.--` `-. `+sooos/ -///////:.`-+sooooooooooooos+`-//:`+so+` .soooooooooooooooooooooos` --. .--. `.-- /hy. ohhhhhhhhhhhhh -hhhhhhhhhhhhho .hh: . `.--` `. -osoos- ://///////-``/osooooooooos+`://:`+sos: `+oooooooooooooooooooooos/ .--. .--. `.` -hh- ohhhhhhhhhhhhh -hhhhhhhhhhhhho .hh- `--` `.--` -osos: -///////////-``:+ssoooos/`:///`/soso :sooooooooooooooooooooooo``-.` .--. .--. -hh- +hhhhhhhhhhhhh -hhhhhhhhhhhhho .hh- .--. `.--` .+ss+.`:////////////-``-/oss/`:///`/soos- osooooooooooooooooooooos- `--.` `--.` .--` -hh- +hhhhhhhhhhhhh -hhhhhhhhhhhhho .hh: . .--. `.--` `/os/``----://///////:-.`.`////`:soos/` :sooooooooooooooooooooos+ .-` `--.` `--.` .` -hh- ohhhhhhhhhhhhh -hhhhhhhhhhhhhs .yh+ --. .--. `.--` ` ..-:::..:`.//////////..////`:sooos```ooooooooooooooosssooooso. `.--` `--.` `--.` /hh. ohhhhhhhhhhhhh -hhhhhhhhhhhhhy `sho .--.` .--. .--` `-/+oooooos:`-`+..//////:`-////`-sooos:``.++oosssssoo+/:-..``....` `` ``.` `--.` `-- ohs` shhhhhhhhhhhhh -hhhhhhhhhhhhhh` /dh` `` .--.` .--. `.:+oooooooss/.-.`.+s/.-::/-`:////.-oooooo`-`--..``......---:::--.....`` `--.` ` yh+ `hhhhhhhhhhhhhh -hhhhhhhhhhhhhd- .hd- `-.` `--.` ```:+oooooooso+:.-..://.-oo. ` ./////..ooooos--.`..```..........-::/+++oooooo++/:.` `--. -hd- .hhhhhhhhhhhhhh -hhhhhhhhhhhhhh+ sho` `--.` `-- -ooooosso+/:-.-.-://///-.+s: -/////-.ooooos+`: ``....-:::/++oooooooooooooooooooooo+/.``` `. ohy /hhhhhhhhhhhhhh -hhhhhhhhhhhhhhy` -hh- `--.` -.:+///::--.-..-://///////:`/s/`:///..ooooooo.:.:ooooooooooooooooooooooooooooooooooooos- --` -hh: `shhhhhhhhhhhhhh -hhhhhhhhhhhhhhh- `` `ohs `` `--.``....```-`.-:///////////////`:s/`//.-oooooos-./`osooooooooooooooooooooooooooooooooooos/` `.` shs` ` -hhhhhhhhhhhhhhh -hhhhhhhhhhhhhhho `.-:/+++o` .hh/ .-` `-.`.`::::`+/`/////////////////:`/s-..:sooooos+`+`.++oossooooooooooooooooooooooooooooos+- .-. /hh. `++` -::- +hhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhh. `++:-o/``o: /hh: .-.` ``..-///-.o-./////////////////:`o+.+oooooooo.// `.....-:/++ooosoooooooooooooooooooo/.`` `.. -yh/ :o` -s:-o/ `hhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhh+ -s. -o` .+` `+hy. `.--` -`:///..s:./////////////////`:soooooooos.-o`` `.--` `.....-::/++oooooooooo++:.`` .--. .yho` -o//o- .s: /hhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhy- +/ ` `:/` `ohy. `.--``-`:///.-s:.:///////////////`:sooooooos:.s- --` `.--` `.--` `..````........` `--.``.. .shs` `-``.-. `+/ .yhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhs ``.```++-` `ohy. `.-.`:`////.-s+../////////////:`+ooooooos:`o/ `.--` `.--` `.--` `.-.` `.-.` `--.` .--. .yho` `/+` -` `` ohhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhh: `+///+s:``. `ohy: ````...:.:///.-+s+--://///////-.+soooooos/.++`.-.``.--```.--` `.--` `.-.` `--.` `--.` .` -yho` /s. :o` -o` :hhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhy- .s/:/++. `/hh/` .. ``.:.-///-./oo+:---::::--:ooooooooo:.o+```.--.``.--```.--` `.--` `.--` `--.` `--` :hh+` -/++o/..o: .yhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhy` `/o/` ` //` :yho. `.. `--.:///-./oso++////+oooooooos+--o/`.-.``.--.``.--` `.--` `.--` `.--` `--.` ` `ohy: -/` `..:/+: `shhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhho` .. `:s+` .shy/ `.. .----:/:-.:+oooooooooooooo+:-+o-```.--.``.--.``.--. `.--` `.--` `.--` `.` :yhs. `/+- .++:. ` `+hhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhh+ .-/+/-/o` `:yho- `.. `-:::---.:+oooooooooo+:-:++:``--.` .--.``.--.``.--. `.--` `.--` `.-. -ohy/` /s. ..`+s` +hhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhh/ `++/.` -:- .+hho. `.. `.:/++ooooo++///::-://:.`..` `--.` .--.``.--.``.--. `.--` `.--` ` .+hh+. `/++-.`.o/ /hhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhh+ ` ./+/+/` .+hho- `.` `....``````..----..`..` `--.` `--.` `--.` .--.``.--. `.--. `.` .+hho- `---.``.:+++- /hhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhh+` `:+o+. /s. -+hho:` `` `.--. .-.` .--` `--.` `--.` `--.` `--.` .--.``.--.``..` `-ohho- .s/::/++:` /hhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhho` :/.`++.-+o` ./yhy+. .--. `.--. `.--` `.--` `--.` `--.` `--.` `--.` .-. ./shy+. +o .o//o- +hhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhs. .o+::. ``.-. `:shhs/. ..-. `.--. `.--` `.--` `--.` `--.` `--.` `-. .:shhs:` /:` `++/o- ` .ohhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhy- :: .+++/:o/ `/shhs+-` ` .--. `.--` `.--` `---` `--.` `.` `-+shhs/` `/o- ./o+` .yhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhh+ -+oo:` .s: .:oyhhs/-` `` `...` `.-.` `..` `-/oyhyo:. :o- .so:-` `` /hhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhs. .- `/o:o+` .//:` `.:oyhhyo/:.` `.:/oyhhyo/.` `-/- .+o++.`-/+. .shhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh/` -o+- `+o-.:o/. `.-/osyhhyso+/:--..````````..--:/+osyhhyso/:.` `/o:.` .+o-` `/hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhy- .. -o/` .s: .` `.-/+ossyyhhyyyyyyyyyyhyyysso+/-.` .s: ` ./. -shhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhho. +o. `/o:``+++/-` ``..............`` -/+/-` .o+. `++ .ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhy+` `:++/++. .o+``.+o` `` `` o+`./o/``:o/++:` `+yhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhy+. `... -o++:.-o/``/o//:. .-///++` oo .:+oo` `..` `+yhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhy+. `o- `+o:- /s.`.:s- .:-.` `. :s:` `o/`.oo/-.`/: .+yhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyo-` o/ :s- -s- `+o:.`+/` .` ``` `..... /- :s. +o.-/o: `o+ .oyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhs:` `` -s/.` -s- .s: .oo+ .s. `+++o. `o+:::o/ :o/.`o/ `+s:.` `` `:syhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhy+-` `.://++: `++` /o`+/`:o .o/` :s- o+ `/o` `:+oo` `o/ `-+yhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhs+.` ` -/o/` s/ `o/o/ :s:---s+ /s//+s- +o `` `./shhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhys/-` ``.` `+. `+o. /s----s/ :s. `/+` .: `-/syhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhs+-. `. .- :- `:` .` .-+shhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhys+-.` `-/oyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhys+:.` `.-+oyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhso+:.`` ``.:/oshhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyso+:-.``` ```.-:/osyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyyso++::-..``````````````````..-::/+osyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyyyyyyyssyyyyyyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh diff --git a/source/vendor/league/climate/src/ASCII/the-league-bigger.txt b/source/vendor/league/climate/src/ASCII/the-league-bigger.txt deleted file mode 100644 index 4b13643..0000000 --- a/source/vendor/league/climate/src/ASCII/the-league-bigger.txt +++ /dev/null @@ -1,153 +0,0 @@ -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyyyssooo+++////////////+++ooossyyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyyso+//:-..```` ````..-://+osyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyyo+/:-.`` ``.-:/+osyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyso/:.`` ``.-/+syhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyo+:.` `.:/oyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhhhyo+-.` `.-+oyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhhhyo:.` `.:oshhhhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyo:. .:oyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhhys/.` .:oyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhy+-` `-+yhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhy+- ``.. -++++- .---..`` ./yhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhy/. -//oosssss. `+yo:/sy: .ossoossss+- .. ./yhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh+. /ys:...`` `oyo` -sy+` oy+` ``.:o: `sy/ ./yhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhho- `+s/ -sy- `oyo` `oy+ -sy- +yo` +s: -ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhdy:` :ys. oso/+osys` `sy:`.....:yo` :ys` `o+//- -yy- :ys. .:. :ydhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhds- `. oyo :ys/:--.` `ssssssssssso` +y+ `-:oy/ `oy+ `sy/ -ysys+:. .ohhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhh/` .:oyy: .sy: .sy- `oy/`` -ys` `oyo` -sy- :ys. +yo` .sy/`-/osss- `/hdhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhdy: .-+syo/-` /ys. +y+-:/+ooy: `oy/ -ss` `+ysso+++ss+ `sy/ -sy: -sy/ `-:` :ydhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhdy: /ys/` ` `oy+ `.-:+s- :yoo+/:--.` `---:/+:` /ys/-.` `oy+ .ssoss/-. -sdhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhdy- .:` :ss: `-+sy: -ysosso+/:. -/oossssss. .sy/`.:+sy: -sdhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhdy: `oys- -ssoss+:` :/-.` `.--.` .sy+` ` `:++o+- -sdhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhh:` :sy+` .ss+` `.+: ./osso:.` -syo//oso/. :ydhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhh/` .+: .oss- .sy+`./oss+:` ``......----......``` ``-/osso` `+ys:` `-+ss/ `/hhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhdo. -sy+. ./os+os+` .ossso/-` `..://+ossyyyhhhhhhhhhhhhhhhhyyysso++/:-.` `-- :sy+. /ys. `+dhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhy- `/:` `+ys:-oss/.``+ys:` `/:`` `.-/+osyhhhhhhhhhyyyysssoooooooosssyyyyhhhhhhhhhyso+/-.` /ys: :sy+` `` -sdhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhh+` `/ss/` -osso-` -ss- `.:+syhhhhhhhyso+/:-..`````` ``````.-::++oyyhhhhhhyso:.` /ys. .oys- `:os/` `/hhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdy. `/sy+` `/ss/` `` .:+syhhhhhys+/-.`` ``.-/+oyhhhhhys+:.` `+ss+-```:ss/` `:oy+/ss/. .sdhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhd+` `/ss+os+. -oyo- .-+shhhhhyo+:.` `.-/oyhhhhhs+:. `:osoooso- `:oso-` `/ss/. /hhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhy- `oy/` ./ss+. `/s/` `./shhhhhs+:.` ` `...` `----` .---.` ``` `.:+shhhhhs+-` .::-.` `:osoos/` `/s/ .ydyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdo` `` ./ss+. ` `-+yhhhhyo:. ` .---. .----` .----` `.----` `.---.` .-+yhhhhyo-` `/sso-``/ss/` ` `+dhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhd/ ./ss+. `.+yhhhhs/.` `---.` `----. `----. .----` `.----` `.---.` `..`` `./shhhhy+-` .oo- .+o. :hhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhh- `/so. `/yhhhhs/. .--.` `.---.` `----. `----. .----` .----` `.---.` `.--..` .:shhhhy+. -hhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhy. ` `-ohhhhy/. `.` `.---.` `.---.` `----. `----. `----` .----` `.---.` `.---.` .:shhhhs-` `sdyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyds` `:yhhhho- .----` `.---.` `.---.` `----. `----. `----` .----` `.---.` `.---.` .+yhhhy/` `odhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdo` `/yhhhy/` .--` .----` `.---.` `.---.` `----. `----. `----` .----` .----` `.---.` `` `:shhhh/` +dhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdo `/hhhhs- .----` .----` .----` `.---.` `----. `----. `----` .----` .----` `.---.` `..` -shhhh/` +dhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdo :hhhhs- `---. `----` .----` .----` `.---.` `----. `----. `----` .----` .----` `.---.` `--` .ohhhh/` +dhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhydo -ydhds- ` `----. `----` .----` .----` `.---.` `.---.` `----. `----. `----` .----` .----` `--. .sdhhh: +dhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhydo `odhhy- .--. `----. `----` .----` .----` .---. `.... `....` `--:-. `----` .----` .---.` `-:. -ydhds. +dhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhyds /dhhd/ `.---.` `----. `----. `----` .---. ` ```.....--....``` ```.-. `----` .----` .----` `.:.` :hhhd+ odyhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhyhy` `ydyds` .:-` `.---.` `----. `----. `--.` `.--//+ooosssssssssssssssssoo++/-.` `----` .----` .----` .:. `odhdy. sdyhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhh. :dhhd: .----` .---.` `----. `--:-` `.-:/+oossssoooooooooooooooooooooooooooossso+/-` `----` `--:-` .--.` .:. -hhhd/ `hhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhd: +dyds` `-` .----` .----` `.---.` `` .:+ossssoooooooooooooooooooooooooooooooooooooooooosso+-` `.---` ``` .:` `odydo` -dhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhyd+ `ydhd/ `----` .----` .----` `.-:-` ./ossooooooooooooooooooooooooooooooooooooooooooooooooooosss+. ``.`..``` ``..---::/+- .-` :dhhh. /dyhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhy` .hhhh- ` `----` .----` .----` `. .+ssooooooooooooooooooooooooooooooooooooooooooooooooooosso/-`..--..`.-:++ooo++//:-----` .-` `.` -hhhh- sdyhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhh. -hhhh. .:-. `----` .----` .----` `/ssooooooooooooooooooooooooooooooooooooooooooooooooooss+-`.-/:-`.-/ooo+:-.` ``` .:--` `` `ydhd: `hhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhyd+ -dhhy. `----. `----. .----` .:-` `osooooooooooooooooooooooooooooooooooooooooooooooooosso:`.:+:.`-/oso/-` ` .-. `-:--. `----` `sdhd: :dhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhy` -hhdy` `.` `----. `...` ..---` `` `osooooooooooooooooooooooooooooooooooooooooooooooooss/.`-++-`./oyo:. `./+so- `--. `----. .----` `sdhd: sdhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhd: .` .hhhy` `-:-.` `-.` `.........`` `` `+soooooooooooooooooooooooooooooooooooooooooooooooss/.`:s/.`:oss+-` ./ossooos+. .--.` `----. `----` `sdhd- .` -dhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhds .y+ `yhhh. `.---. `:+osssssssssoo+/:-` /yooooooooooooooooooooooooooooooooooooooooooooooos+. :s+``:oss+. -+ssoooooooss/` `-:-.` `----. `----` `yhhh. .so` odhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhd: -sss/ sdhh- `-` `.-` `/ssoooooooooooooooy+ -sooooooooooooooooooooooooooooooooooooooooooooooss: .ss- -osso- -osooooooooooooss: `---.` `----. `----` .hhhy` -sss/ -hhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhy :sooos/ +dhd/ -:--` `+sooooooooooooooooso` .ssooooooooooooooooooooooooooooooooooooooooooooos+``/y/``+sos/` .+ssooooooooooooooos+` `.---.` `----. `-:-` -dhdo :ssoos/ sdhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhd/ .--::///+sooooos/-..``` -dhdo .--:. /sooooooooooooooooss. `osooooooooooooooooooooooooooooooooooooooooooooss: .oy- -ssss: :ssooooooooooooooooooss- `.---.` `----. `-- +dhd: .--::///+sooooos/-..``` -dhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhh` `/ssssssoooooooossssoooo- `sdhy` .. .-` -sooooooooooooooooss- +sooooooooooooooooooooooooooooooooooooooooooooso. :ss. :soss. `+soooooooooooooooooooooss: `.---.` `----.` .. `sdhy` `/ssssssoooooooossssoooo- `yhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhd+ .+ssooooooooooooooso:` /dhd: `:--` +soooooooooooooooos- `ssooooooooooooooooooooooooooooooooooooooooooos+``+ys. /soss. `osoooooooooooooooooooooooos/ `.---.` `.---.` -dhd+ ./ssooooooooooooooso/` /dhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhd: .+soooooooooooso-` `yhds .----` osooooooooooooooos/ /yoooooooooooooooooooooooooooooooooooooooooos/ `oss. /soss. `osoooooooooooooooooooooooooos/ `.---.` `.---. odhh. .+soooooooooooso:` -dhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhy` -soooooooooos/ /dhd: ` `--:` osoooooooooooooos/ -. `+soooooooooooooooooooooooooooooooooooooooss: .sss. :soss- `osooooooooooooooooooooooooooooy: .` `.---.` `.---.` .hhd+ -yoooooooooos/ sdhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhdo osoooossoooos+ `yhds `--. `-. /yooooooooooooos+ .++. `+soooooooooooooooooooooooooooooooooooooss. ``./- :yssy: `osoooooooooooooooooooooooooooooos. --` `.---.` `.---` odhh. +soooossoooos+ +dhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhd: -yssso+::+ssoso` -dhd/ `----. ` `ssoooooooooooso` `///+. :ssooooooooooooooooooooooooooooooooooso` -/:-.``..:+: /yooooooooooooooooooooooooooooooos+ .:--` `.---.` `.:. -dhd/ .sssso+::+ssoss` -dhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhd- +o/-.` .-+oy- odhh. `----. -sooooooooooss. `/+///+:` .+sooooooooooooooooooooooooooooooooso` `::::::::-...` -sooooooooooooooooooooooooooooooooso` .----` `.---.` `.` `yhds +o/-.` `-+oy- .hhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhh` ` `-. `yhds `-` `----. ` :sooooooooos/ :+///////. .osooooooooooooooooooooooooooooos+``:-``.-::::::/: `osooooooooooooooooooooooooooooooooso` .----` .----` +dhh` ` `-. yhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhs .hhd/ .:-.` `----` ` -ssoooooooy: :+///////+/. -ossooooooooooooooooooooooooos/ `/+/+- ````...-` /yooooooooooooooooooooooooooooooooos+ .. .----` .----` :dhd: odhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhdo /dhd: `.---.` `-:- .osoooooos+ -+/////////+/. ./ssoooooooooooooooooooooos/ `///+: .sso++: .soooooooooooooooooooooooooooooooooos. -:-` .----` .---. -dhd+ +dhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhd+ +dhh. `.---.` `-- :ssooooos- :+//////////+/-` `-ossooooooooooooooooooy: .+//+: `osooos. +sooooooooooooooooooooooooooooooooos/ `----. `----` .-:` `yhdo /dhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhd/ odhy` `-` `.---.` `. `+ssoooss. :+////////////+:. .:ossoooooooooooooos- .+//+/ `osoooy/ :yoooooooooooooooooooooooooooooooooos. `----. `----` .` sdds /dhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhd/ odhy `:--` .----` .+ssooss- -+/////////////+/:. `:ossoooooooooss- .+//+/ +soooso` `osoooooooooooooooooooooooooooooooooy/ .:. `----. `----` sdds :dhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhd/ odhy .----` .----` `/ssoos+` `:+//////////////+/:. `-/ossooooss. -+////` +sooooy: :yoooooooooooooooooooooooooooooooooso` ----. `----. `----` sdds :dhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhd/ odhy .----` .----` `:ssoss: `/+///////////////+//-` `-+osss. -+///+` /yoooos+ `ssoooooooooooooooooooooooooooooooooy- `----. `----. `--:` sdds :dhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhd/ odhy` `. .----` .----` -+ssss:` `:/::://////////////+/:.` `-` :+///+. :yooooss. ` /yooooooooooooooooooooooooooooooooos+ .-` `.---.` `----. `-` sdds :dhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhd+ +dhh. --. `----` .----` `:/--` `.``-/+///////////////. `/+///+. -yoooooy/ ` `ssooooooooooooooooooooooooooooooooss. ----` `.---.` `----. `yhdo /dhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhdo /dhd: .:--. `----` .----` `` `.-://++/- .+. -/+///////////+- `/////+- -ssooooso``. /yoooooooooooooooooooossssssoooooosy- .--:-` `.---.` `.---. .hhd+ +dhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhds -hhd/ `----. `----` .----` `.-/+ossssooooso``+` /. -///////////. .+////+- .ssoooooy- -``ossssssoooooooossssoo/::-..````````. ``` ``.-` `.---.` `.-:. :dhd: odhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhy` `yhdo `----. `----` .-.` .-+ossoooooooooss/``/. :ys/``-+/////+:` :+////+: .ssooooos+ .- ``.-::/++ooooo/:-.`` ``..--:::::---..` `` `.---.` `-. +dhh. shhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhh. odhh` .` `----. `----` ./ossoooooooooooss/.`--````:sss: `-:://- `/+////+: `osoooooos. :``/::-.` `````..-:////:--..``````````` `.---.` `yhds `hhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhd: :dhd: .:.` `----. `-` `:ossoooooooooosss+:`.--``-++:``/ss+` ` -+/////+: `osoooooos/ -: `-..```````.---:---.``````..-://++oooooooo++//:..` `.----` -dhd/ -dhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhdo `yhds `---.` `----. `/ssooooooooossso/:`.---``-//////. -sss- ` `:+/////+: `osooooooss``/` ``..```...```````..-://+oossssssoooooooooooossssso+:.` `` .-:` odhh. /dhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhy` +dhd- `.---.` `-:. .ssoooooosssoo/:...---``-:////////+: `+ss: /+/////+: `+sooooooos: /: `````...--::/+++oossssssooooooooooooooooooooooooooossso+:. `` `. .hhdo sdhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhd- `hhdo `.---.` ` .. /soooooo//-....---.``-:////////////+/` /ss/``/+///+: `osooooooos+ .o `ooooooosssssssooooooooooooooooooooooooooooooooooooooooooss. `:-` +dhh. .hhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhd+ /dhd- `.---.` -+-`......``...-.`..-:///////////////////` /ss+ `///+: `osoooooooss. o: /yoooooooooooooooooooooooooooooooooooooooooooooooooooooooy/ `--:. .hhdo /dhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhy` `.` `yhhy` .` `.---. ``....`````.. `::///////////////////////+. :sy/ `++- .osooooooooy: :o `ssoooooooooooooooooooooooooooooooooooooooooooooooooooooss/` .- sdhh. `` sdhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhd: ``.-/+osy/ :dhd+ --` `.-:` -` :::::/` +s` /+/////////////////////////` /ss- -- -ssoooooooos+ `y- /yssssoooooooooooooooooooooooooooooooooooooooooooooooosso. .-. /dhd/ -so` .-.` -dhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhds .//+oosso/-.+y- odhd: `---` `.- `- .+///+: `so `/////////////////////////+/ `oyo` `:ssooooooooss. oo `..-:/+ooossssooooooooooooooooooooooooooooooooooooooss+- `----` -hhds -yo. `+sooso. odhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhd- -ys:.`.yo` .yo` `yhhh. `----` `` -- :+///+- .y+ `/////////////////////////+- .sy-`osoooooooooos- :y. ...`` ``.-:/++oosssssooooooooooooooooooooooooooss+:` .. `-. `yhhh` `oy. `+y/``-ss. .hhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhds /h- /h/ /h: .hhhy` .----` :. /+///+. :y/ `/+////////////////////////` +soosoooooooooos/ .y/ `----. ``` ``..:/++oossssssssoooooooossssso+:. .:--. sdhd- `oy+..+y+ -yo` odhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhd: `ss. `/. `.` -dhds` .----` `/``//////` /y+``:+//////////////////////+. /yoooooooooooos+ `ss` --` `.---.` `----. ``...-:///++++o++++/:-.` `..` `.---` odhd/ `/+oss/ -sy. .hhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhds` :s: `:+o. :dhds` .----` ./ `//////` +yo. -//////////////////////+` +soooooooooooso` +y: `---.` `.---.` `----. `....` ```` .---.` `-` +dhd/ `/: `` .so. odhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhd/ `oy+-` :dhds` .--:. -/ `////+/` +ys/``:+//////////////////+: .ssooooooooooss` /y/ .---.` `.---.` `----. `-:--. `----` .-:--` .---.` odhd/ +y: ` :dhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhh. .:+o/:.`/y/ :dhdy` ` .-:. :+ `//////` /sso- `:+///////////////+: `osooooooooooss. /y+` .` `.---.` `.---.` `----. `----. `----` .----` .-:- `sdhd/ /y: :y/ .:` `yhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhyds .o:-:ososs:. . -hhhh. `. `:. -+``/+///+. -ssso:``-/+//////////+/- .osooooooooooss. /yo` .:--` .----` `.---.` `----. `----. `----` .----` ` .ydhd: /y+` -yo` `sy- odyhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhyd/ `ss/+ssosy: .hhhd: `-. .. -o. :+///+: `+soss/. .-////////:.``/ssooooooooooss. /yo` .----` .----` `.---.` `----. `----. `----` .----` -hhhd- /+oso+os. `oy- :dhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhd- `+h/ `.-.``- `sdhd+ .:. ` `+: .////+/. .ososso/-.````` `.:ossooooooooooos+``+y+` -. .----` .----` .----` `.---. `----. `----` `-. /dhdy. .-/osso/+y: .hhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhh` .osy+ +h+ /dhhh. .:. :+. -++//+/. -ossoosssooooosssooooooooooooss- .sy/ -:--. `----` .----` .----` `.---.` `----. `----. .ydyd+ -oy- .-+s/ `ydhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhyds --` :yo` .hhhd+ `-:. `:/. .:/+++/. .+ssoooooooooooooooooooooss: `+ys. `----. `----` .----` .----` `.---.` `----. `-:-` /dhhh- `+y+. +y+-` odyhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhydo .:ososs. +dhhh- `-:. :+:. `.--::` `-/osoooooooooooooosss+- .+ys: `-:. `----. `----` .----` .----` `.---.` `----. ` -ydhdo` `oy: `os:/sy/ +dyhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhd+ `-+syo:. `sy- .ydhds. `-:. ./oo+:-----:/+osooooooooosssso/-`.:oyo- `.---. `----. `----. `----` .----` .----` `.-:- .odhdy- -ys` `` .sy. /dhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhd+ :oss+-` `:`. :hhhdo. `.:.` `.:+sssssssssssssssooo+::.``-/oso:.``--` `.---. `----. `----. .----` .----` `.---.` `` `+hhhh/ /sso:. `+y/ :dhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhd+ ./. `:oyo. `+hhhho. .--` `..```..--------..`..---/+++/-.`` .----` `.---.` `----. `----. `----` .----` .-:-` `+hhhdo` `-/oss/-:oy: :dhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhd+ `-+ss/-oy: `+hhhho. `..` `---.. `..---..``` ----` .----` `.---.` `----. `----. `----` .----` `` .+hhhdo. ://::-.` `:+o+/. /dhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhd+ ./sso-` `/yo. .+hhhhs- `` `----. `.-... `.---` .----` .----` `.---.` `.---.` `----. `----` .--.` -ohhhho. .os//++oss+-` /dhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdo` :sso:+y/` `oh/ `+hhhhy/. `.---.` `----. `----. .----` .----` `.---.` `.---.` `----. `----. `:shhhh+. -ys. `+sss+.` +dhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhds` ./. -yo:-+ss/` `:shhhho-` `.---.` `----. `----` .----` .----` `.---.` `.---.` `----.` `..` `-ohhhhy/` :yo` .oy/`-oo. `odhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhy. `/s++o+-` `` `-+hhhhyo-` `.---.` `----. `----. .----` .----` `.---.` `.---.` `---. `-+yhhhho-` -/` /yo-:so. `` .ydyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhh: `oy/` .:/++oso:` `:ohhhhyo:. `...` `.---.` `----. `----` .----` .---.` `.---. ` `-+yhhhhs:` :ss/` ./sss-` -hhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhd+` /: .+so//:..+y/ `:ohhhhho/.` `----.` `----. `----` .----` .---. `` `./oyhhhhs/. `/ss. `:+yo` /dhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhds. `-+sss. `sy. .:oyhhhhyo/.` ```.` `----. `----` .---. `` `.:oyhhhhyo:. .o+. `oy+-`` .. `odhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhh/ :yo..+y+. /y+ `` `./oyhhhhys+:.` ` ```` `.:+syhhhhyo/.` `:ss+``:so//oso+:` :hhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhdo` . .+s/+y+` `:+oo+-` `./oyhhhhhys+/-.`` ``.-/+syhhhhhyo+-` `-/+o. `:osos:` `.:+- `+dhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhh: `-ss+- -sy/--/ss/. `.-+oyhhhhhhhyo+/:--.```` ````.--:/+osyhhhhhhys+:.` `/ss+-.` `:os+. :yhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhds. /y+. `+yo. `:ss. `.-/+osyhhhhhhhhyyysso++++++//++++++ossyyyhhhhhhhhyss+/-.` +h/` `-oy+` .odhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhh+` . -ss: -ss. `-` `.-:/+ossyyhhhhhhhhhhhhhhhhhhhhhhyysso+/:-.` +y+` ` :- `/hhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhy: +h/ `+yo. `oyso:.` ```...-----::::-----....`` ./+/-` :ss: -s+ -ydhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhds- .oso-` `:ss: .sy-`:oss/` /yo:/sso/. `+yo.``-+yo. .sdhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhds. .+ssosy+` :ys. `+h/ `` `` /h: `./sy: -sssss+. .odhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhdo. `--.` /yss/-` :ss. `oyo+:.` `.:/osso- /h: `-+sy/ `..` .odhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhdo. `+y+`.+so+oyo` +y/.:+sss- .osso:.`.oy: :yo.-oss/./yo` .odhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhds- -s/ -y+-. /yo` .sy- /s/:-.` .:` /y+` .sy- :sss:. /:` .odhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhdy: +h: :ys` -ys` `-ss+o. .o/` -:` +h/ +h+ `-+ys` .ss: -sdhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh+` -o. -ys. .sy. +y/ :yso :y/ :++/. `/++oooss+. oh/ +y: +yooso/-` `o:` `/hdhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhds- .sy+-` .sy- :yo os+s+ +y- `oy/:sy: `ss:....:ss. `/ys:` /h+ `oy/ -ohhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhy+. .-/ossoosy: `sy- .yo -h+ .so` -yy- `oy/ +y- oy- `:ss+so` `sy: `/ydhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhy:` .-:. ../y/ /h/ :h+ :h/ .ss. `oy: /y+...-/ss. -sy- .:. `:shhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhs:` `/ooso/ oy. /y/+y- .so+/////oy: -yooo++ss. :yo `-ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhs:` `-. -y+ /yso -yo--::::oy- .ss` -ys. `+/` `-ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhs/. ` :s: -yo `sy- `oy- -o+` .:shhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhy+-` `.` ..` `` `-+shhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhs/-` `-/syhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhys/-` `-/oyhhhhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhs+:.` `.:+syhhhhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhys+:.` `.:+oyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyso/:.`` ``.:/osyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyyo+/:..`` ``..-/+osyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyss++/:-..```` ```..-:/++ssyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyyssso+++////::::::::::::////+++oossyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh diff --git a/source/vendor/league/climate/src/ASCII/the-league-massive.txt b/source/vendor/league/climate/src/ASCII/the-league-massive.txt deleted file mode 100644 index 9805252..0000000 --- a/source/vendor/league/climate/src/ASCII/the-league-massive.txt +++ /dev/null @@ -1,255 +0,0 @@ -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyyyyysssooo+++++++//////////++++++++oossssyyyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyyyso++//::--....``` ````....--://++ossyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhhhhhhhhhhyyysoo+/::--..`` ``..---://oooyyyhhhhhhhhhhhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyyso++::-..``` ```..-::/+osyyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyso+/:-..``` ```..--/+osyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhddhyss/:-.``` ```.-:/osyhhdhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhhhhhhhhyo+--` `.-+oyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhhhhhhhys++--` `.-/+syyhhhhhhhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhhhhyys+/--` `.-/+syyhhhhhyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhhdhhyo+-..` ``.-/+syhddhhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhddhso:-``` ```--oshddhhyyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdyy/:.` ``:/syhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhhhhhhso/.` `.:+ohhhhhhhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhhhhyyo/:`` ``:/osyhhhhhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyyhhdhyo+-.` `.-+oyhhhhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyyhhdhh+/.`` ``./+yhdhhyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdhy+-.` `..---.. ` `-+sydhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhso-.` ``````..:::.` `./ossssss:- ``-:///:::--..`` `.-oshhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyyhhhhhso:.` `.--::/+++oooossy:. :+yss+++sss+-` ``/+ssyssssssssoo:-`` ``` .:+ohhhhhyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyyhhhhy+:`` .+sysssssooo++//:.` ..ssyo+```/oyss:. -/yyso+::://++ossys+. .///.` `:/shhhhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyyhhdhh+/.` ./sys+:-...```` `/oyss-` ..ssyo+` /oys+-` ```.-:s+:` `:syy/- `.:/hhdhhyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhys:-` --/-. `-oys+.` ./oyso-` :/syy:- `.+syo:` `` :+yss.` `-::.` .:oyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhhhhy/:` ``osyo+ `.+syo:` `````` `-osy+: .+syo/ `-oyyo-` +oyo+ -oyy/: `-:yydhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhhhhyo:. /+yss`` `/oys+:-:://+oo+. `:syy:-`````````.:oyo/` `:oys+.` `:::---.` `.ssy+: -/syy-. ````` .-oyhhhhhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyyhhhhy/- .:syy:- :+ssossssssssoo-` `-sss++/////////++sso/` ./syo/ `.yyyssys+. -/yys-` +oyso`` :+so/-.`` -:yyhhhyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyyhhdhs:- `.` .osyo: -:yss+/::---..`` `-sssssssssssssssssso/` .+sy+: `--:+oys/. `/oys+. ``ssy+/ `-oyssyss+/:-. .:oyhhhyyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyyhhdhh/:` `.-/+s+-` `:oys+.` .-yys/- `-oss+/----------/oys/` `-osy/: `+syo:` `-oyyo-` .:yys/- `-osy++:+osssso//-.` `-:yhdhhyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdhy/- `-:+ossyso:` `+sys/. `.ssy+: ``` `-oyy/- `-oys+` -osyo+-` .:osyo-` ./syo/` :+yso- :/yys-.```-:+osyyy+: .:shdhhyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhddo/` ``:/ossyso+/.`` :+yso-` osyo/``.--::://s+:` `-syh/- `-shy+.` `.+ssso++//:::/+ssss/` `-ssy/- `.+sys/. ``ssyo+ `../+o:. `/oddhhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhhhho/ .:osssso+:-` .-yyy/- ``.` /+yssoosssyyyysyo:` ./++-. `.:/:-` .-oosssyyyyysssoo.` `-ssy+:` ./oys+.` :/yys+/.`` :+hhhhhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhhdyo:` ./syso/.` `` osyo+ ``..-:/+so-` :/ysooo++//:---..` `.----:://+/:.` ./oyso/--..`` `-osy+: `.+sssossso/:-`` `-oydhhhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhdys.. `` `/oyso-` .-:+o.` /+yso::/+osssssso:` `.-..````` ``` `/+ssyssoo+/:/+ssy:- .+syo+-:/ssssso+-` `.osdhhyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyyhhdho-. `.:+o.` ..ssy+/``.:/osyyy:- .:ssssssss++/:-..` ``-:/++sssssyyyso`` -/syy:- ``.-:+oyo-` `-+ydhhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhdd+:` .:yyyo/` /+yso++oyyss+:-` .+os/:-..`` ```..-////:.. `osyo+` ``-. ``::://-. `:/ddhhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyyhhdo/ `-osyso-` .osssso+/.` `` -/yyso+-.`` `-osyyyyyyso:. -+hhhyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhhs:` -:ssyo+`` `.+sss+. `..+/:` .-++osssso/:..` -:ssyo+///osyss/:. `-shhhyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhhh:. ..` :/ssy/:` -/yss/- ``-:/osyso-` `.::+ossyso/:-` `.ssyso..` -:+sssso:. .-yhdhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyydhh/- -:so+. `-ossso/. ``osyso..-/+ssyss/:.` ```..---::::::::::::::::::::---..```` `.-:/osyss`` `.+oyss:. `-:ssyoo ./yhdyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyyhdhs-` :/yys+/ .-oossssss+/ .:sssossyyo+:-.` ``..-::/++oosssyyhhhhhhhhhhhhhhhhhhhhhhhhhhyysssoo++/::-..`` `.-/:: .:osys+.` /+yss`` `.oydhyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhhh.` ` /+yyy/- `-+ssyso:-/+syy:- .:syss+:-`` ```..-:/+oyyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyyoo+::..``` ``ossss-. /+yss.` ``yhdhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyyhhh/- `./::` `-+syso:--osyss/:.` `-osyso-` `:/:-` ``..::++ssyhhhhhhhhhhhhhhhhhhhhhyyyyyysssoooooooooossssyyyyyhhhhhhhhhhhhhhhhhhhhhyyso+/:..``` -/yys/- -:ssyo+ ``` ./yhdhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhhs-` ``/oyss.` `/ossossso+:- `./oyys/- `..-//osyhhhhhhhhhhhhhhhyyssooo///::-----....`````````````...-----::://+oossyyhhhhhhhhhhhhhhhyss+/-..` :+yso- `-osyso-` `./++.` `.oydhyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhhh-. `./+yys/:`` `.oosss+:` `.oos/- .-:/+yyhhhhhhhhhhhhyyss++/::-..```` ```..-:::++osyyhhhhhhhhhhhhyy++:-. -/yys/- -/ssyo/.` ``/+syyo/.` .-hhdhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyyhhd+: -/osyo/.` .-osyo+-` ...` `.:/+yyhhhhhhhhdhhyyo+/:-..``` ``..--/+osyhhddhhhhhhhyyo+:.` `.ssyss/:` .-ssyso.` `./osssooyss/- -/hhhyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhdy/. -:sssss+:` `.+oyss:. ``.:/syhhhhhhhhdhyss+/-.``` ```.-//ssyhdhhhhhhhhyy+/-`` .-+sssso/---:+oyso:. -/sssso-.`/oyss/-` `:sdhhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhdd+: `./ossooosso+-` ..ssyso.` `.-+oyhhhhhhhhhhss+/-.``` ``.-:/oshhhhhhhhhhyso--`` `-:ossssssssss+.` `-:sssoo-. `./osyo/-` -/dhhhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdyo ``+oyss:-.:/ssyoo.` -/syyo/` ``-:oyhdhhhhhhhyy+/:.` ````` ``.....`` `...````` `.-/+syhhhhhhhdhyo/:`` .-/oooo+++-. `./osssso+`` -:ssyo+ +sdhhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyydhs-` ``oos/- :/ssys+-` `:+o:- `.:+shhdhhhhhhho+:.` ``` `.-----.. `.-:::--.` `.--:----`` ``..````` `.:/+yhhhhhhdhhso:.. `..`` `.+oyss++osyo/.` -:o/: -ohdhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyyhdho.` `..` `-+oyys+/` `` -:syhhhhhhhhys+:-`` `.-----.` `.-:-----`` `.-:----.` ``--:----.` ``------..` `--/syhhhhhhhhys:-` `-+oyys+:``./oyyo:- .` `+ydhyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhhh-. `.+oyss+:` -/oyhhhhhhhhs+/..` ``...` ``--:----`` `.-------`` `.-------`` ``.------.` ``--:---.. ``` `./+syhhhhhhhys/: -/ssys+-` `.+oyyy-. `.hhhhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdo/ `-/osss+-. ``/+hhhhhhhhyy/:.`` ..-----.` ``-------.` ``-------`` `.------.` `.------.` ..-----..` `....`` `.-:syhhhhhhhh+/.` .:ooo-. `-+oo.` :+dhhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhydhs- `-/ssyss.` ``:+yhdhhhhdys+-` ``..`` ``.------. ``-------. `.------.. `.------.` ..------.` ..------`` --:--..`` `./sydhhhhdhy+/`` ``.. ``` .ohdyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyyhdyo` -/s++`` `.+sddhhhhhho+.` .-:::--` `.------.` `.----:-.` ..----:..` `.------.` `.------.` `-------`` `.--::---`` ``/ohhhhhhdds+-` `+sdhyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhhd-. `.`` ``/+yhdhhhhho+-` `` `.------.. `.------.` ..------.` ..------`` .------.`` `.------.` ``-------.` ``-------`` `-/+hhhhhdhho+`` `.hhhhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdo/ `./ohhhhhdhy+:`` `.----.` `..-----.. `.------.` `.------.` ``-------`` `.-------`` `.-------` ``.------. ``------.. `:/shdhhhhds+-` :odhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyydhy-` :+yhhhhhhdo/.` ..:-----.` .-------`` `.------.` `-------.` ``-------.` ``------.` `.------.` ..------.` `..:----.. `./+hhhhhhhh+/ `-ohdyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhds.` :/dhhhydhh+:` ``.` ``-------`` `.-:-----`` `.-:----- `.-:----. ``--:----. `.------.. `.------.` ..:-----.` .-------` ` `-/yhdhhhdd+: `ohhhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhydd/- `-shdhhhhdo/` ``--::-.` `-----:-.` ``-------`` ``-------` `.----:-.` ..----:-. .-----:.. `.-----:.` `.------.` `-------`` ```. /odhhhhdhy:. -:ddhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhdyy` ..yydhhhhho/ `.----:--` `-----:-. ``------.. `.------.` `.------.` ..------.` .----:--`` .----:-.`` ``-------.` ``-------.` `...` /+hhhhhdhy-. sydhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhd+- `:oydhhhdyo:` ..` `.------.` `.------.` `..-----..` `.------.` `.------.` `-------`` `.-------`` `.-------`` ``.------.` ``------.. `.-..` `-oydhhhhhs:` ./hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyydho. :+hhhhhdys.. `.----.. `.------.` `.------.` ..------`` `.-------`` `--:----.` ``-------.` ``-------` ``------.` `.------.` `..-----..` `.--.` `.oydhhhhho/ .+ydyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhho` -/ddhhhdho-` `.-::---.. `.-:----.` `.------.` ``-------`` `.-:-----`` `.-:----- `--:----. ``--:---.. `.------.. `.------.` ..:-----.` .-:-. `-+hdhhhdd+: `oyhhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdd/- .+ydhhhdd+: ``` ..------`` .-:--:--` -----:-.` ``-----:-.` ``-------`` `.----:--` `.---::-.` ..----:-. .-----:.. `.-----:.` `.------.` `.-:-.` -/ddhhhdho-` .-ddhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdyy /odhhhhdo+ `.---`` `.-------`` `.-------` `.------.` ``-------. `.-----:.. `.-----.`` `....---`` ..---:--`` .----:--`` `-------.` ``-------.` ``---.` /ohhhhhds+`` sydhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhd+: -/dhhhhhy/. --:----.` ``-------`` `.------.` `.------.` ..---::-.` `..-.... ``` `..------`` `.-------`` `.------.` ``.------.` `.--:.` .:shhhhhd+:` -/dhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhydhs- ./ydhhhhd/- ``.------.` ``------.. `.------.. `.------.` ..----..` ```.......-----.......``` ````..-..` ``-------` `.------.` `.------.` `..:--`` .:hhhhhdy+. .ohdyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdy-` :+dhhhhdo/ -.` `.:-----.` `..:-----. `.-:----.` `.-:::::`` ``` ``...-::////+++ooooooooooooooooooo+++///::-..`` ````` ``--:---.. `.------.` `.------.` .-:--` :+dhhhhdo/ `.sdhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhds/ .-dhhhhdy/. `.-::-.. `.------.` ..------.` ..------`` ...`` ````--://++ooossssssssssssssssssssosssssssssssssssssssooo//:--`` ..-----.. `.-:----.` `.------.` `----` `:sdhhhdd:- :+ddyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdd-. `.oyhhhhd+: `.------.` `.------.` ``-------`` `.----:--`` ```..-:://+oosssssssooooooooooooooooooooooooooooooooooooooooooosssssso++/:-``` ..------`` .----:-.`` `------.` ``---.` :/dhhhhhs-` ..hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhdys `-shdhhdyo` ` `.------.`` ``-------.` ``-------.` ``---..` ``.-:/++oosssssssoooooooooooooooooooooooooooooooooooooooooooooooooooooooooosssss++:-.`` `.----:--`` `.-----.` ````` ``---`` +sdhhdhy:` osdhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhd+: +sdhydhs-` `.-`` `.-------`` `.-------` ``-------. ``` `.-:++osssssssoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooosssso+/-.` ``.-----.` ``` ..:-` -ohdyhdyo`` -/dhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhy-` -/ddhhhho.` `.--:--.` ``------.` `.------.` `.------.` ``:/oosssssooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooossssso+:-` `````````````````` ````` ..:.` `+ydhhdd+: -shdyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhdy/. `-shhhhhh-. ``-------. ``------.. `.------.. `.-::-.` `:+ossssoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooosssss+:.` ``.......`````````..-:::////++++ooso:` `` ``.-`` `.hhhhhds:` `:ydhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhho` `-shdhhdo/ ..-----..` `.------.` `.------.` ``.- `/+sssoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooosssso+/-..``..---..`````..-::/++ooooooo+++/////::/:.` ..-` ``-.` :odhhhhy:` `+yhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyddo: /odhydhs- `..` ..------`` .------.` `-------.` `:/sssooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooossso+/:`````:::--.````.-/++ossso++/::--...````` ..:--` ``.`` -ohdyhds+ -/ddyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhd.` ..dhhhhho.` .-::-.` `-------`` `.----:--`` `.----:--` `./syooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooossso+-.```--//:-.```.-/oossso+::-.` ``` ..::--.` `` `oydhhdd:. ``hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhdys `+sdhhdd/- .-:----.` ``-------.` ``-------.` `.---::`` :+ysooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooossso+:.` .:/+/:-``..:+osssoo:-.`` ```` `.---...` `.------.. .-ddhhdyo` osdhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdo/ ./ydhhdys` ``.-------` ``.---::-.` ``------.. `.--- ..sssoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooosss+/.` .-+++:-```-:osyss+/-.` ..` `.-:-.` `.-::---.. `.------.` +sdhydy+. -+dhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh:. `:yhhhhh/. `` `.------.` ..--.--.` `..---::.. ``` :+ssooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooosso+:.``./oo/:.` :/+ssss+:-`` `.:/oo+.` `..::-.` ..------`` `.------.` `:yhhhhh/. `:yhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdho- +sdhydy+. ..:.. `.---::-.` ```..--.`` `-oyooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooossso.` `.oos:-```:+sssss:-` `./+sssssso+` .-:--`` `.-------`` `.-------` `:ydyhdso .+ydyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdy:` ``` `.dhhhhy+` `---::.. `.-..`` ````......``````` ``` .ossooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooso+.` `:oy+: ``-/ssysso:. `-/osssoooooosso/` `.-::-.` ``-------.` ``-------`` /sdhhdd-. ``` `-sdhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhho` .o// /oddydd:- .-------`` `.-:/++ooooooooooo++//:--..`` -/ysoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooosss/- `/+y+/ `:/sssss/:` .-oosssoooooooooosso:. `.:::-.` ``-------. `.------.. .-dhhhds+ .o// `+yhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhdo/ -/yso`` `.shhhdyy` `.----:-- ..+ossssssssssssssssssssssooo+//`` +ossoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooss+/```:/yo:` `-+ossss+/` `.:osssoooooooooooooossoo.` ..:::-.` ..-----..` `.------.. sydhhds-` -/yss`` :+ddyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhydd/- ``ssssy:- .ohdyhd+: `.` ``--:-. `-+ssssooooooooooooooooooooossssso`` `.ssooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooyo/.` .+sy:- ``oosssyo/.` `++sssoooooooooooooooooosso/. `.-:---.` ..------.` .-------` -+dhhdhs- ``osssy:- .:ddhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh.` :+ssosso/` `:hhhhhy- ..:-. ``.` .:sssoooooooooooooooooooooooooosy/: :/ysoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooosy+:` /oh+: `/ossosy/: :+ssooooooooooooooooooooooosso-` .-::---.` ``-------`` `.-:--:-. -shdhhd/. :/ysosss+` ``hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyy `:oyoooooyo/. +sdhydy:` ----:-.` oossoooooooooooooooooooooooooosso- `.+soooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooossoo :/hs/. `-ossosyo+ `-osyoooooooooooooooooooooooooossoo` --:--:-.` `-----:-.` ``-----` `-sdhhdyo `-oyoooooys/. sydhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhds+ ` ```````...-:sssooooosss:.` ``yhhhhy+` ..------.` .-ysooooooooooooooooooooooooooooyo:` ./oyooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooosso-` `:sh+: `+oysosso-` ``+ossooooooooooooooooooooooooooooosy+: `.----:--` `.----:-.` ``-::.. +sdhhhh.` ` ```````...-:sssooooosss:.` /odhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhd+: `-:////+++++oooosooooooooosoo/::--...````` -:ddydd+: `.--::-. :+ssoooooooooooooooooooooooooosso/` `-sssooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooosss+.` -/yss`` -:ysosss+.` :/ysoooooooooooooooooooooooooooooooooso:` `.------.` `.------.` `.-:-` -/ddydd/- `-:////+++++oooosooooooooosoo/::--...````` -/dhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh/. `.+oyssssssssssoooooooooooosssssssooo+++/:` /oddhhh.` ``` ``--:.` `.+soooooooooooooooooooooooooooosy:- /+ysooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooosss-. `.ssy/- `-+sssosy:. `:oyooooooooooooooooooooooooooooooooooosss:- `.------.` ..------.` ...` ``yhhhds+ `.+oyssssssssssoooooooooooossssssoooo+++/:` `:hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhy- `.ooysooooooooooooooooooooooooossssyy+/.` .ohhhdyo `---` ``.` `:oyoooooooooooooooooooooooooossoo` ``ossooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooosy+/ `/oys+. `-ossosso+ .:sssoooooooooooooooooooooooooooooooooooossso`` `.-:----.` `.------.` ```` +sdhhds.` ``ooysoooooooooooooooooooooooooosssyyo/.` -ohdhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdh+. `.+ssooooooooooooooooooooooooosss/:` ./ydhhd+: ..:----`` .+ssoooooooooooooooooooooooooosy/- ``sssooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooss+. .+sys+` /+ysosss:` ``ossooooooooooooooooooooooooooooooooooooooooss+: .-:-----` -------.` -/dhhdy+. `.+osooooooooooooooooooooooooosss/:` ./ydhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdy/. `:/ssooooooooooooooooooooosso/-` -shdhhy:` `.------.. .ossooooooooooooooooooooooooosso- +ossooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooosss/`` :+yyy:- `.sssooyo:` -/ysooooooooooooooooooooooooooooooooooooooooooos+-` `.-------`` `.------.` -yhdhhy- -/ssooooooooooooooooooooosso+-` `:ydhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhds-` `/+ssoooooooooooooooooss+/.` `:hhhdho. `.------.` -ossoooooooooooooooooooooooooyo-` :/ysoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooosss-. ..sssso`` :+ssosso/` `.+sssoooooooooooooooooooooooooooooooooooooooooooss+. `.------.` `.------.` .+hdhhh/. /+ssoooooooooooooooooss++.` `.shhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhho` .:ssooooooooooooooooso/.` :+dhhdy/` `.----:-` .ossooooooooooooooooooooooosso/` ...` `-ossooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooss+/ `/ssss/- `-oyooosy:. .+ssoooooooooooooooooooooooooooooooooooooooooooooosy/- ``` `.------.. `.------.` `-sdhhdo/ .:ysooooooooooooooooso/.` +yhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhds+ :+ysooooooooooooooooyo/. osdhhho.` ...` `.--:-` .+ssooooooooooooooooooooooosy-. //:` `:oyooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooosso-` `/oys+. `-ossoosoo` -/ysooooooooooooooooooooooooooooooooooooooooooooooosso+ `.-.` `.-:----.. `.-:----.` `+yhhdys :+ysooooooooooooooooyo/. /odhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdo/ oossoooooosssoooooooso+. ``yhhhds+ `.-:-.` ``:-.` ./oyooooooooooooooooooooosso+ `.+++-` :+ssooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooosss+.` `` ``::.` /+ysoosy/- `oossoooooooooooooooooooooooooooooooooooooooooooooooooss.` ---.` .-------`` .------` /oddhhh.` +ossoooooosssoooooooss+. :/ddhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdd/: `.sssoosssssooossssooosso. ..hhhdd+: `-:----. ``.` `-oyoooooooooooooooooooooss/- -:+++// ``osssooooooooooooooooooooooooooooooooooooooooooooooooooooooooooosy:- ``/:-.``` :/+oosso-` .-ysooooooooooooooooooooooooooooooooooooooooooooooooooosy:- .-:--`` `.-------`` `.--:-` -/ddhhd-. ``sssoosssssooosssoooosso-` -:ddhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdd:- .:yssssso+/:...:/ssssssss:` -:ddhdd:- ..------.` `/ossooooooooooooooooooss+. `.:+///++-. .:sssoooooooooooooooooooooooooooooooooooooooooooooooooooooooosso+ -://:::--.`````..:--` :+ssoooooooooooooooooooooooooooooooooooooooooooooooooooss+: ..:----.` ``------.`` `.:-.` .-dhhdd/: .-ysssssoo/:...:/ssssssss:. .-dhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhd-. :+yso+/-.` --/oossy/- :+ddhhh.` ..------.` -:ysoooooooooooooooooos+.` .:/+/////+/-` `-+sssooooooooooooooooooooooooooooooooooooooooooooooooooooosss:. `:/::::://:::--..````` `.+sooooooooooooooooooooooooooooooooooooooooooooooooooooosso/` `-------.` `.------.. `.-` ``hhhdds/ :+yso+/-.` .-/+ossy/. `.hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh.` `:/:-.` ../+y/: /sdhhhy`` `.------`` `` ``sssooooooooooooooosso/ .-+/////////+:. .-osssoooooooooooooooooooooooooooooooooooooooooooooooooooyo:` ` `.-:://:::::::::::::.` ./oyooooooooooooooooooooooooooooooooooooooooooooooooooooosso/` ..------.` `..-----..` ``` sydhhy+ :/:-.` ../+s/: ``hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh`` `` ``... `+yhhdyo `.-`` `-------.` `` :/ysooooooooooooooss/- :/+//////////++-. .:ossooooooooooooooooooooooooooooooooooooooooooooooooss+: `/:-` ``.--:::::::::://:` `-ossooooooooooooooooooooooooooooooooooooooooooooooooooooosso/` ..------.` ..------.` +sdhhho` `` ``... yyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyy` .ohhhds+ `.:--` `.------. ``` `-+ssooooooooooooosy:- :/+////////////+/-` `/+sssoooooooooooooooooooooooooooooooooooooooooooosss.` .-++//:.` ```.---::::/:.` -/ssoooooooooooooooooooooooooooooooooooooooooooooooooooooosso/ `` `.------`` `.-------`` /odhhds-` oydhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdys `-sdhhdo/ .-::--.` `.----:`` ` `.+sssooooooooooosy/- :/+//////////////+:- `/+sssooooooooooooooooooooooooooooooooooooooooosy/: `:+///++-. `...````````.` +ossooooooooooooooooooooooooooooooooooooooooooooooooooooooss/- ..-` ``-------.` ``-------`` :+dhhdy:` osdhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdso `:ydhhd+: `.------.` `.-::.. .-sssooooooooooss+: -:+///////////////++:-` `-+osssoooooooooooooooooooooooooooooooooooooss+. .//+//+// `/oss+//:-.` ``sssooooooooooooooooooooooooooooooooooooooooooooooooooooooosy-. --:--` `.----:-.` ``------.. -+dhhdy+. +sdhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhds+ ./ydhhd+- `.------.. `.-:-` :/sssoooooooosso/` `-+/////////////////+//-. `./+sssooooooooooooooooooooooooooooooooosss+.` -:+////+-. `:oysssssys/. -:ysooooooooooooooooooooooooooooooooooooooooooooooooooooooosss`` ------.` `.------.` ..-----` ./hhhdy+. /odhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhds+ .+ydhhh/. `.-------`` `---` .:osssooooooooyo-` `:/+////////////////////-.` ``-/osssoooooooooooooooooooooooooooooosy:- `.++///+/:` `-ossooooos+.` :+ssooooooooooooooooooooooooooooooooooooooooooooooooooooooss+/ `.------.. `.------.` ..-::`` `:yhhdho. /odhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdo+ .ohdhhh:` ``` `.-------`` ``-.. -:sssoooooooss+. `:+////////////////////+/:-. `./+sssoooooooooooooooooooooooooossoo` -/+////+:` :+ysoooosso/ `.+soooooooooooooooooooooooooooooooooooooooooooooooooooooooosy/: `.------.` `.------.` ``-:`` -yhhdho. /odhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdo/ .ohdhhy:` ``:-.` ``------.` `.`` :/yssoooooosy/- .-++////////////////////+++-. `./+ssssooooooooooooooooooooosss:. `-/+///++:- ``sssooooosy:- `:oyooooooooooooooooooooooooooooooooooooooooooooooooooooooosss-` ``` .-:--:-.` `--:----.` ```` -shddhs- :odhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdo/ .ohdhhy- ``:::-. ``-----:.. ` `-+sssooooosss`` :/+//////////////////////++/--` .:+osssooooooooooooooooooyo:` `-+//////+`` :/ysooooosss.` .ossoooooooooooooooooooooooooooooooooooooooooooooooooooooooss/. `.-:`` `.----:--`` `.----:-- -shddhs- :+dhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdo/ .ohdhhy- ``:---:-.` `..----:..` `.oosssooosso/` .:/+//////////////////////+++::.`` .-++sssssooooooooooosso/ //+////+:- `.+ssooooosso+ .:ssooooooooooooooooooooooooooooooooooooooooooooooooooooooooyo-` `--:--.` ``-------` `.------.` -shddhs- :+dhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdo/ .ohdhhy- ..------.` ..------`` `-/osssoooss+.` `-:++///////////////////////+///:.` ``-:/ossssooooooosss.` .-++//////.` .+ssoooooosy/: :+ysoooooooooooooooooooooooooooooooooooooooooooooooooooooosso/` `-------. `.------.. `.------.` -shddhs- :+dhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdo/ .ohdhhy- `-------`` `.-------`` `-:ssssooss+/ ``:/+/////////////////////////////:-. `.-/+ossssoosy+: `://////+/-` .:ssoooooosso-` +ossooooooooooooooooooooooooooooooooooooooooooooooooooooooss/: `..:----..` `.-:----.. `.------`` -shddhs- :+dhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdo/ .ohdhhy- ``--:----.` ``-------` .-osysooss+: `.:/+////////////////////////////++:-.` ```:/+ssyso-` `:/+//////: +ossooooooyo/. `.sssooooooooooooooooooooooooooooooooooooooooooooooooooooooosy-. ..:-----.` .-:-----` --:::`` -shddhs- :+dhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdo/ .ohdhhy- ``` `.-:--:-. `-----:-. -:ssssoyso-` ../++////////////////////////////++//-.` ../:.` -:+/////++.. .-ysooooooooyo-` ` -:ysoooooooooooooooooooooooooooooooooooooooooooooooooooooossoo `... `-------`` ``-------`` `.-:`` -shddhs- :odhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdo+ .ohdhhh:` ``--` `.------.` ..-----..` .-+osssyo+`` ..........-://+////////////////////+//:-.``` `.++/////+// /ossoooooosso/ ` :+ssoooooooooooooooooooooooooooooooooooooooooooooooooooooosy+: .-:-.`` ``-------.` ``-------.` `.`` -yhhdhs- /odhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhds+ .+ydhhh/. ---.` ..------.` ..------`` `-:/:---`` `````--///////////////////////++///-. `-/+//////+-. `-oyoooooooosy/- `` `/sssooooooooooooooooooooooooooooooooooooooooooooooooooooosss:. .------` ``-------.` `.------.. -yhhdho. /odhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhds+ .+ydhhd+- --:--.` `.------.` ``-------`` ``` ```....... .-:-` .-//+////////////////////+++-` `-/+/////+//. `-ossooooooooss.` `. `-oyoooooooooooooooooooooooooooooooooooooooooosssssssssssssys+. `.---::-.` `.------.` `..-----..` .:hhhdho. /odhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdso ./ydhhd+: .-:----.` `--:----.` ``--:----.` ``` `.-::/++oooooooo/: ``o/-` `:/++//////////////////+/.` .-+///////+/.` :/ysooooooossoo ``.. ./oyooooooooooooooooooooooooooooooooossssssssssoooooooooossyo-` ``..-:::.. `.------.` ..------`` -/dhhdy+. +sdhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdys `-sdhhdo/ `.-------`` `.-:-----` `.------. ```-:/+ossssssssosssosss+` +:.` -.```:/+///////////////++.. ``+///////++:- ``sssoooooooosy+: `-```-sssoooooooooooooooooooooooooosssssso++///:-.....````````.... ````` ``.--.. `.------.` ``----:-- :+dhhdy/. +sdhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyy `.ohhhds+ ``-------`` `.------.` ..---::.. ``--/+osssssooooooooooooosy/- `./- ``so/.` .:/+////////////+:: `-/+///////++`` -/ysoooooooooss:. `-` `./++oosssssssssssssssssssssssoo+/:--.```` ``````````````````` ```` ``...`` `-------.` ``--:-. /odhhds-` osdhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhy`` `+yhhdso `.------.` `.------.` ..-..`` `.-/+sssssooooooooooooooossso+```-/.` -:yys+/`` -:++////////+//.` `:/+///////+/: `+sssooooooooss+. ..-` ``..-::://++oooooooooo+//::..` `````..----:::::::::---...`` ``` `.------.` `.-.. +sdhhho.` syhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh.` +sdhhyy ` `.------.. `.------.` ` `-:+ossssooooooooooooooooossso/.``.:-- .-ossss/:` ::+/////++/:` -:+//////////-` ./oyooooooooooyo:` --.` ...```` ``.....---..`` ``..--://////////::----......````` `.------.` ``` sydhhy+` ``yhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhd-. /oddhhh.` `-.` `.-------`` `-----:-.` :/oossssooooooooooooooooosssso-. `.::-` ...` .:ossso+. ``...--::/.` `.++////////+/-` .:sssoooooooooss+`` :- ``+++//::-..` `.--:////////::--...``` `````````````` `.------.` ``yhhdds/ `.hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhd:. -:ddhhd-. `.-:`` `.-------`` `.--.. `./+ssssooooooooooooooooooossso/-. `-::.` ../++:- ``/osss+/ ``` `.:////////////:` +ossoooooooooss+: .-:- `.::---..``` ``.---:://:::--..````` `..--::://++++++ooo++++++/::--.` `.------.` ..dhhdd+: .-dhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdd/- .-dhhdd+: `-:--.` ``-------`` `` `:/osssooooooooooooooooooossso+-.```:::.```-:////++.. `.ossss:- `` `.//+////////++.. .-ssooooooooooosy-. -/-. ````` ``..---------..`````````````..::///+ooosssssssssssssssssssssssssso++/:..`` `.----:-` -:ddhdd:. .:ddhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhddo: ``hhhhds/ `.-----. `.------.. `-/sssooooooooooooooooosssss+/:.``.-::-. ``-:+///////+:.` -/ssss+.` ` ``//+/////////+// /ossoooooooooosss`` :/`` ````...`````.....```` ```````--:://+ooosssssssoooooooooooooooooooooooooooosssssoo+/:``` ``` `.--:-` :oddhhh.` -/ddhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhds/ oydhhho` `.----:-.` `..-----` ./oysoooooooooooooosssssoo/:- ``..:::.```.:/++////////+++-` `:ossso-` -:++//////////+-. `:oyoooooooooooss++ `-// ```````` `````...--::/+++oosssssssssoooooooooooooooooooooooooooooooooooooooooossssoo/-.`` ```` `.-. +yhhhyy /oddhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyo` /odhhdy:` ..------.` .-:.` :/yssooooooooossssssoo+::.. `.--::-.` `.::/++////////////+//`` -/ssso+ -/++////////+/:` `-sssoooooooooooss:. .+:- `````.....---::///++ooooossssssssooooooooooooooooooooooooooooooooooooooooooooooooooooooosssss+/-` `.. `` `.shhhds+ +shhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhds-` ./hhhdho. `.------.` `` ``` +oyssssssssssoo++/:-..```---::-..` ..-////////////////////++:- ``oosss:- ``/////////+/:` +ossooooooooooosso. `-o-` .+++++oooooooosssssssssssooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooosssss:. `-:-.` .+ydhhd+- `.ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdy:` -yhdhhy-` ``-------.` :::` .-/+++++///::-..````..---:-.````.--/////////////////////////+/-` .:ssss+.` -:+/////++.. .-ssoooooooooooooyo:` :/+. .:ysssssssssssooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooosss-` `-:---`` -shdhhy:` `-sdhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdy+. .+ydhhd+- `-------. -/o:-```````````````.------.`````..::/++////////////////////////////.` ./oyss+. `./////+/: `/ossooooooooooooss+.` o+:` /+ysoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooys+. `----:-. ./hhhdho. ./ydhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdhs- `.sdhhds+ `` `.----:-.` `.:::----.......---..`` ``..::/+++///////////////////////////////+// /ossy/- `-/+///.` ./syoooooooooooooss+: ``s/` oossooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooosss+.` ``--:.` /odhhds-` .ohdhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh:. ``..-.` +sdhhhh`` `... `.---:--` ` `````````` --.` .-/++++////////////////////////////////////++.. .-ssso+ `:++/.` -/ssoooooooooooooosy-. -/o/ ``sssooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooosss:. ` ``.` `yyhhhy+` `.. `-yhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhd+- ``.--:/+osy+/ -/ddydd/- `-:.. `.--::.` `-`` `--------:- ooo- `.//+///////////////////////////////////////+/:` +osss.` -::- ``ossoooooooooooooosoo` +s:- -/yysooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooosss/: ``-.` -:ddhdd+: .:ooo`` `` ./dhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdo+ `.-::/+ossyssossso` `.hhhhds+ ..:-.` `--:-. `--. .//+/////+/.` /+h/- `-/+////////////////////////////////////////+/-` -/yyy/- ```` :+ssoooooooooooooosy+/ `-oy`` -:ooosssssssoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooosss+-` `.-:--.` /oddhhd-. `osyso`` `./++//:.` :+dhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdys `.-:++ossyyssso+/-.`-osy.. osdhydy-` `--:--` `--: `-- `./+/////+/:` `:yo+ ://///////////////////////////////////////+//. -osyo/ `:oyooooooooooooooosss:` .ooo ``..-:/++ossysssssooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooossyoo.` `------:`` `.sdhhdys .-yyo-` +oyyyyyyso.` osdhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh`` ./shsso++-:/sy/- `-sh+: ./dhhdhs- ..:----` `..` -:`` -/+//////+-` `:sh-. ..++////////////////////////////////////////+:. `:oys+.` :/ysooooooooooooooooys/. .:h+: ``` `.-::/+oossssssssoooooooooooooooooooooooooooooooooooooooooooooooooooooooosss+:` --:-- .ohdhhd+- :+ho-` .:yyo:.-:+syo/` yhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdd:- `.+ss+.` `+ss+` `+ss+` -shdhhd+- `------.. ` ..:. .-++/////+/: `+yo/` //+///////////////////////////////////////+/: `+syo:-.sssooooooooooooooooss+.` /oy:` `.---..``` `..-:://+ooosssssssssoooooooooooooooooooooooooooooooooooooooosssss+/.` ``---`` `.`` ./hhhdhy- `+ss+` `/oyo:` `.+syo.` .-dhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyddo/ :+yo.` :+hs:` :+hs:` `-sdhhdys `..-----.. `:-```/////////+`` -/hs:` .-+////////////////////////////////////////// :ossooossooooooooooooooooss+: ``ys+. ..-::---.` ``..--::/++ooossssssssssoooooooooooooooooooooooooossssss+/-` --::---` +sdhydy:` `/syo:.``./syo/` `.+yo/` :+ddhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhy+` .:hs/. .-hy+. .-so:` +sdhhhd-. .-------`` ---` -:+/////++-. `.yss:. `-/+//////////////////////////////////////++.` -/sssssooooooooooooooooooss.. -:hs:` `` `.-:----.` `....``` ```..--://++ooosssssssssssssssssssssssssssoo+/--`` `.------.. `.hhhhhy+` -:yyso+/+syy-. ./sh/- +sdhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdy-` ``sss:` ``:-.` ```` .-ddhhds/ `.-------`` `./. `.+///////+:` /oho+ -:++////////////////////////////////////++.` -/ysooooooooooooooooooosso+ `/ss+` ---` `--:----.` ``--:----.` `````..-::///++++ooooooooooo++//:-.``` ``.--. `.-:--::`` /oddydm/- :/ossyyy+/ .:syy.. `.sdhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdho. /oho/ ``.-: osdhydy:` ``-------.` `::: `-/+/////+/:` `-syy/- `//+///////////////////////////////////++.` -/ysoooooooooooooooooooss:. `:sh/: `--:--`` `.-------` `.-:--:-. ``..`` `````````````` `.::----.` .-:-- `-sdhhdys ``` ``.--.` `.syyo/ ./ydyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhy:` -:o:- `.++syy-. ./hhhhhy:` ``------.. `:/`` -/+//////+-. `:oyso:` `-//+///////////////////////////////////` :+ssooooooooooooooooooss+. `-osy.. ``-------`` `.------.` `.------.` `..-----..` ``` ` ```...` `-------`` `.`` `-shdhhd+- `.so/. `.o+/.` -shdhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhd+: :+yys+/.` .+ydyhds+ ..---::.` -::- `.++/////+/: `/osss/- `.:/+///////////////////////////////+/: `/sssoooooooooooooooooos+.` :+yo+ `.------.. `.------.` ..------.` ..--:---`` ..---...`` .-:::--.` ``-------.` /odhhdho. -/hy+. `` -/dhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhdyo `..`` `-oys+.` `oyhhhhd-. ..--:-. ``+/.` :/+/////++.. .-sssss-. `.//+/////////////////////////////+:. `-oyooooooooooooooooooss+: ``ssy/- `.------.. `.------.` `.------`` `-------`` `.-:::---`` ``.-------` ``.------. `.hhhhhho.` `.+ys+` `.-.` +sdhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh`` `.:/+os+/:.. ./sy+: -:ddhhdy+` `` ``--:-.` ::+. `-+////////:` /+ysss+-` `.:/+/////////////////////////+//. `-ossooooooooooooooooosss.` -/yyo- `-.` .-------`` `.-:----.` ``--:----.` ``-------.` ``-------` `.------.` `.-::-- /sdhydd/- ./sh:- `:sy/: `-:`` `yhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhydd+: .:yyoo+ssyso++oss.` osdhydho. ``.`` ``--:.` .+/: `./+/////+/:. `.+sssss+/```.-//+////////////////////++/:` /+ssooooooooooooooooosy+/ `.+syo-` ..:--.` ``-------`` `.-------`` `.-------` `.------. ``------.. `.------.. ..-`` ./ydyhdys` ./yso` `-oyy-. ./sh:- -:ddhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhy+` ``::.``.-/++sssss+/:.````.-`` `:yhhhhd+: `..`` ``--- `./o.` -:++/////+:- ``/osssss+:```.-:/+/////////////////+//`` .-sssooooooooooooooooosso-` .+sy+: .-:----.` ``-------.` ``------.`` `.------.` ..------.` ..-----.. `.------.` -/hhhhhh/. +oyoo..`` :+ho+ .:yss`` +sdhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdy:` `.ossoosssoo/++sy:- `:ydhhhhh.` ``-.` .-`` -:+:```//+/////++.` `.ssssosso:-`` .-/////////////////:.```-+sssooooooooooooooooosso-` -/yss.` ``.------. `.------.. `.------.` ..------.` ..------.` .-------`` .------.` ``yydhhdy/. `+osssso+::ooy:. /oh+/ `-sdhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhydhs- .-yso:.--/oossso+-. :+ddyhds+` ..-.. .`` +//. `-//+/////+:.` .:ossoosss+/.````.--::::::::--.` `./+sssooooooooooooooooooss/- ``ssy+: ` `.------.` ..-----..` `.------.. `.------.` `.------`` `.-------`` `.---::.` `/oddyhdo/ `.-:/oossssso/-.` `.yss-` .ohdyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhd+- :+hs/. `.--.```.-` ``sydhydyo. .-:.` ` `-+/: `.:++///////-. `./ossoossso+/--.`` `````` ``.-:+osssoooooooooooooooooosyo+```:+ys+. `-.. `.------.` ..------.` .-------`` `.------.` ``-------.` ``-------`` ``--.` ./ydhhdhy.` `.-:/oosssoo//+ys:` ./hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhdyo `-:/oss+.` +oy/- .:yhhhhdo+ ``:--` ./+-. `.//+///////.. `.+ossooossssoo++/::::::/++oosssooooooooooooooooooooss+-` ./syo/` .-:--.` `.------.` ``.------`` `.-------`` `.-------`` ``.------.` ``-------. `` /odhhhhh/. `.://`` `..-//oosyyo/` +sdhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh.. `.syyss:- :+yso`` `-shhhhhd:- `.:--` `.+/-``.-//+///////-` `./osssooosssssssssssssssssoooooooooooooooooooooss+/`` :+yss-. .-:----.` `-------.` ``-------.` ``-------`` `.------.` `.------.` ..------.` .-hhhhhdy:` `+osyy-. `` ```.:/+:. `.hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyyddo: ///-. ./sy/: -/ddhhhhs-` `-:-.` .-+::```-:++////++:-```-:ssssooooooooooooooooooooooooooooooooooooosso+`` -:yyy+: `.-------` `.------. ``-------. `.------.. `.------.` ..------.` ..---:-` `.ohhhhdd+: -/yys/:` :/o/-`` `` :/ddyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhds.` .-:osyo-` +odhhhhh/- ``--:.. `://:.` ..::////++/:.` .-+osssoooooooooooooooooooooooooooooosssso/. `./oyyo/` ```` ``-------` `.----:-.` ..----:-.` ..----:..` `.-----:.` `.------.` `--`` ./hhdyhdso `-oys+.` .-yyyyyo+:.` `ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhydho. `.::ossoosss:. .ohdhhhhh-. ``-::.` :/+/:.` ``..---:::.` .-/+oooooooooooooooooooooooooooossso+-. `.+oyss:- ``--:-. `.------.. `.------.` ..------.` ..------`` `.------.`` ``-------.` ` ..yhdhhdhs-` `-osy:- `/oso://syy+/ .+ydyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhd/- ../+osyso/-.:+yo+`` `/odhhhhhs:` `..:--`` `.:/o+/:-..`` ````` ```.-:+osoooooooooooooooooooosssss+/-.```-+oyso:- ``::----.` `..-----.. `.------.` `.------.` ``-------`` `.-------`` ``.------- `-oydhhhds+` :+yso` .-:. ``:/yss`` ./hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhdys .-/ooyss+/..` `-oyh/- ``osdhhhhh+: ..:--`` ``-:+ssso+/////////++ooooooooooooooooooooosssssoo+:-`` .-+oyys/:.` ..------.` .-------`` `.-:----.` `-------.` ``-------.` ``-------` `.-::-. -/hhhhhdys`` -/yss.. `:syy-. +sdhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdd-. `.:/ssyss+/.`` `./o.. `-shdyhhhh:- `--:-` `.-ooyyysssssssssssooooooooooossssssssoo+/:```` .-/syyso:-` `..` ``-------`` `.-:-----`` `.-:----- `--:--:-. ``--:---.. `.------.. ...` .-hhhhydhy:` -osyo+/.` :+yso`` `.hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhdy+` .+yhso/-. `./-. /oddhhhdy/.` --:-. ```` `.:/++oossssssssssssssssoo++//::.. ```.-:+oyys+/.. ``--::-.` ``-----:-.` ``-------`` ``------.` `.----:-.` ..----:-. .-----:.. .:ydhhyhds/` `:/ssyss/:.`` .-yys:. +sdhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhydy/. `.:/.` `--osyso`` +sdhhhhds+`` `.--..` `...`` `...-------------...`````....-:/++ooo++--.` ` ``.----:--` ``.------.` `.------.. `.------.. `.------.` ..------.` .------` ``/odhhhhdso`` .-/osyys+/--:+syo:` `:ydhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh/. -:+syso+syo/` ./yhhhhhds+.` ``---.` ``---..``` ``..--:///////:::-.`` ``..-.` `.------.` `.------.` `..-----..` `.------.. `.------.` `-------`` `..-`` `./odhhhhdy+-` ``.````` `.:/osssssss/: `:hhhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhdyo `-/ssyso-..:+hs+. -:hhdhhdhy+: ``.-`` `.-:----.` ````.....``` ``--:---.. `.------.` ..------.` ..------`` `.-:-----` `--:----.` ``-------.` -/yhdhhhhd/-` `-+ooo+++///:-. `.-:+/:--`` +sdhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdd:. -:ossoo/.` ``osyo/ -/hddyhhhh/: `..`` `.::----.` ``......`` ``------. `.-:----.` `.-:----.` `-------`` `.-------`` `.-:-----` `.-:----- `--::::.` -:hhhhyddh+: `+oyssosssyyyyss/-` `` .-dhhhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhho` `./+yysss+/` `-oyy:- `/sddhhhdhs:. ``` `.------.. ..::::--.` ..:-----.` .----:--`` .-:--:--` -----:-.` ``-----:-.` ``-------`` `.------.` `...` `-ohdhhhhds+.` -:hyo-```..--:/+oyss/:` `+ydhyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyydho- :/syyo+:/+ys/.` `-oyh/- +ohhhhhdhh/:` `.------.. `.------.` `-------`` `.-------`` `.-------` `.------.` ``-------. `.------.. `.------.. `-:yhdhhhhhs+`` .-yss-` :/sssss+:.`` .+ydhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyyhhd+: /+y+/.` `.osy+:`` ..+osss.. `:oydhhhhhyo:- .------.`` ``-------.` ``-------.` ``-------`` `.------.` `.------.` ..-----..` `.------.. `.----.. .:oyhhhhhdys/. +oho/ `-+so+:+oyys:. -/dhhyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhhh.` `.-`` .:sss///+oyso:- `.oshhhhhdhy/:` `.-------`` `.-------`` ``.------. `.------.. `.------.. `.------.` ..------.` .------.`` `..` `-/yhdhhhhdyo-. -/yss.` -/syy-. `.++o-` ``yydhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhds+ -/ssssssss/:.` `.:syddhhhhhy+: ``--:::--` `.------.` `.:-----.` `..:----.. `.-:----.` `.------.` `-------`` `.---::-- :/shhhhhddhs/.` ``.` .+sy+:`..ssy/- ``` /oddhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhdy+. ..sss/-..-.. ````.-:.. ``+shhhhhhhhs+:.` ``..--:-. `.------.. `.------.` ..------`` .-------`` .------.` `-------.` ``-..`` ``-+ohhhhhhhhso.` `+oy+: `./oysoooso-` ./ydhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhd+: `/oys/. ``-://+ooosss+:.` `.-+shhhhhhhhso-.` ``..-..` `.------.` `.------.` ``-------`` `.-------`` `.-------` ``.----:-. `.-oshhhhhhhhso:.` :/ssy/-` `.++ssss+.`` -/hhhyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhhh.` `+so/` `./osssssoo+//ssy/: ``/+yhhhhhhhyyo:-`` ``` `.----:-.`` ``-------.` ``-------.` ``-------`` `.----:-.` `.-..`` ``-:+sydhhhhhhyo/`` `-+sys/.` .:+osso/:` ``yydhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyyhds+` .--. :/sss+/:--.`` /oho+ `.:+yhhhhhhdhho+:.. `.----:--`` ``.------.` ``-------. `.------.. `.------`` `.:+oyhdhhhhhhh+/-` ` .-ssy:. `./+yss`` `/oddyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdho. `-/syyso`` `osy/- -:+sydhhhhhhhys/:.` ````.....` `.--:::--` `..--:::-.` `..-----.` `````` `.:/syhhhhhhhdys+:- `-+/: osy+:`` ``--- ./ydhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhdo+ .:+syoo+sy+:` .-yso-` ``./+shhhhhhhhhyso::.`` ``......`` ..-..-..` `````` ``-:ooyhhhhhhhhhyo+..` -/yyy/:` -:ssssso+/-. /odhhyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhhd:- /+yso..`/+yso-. :/hs+. ``.:/syhhhhhhhhhyyo+:-``` ```--+osyhhhhhhhhhys/:.`` `.:osys+-``.:osso//+sssss+/:.` .-hhhhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyyhhhs-` `-/-. ``+oyso...+syo-` ``--:::..` `.:+ohhhhhhhhhdhyso+:-.`` ```--+osyhdhhhhhhhhhso:.` ``--:.` .-ssyo+/+sss-. ``-:/ooyso-` `.ohhhyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyydhh/. ./osoossy/- `/+sssyyso/-. -:/oshhhhhhhhddhhyso/:-..`` ``..-:/osyhhddhhhhhhhhso+:- .-/ossyy/- .-+syyss:. `.:-` .:yhdyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhdhy.` `/oyys/: `-+syo+:::osyso-. ``-:/osyhhhhhhhhhhhyyyoo+/:--..`` ```.--://+oyyyhhhhhhhhhhhhso+:-.` .-osyss/::.. `:/sss/:` ``sydhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhdy+.` -:osso+-` ``+oyso.` .-/osso/. `.-:/ooyyhhhhhhhhhhhhhyyysso+//:::---..``` ```..---::://+ossyyyhhhhhhhhhhhhhyyoo/:-.` `-osso+-. ``:/ssy+:` `+sdhhhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdhs:. +oyso.` `:+yyo:. `-:sss:. ```.-:/+ssyyhhhhhhhhhhhhhhhhhhyyyyssooo+++++++++++++++++++oosssyyyhhhhhhhhhhhhhhhhhhhyss+/:-.``` .+sh/:` `-+syso-` `-ohdhhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhdys`` `./.` .+sys+.` `ssy/- ```.-:++osyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdhhhhyyso+:-.```` -oyy:- `.sso-` `oydhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyyhdy+. :+yss.` `-/yss:. ``/:.`` ``..-:/++ossyyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyyysso++/:--.`` ` ./sys+.` ``` ``` `/sddyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyydhs:. +oho/ ./oyso-` :+yys+/..` ```..--:::::///////+++++++///////::::---..`` `.-/:-.. `:+yys:. `-o+/` `-ohdhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdyy.` /+ho+.` :+yys:. `:oyoo+ssso/:- .-+ossssoo:-.` ``+oyso.` ``+oho+ `.sydhhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdyo.` .:ssyo+-` -:yyy/: .:syy--`--ooyss/:` /+yso::/osyso+/`` `-+syo/.` `-/oyys:. `+sdhhhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyydhh/. ``/+yys+/::/osyo:. osyo+ `.:+syo-` /oh+: `.-+oyyy+: `/oyso///+syyo/.` .:yhdhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhdd:- -/oyyyyyys:- :+yso. :/hs+. ``..` `````` /oh+: `./oys+. `+osyyyys/: .-hhdhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhdy/.` `.-::::-- `-oysso:-`` `.+syo:` :+ys+/:..` `..:/+osoo/-. /oh+: ``:/yyy/- `-----.` .:shhhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyyhhds+`` .:sss++oss+/-...:osy/: `.+ssssssso+/:.` `.-:+osssso+osyso`` /oh+/ `.:/oosoosss.` ``/ohhhyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhhds+.` `+oyo+`..:+sssoossyso`` .+sy+:.--+ossss+-` `.+ssssoo:-.``.:oyy:- :+yso..-+oyss+/.-+syo/` `/odhhhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhdhy/- -:hys:. ``:/yssoo+-. .:yyy.` ``.:+yso-` ..:-.` `/sys/.` `:oyo/` `-ossoosss/:.`` `+syo-` .:yhdhhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhhh/:` ``/:-` :+ho+`` +oyo/ `ssy/: :+yyso+//:.` -:o/.` .-yyo-` `/oyo-` `.+syso-` `.`` `-:hhhhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhdyo:. /oh+: .-yys:. `.sss:. `.:/sssssy:. `:/-. `..` :+hs/. osy+/ ``.:oss+.` .-yss:. .-+yhhhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhdys-. osh/- :+ys/. :/ys+. -/yso..-.` `-oys+-` `.-`` ````` ````````.....`` `+os:. -/hs+. -/yss...:/oosss/- /oyso`` .-sydhhyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhhhhy+-` -/o:. `-oys+.` `.+sy+.` +oh+/ `:oysso- `:sy/- `:/++//-. ``//+++ooooosss++.` osho/ :+ys:` .+syooossoo/:-` `-o/:` `./shdhhhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyyhhdys-. ``` .+sy/: ./sh+: `.sss:. .+osssy/- ./yh:- :+yssssyoo`` ``sssooo++++/+osyo/` -/yys/-` `.oys+` `-oyss+:-.`` `` `.oshhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhhhhy+.` .:ssyo+/:-`` -/sss.` -/hs+. `-sss:/sss`` .osy.` .-yys/:.:+sy+: `osy/-```````.+sy+.` `-+syso:. .+sh/- :+ys/. `./shhhhhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhhhhys-.` `.-:/oosss++///osyo/ `/oyo:` .:yoo`./sh/- `-sss`` ./oys/. `.+syo-` osy/- /oyo-` ..+oyso/+sss`` ..ssy/- `..oshhhhhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdhs+-. ..://ossssso+-` `.oys+` -/ho+ `+ss+.` -/yo+ .+syo/` -/yso-` +oh+: `/oys:` `./ossss+/ +oho+ `-/sydhhhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyyhhdyy:-` ..-::.` `..-/sh/: /oh+/ -:hs+. :+h+/ .:yss.` `osy+: /+yo+.....--/oss+-` .-ssy/- .-/-. `.-sydhhyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhhhhyo:- `/osssyy/:.` +oy/- ``osy:.:+h+: .:yso...```````+oy+: :/ysooossssssss:- +oy+/ .:+yhhhhhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyyhhhhh+/.` `-:/++ooss+. ``sss:` -/yoooos:. .:ssoooooooooooosy/: -/yso++//::/osy-. -/yso` `.:+yhhhhyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhhhhhyo/`` ```..:::` .-hyo- .+sssso-` -/yso////++++++osy/- .:yss```` .:syo/` `:sso`` ``/+yhhhhhhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdyo:.` `.o+:` `.+yys+. -/yso``````````osy/- `:sss.` `/oys/. `... `.:osdhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyyyhhdys:-.` -:so:` -/hso `ssy/- `-oyy-. ..ooo-. `-:syhddyyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhhdhhs+:.` .`` .-/:: `/++:. `://.` ````` `.:/syhdhhhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyyhhhhhyo/-- ```` .-/oshhhhhyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyy+/-` `./+yyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdhhso-. ..oshhdhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhhddhy+/.`` ``./+shhddhhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhdddyyo/:..` ``.-:osydddhhyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhhhhhhys+/:.` `.::+sshhhhhhhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyyyhhhhhhhss+/:.` ``-:+oshhhhhhhyyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhhhhhhhhyso/:`` ``:/+syhhhhhhhhhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhddhys+/--``` ```.-/+syydddhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhysoo/:-..``` ```...:/oosyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyyyoo/::--.``` ```..-::/+osyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyhhhhhhhhhhyysso++::--..`` ``..--::/+oosyyhhhhhhhhhhyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyyyss++//:--...``` ```...--::/++osyyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyyyyssoo++++/////:::::::::::::::::::://///+++++osssyyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh diff --git a/source/vendor/league/climate/src/ASCII/the-league.txt b/source/vendor/league/climate/src/ASCII/the-league.txt deleted file mode 100644 index 56420c5..0000000 --- a/source/vendor/league/climate/src/ASCII/the-league.txt +++ /dev/null @@ -1,51 +0,0 @@ -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyysoo++//////++oosyyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhyo+/-.`` ``.-:+oyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhs+:.` `.:+shhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhyo:.` `` `.` `.` `.:oyhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhyo:` . :/-. -/./`./.-. /` . `:oyhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhy+. `.` /- `o-. +:-+-/-`/:-/ `+ ::-. ./yhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhs/` ` .+-- `+.-./--`.` ```---`::./.:/-.` ` `/shhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhy/` . .+.-+--. ``` ```.....`` ````/:-` `/-:- `/yhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhy+. `- :::-:--.` .-:/++++//////++++/:-.` `` `+. -+`.` `+yhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhy- -//` ./` ` .:+++:-.`` ` ` ` ``.-:+++:. -:::-/::- -shhhhhhhhhhhhhh -hhhhhhhhhhhhho` ` `:: ` `:++:.````.`...........`.`````.:++:. -.`- ` `ohhhhhhhhhhhhh -hhhhhhhhhhhh+` ` .+o:.```.`..`..`................` .:o+. +hhhhhhhhhhhh -hhhhhhhhhhh+ .+o-``.`..`..`..`..`..`..`...........```-o+. /hhhhhhhhhhh -hhhhhhhhhh+ `/s- `..`..`..`..`...--:::::--.``........```-s/` +hhhhhhhhhh -hhhhhhhhhs `o+```..`..`..`.-/++oooooooooooo+/-..`..`.`````+s. ohhhhhhhhh -hhhhhhhhy. .y: .`..`..`..`:ooooooooooooooooo+/:-::-...-`..` :y. `yhhhhhhhh -hhhhhhhh/ . .y: .`.`.:---. /oooooooooooooooo/::/:-:++:..`..... -y. . /hhhhhhhh -hhhhhhhy` `.:s:`` s/ .```+ooooo/-ooooooooooooooo+::/+./ooooo+...`..`. /y` `.:s:`` yhhhhhhh -hhhhhhh+ `/ooooo/` /s ..` :ooooo+`ooooooooooooooo//:+/.+oooooooo.`..`..` s/ `/ooooo/` +hhhhhhh -hhhhhhh. oooo/ h-`.`` :ooooo.:-ooooooooooooo:--/+`ooooooooooo`.`..`.`-h` oooo/ .hhhhhhh -hhhhhhh `. `- -h ``.. `+oos.///-/oooooooooo-----./oooooooooos.`..`..` y: `. `- yhhhhhh -hhhhhhy +s `..`` :oo:-///:-:+oooooo-/-/o-.sooooooooooo ..`..`. o+ yhhhhhh -hhhhhhy ++ ..`.. `:o/-/////:-:/oo-/:/o+ oooooooooooo-`.`..`.. ++ shhhhhh -hhhhhhy +o .`..`.. `-:.-.-:///:.-/::oo.-ooooooosooo+`.`..`..` o+ yhhhhhh -hhhhhhh -y `..`..`..:+ooo+../-:/--//:oo/.:::///::-...`` ` ..`. y: yhhhhhh -hhhhhhh. `h-`.`..`-+ooo+/--:/-/:`://-ooo-`.`.-:::/++ooooo+:-``.`.h` .hhhhhhh -hhhhhhh+ ` /s `..`.---.-:://///::/:::ooo:-+oooooooooooooooooo:`. s+ /hhhhhhh -hhhhhhhy .:/:/` `y/ .`.`-/-/-////////:/-/ooo/:`://++oooooooooooo/-`. :y` `/`::` yhhhhhhh -hhhhhhhh/ `/`.`: .y- ..`.:/-/-////////.ooooo:-.`..`....:::///:-..`. -y. .::`/` :hhhhhhhh -hhhhhhhhy` `--/:` .y: `..-:/-//://///:/oooo:/.`..`..`..`..`..`..`. :y- /.:`-` `yhhhhhhhh -hhhhhhhhhs `::.-- .s+````.:/::++/::/+ooo+::.`..`..`..`..`..`..```/s. ..:/-: ohhhhhhhhh -hhhhhhhhhh+ ``.-/: `/s-````-:::/ooooo++/:-.`..`..`..`..`..`..` -s+` /-`:/` +hhhhhhhhhh -hhhhhhhhhhh/ ..``::. .oo-```.-:::::::--...`..`..`..`..`..`.``-oo. ..-:--: /hhhhhhhhhhh -hhhhhhhhhhhh+ -:/.+` .+o:` `.``..`.......`..`..`..`.````:o+- `+.::-` /hhhhhhhhhhhh -hhhhhhhhhhhhho` `:.---: ./++:.`````.`...........`.``` .:+o/. ` :-.:/ ` `ohhhhhhhhhhhhh -hhhhhhhhhhhhhhs- -::-:`.. .:++/:..`` `` ` ` ``..:/++:. ``-::::.` -shhhhhhhhhhhhhh -hhhhhhhhhhhhhhhy+` :.-:.-: ` `.-//+++////////+++//-.` ` ::` .:- `+yhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhy:` /-.:./-:. ` ``......`` `` /-:-:--: `:yhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhs:` ```/-/:.:--- .` ` `/././::/``` `:shhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhs/. : -:`-:`+`:: -` --` :-:`:.-: /:-` - ./shhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhyo:` `.--`/- +.:+ /-.+ +-/- -+ - `-oyhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhyo:`` `` . .- /../ :`.- . ``:oyhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhys+:`` ``-+syhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhso+:.`` ``.:/oshhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhysso++////////++oosyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh -hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh diff --git a/source/vendor/league/climate/src/Argument/Argument.php b/source/vendor/league/climate/src/Argument/Argument.php deleted file mode 100644 index a1d4e4e..0000000 --- a/source/vendor/league/climate/src/Argument/Argument.php +++ /dev/null @@ -1,416 +0,0 @@ -setName($name); - } - - /** - * Build a new command argument from an array. - * - * @param string $name - * @param array $params - * - * @return Argument - */ - public static function createFromArray($name, array $params) - { - $argument = new Argument($name); - $params = self::getSettableArgumentParams($params); - - foreach ($params as $key => $value) { - $method = 'set' . ucwords($key); - $argument->{$method}($value); - } - - return $argument; - } - - /** - * Get argument params based on settable properties - * - * @param array $params - * - * @return array - */ - protected static function getSettableArgumentParams(array $params) - { - $allowed = [ - 'prefix', - 'longPrefix', - 'description', - 'required', - 'noValue', - 'castTo', - 'defaultValue', - ]; - - return array_intersect_key($params, array_flip($allowed)); - } - - /** - * Retrieve an argument's name. - * - * Use this name when internally referring to the argument. - * - * @return string - */ - public function name() - { - return $this->name; - } - - /** - * Set an argument's name. - * - * Use this name when internally referring to the argument. - * - * @param string $name - */ - protected function setName($name) - { - $this->name = trim($name); - } - - /** - * Retrieve an argument's short form. - * - * @return string - */ - public function prefix() - { - return $this->prefix; - } - - /** - * Set an argument's short form. - * - * @param string $prefix - */ - protected function setPrefix($prefix) - { - $this->prefix = trim($prefix); - } - - /** - * Retrieve an argument's long form. - * - * @return string - */ - public function longPrefix() - { - return $this->longPrefix; - } - - /** - * Set an argument's short form. - * - * @param string $longPrefix - */ - protected function setLongPrefix($longPrefix) - { - $this->longPrefix = trim($longPrefix); - } - - /** - * Determine if an argument has a prefix. - * - * @return bool - */ - public function hasPrefix() - { - return $this->prefix() || $this->longPrefix(); - } - - /** - * Retrieve an argument's description. - * - * @return string - */ - public function description() - { - return $this->description; - } - - /** - * Set an argument's description. - * - * @param string $description - */ - protected function setDescription($description) - { - $this->description = trim($description); - } - - /** - * Determine whether or not an argument is required. - * - * @return bool - */ - public function isRequired() - { - return $this->required; - } - - /** - * Set whether an argument is required or not. - * - * @param bool $required - */ - protected function setRequired($required) - { - $this->required = (bool) $required; - } - - /** - * Determine whether or not an argument only needs to be defined to have a - * value. - * - * @return bool - */ - public function noValue() - { - return $this->noValue; - } - - /** - * Set whether or not an argument only needs to be defined to have a value. - * - * @param bool $noValue - */ - protected function setNoValue($noValue) - { - $this->setCastTo('bool'); - $this->noValue = (bool) $noValue; - } - - /** - * Retrieve the data type to cast an argument's value to. - * - * @return string - */ - public function castTo() - { - return $this->castTo; - } - - /** - * Set the data type to cast an argument's value to. - * - * Valid data types are "string", "int", "float", and "bool". - * - * @param string $castTo - * - * @return void - * @throws UnexpectedValueException if $castTo is not a valid data type. - */ - protected function setCastTo($castTo) - { - if (!in_array($castTo, ['string', 'int', 'float', 'bool'])) { - throw new UnexpectedValueException( - "An argument may only be cast to the data type " - . "'string', 'int', 'float', or 'bool'." - ); - } - - $this->castTo = $this->noValue() ? 'bool' : $castTo; - } - - /** - * Retrieve an argument's default values. - * - * @return string - */ - public function defaultValue() - { - return $this->defaultValue; - } - - /** - * Set an argument's default value. - * - * @param string $defaultValue - */ - public function setDefaultValue($defaultValue) - { - if (!is_array($defaultValue)) { - $defaultValue = [$defaultValue]; - } - $this->defaultValue = $defaultValue; - } - - /** - * Retrieve an argument's value. - * - * Argument values are type cast based on the value of $castTo. - * - * @return string|int|float|bool - */ - public function value() - { - if ($this->values) { - return end($this->values); - } - $cast_method = 'castTo' . ucwords($this->castTo); - return $this->{$cast_method}(current($this->defaultValue())); - } - - /** - * Retrieve an argument's values. - * - * Argument values are type cast based on the value of $castTo. - * - * @return string[]|int[]|float[]|bool[] - */ - public function values() - { - if ($this->values) { - return $this->values; - } - $cast_method = 'castTo' . ucwords($this->castTo); - return array_map([$this, $cast_method], $this->defaultValue()); - } - - /** - * @deprecated use values() instead. - */ - public function valueArray() - { - return $this->values(); - } - - /** - * Set an argument's value based on its command line entry. - * - * Argument values are type cast based on the value of $castTo. - * - * @param string|bool $value - */ - public function setValue($value) - { - $cast_method = 'castTo' . ucwords($this->castTo); - $this->values[] = $this->{$cast_method}($value); - } - - /** - * @param string $value - * - * @return string - */ - protected function castToString($value) - { - return (string) $value; - } - - /** - * @param string $value - * - * @return int - */ - protected function castToInt($value) - { - return (int) $value; - } - - /** - * @param string $value - * - * @return float - */ - protected function castToFloat($value) - { - return (float) $value; - } - - /** - * @param string $value - * - * @return bool - */ - protected function castToBool($value) - { - return (bool) $value; - } -} diff --git a/source/vendor/league/climate/src/Argument/Filter.php b/source/vendor/league/climate/src/Argument/Filter.php deleted file mode 100644 index 9be0641..0000000 --- a/source/vendor/league/climate/src/Argument/Filter.php +++ /dev/null @@ -1,183 +0,0 @@ -arguments = $arguments; - } - - /** - * Retrieve optional arguments - * - * @return Argument[] - */ - public function optional() - { - return $this->filterArguments(['isOptional']); - } - - /** - * Retrieve required arguments - * - * @return Argument[] - */ - public function required() - { - return $this->filterArguments(['isRequired']); - } - - /** - * Retrieve arguments with prefix - * - * @return Argument[] - */ - public function withPrefix() - { - return $this->filterArguments(['hasPrefix']); - } - - /** - * Retrieve arguments without prefix - * - * @return Argument[] - */ - public function withoutPrefix() - { - return $this->filterArguments(['noPrefix']); - } - - /** - * Find all required arguments that don't have values after parsing. - * - * These arguments weren't defined on the command line. - * - * @return Argument[] - */ - public function missing() - { - return $this->filterArguments(['isRequired', 'noValue']); - } - - /** - * Filter defined arguments as to whether they are required or not - * - * @param string[] $filters - * - * @return Argument[] - */ - protected function filterArguments($filters = []) - { - $arguments = $this->arguments; - - foreach ($filters as $filter) { - $arguments = array_filter($arguments, [$this, $filter]); - } - - if (in_array('hasPrefix', $filters)) { - usort($arguments, [$this, 'compareByPrefix']); - } - - return array_values($arguments); - } - - /** - * Determine whether an argument as a prefix - * - * @param Argument $argument - * - * @return bool - */ - protected function noPrefix($argument) - { - return !$argument->hasPrefix(); - } - - /** - * Determine whether an argument as a prefix - * - * @param Argument $argument - * - * @return bool - */ - protected function hasPrefix($argument) - { - return $argument->hasPrefix(); - } - - /** - * Determine whether an argument is required - * - * @param Argument $argument - * - * @return bool - */ - protected function isRequired($argument) - { - return $argument->isRequired(); - } - - /** - * Determine whether an argument is optional - * - * @param Argument $argument - * - * @return bool - */ - protected function isOptional($argument) - { - return !$argument->isRequired(); - } - - /** - * Determine whether an argument is optional - * - * @param Argument $argument - * - * @return bool - */ - protected function noValue($argument) - { - return $argument->values() == []; - } - - /** - * Compare two arguments by their short and long prefixes. - * - * @see usort() - * - * @param Argument $a - * @param Argument $b - * - * @return int - */ - public function compareByPrefix(Argument $a, Argument $b) - { - if ($this->prefixCompareString($a) < $this->prefixCompareString($b)) { - return -1; - } - - return 1; - } - - /** - * Prep the prefix string for comparison - * - * @param Argument $argument - * - * @return string - */ - protected function prefixCompareString(Argument $argument) - { - return mb_strtolower($argument->longPrefix() ?: $argument->prefix() ?: ''); - } -} diff --git a/source/vendor/league/climate/src/Argument/Manager.php b/source/vendor/league/climate/src/Argument/Manager.php deleted file mode 100644 index a18410b..0000000 --- a/source/vendor/league/climate/src/Argument/Manager.php +++ /dev/null @@ -1,261 +0,0 @@ -filter = new Filter(); - $this->summary = new Summary(); - $this->parser = new Parser(); - } - - /** - * Add an argument. - * - * @param Argument|string|array $argument - * @param $options - * - * @return void - * @throws InvalidArgumentException if $argument isn't an array or Argument object. - */ - public function add($argument, array $options = []) - { - if (is_array($argument)) { - $this->addMany($argument); - return; - } - - if (is_string($argument)) { - $argument = Argument::createFromArray($argument, $options); - } - - if (!$argument instanceof Argument) { - throw new InvalidArgumentException('Please provide an argument name or object.'); - } - - $this->arguments[$argument->name()] = $argument; - } - - /** - * Add multiple arguments to a CLImate script. - * - * @param array $arguments - */ - protected function addMany(array $arguments = []) - { - foreach ($arguments as $name => $options) { - $this->add($name, $options); - } - } - - /** - * Determine if an argument exists. - * - * @param string $name - * @return bool - */ - public function exists($name) - { - return isset($this->arguments[$name]); - } - - /** - * Retrieve an argument's value. - * - * @param string $name - * @return string|int|float|bool|null - */ - public function get($name) - { - return isset($this->arguments[$name]) ? $this->arguments[$name]->value() : null; - } - - /** - * Retrieve an argument's all values as an array. - * - * @param string $name - * @return string[]|int[]|float[]|bool[] - */ - public function getArray($name) - { - return isset($this->arguments[$name]) ? $this->arguments[$name]->values() : []; - } - - /** - * Retrieve all arguments. - * - * @return Argument[] - */ - public function all() - { - return $this->arguments; - } - - /** - * Determine if an argument has been defined on the command line. - * - * This can be useful for making sure an argument is present on the command - * line before parse()'ing them into argument objects. - * - * @param string $name - * @param array $argv - * - * @return bool - */ - public function defined($name, array $argv = null) - { - // The argument isn't defined if it's not defined by the calling code. - if (!$this->exists($name)) { - return false; - } - - $argument = $this->arguments[$name]; - $command_arguments = $this->parser->arguments($argv); - - foreach ($command_arguments as $command_argument) { - if ($this->isArgument($argument, $command_argument)) { - return true; - } - } - - return false; - } - - /** - * Check if the defined argument matches the command argument. - * - * @param Argument $argument - * @param string $command_argument - * - * @return bool - */ - protected function isArgument($argument, $command_argument) - { - $possibilities = [ - $argument->prefix() => "-{$argument->prefix()}", - $argument->longPrefix() => "--{$argument->longPrefix()}", - ]; - - foreach ($possibilities as $key => $search) { - if ($key && strpos($command_argument, $search) === 0) { - return true; - } - } - - return false; - } - - /** - * Retrieve all arguments as key/value pairs. - * - * @return array - */ - public function toArray() - { - $return = []; - - foreach ($this->all() as $name => $argument) { - $return[$name] = $argument->value(); - } - - return $return; - } - - /** - * Set a program's description. - * - * @param string $description - */ - public function description($description) - { - $this->description = trim($description); - } - - /** - * Output a script's usage statement. - * - * @param CLImate $climate - * @param array $argv - */ - public function usage(CLImate $climate, array $argv = null) - { - $this->summary - ->setClimate($climate) - ->setDescription($this->description) - ->setCommand($this->parser->command($argv)) - ->setFilter($this->filter, $this->all()) - ->output(); - } - - /** - * Parse command line arguments into CLImate arguments. - * - * @param array $argv - */ - public function parse(array $argv = null) - { - $this->parser->setFilter($this->filter, $this->all()); - - $this->parser->parse($argv); - } - - /** - * Get the trailing arguments - * - * @return string|null - */ - public function trailing() - { - return $this->parser->trailing(); - } - - /** - * Get the trailing arguments as an array - * - * @return array|null - */ - public function trailingArray() - { - return $this->parser->trailingArray(); - } -} diff --git a/source/vendor/league/climate/src/Argument/Parser.php b/source/vendor/league/climate/src/Argument/Parser.php deleted file mode 100644 index 1badc63..0000000 --- a/source/vendor/league/climate/src/Argument/Parser.php +++ /dev/null @@ -1,309 +0,0 @@ -summary = new Summary(); - } - - /** - * @param Filter $filter - * @param Argument[] $arguments - * - * @return \League\CLImate\Argument\Parser - */ - public function setFilter($filter, $arguments) - { - $this->filter = $filter; - $this->filter->setArguments($arguments); - - return $this; - } - - /** - * Parse command line arguments into CLImate arguments. - * - * @param array $argv - * - * @return void - * @throws InvalidArgumentException if required arguments aren't defined. - */ - public function parse(array $argv = null) - { - $cliArguments = $this->arguments($argv); - - if (in_array('--', $cliArguments)) { - $cliArguments = $this->removeTrailingArguments($cliArguments); - } - - $unParsedArguments = $this->prefixedArguments($cliArguments); - - $this->nonPrefixedArguments($unParsedArguments); - - // After parsing find out which arguments were required but not - // defined on the command line. - $missingArguments = $this->filter->missing(); - - if (count($missingArguments) > 0) { - throw new InvalidArgumentException( - 'The following arguments are required: ' - . $this->summary->short($missingArguments) . '.' - ); - } - } - - /** - * Get the command name. - * - * @param array $argv - * - * @return string - */ - public function command(array $argv = null) - { - return $this->getCommandAndArguments($argv)['command']; - } - - /** - * Get the passed arguments. - * - * @param array $argv - * - * @return array - */ - public function arguments(array $argv = null) - { - return $this->getCommandAndArguments($argv)['arguments']; - } - - /** - * Get the trailing arguments - * - * @return string|null - */ - public function trailing() - { - return $this->trailing; - } - - /** - * Get the trailing arguments as an array - * - * @return array|null - */ - public function trailingArray() - { - return $this->trailingArray; - } - - /** - * Remove the trailing arguments from the parser and set them aside - * - * @param array $arguments - * - * @return array - */ - protected function removeTrailingArguments(array $arguments) - { - $trailing = array_splice($arguments, array_search('--', $arguments)); - array_shift($trailing); - $this->trailingArray = $trailing; - $this->trailing = implode(' ', $trailing); - - return $arguments; - } - - /** - * Parse command line options into prefixed CLImate arguments. - * - * Prefixed arguments are arguments with a prefix (-) or a long prefix (--) - * on the command line. - * - * Return the arguments passed on the command line that didn't match up with - * prefixed arguments so they can be assigned to non-prefixed arguments. - * - * @param array $argv - * @return array - */ - protected function prefixedArguments(array $argv = []) - { - foreach ($argv as $key => $passed_argument) { - $argv = $this->trySettingArgumentValue($argv, $key, $passed_argument); - } - - // Send un-parsed arguments back upstream. - return array_values($argv); - } - - /** - * Parse unset command line options into non-prefixed CLImate arguments. - * - * Non-prefixed arguments are parsed after the prefixed arguments on the - * command line, in the order that they're defined in the script. - * - * @param array $unParsedArguments - */ - protected function nonPrefixedArguments(array $unParsedArguments = []) - { - foreach ($this->filter->withoutPrefix() as $key => $argument) { - if (isset($unParsedArguments[$key])) { - $argument->setValue($unParsedArguments[$key]); - } - } - } - - /** - * Parse the name and value of the argument passed in - * - * @param string $cliArgument - * @return string[] [$name, $value] - */ - protected function getNameAndValue($cliArgument) - { - // Look for arguments defined in the "key=value" format. - if (strpos($cliArgument, '=') !== false) { - return explode('=', $cliArgument, 2); - } - - // If the argument isn't in "key=value" format then assume it's in - // "key value" format and define the value after we've found the - // matching CLImate argument. - return [$cliArgument, null]; - } - - /** - * Attempt to set the an argument's value and remove applicable - * arguments from array - * - * @param array $argv - * @param int $key - * @param string $passed_argument - * - * @return array The new $argv - */ - protected function trySettingArgumentValue($argv, $key, $passed_argument) - { - list($name, $value) = $this->getNameAndValue($passed_argument); - - // Look for the argument in our defined $arguments - // and assign their value. - if (!($argument = $this->findPrefixedArgument($name))) { - return $argv; - } - - // We found an argument key, so take it out of the array. - unset($argv[$key]); - - return $this->setArgumentValue($argv, $argument, $key, $value); - } - - /** - * Set the argument's value - * - * @param array $argv - * @param Argument $argument - * @param int $key - * @param string|null $value - * - * @return array The new $argv - */ - protected function setArgumentValue($argv, $argument, $key, $value) - { - // Arguments are given the value true if they only need to - // be defined on the command line to be set. - if ($argument->noValue()) { - $argument->setValue(true); - return $argv; - } - - if (is_null($value)) { - if (count($argv) === 0) { - return $argv; - } - - // If the value wasn't previously defined in "key=value" - // format then define it from the next command argument. - $nextArgvValue = $argv[$key + 1]; - if ($this->isValidArgumentValue($nextArgvValue)) { - $argument->setValue($nextArgvValue); - unset($argv[$key + 1]); - return $argv; - } - } - - $argument->setValue($value); - - return $argv; - } - - /** - * Check if the value is considered a valid input value. - * - * @param $argumentValue - * @return bool - */ - protected function isValidArgumentValue($argumentValue) - { - return empty($this->findPrefixedArgument($argumentValue)); - } - - /** - * Search for argument in defined prefix arguments - * - * @param string $name - * - * @return Argument|false - */ - protected function findPrefixedArgument($name) - { - foreach ($this->filter->withPrefix() as $argument) { - if (in_array($name, ["-{$argument->prefix()}", "--{$argument->longPrefix()}"])) { - return $argument; - } - } - - return false; - } - - /** - * Pull a command name and arguments from $argv. - * - * @param array $argv - * @return array - */ - protected function getCommandAndArguments(array $argv = null) - { - // If no $argv is provided then use the global PHP defined $argv. - if (is_null($argv)) { - global $argv; - } - - $arguments = $argv; - $command = array_shift($arguments); - - return compact('arguments', 'command'); - } -} diff --git a/source/vendor/league/climate/src/Argument/Summary.php b/source/vendor/league/climate/src/Argument/Summary.php deleted file mode 100644 index 57f581d..0000000 --- a/source/vendor/league/climate/src/Argument/Summary.php +++ /dev/null @@ -1,215 +0,0 @@ -climate = $climate; - - return $this; - } - - /** - * @param string $description - * - * @return \League\CLImate\Argument\Summary - */ - public function setDescription($description) - { - $this->description = $description; - - return $this; - } - - /** - * @param string $command - * - * @return \League\CLImate\Argument\Summary - */ - public function setCommand($command) - { - $this->command = $command; - - return $this; - } - - /** - * @param Filter $filter - * @param Argument[] $arguments - * - * @return \League\CLImate\Argument\Summary - */ - public function setFilter($filter, $arguments) - { - $this->filter = $filter; - $this->filter->setArguments($arguments); - - return $this; - } - - /** - * Output the full summary for the program - */ - public function output() - { - // Print the description if it's defined. - if ($this->description) { - $this->climate->out($this->description)->br(); - } - - // Print the usage statement with the arguments without a prefix at the end. - $this->climate->out("Usage: {$this->command} " - . $this->short($this->getOrderedArguments())); - - // Print argument details. - foreach (['required', 'optional'] as $type) { - $this->outputArguments($this->filter->{$type}(), $type); - } - } - - /** - * Build a short summary of a list of arguments. - * - * @param Argument[] $arguments - * - * @return string - */ - public function short($arguments) - { - return implode(' ', array_map([$this, 'argumentBracketed'], $arguments)); - } - - /** - * Build an argument's summary for use in a usage statement. - * - * For example, "-u username, --user username", "--force", or - * "-c count (default: 7)". - * - * @param Argument $argument - * - * @return string - */ - public function argument(Argument $argument) - { - $summary = $this->prefixedArguments($argument); - $printedName = mb_strstr($summary, ' ' . $argument->name()); - - // Print the argument name if it's not printed yet. - if (!$printedName && !$argument->noValue()) { - $summary .= $argument->name(); - } - - if ($defaults = $argument->defaultValue()) { - if (count($defaults) == 1) { - $summary .= " (default: {$defaults[0]})"; - } else { - $summary .= ' (defaults: ' . implode(', ', $defaults) . ')'; - } - } - - return $summary; - } - - /** - * Build argument summary surrounded by brackets - * - * @param Argument $argument - * - * @return string - */ - protected function argumentBracketed(Argument $argument) - { - return '[' . $this->argument($argument) . ']'; - } - - /** - * Get the arguments ordered by whether or not they have a prefix - * - * @return Argument[] - */ - protected function getOrderedArguments() - { - return array_merge($this->filter->withPrefix(), $this->filter->withoutPrefix()); - } - - /** - * Print out the argument list - * - * @param array $arguments - * @param string $type - */ - protected function outputArguments($arguments, $type) - { - if (count($arguments) == 0) { - return; - } - - $this->climate->br()->out(mb_convert_case($type, MB_CASE_TITLE) . ' Arguments:'); - - foreach ($arguments as $argument) { - $this->climate->tab()->out($this->argument($argument)); - - if ($argument->description()) { - $this->climate->tab(2)->out($argument->description()); - } - } - } - - /** - * Builds the summary for any prefixed arguments - * - * @param Argument $argument - * - * @return string - */ - protected function prefixedArguments(Argument $argument) - { - $prefixes = [$argument->prefix(), $argument->longPrefix()]; - $summary = []; - - foreach ($prefixes as $key => $prefix) { - if (!$prefix) { - continue; - } - - $sub = str_repeat('-', $key + 1) . $prefix; - - if (!$argument->noValue()) { - $sub .= " {$argument->name()}"; - } - - $summary[] = $sub; - } - - return implode(', ', $summary); - } -} diff --git a/source/vendor/league/climate/src/CLImate.php b/source/vendor/league/climate/src/CLImate.php deleted file mode 100644 index f4e3e28..0000000 --- a/source/vendor/league/climate/src/CLImate.php +++ /dev/null @@ -1,445 +0,0 @@ -setStyle(new Style()); - $this->setRouter(new Router()); - $this->setSettingsManager(new SettingsManager()); - $this->setOutput(new Output()); - $this->setUtil(new UtilFactory()); - $this->setArgumentManager(new ArgumentManager()); - } - - /** - * Set the style property - * - * @param \League\CLImate\Decorator\Style $style - */ - public function setStyle(Style $style) - { - $this->style = $style; - } - - /** - * Set the router property - * - * @param \League\CLImate\TerminalObject\Router\Router $router - */ - public function setRouter(Router $router) - { - $this->router = $router; - } - - /** - * Set the settings property - * - * @param \League\CLImate\Settings\Manager $manager - */ - public function setSettingsManager(SettingsManager $manager) - { - $this->settings = $manager; - } - - /** - * Set the arguments property - * - * @param \League\CLImate\Argument\Manager $manager - */ - public function setArgumentManager(ArgumentManager $manager) - { - $this->arguments = $manager; - } - - /** - * Set the output property - * - * @param \League\CLImate\Util\Output $output - */ - public function setOutput(Output $output) - { - $this->output = $output; - } - - /** - * Set the util property - * - * @param \League\CLImate\Util\UtilFactory $util - */ - public function setUtil(UtilFactory $util) - { - $this->util = $util; - } - - /** - * Extend CLImate with custom methods - * - * @param string|object|array $class - * @param string $key Optional custom key instead of class name - * - * @return \League\CLImate\CLImate - */ - public function extend($class, $key = null) - { - $this->router->addExtension($key, $class); - - return $this; - } - - /** - * Force ansi support on - * - * @return \League\CLImate\CLImate - */ - public function forceAnsiOn() - { - $this->util->system->forceAnsi(); - - return $this; - } - - /** - * Force ansi support off - * - * @return \League\CLImate\CLImate - */ - public function forceAnsiOff() - { - $this->util->system->forceAnsi(false); - - return $this; - } - - /** - * Write line to writer once - * - * @param string|array $writer - * - * @return \League\CLImate\CLImate - */ - public function to($writer) - { - $this->output->once($writer); - - return $this; - } - - /** - * Output the program's usage statement - * - * @param array $argv - */ - public function usage(array $argv = null) - { - return $this->arguments->usage($this, $argv); - } - - /** - * Set the program's description - * - * @param string $description - * - * @return \League\CLImate\CLImate - */ - public function description($description) - { - $this->arguments->description($description); - - return $this; - } - - /** - * Check if we have valid output - * - * @param mixed $output - * - * @return boolean - */ - protected function hasOutput($output) - { - if (!empty($output)) { - return true; - } - - // Check for type first to avoid errors with objects/arrays/etc - return ((is_string($output) || is_numeric($output)) && strlen($output) > 0); - } - - /** - * Search for the method within the string - * and route it if we find one. - * - * @param string $method - * @param string $name - * - * @return string The new string without the executed method. - */ - protected function parseStyleMethod($method, $name) - { - // If the name starts with this method string... - if (substr($name, 0, strlen($method)) == $method) { - // ...remove the method name from the beginning of the string... - $name = substr($name, strlen($method)); - - // ...and trim off any of those underscores hanging around - $name = ltrim($name, '_'); - - $this->style->set($method); - } - - return $name; - } - - /** - * Search for any style methods within the name and apply them - * - * @param string $name - * @param array $method_search - * - * @return string Anything left over after applying styles - */ - protected function applyStyleMethods($name, $method_search = null) - { - // Get all of the possible style attributes - $method_search = $method_search ?: array_keys($this->style->all()); - - $new_name = $this->searchForStyleMethods($name, $method_search); - - // While we still have a name left and we keep finding methods, - // loop through the possibilities - if (strlen($new_name) > 0 && $new_name != $name) { - return $this->applyStyleMethods($new_name, $method_search); - } - - return $new_name; - } - - /** - * Search for style methods in the current name - * - * @param string $name - * @param array $search - * @return string - */ - protected function searchForStyleMethods($name, $search) - { - // Loop through the possible methods - foreach ($search as $method) { - // See if we found a valid method - $name = $this->parseStyleMethod($method, $name); - } - - return $name; - } - - /** - * Build up the terminal object and return it - * - * @param string $name - * @param array $arguments - * - * @return object|null - */ - protected function buildTerminalObject($name, $arguments) - { - // Retrieve the parser for the current set of styles - $parser = $this->style->parser($this->util->system); - - // Reset the styles - $this->style->reset(); - - // Execute the terminal object - $this->router->settings($this->settings); - $this->router->parser($parser); - $this->router->output($this->output); - $this->router->util($this->util); - - return $this->router->execute($name, $arguments); - } - - /** - * Route anything leftover after styles were applied - * - * @param string $name - * @param array $arguments - * - * @return object|null - */ - protected function routeRemainingMethod($name, array $arguments) - { - // If we still have something left, let's figure out what it is - if ($this->router->exists($name)) { - $obj = $this->buildTerminalObject($name, $arguments); - - // If something was returned, return it - if (is_object($obj)) { - return $obj; - } - } elseif ($this->settings->exists($name)) { - $this->settings->add($name, reset($arguments)); - // Handle passthroughs to the arguments manager. - } else { - // If we can't find it at this point, let's fail gracefully - $this->out(reset($arguments)); - } - } - - /** - * Magic method for anything called that doesn't exist - * - * @param string $requested_method - * @param array $arguments - * - * @return \League\CLImate\CLImate|\League\CLImate\TerminalObject\Dynamic\DynamicTerminalObject - * - * List of many of the possible method being called here - * documented at the top of this class. - */ - public function __call($requested_method, $arguments) - { - // Apply any style methods that we can find first - $name = $this->applyStyleMethods(Helper::snakeCase($requested_method)); - - // The first argument is the string|array|object we want to echo out - $output = reset($arguments); - - if (strlen($name)) { - // If we have something left, let's try and route it to the appropriate place - if ($result = $this->routeRemainingMethod($name, $arguments)) { - return $result; - } - } elseif ($this->hasOutput($output)) { - // If we have fulfilled all of the requested methods and we have output, output it - $this->out($output); - } - - return $this; - } -} diff --git a/source/vendor/league/climate/src/Decorator/Component/BackgroundColor.php b/source/vendor/league/climate/src/Decorator/Component/BackgroundColor.php deleted file mode 100644 index 70f5d9f..0000000 --- a/source/vendor/league/climate/src/Decorator/Component/BackgroundColor.php +++ /dev/null @@ -1,72 +0,0 @@ -strip($val)); - - if ($color) { - $color += self::ADD; - } - - return $color; - } - - /** - * Set the current background color - * - * @param mixed $val - * - * @return boolean - */ - public function set($val) - { - return parent::set($this->strip($val)); - } - - /** - * Get all of the available background colors - * - * @return array - */ - public function all() - { - $colors = []; - - foreach ($this->colors as $color => $code) { - $colors['background_' . $color] = $code + self::ADD; - } - - return $colors; - } - - /** - * Strip the color of any prefixes - * - * @param string $val - * - * @return string - */ - protected function strip($val) - { - return str_replace('background_', '', $val); - } -} diff --git a/source/vendor/league/climate/src/Decorator/Component/BaseDecorator.php b/source/vendor/league/climate/src/Decorator/Component/BaseDecorator.php deleted file mode 100644 index 40f0329..0000000 --- a/source/vendor/league/climate/src/Decorator/Component/BaseDecorator.php +++ /dev/null @@ -1,53 +0,0 @@ -defaults(); - } - - /** - * Load up the defaults for this decorator - */ - public function defaults() - { - foreach ($this->defaults as $name => $code) { - $this->add($name, $code); - } - } - - /** - * Reset the currently set decorator - */ - public function reset() - { - $this->current = []; - } - - /** - * Retrieve the currently set codes for the decorator - * - * @return array - */ - public function current() - { - return $this->current; - } -} diff --git a/source/vendor/league/climate/src/Decorator/Component/Color.php b/source/vendor/league/climate/src/Decorator/Component/Color.php deleted file mode 100644 index 7b176dc..0000000 --- a/source/vendor/league/climate/src/Decorator/Component/Color.php +++ /dev/null @@ -1,100 +0,0 @@ - 39, - 'black' => 30, - 'red' => 31, - 'green' => 32, - 'yellow' => 33, - 'blue' => 34, - 'magenta' => 35, - 'cyan' => 36, - 'light_gray' => 37, - 'dark_gray' => 90, - 'light_red' => 91, - 'light_green' => 92, - 'light_yellow' => 93, - 'light_blue' => 94, - 'light_magenta' => 95, - 'light_cyan' => 96, - 'white' => 97, - ]; - - /** - * Add a color into the mix - * - * @param string $key - * @param integer $value - */ - public function add($key, $value) - { - $this->colors[$key] = (int) $value; - } - - /** - * Retrieve all of available colors - * - * @return array - */ - public function all() - { - return $this->colors; - } - - /** - * Get the code for the color - * - * @param string $val - * - * @return string - */ - public function get($val) - { - // If we already have the code, just return that - if (is_numeric($val)) { - return $val; - } - - if (array_key_exists($val, $this->colors)) { - return $this->colors[$val]; - } - - return null; - } - - /** - * Set the current color - * - * @param string $val - * - * @return boolean - */ - public function set($val) - { - $code = $this->get($val); - - if ($code) { - $this->current = [$code]; - - return true; - } - - return false; - } -} diff --git a/source/vendor/league/climate/src/Decorator/Component/Command.php b/source/vendor/league/climate/src/Decorator/Component/Command.php deleted file mode 100644 index 343ac15..0000000 --- a/source/vendor/league/climate/src/Decorator/Component/Command.php +++ /dev/null @@ -1,77 +0,0 @@ - 'green', - 'comment' => 'yellow', - 'whisper' => 'light_gray', - 'shout' => 'red', - 'error' => 'light_red', - ]; - - /** - * Add a command into the mix - * - * @param string $key - * @param mixed $value - */ - public function add($key, $value) - { - $this->commands[$key] = $value; - } - - /** - * Retrieve all of the available commands - * - * @return array - */ - public function all() - { - return $this->commands; - } - - /** - * Get the style that corresponds to the command - * - * @param string $val - * - * @return string - */ - public function get($val) - { - if (array_key_exists($val, $this->commands)) { - return $this->commands[$val]; - } - - return null; - } - - /** - * Set the currently used command - * - * @param string $val - * - * @return string|false - */ - public function set($val) - { - // Return the code because it is a string corresponding - // to a property in another class - return ($code = $this->get($val)) ? $code : false; - } -} diff --git a/source/vendor/league/climate/src/Decorator/Component/DecoratorInterface.php b/source/vendor/league/climate/src/Decorator/Component/DecoratorInterface.php deleted file mode 100644 index b48e41a..0000000 --- a/source/vendor/league/climate/src/Decorator/Component/DecoratorInterface.php +++ /dev/null @@ -1,28 +0,0 @@ - 1, - 'dim' => 2, - 'underline' => 4, - 'blink' => 5, - 'invert' => 7, - 'hidden' => 8, - ]; - - /** - * Add a format into the mix - * - * @param string $key - * @param mixed $value - */ - public function add($key, $value) - { - $this->formats[$key] = (int) $value; - } - - /** - * Retrieve all of the available formats - * - * @return array - */ - public function all() - { - return $this->formats; - } - - /** - * Get the code for the format - * - * @param string $val - * - * @return string - */ - public function get($val) - { - // If we already have the code, just return that - if (is_numeric($val)) { - return $val; - } - - if (array_key_exists($val, $this->formats)) { - return $this->formats[$val]; - } - - return null; - } - - /** - * Set the current format - * - * @param string $val - * - * @return boolean - */ - public function set($val) - { - $code = $this->get($val); - - if ($code) { - $this->current[] = $code; - - return true; - } - - return false; - } -} diff --git a/source/vendor/league/climate/src/Decorator/Parser/Ansi.php b/source/vendor/league/climate/src/Decorator/Parser/Ansi.php deleted file mode 100644 index d4d86c5..0000000 --- a/source/vendor/league/climate/src/Decorator/Parser/Ansi.php +++ /dev/null @@ -1,174 +0,0 @@ -start() . $this->parse($str) . $this->end(); - } - - /** - * Get the string that begins the style - * - * @param string $codes - * @return string - */ - protected function start($codes = null) - { - $codes = $codes ?: $this->currentCode(); - $codes = $this->codeStr($codes); - - return $this->wrapCodes($codes); - } - - /** - * Get the string that ends the style - * - * @param string|array $codes - * @return string - */ - protected function end($codes = null) - { - if (empty($codes)) { - $codes = [0]; - } else { - $codes = Helper::toArray($codes); - - // Reset everything back to normal up front - array_unshift($codes, 0); - } - - return $this->wrapCodes($this->codeStr($codes)); - } - - /** - * Wrap the code string in the full escaped sequence - * - * @param string $codes - * - * @return string - */ - - protected function wrapCodes($codes) - { - return "\e[{$codes}m"; - } - - /** - * Parse the string for tags and replace them with their codes - * - * @param string $str - * - * @return string - */ - - protected function parse($str) - { - $count = preg_match_all($this->tags->regex(), $str, $matches); - - // If we didn't find anything, return the string right back - if (!$count || !is_array($matches)) { - return $str; - } - - // All we want is the array of actual strings matched - $matches = reset($matches); - - return $this->parseTags($str, $matches); - } - - /** - * Parse the given string for the tags and replace them with the appropriate codes - * - * @param string $str - * @param array $tags - * - * @return string - */ - - protected function parseTags($str, $tags) - { - // Let's keep a history of styles applied - $history = ($this->currentCode()) ? [$this->currentCode()] : []; - - foreach ($tags as $tag) { - $str = $this->replaceTag($str, $tag, $history); - } - - return $str; - } - - /** - * Replace the tag in the str - * - * @param string $str - * @param string $tag - * @param array $history - * - * @return string - */ - - protected function replaceTag($str, $tag, &$history) - { - // We will be replacing tags one at a time, can't pass this by reference - $replace_count = 1; - - if (strpos($tag, '/')) { - // We are closing out the tag, pop off the last element and get the codes that are left - array_pop($history); - $replace = $this->end($history); - } else { - // We are starting a new tag, add it onto the history and replace with correct color code - $history[] = $this->tags->value($tag); - $replace = $this->start($this->tags->value($tag)); - } - - return str_replace($tag, $replace, $str, $replace_count); - } - - /** - * Stringify the codes - * - * @param mixed $codes - * - * @return string - */ - - protected function codeStr($codes) - { - // If we get something that is already a code string, just pass it back - if (!is_array($codes) && strpos($codes, ';')) { - return $codes; - } - - $codes = Helper::toArray($codes); - - // Sort for the sake of consistency and testability - sort($codes); - - return implode(';', $codes); - } - - /** - * Retrieve the current style code - * - * @return string - */ - - protected function currentCode() - { - return $this->codeStr($this->current); - } -} diff --git a/source/vendor/league/climate/src/Decorator/Parser/NonAnsi.php b/source/vendor/league/climate/src/Decorator/Parser/NonAnsi.php deleted file mode 100644 index 6c5fef6..0000000 --- a/source/vendor/league/climate/src/Decorator/Parser/NonAnsi.php +++ /dev/null @@ -1,19 +0,0 @@ -tags->regex(), '', $str); - } -} diff --git a/source/vendor/league/climate/src/Decorator/Parser/Parser.php b/source/vendor/league/climate/src/Decorator/Parser/Parser.php deleted file mode 100644 index 43e0910..0000000 --- a/source/vendor/league/climate/src/Decorator/Parser/Parser.php +++ /dev/null @@ -1,38 +0,0 @@ -current = $current; - $this->tags = $tags; - } - - /** - * Wrap the string in the current style - * - * @param string $str - * - * @return string - */ - abstract public function apply($str); -} diff --git a/source/vendor/league/climate/src/Decorator/Parser/ParserFactory.php b/source/vendor/league/climate/src/Decorator/Parser/ParserFactory.php deleted file mode 100644 index 5383f5a..0000000 --- a/source/vendor/league/climate/src/Decorator/Parser/ParserFactory.php +++ /dev/null @@ -1,26 +0,0 @@ -hasAnsiSupport()) { - return new Ansi($current, $tags); - } - - return new NonAnsi($current, $tags); - } -} diff --git a/source/vendor/league/climate/src/Decorator/Parser/ParserImporter.php b/source/vendor/league/climate/src/Decorator/Parser/ParserImporter.php deleted file mode 100644 index 823c041..0000000 --- a/source/vendor/league/climate/src/Decorator/Parser/ParserImporter.php +++ /dev/null @@ -1,23 +0,0 @@ -parser = $parser; - } -} diff --git a/source/vendor/league/climate/src/Decorator/Style.php b/source/vendor/league/climate/src/Decorator/Style.php deleted file mode 100644 index fb52669..0000000 --- a/source/vendor/league/climate/src/Decorator/Style.php +++ /dev/null @@ -1,295 +0,0 @@ - 'Format', - 'color' => 'Color', - 'background' => 'BackgroundColor', - 'command' => 'Command', - ]; - - protected $parser; - - /** - * An array of the current styles applied - * - * @var array $current - */ - protected $current = []; - - public function __construct() - { - foreach ($this->available as $key => $class) { - $class = 'League\CLImate\Decorator\Component\\' . $class; - $this->style[$key] = new $class(); - } - } - - /** - * Get all of the styles available - * - * @return array - */ - public function all() - { - $all = []; - - foreach ($this->style as $style) { - $all = array_merge($all, $this->convertToCodes($style->all())); - } - - return $all; - } - - /** - * Attempt to get the corresponding code for the style - * - * @param mixed $key - * - * @return mixed - */ - public function get($key) - { - foreach ($this->style as $style) { - if ($code = $style->get($key)) { - return $code; - } - } - - return false; - } - - /** - * Attempt to set some aspect of the styling, - * return true if attempt was successful - * - * @param string $key - * - * @return boolean - */ - public function set($key) - { - foreach ($this->style as $style) { - if ($code = $style->set($key)) { - return $this->validateCode($code); - } - } - - return false; - } - - /** - * Reset the current styles applied - * - */ - public function reset() - { - foreach ($this->style as $style) { - $style->reset(); - } - } - - /** - * Get a new instance of the Parser class based on the current settings - * - * @param \League\CLImate\Util\System\System $system - * - * @return \League\CLImate\Decorator\Parser\Parser - */ - public function parser(System $system) - { - return ParserFactory::getInstance($system, $this->current(), new Tags($this->all())); - } - - /** - * Compile an array of the current codes - * - * @return array - */ - public function current() - { - $full_current = []; - - foreach ($this->style as $style) { - $full_current = array_merge($full_current, Helper::toArray($style->current())); - } - - $full_current = array_filter($full_current); - - return array_values($full_current); - } - - /** - * Make sure that the code is an integer, if not let's try and get it there - * - * @param mixed $code - * - * @return boolean - */ - protected function validateCode($code) - { - if (is_integer($code)) { - return true; - } - - // Plug it back in and see what we get - if (is_string($code)) { - return $this->set($code); - } - - if (is_array($code)) { - return $this->validateCodeArray($code); - } - - return false; - } - - /** - * Validate an array of codes - * - * @param array $codes - * - * @return boolean - */ - protected function validateCodeArray(array $codes) - { - // Loop through it and add each of the properties - $adds = []; - - foreach ($codes as $code) { - $adds[] = $this->set($code); - } - - // If any of them came back true, we're good to go - return in_array(true, $adds); - } - - /** - * Convert the array of codes to integers - * - * @param array $codes - * @return array - */ - protected function convertToCodes(array $codes) - { - foreach ($codes as $key => $code) { - if (is_int($code)) { - continue; - } - - $codes[$key] = $this->getCode($code); - } - - return $codes; - } - - /** - * Retrieve the integers from the mixed code input - * - * @param string|array $code - * - * @return integer|array - */ - protected function getCode($code) - { - if (is_array($code)) { - return $this->getCodeArray($code); - } - - return $this->get($code); - } - - /** - * Retrieve an array of integers from the array of codes - * - * @param array $codes - * - * @return array - */ - protected function getCodeArray(array $codes) - { - foreach ($codes as $key => $code) { - $codes[$key] = $this->get($code); - } - - return $codes; - } - - /** - * Parse the add method for the style they are trying to add - * - * @param string $method - * - * @return string - */ - protected function parseAddMethod($method) - { - return strtolower(substr($method, 3, strlen($method))); - } - - /** - * Add a custom style - * - * @param string $style - * @param string $key - * @param string $value - */ - protected function add($style, $key, $value) - { - $this->style[$style]->add($key, $value); - - // If we are adding a color, make sure it gets added - // as a background color too - if ($style == 'color') { - $this->style['background']->add($key, $value); - } - } - - /** - * Magic Methods - * - * List of possible magic methods are at the top of this class - * - * @param string $requested_method - * @param array $arguments - */ - public function __call($requested_method, $arguments) - { - // The only methods we are concerned about are 'add' methods - if (substr($requested_method, 0, 3) != 'add') { - return false; - } - - $style = $this->parseAddMethod($requested_method); - - if (array_key_exists($style, $this->style)) { - list($key, $value) = $arguments; - $this->add($style, $key, $value); - } - } -} diff --git a/source/vendor/league/climate/src/Decorator/Tags.php b/source/vendor/league/climate/src/Decorator/Tags.php deleted file mode 100644 index ab15a41..0000000 --- a/source/vendor/league/climate/src/Decorator/Tags.php +++ /dev/null @@ -1,76 +0,0 @@ -keys = $keys; - $this->build(); - } - - /** - * Get all available tags - * - * @return array - */ - - public function all() - { - return $this->tags; - } - - /** - * Get the value of the requested tag - * - * @param string $key - * - * @return string|null - */ - - public function value($key) - { - return (array_key_exists($key, $this->tags)) ? $this->tags[$key] : null; - } - - /** - * Get the regular expression that can be used to parse the string for tags - * - * @return string - */ - - public function regex() - { - return '(<(?:(?:(?:\\\)*\/)*(?:' . implode('|', array_keys($this->keys)) . '))>)'; - } - - /** - * Build the search and replace for all of the various style tags - */ - - protected function build() - { - foreach ($this->keys as $tag => $code) { - $this->tags["<{$tag}>"] = $code; - $this->tags[""] = $code; - $this->tags["<\\/{$tag}>"] = $code; - } - } -} diff --git a/source/vendor/league/climate/src/Exceptions/Exception.php b/source/vendor/league/climate/src/Exceptions/Exception.php deleted file mode 100644 index 3b6f140..0000000 --- a/source/vendor/league/climate/src/Exceptions/Exception.php +++ /dev/null @@ -1,7 +0,0 @@ - 1, - LogLevel::ALERT => 2, - LogLevel::CRITICAL => 3, - LogLevel::ERROR => 4, - LogLevel::WARNING => 5, - LogLevel::NOTICE => 6, - LogLevel::INFO => 7, - LogLevel::DEBUG => 8, - ]; - - /** - * @var int $level Ignore logging attempts at a level less than this. - */ - private $level; - - /** - * @var CLImate $climate The underlying climate instance we are using for output. - */ - private $climate; - - /** - * Create a new Logger instance. - * - * @param string $level One of the LogLevel constants - * @param CLImate $climate An existing CLImate instance to use for output - */ - public function __construct($level = LogLevel::INFO, CLImate $climate = null) - { - $this->level = $this->convertLevel($level); - - if ($climate === null) { - $climate = new CLImate; - } - $this->climate = $climate; - - # Define some default styles to use for the output - $commands = [ - "emergency" => ["white", "bold", "background_red"], - "alert" => ["white", "background_yellow"], - "critical" => ["red", "bold"], - "error" => ["red"], - "warning" => "yellow", - "notice" => "light_cyan", - "info" => "green", - "debug" => "dark_gray", - ]; - - # If any of the required styles are not defined then define them now - foreach ($commands as $command => $style) { - if (!$this->climate->style->get($command)) { - $this->climate->style->addCommand($command, $style); - } - } - } - - - /** - * Get a numeric log level for the passed parameter. - * - * @param string $level One of the LogLevel constants - * - * @return int - */ - private function convertLevel($level) - { - # If this is one of the defined string log levels then return it's numeric value - if (!array_key_exists($level, $this->levels)) { - throw new InvalidArgumentException("Unknown log level: {$level}"); - } - - return $this->levels[$level]; - } - - - /** - * Get a new instance logging at a different level - * - * @param string $level One of the LogLevel constants - * - * @return Logger - */ - public function withLogLevel($level) - { - $logger = clone $this; - $logger->level = $this->convertLevel($level); - return $logger; - } - - - /** - * Log messages to a CLImate instance. - * - * @param string $level One of the LogLevel constants - * @param string|object $message If an object is passed it must implement __toString() - * @param array $context Placeholders to be substituted in the message - * - * @return void - */ - public function log($level, $message, array $context = []) - { - if ($this->convertLevel($level) > $this->level) { - return; - } - - # Handle objects implementing __toString - $message = (string)$message; - - # Handle any placeholders in the $context array - foreach ($context as $key => $val) { - $placeholder = "{" . $key . "}"; - - # If this context key is used as a placeholder, then replace it, and remove it from the $context array - if (strpos($message, $placeholder) !== false) { - $val = (string)$val; - $message = str_replace($placeholder, $val, $message); - unset($context[$key]); - } - } - - # Send the message to the climate instance - $this->climate->{$level}($message); - - # Append any context information not used as placeholders - $this->outputRecursiveContext($level, $context, 1); - } - - - /** - * Handle recursive arrays in the logging context. - * - * @param string $level One of the LogLevel constants - * @param array $context The array of context to output - * @param int $indent The current level of indentation to be used - * - * @return void - */ - private function outputRecursiveContext($level, array $context, $indent) - { - foreach ($context as $key => $val) { - $this->climate->tab($indent); - - $this->climate->{$level}()->inline("{$key}: "); - - if (is_array($val)) { - $this->climate->{$level}("["); - $this->outputRecursiveContext($level, $val, $indent + 1); - $this->climate->tab($indent)->{$level}("]"); - } else { - $this->climate->{$level}((string)$val); - } - } - } -} diff --git a/source/vendor/league/climate/src/Settings/Art.php b/source/vendor/league/climate/src/Settings/Art.php deleted file mode 100644 index cf69ab9..0000000 --- a/source/vendor/league/climate/src/Settings/Art.php +++ /dev/null @@ -1,22 +0,0 @@ -dirs = array_merge($this->dirs, func_get_args()); - $this->dirs = array_filter($this->dirs); - $this->dirs = array_values($this->dirs); - } -} diff --git a/source/vendor/league/climate/src/Settings/Manager.php b/source/vendor/league/climate/src/Settings/Manager.php deleted file mode 100644 index ccd5a32..0000000 --- a/source/vendor/league/climate/src/Settings/Manager.php +++ /dev/null @@ -1,84 +0,0 @@ -getPath($name)); - } - - /** - * Add a setting - * - * @param string $name - * @param mixed $value - */ - public function add($name, $value) - { - $setting = $this->getPath($name); - $key = $this->getClassName($name); - - // If the current key doesn't exist in the settings array, set it up - if (!array_key_exists($name, $this->settings)) { - $this->settings[$key] = new $setting(); - } - - $this->settings[$key]->add($value); - } - - /** - * Get the value of the requested setting if it exists - * - * @param string $key - * - * @return mixed - */ - public function get($key) - { - if (array_key_exists($key, $this->settings)) { - return $this->settings[$key]; - } - - return false; - } - - /** - * Get the short name for the requested settings class - * - * @param string $name - * - * @return string - */ - protected function getPath($name) - { - return 'League\CLImate\Settings\\' . $this->getClassName($name); - } - - /** - * Get the short class name for the setting - * - * @param string $name - * - * @return string - */ - protected function getClassName($name) - { - return ucwords(str_replace('add_', '', $name)); - } -} diff --git a/source/vendor/league/climate/src/Settings/SettingsImporter.php b/source/vendor/league/climate/src/Settings/SettingsImporter.php deleted file mode 100644 index 72420cb..0000000 --- a/source/vendor/league/climate/src/Settings/SettingsImporter.php +++ /dev/null @@ -1,32 +0,0 @@ -$method($setting); - } - } -} diff --git a/source/vendor/league/climate/src/Settings/SettingsInterface.php b/source/vendor/league/climate/src/Settings/SettingsInterface.php deleted file mode 100644 index 180bd67..0000000 --- a/source/vendor/league/climate/src/Settings/SettingsInterface.php +++ /dev/null @@ -1,11 +0,0 @@ -$key = $value; - } - } - - /** - * Get the parser for the current object - * - * @return \League\CLImate\Decorator\Parser\Parser - */ - public function getParser() - { - return $this->parser; - } - - /** - * Check if this object requires a new line to be added after the output - * - * @return boolean - */ - public function sameLine() - { - return false; - } -} diff --git a/source/vendor/league/climate/src/TerminalObject/Basic/BasicTerminalObjectInterface.php b/source/vendor/league/climate/src/TerminalObject/Basic/BasicTerminalObjectInterface.php deleted file mode 100644 index 863abb5..0000000 --- a/source/vendor/league/climate/src/TerminalObject/Basic/BasicTerminalObjectInterface.php +++ /dev/null @@ -1,34 +0,0 @@ -char($char)->length($length); - } - - /** - * Set the character to repeat for the border - * - * @param string $char - * - * @return Border - */ - public function char($char) - { - $this->set('char', $char); - - return $this; - } - - /** - * Set the length of the border - * - * @param integer $length - * - * @return Border - */ - public function length($length) - { - $this->set('length', $length); - - return $this; - } - - /** - * Return the border - * - * @return string - */ - public function result() - { - $length = $this->length ?: $this->util->width() ?: 100; - $str = str_repeat($this->char, $length); - $str = substr($str, 0, $length); - - return $str; - } -} diff --git a/source/vendor/league/climate/src/TerminalObject/Basic/Br.php b/source/vendor/league/climate/src/TerminalObject/Basic/Br.php deleted file mode 100644 index 8c69797..0000000 --- a/source/vendor/league/climate/src/TerminalObject/Basic/Br.php +++ /dev/null @@ -1,16 +0,0 @@ -count, ''); - } -} diff --git a/source/vendor/league/climate/src/TerminalObject/Basic/Clear.php b/source/vendor/league/climate/src/TerminalObject/Basic/Clear.php deleted file mode 100644 index 23f2766..0000000 --- a/source/vendor/league/climate/src/TerminalObject/Basic/Clear.php +++ /dev/null @@ -1,21 +0,0 @@ -count > 0) { - $string .= $this->util->cursor->startOfCurrentLine(); - $string .= $this->util->cursor->deleteCurrentLine(); - --$this->count; - - $string .= $this->util->cursor->up(); - } - - $string .= $this->util->cursor->down(); - - return $string; - } - - - /** - * @inheritdoc - */ - public function sameLine() - { - return true; - } -} diff --git a/source/vendor/league/climate/src/TerminalObject/Basic/Columns.php b/source/vendor/league/climate/src/TerminalObject/Basic/Columns.php deleted file mode 100644 index 9569abd..0000000 --- a/source/vendor/league/climate/src/TerminalObject/Basic/Columns.php +++ /dev/null @@ -1,207 +0,0 @@ -data = $data; - $this->column_count = $column_count; - } - - /** - * Calculate the number of columns organize data - * - * @return array - */ - public function result() - { - $keys = array_keys($this->data); - $first_key = reset($keys); - - return (!is_int($first_key)) ? $this->associativeColumns() : $this->columns(); - } - - /** - * Get columns for a regular array - * - * @return array - */ - protected function columns() - { - $this->data = $this->setData(); - $column_widths = $this->getColumnWidths(); - $output = []; - $count = count(reset($this->data)); - - for ($i = 0; $i < $count; $i++) { - $output[] = $this->getRow($i, $column_widths); - } - - return $output; - } - - /** - * Re-configure the data into it's final form - */ - protected function setData() - { - // If it's already an array of arrays, we're good to go - if (is_array(reset($this->data))) { - return $this->setArrayOfArraysData(); - } - - $column_width = $this->getColumnWidth($this->data); - $row_count = $this->getMaxRows($column_width); - - return array_chunk($this->data, $row_count); - } - - /** - * Re-configure an array of arrays into column arrays - */ - protected function setArrayOfArraysData() - { - $this->setColumnCountViaArray($this->data); - - $new_data = array_fill(0, $this->column_count, []); - - foreach ($this->data as $items) { - for ($i = 0; $i < $this->column_count; $i++) { - $new_data[$i][] = (array_key_exists($i, $items)) ? $items[$i] : null; - } - } - - return $new_data; - } - - /** - * Get columns for an associative array - * - * @return array - */ - protected function associativeColumns() - { - $column_width = $this->getColumnWidth(array_keys($this->data)); - $output = []; - - foreach ($this->data as $key => $value) { - $output[] = $this->pad($key, $column_width) . $value; - } - - return $output; - } - - /** - * Get the row of data - * - * @param integer $key - * @param array $column_widths - * - * @return string - */ - protected function getRow($key, $column_widths) - { - $row = []; - - for ($j = 0; $j < $this->column_count; $j++) { - if (isset($this->data[$j]) && array_key_exists($key, $this->data[$j])) { - $row[] = $this->pad($this->data[$j][$key], $column_widths[$j]); - } - } - - return trim(implode('', $row)); - } - - /** - * Get the standard column width - * - * @param array $data - * - * @return integer - */ - protected function getColumnWidth($data) - { - // Return the maximum width plus a buffer - return $this->maxStrLen($data) + 5; - } - - /** - * Get an array of each column's width - * - * @return array - */ - protected function getColumnWidths() - { - $column_widths = []; - - for ($i = 0; $i < $this->column_count; $i++) { - if (!isset($this->data[$i])) { - $column_widths[] = 0; - continue; - } - $column_widths[] = $this->getColumnWidth($this->data[$i]); - } - - return $column_widths; - } - - /** - * Set the count property - * - * @param integer $column_width - */ - protected function setColumnCount($column_width) - { - $this->column_count = (int) floor($this->util->width() / $column_width); - } - - /** - * Set the count property via an array - * - * @param array $items - */ - protected function setColumnCountViaArray($items) - { - $counts = array_map(function ($arr) { - return count($arr); - }, $items); - - $this->column_count = max($counts); - } - - /** - * Get the number of rows per column - * - * @param integer $column_width - * - * @return integer - */ - protected function getMaxRows($column_width) - { - if (!$this->column_count) { - $this->setColumnCount($column_width); - } - - return ceil(count($this->data) / $this->column_count); - } -} diff --git a/source/vendor/league/climate/src/TerminalObject/Basic/Draw.php b/source/vendor/league/climate/src/TerminalObject/Basic/Draw.php deleted file mode 100644 index 0b10116..0000000 --- a/source/vendor/league/climate/src/TerminalObject/Basic/Draw.php +++ /dev/null @@ -1,30 +0,0 @@ -addDir(__DIR__ . \DIRECTORY_SEPARATOR . '..' . \DIRECTORY_SEPARATOR . '..' . \DIRECTORY_SEPARATOR . 'ASCII'); - - $this->art = $art; - } - - /** - * Return the art - * - * @return array - */ - public function result() - { - $file = $this->artFile($this->art); - - return $this->parse($file); - } -} diff --git a/source/vendor/league/climate/src/TerminalObject/Basic/Dump.php b/source/vendor/league/climate/src/TerminalObject/Basic/Dump.php deleted file mode 100644 index 4412f03..0000000 --- a/source/vendor/league/climate/src/TerminalObject/Basic/Dump.php +++ /dev/null @@ -1,36 +0,0 @@ -data = $data; - } - - /** - * Return the data as JSON - * - * @return string - */ - public function result() - { - ob_start(); - - var_dump($this->data); - - $result = ob_get_contents(); - - ob_end_clean(); - - return $result; - } -} diff --git a/source/vendor/league/climate/src/TerminalObject/Basic/Flank.php b/source/vendor/league/climate/src/TerminalObject/Basic/Flank.php deleted file mode 100644 index 046bcaf..0000000 --- a/source/vendor/league/climate/src/TerminalObject/Basic/Flank.php +++ /dev/null @@ -1,74 +0,0 @@ -str = $str; - - $this->char($char)->repeat($repeat); - } - - /** - * Set the character(s) to repeat on either side - * - * @param string $char - * - * @return Flank - */ - public function char($char) - { - $this->set('char', $char); - - return $this; - } - - /** - * Set the repeat of the flank character(s) - * - * @param integer $repeat - * - * @return Flank - */ - public function repeat($repeat) - { - $this->set('repeat', $repeat); - - return $this; - } - - /** - * Return the flanked string - * - * @return string - */ - public function result() - { - $flank = str_repeat($this->char, $this->repeat); - - return "{$flank} {$this->str} {$flank}"; - } -} diff --git a/source/vendor/league/climate/src/TerminalObject/Basic/Inline.php b/source/vendor/league/climate/src/TerminalObject/Basic/Inline.php deleted file mode 100644 index 9cd8dc5..0000000 --- a/source/vendor/league/climate/src/TerminalObject/Basic/Inline.php +++ /dev/null @@ -1,16 +0,0 @@ -data = $data; - } - - /** - * Return the data as JSON - * - * @return string - */ - public function result() - { - return json_encode($this->data, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES); - } -} diff --git a/source/vendor/league/climate/src/TerminalObject/Basic/Out.php b/source/vendor/league/climate/src/TerminalObject/Basic/Out.php deleted file mode 100644 index 550b6c4..0000000 --- a/source/vendor/league/climate/src/TerminalObject/Basic/Out.php +++ /dev/null @@ -1,28 +0,0 @@ -content = $content; - } - - /** - * Return the content to output - * - * @return string - */ - public function result() - { - return $this->content; - } -} diff --git a/source/vendor/league/climate/src/TerminalObject/Basic/Repeatable.php b/source/vendor/league/climate/src/TerminalObject/Basic/Repeatable.php deleted file mode 100644 index 7d8dacd..0000000 --- a/source/vendor/league/climate/src/TerminalObject/Basic/Repeatable.php +++ /dev/null @@ -1,18 +0,0 @@ -count = (int) round(max((int) $count, 1)); - } -} diff --git a/source/vendor/league/climate/src/TerminalObject/Basic/Tab.php b/source/vendor/league/climate/src/TerminalObject/Basic/Tab.php deleted file mode 100644 index 1eae6cf..0000000 --- a/source/vendor/league/climate/src/TerminalObject/Basic/Tab.php +++ /dev/null @@ -1,29 +0,0 @@ -count); - } -} diff --git a/source/vendor/league/climate/src/TerminalObject/Basic/Table.php b/source/vendor/league/climate/src/TerminalObject/Basic/Table.php deleted file mode 100644 index f40f789..0000000 --- a/source/vendor/league/climate/src/TerminalObject/Basic/Table.php +++ /dev/null @@ -1,308 +0,0 @@ -data = $this->getData($data); - $this->prefix = $prefix; - } - - - /** - * @param array $input - * - * @return array - */ - private function getData(array $input) - { - $output = []; - - foreach ($input as $item) { - if (is_object($item)) { - $item = get_object_vars($item); - } - - if (!is_array($item)) { - throw new InvalidArgumentException("Invalid table data, you must pass an array of arrays or objects"); - } - - $output[] = $item; - } - - return $this->splitRows($output); - } - - /** - * Split each row in $data into an array of arrays - * Where each value represents a line in a cell - * - * @param array $data - * - * @return array - */ - private function splitRows($data) - { - foreach ($data as $row_key => $row) { - $height = 1; - $lines = []; - foreach ($row as $key => $column) { - $lines[$key] = preg_split('/(\r\n|\r|\n)/u', $column); - $height = max($height, count($lines[$key])); - } - $keys = array_keys($row); - $new_rows = []; - for ($i = 0; $i < $height; $i++) { - $new_row = []; - foreach ($keys as $key) { - $new_row[$key] = $lines[$key][$i] ?? ''; - } - $new_rows[] = $new_row; - } - $data[$row_key] = $new_rows; - } - return $data; - } - - - /** - * Return the built rows - * - * @return array - */ - public function result() - { - $this->column_widths = $this->getColumnWidths(); - $this->table_width = $this->getWidth(); - $this->border = $this->getBorder(); - - $this->buildHeaderRow(); - - foreach ($this->data as $row_columns) { - foreach ($row_columns as $columns) { - $this->addLine($this->buildRow($columns)); - } - $this->addLine($this->border); - } - - return $this->rows; - } - - /** - * Append a line to the output. - * - * @param string $line The line to output - * - * @return void - */ - private function addLine($line) - { - $this->rows[] = $this->prefix . $line; - } - - - /** - * Determine the width of the table - * - * @return integer - */ - protected function getWidth() - { - $first_row = reset($this->data); - $first_row = reset($first_row); - $first_row = $this->buildRow($first_row); - - return $this->lengthWithoutTags($first_row); - } - - /** - * Get the border for each row based on the table width - */ - protected function getBorder() - { - return (new Border())->length($this->table_width)->result(); - } - - /** - * Check for a header row (if it's an array of associative arrays or objects), - * if there is one, tack it onto the front of the rows array - */ - protected function buildHeaderRow() - { - $this->addLine($this->border); - - $header_row = $this->getHeaderRow(); - if ($header_row) { - $this->addLine($this->buildRow($header_row)); - $this->addLine((new Border)->char('=')->length($this->table_width)->result()); - } - } - - /** - * Get table row - * - * @param mixed $columns - * - * @return string - */ - protected function buildRow($columns) - { - $row = []; - - foreach ($columns as $key => $column) { - $row[] = $this->buildCell($key, $column); - } - - $row = implode($this->column_divider, $row); - - return trim($this->column_divider . $row . $this->column_divider); - } - - /** - * Build the string for this particular table cell - * - * @param mixed $key - * @param string $column - * - * @return string - */ - protected function buildCell($key, $column) - { - return $this->pad($column, $this->column_widths[$key]); - } - - /** - * Get the header row for the table if it's an associative array or object - * - * @return mixed - */ - protected function getHeaderRow() - { - $first_item = reset($this->data); - $first_item = reset($first_item); - - $keys = array_keys($first_item); - $first_key = reset($keys); - - // We have an associative array (probably), let's have a header row - if (!is_int($first_key)) { - return array_combine($keys, $keys); - } - - return false; - } - - /** - * Determine the width of each column - * - * @return array - */ - protected function getColumnWidths() - { - $first_row = reset($this->data); - $first_row = reset($first_row); - - // Create an array with the columns as keys and values of zero - $column_widths = $this->getDefaultColumnWidths($first_row); - - foreach ($this->data as $row_columns) { - foreach ($row_columns as $columns) { - foreach ($columns as $key => $column) { - $column_widths[$key] = $this->getCellWidth($column_widths[$key], $column); - } - } - } - - return $column_widths; - } - - /** - * Set up an array of default column widths - * - * @param array $columns - * - * @return array - */ - protected function getDefaultColumnWidths(array $columns) - { - $widths = $this->arrayOfStrLens(array_keys($columns)); - - return array_combine(array_keys($columns), $widths); - } - - /** - * Determine the width of the columns without tags - * - * @param array $current_width - * @param string $str - * - * @return integer - */ - protected function getCellWidth($current_width, $str) - { - return max($current_width, $this->lengthWithoutTags($str)); - } -} diff --git a/source/vendor/league/climate/src/TerminalObject/Dynamic/Animation.php b/source/vendor/league/climate/src/TerminalObject/Dynamic/Animation.php deleted file mode 100644 index 4b5ee21..0000000 --- a/source/vendor/league/climate/src/TerminalObject/Dynamic/Animation.php +++ /dev/null @@ -1,213 +0,0 @@ -addDir(__DIR__ . \DIRECTORY_SEPARATOR . '..' . \DIRECTORY_SEPARATOR . '..' . \DIRECTORY_SEPARATOR . 'ASCII'); - - $this->setSleeper($sleeper); - $this->setKeyFrames($keyframes); - - $this->art = $art; - } - - /** - * Run a basic animation - */ - public function run() - { - $files = $this->artDir($this->art); - $animation = []; - - foreach ($files as $file) { - $animation[] = $this->parse($file); - } - - $this->animate($animation); - } - - /** - * Set the speed of the animation based on a percentage - * (50% slower, 200% faster, etc) - * - * @param int|float $percentage - * - * @return \League\CLImate\TerminalObject\Dynamic\Animation - */ - public function speed($percentage) - { - $this->sleeper->speed($percentage); - - return $this; - } - - /** - * Scroll the art - * - * @param string $direction - * @return bool - */ - public function scroll($direction = 'right') - { - $this->setupKeyframes(); - - $mapping = $this->getScrollDirectionMapping(); - - if (!array_key_exists($direction, $mapping)) { - return false; - } - - $lines = $this->getLines(); - $enter_from = $mapping[$direction]; - $exit_to = $mapping[$enter_from]; - - $this->animate($this->keyframes->scroll($lines, $enter_from, $exit_to)); - } - - /** - * Animate the art exiting the screen - * - * @param string $direction top|bottom|right|left - */ - public function exitTo($direction) - { - $this->setupKeyframes(); - - $this->animate($this->keyframes->exitTo($this->getLines(), $direction)); - } - - /** - * Animate the art entering the screen - * - * @param string $direction top|bottom|right|left - */ - public function enterFrom($direction) - { - $this->setupKeyframes(); - - $this->animate($this->keyframes->enterFrom($this->getLines(), $direction)); - } - - protected function getScrollDirectionMapping() - { - return [ - 'left' => 'right', - 'right' => 'left', - 'top' => 'bottom', - 'bottom' => 'top', - 'up' => 'bottom', - 'down' => 'top', - ]; - } - - protected function getLines() - { - return $this->parse($this->artFile($this->art)); - } - - /** - * @param \League\CLImate\TerminalObject\Helper\Sleeper $sleeper - */ - protected function setSleeper($sleeper = null) - { - $this->sleeper = $sleeper ?: new Sleeper(); - } - - /** - * @param League\CLImate\TerminalObject\Dynamic\Animation\Keyframe $keyframes - */ - protected function setKeyFrames($keyframes) - { - $this->keyframes = $keyframes ?: new Keyframe; - } - - /** - * Set up the necessary properties on the Keyframe class - */ - protected function setupKeyframes() - { - $this->keyframes->parser($this->parser); - $this->keyframes->util($this->util); - } - - /** - * Animate the given keyframes - * - * @param array $keyframes Array of arrays - */ - protected function animate(array $keyframes) - { - $count = 0; - - foreach ($keyframes as $lines) { - $this->writeKeyFrame($lines, $count); - $this->sleeper->sleep(); - $count = count($lines); - } - } - - /** - * Write the current keyframe to the terminal, line by line - * - * @param array $lines - * @param integer $count - */ - protected function writeKeyFrame(array $lines, $count) - { - foreach ($lines as $key => $line) { - $content = $this->getLineFormatted($line, $key, $count); - $this->output->write($this->parser->apply($content)); - } - } - - /** - * Format the line to re-write previous lines, if necessary - * - * @param string $line - * @param integer $key - * @param integer $last_frame_count - * - * @return string - */ - protected function getLineFormatted($line, $key, $last_frame_count) - { - // If this is the first thing we're writing, just return the line - if ($last_frame_count == 0) { - return $line; - } - - $content = ''; - - // If this is the first line of the frame, - // move the cursor up the total number of previous lines from the previous frame - if ($key == 0) { - $content .= $this->util->cursor->up($last_frame_count); - } - - $content .= $this->util->cursor->startOfCurrentLine(); - $content .= $this->util->cursor->deleteCurrentLine(); - $content .= $line; - - return $content; - } -} diff --git a/source/vendor/league/climate/src/TerminalObject/Dynamic/Animation/Keyframe.php b/source/vendor/league/climate/src/TerminalObject/Dynamic/Animation/Keyframe.php deleted file mode 100644 index cb9fe39..0000000 --- a/source/vendor/league/climate/src/TerminalObject/Dynamic/Animation/Keyframe.php +++ /dev/null @@ -1,265 +0,0 @@ -exitTo($lines, $direction)); - } - - /** - * Get the exit keyframes for the desired direction - * - * @param array $lines - * @param string $direction - * - * @return array - */ - public function exitTo($lines, $direction) - { - $lines = $this->adjustLines($lines, $direction); - $line_method = $this->getLineMethod($direction); - - $direction_keyframes = $this->getDirectionFrames($direction, $lines, $line_method); - - $keyframes = array_fill(0, 4, $lines); - $keyframes = array_merge($keyframes, $direction_keyframes); - $keyframes[] = array_fill(0, count($lines), ''); - - return $keyframes; - } - - /** - * Get scroll keyframes - * - * @param array $lines - * @param string $enter_from - * @param string $exit_to - * - * @return array - */ - public function scroll($lines, $enter_from, $exit_to) - { - $keyframes = $this->enterFrom($lines, $enter_from); - $keyframes = array_merge($keyframes, $this->exitTo($lines, $exit_to)); - $keyframes = array_unique($keyframes, SORT_REGULAR); - $keyframes[] = reset($keyframes); - - return $keyframes; - } - - /** - * Get the line parser for the direction - * - * @param string $direction - * @return string - */ - protected function getLineMethod($direction) - { - return 'current' . ucwords(strtolower($direction)) . 'Line'; - } - - /** - * Adjust the array of lines if necessary - * - * @param array $lines - * @param string $direction - * - * @return array - */ - protected function adjustLines(array $lines, $direction) - { - $adjust_method = 'adjust' . ucwords(strtolower($direction)) . 'Lines'; - - if (method_exists($this, $adjust_method)) { - return $this->$adjust_method($lines); - } - - return $lines; - } - - /** - * Pad the array of lines for "right" animation - * - * @param array $lines - * @return array - */ - protected function adjustRightLines(array $lines) - { - return $this->padArray($lines, $this->util->width()); - } - - /** - * Pad the array of lines for "left" animation - * - * @param array $lines - * @return array - */ - protected function adjustLeftLines(array $lines) - { - return $this->padArray($lines, $this->maxStrLen($lines)); - } - - /** - * Get the keyframes appropriate for the animation direction - * - * @param string $direction - * @param array $lines - * @param string $line_method - * - * @return array - */ - protected function getDirectionFrames($direction, array $lines, $line_method) - { - $mapping = [ - 'exitHorizontalFrames' => ['left', 'right'], - 'exitVerticalFrames' => ['top', 'bottom'], - ]; - - foreach ($mapping as $method => $directions) { - if (in_array($direction, $directions)) { - return $this->$method($lines, $line_method); - } - } - - // Fail gracefully, simply return an array - return []; - } - - /** - * Create horizontal exit animation keyframes for the art - * - * @param array $lines - * @param string $line_method - * - * @return array - */ - protected function exitHorizontalFrames(array $lines, $line_method) - { - $keyframes = []; - $length = mb_strlen($lines[0]); - - for ($i = $length; $i > 0; $i--) { - $keyframes[] = $this->getHorizontalKeyframe($lines, $i, $line_method, $length); - } - - return $keyframes; - } - - /** - * Get the keyframe for a horizontal animation - * - * @param array $lines - * @param int $frame_number - * @param string $line_method - * @param int $length - * - * @return array - */ - protected function getHorizontalKeyframe(array $lines, $frame_number, $line_method, $length) - { - $keyframe = []; - - foreach ($lines as $line) { - $keyframe[] = $this->$line_method($line, $frame_number, $length); - } - - return $keyframe; - } - - /** - * Create vertical exit animation keyframes for the art - * - * @param array $lines - * @param string $line_method - * - * @return array - */ - protected function exitVerticalFrames(array $lines, $line_method) - { - $keyframes = []; - $line_count = count($lines); - - for ($i = $line_count - 1; $i >= 0; $i--) { - $keyframes[] = $this->$line_method($lines, $line_count, $i); - } - - return $keyframes; - } - - /** - * Get the current line as it is exiting left - * - * @param string $line - * @param int $frame_number - * - * @return string - */ - protected function currentLeftLine($line, $frame_number) - { - return mb_substr($line, -$frame_number); - } - - - /** - * Get the current line as it is exiting right - * - * @param string $line - * @param int $frame_number - * @param int $length - * - * @return string - */ - protected function currentRightLine($line, $frame_number, $length) - { - return str_repeat(' ', $length - $frame_number) . mb_substr($line, 0, $frame_number); - } - - /** - * Slice off X number of lines from the bottom and fill the rest with empty strings - * - * @param array $lines - * @param integer $total_lines - * @param integer $current - * - * @return array - */ - protected function currentTopLine($lines, $total_lines, $current) - { - $keyframe = array_slice($lines, -$current, $current); - - return array_merge($keyframe, array_fill(0, $total_lines - $current, '')); - } - - /** - * Slice off X number of lines from the top and fill the rest with empty strings - * - * @param array $lines - * @param integer $total_lines - * @param integer $current - * - * @return array - */ - protected function currentBottomLine($lines, $total_lines, $current) - { - $keyframe = array_fill(0, $total_lines - $current, ''); - - return array_merge($keyframe, array_slice($lines, 0, $current)); - } -} diff --git a/source/vendor/league/climate/src/TerminalObject/Dynamic/Checkbox/Checkbox.php b/source/vendor/league/climate/src/TerminalObject/Dynamic/Checkbox/Checkbox.php deleted file mode 100644 index 793fdcc..0000000 --- a/source/vendor/league/climate/src/TerminalObject/Dynamic/Checkbox/Checkbox.php +++ /dev/null @@ -1,222 +0,0 @@ -value = (!is_int($value)) ? $value : $label; - $this->label = $label; - } - - /** - * @return bool - */ - public function isCurrent() - { - return $this->current; - } - - /** - * @return bool - */ - public function isChecked() - { - return $this->checked; - } - - /** - * @return bool - */ - public function isFirst() - { - return $this->first; - } - - /** - * @return bool - */ - public function isLast() - { - return $this->last; - } - - /** - * Set whether the pointer is currently pointing at this checkbox - * - * @param bool $current - * - * @return Checkbox - */ - public function setCurrent($current = true) - { - $this->current = $current; - - return $this; - } - - /** - * Set whether the checkbox is currently checked - * - * @param bool $checked - * - * @return Checkbox - */ - public function setChecked($checked = true) - { - $this->checked = $checked; - - return $this; - } - - /** - * @return Checkbox - */ - public function setFirst() - { - $this->first = true; - - return $this; - } - - /** - * @return Checkbox - */ - public function setLast() - { - $this->last = true; - - return $this; - } - - /** - * @return string|int|bool - */ - public function getValue() - { - return $this->value; - } - - /** - * Build out basic checkbox string based on current options - * - * @return string - */ - protected function buildCheckboxString() - { - $parts = [ - ($this->isCurrent()) ? $this->pointer() : ' ', - $this->checkbox($this->isChecked()), - $this->label, - ]; - - $line = implode(' ', $parts); - - return $line . $this->getPaddingString($line); - } - - /** - * Get the padding string based on the length of the terminal/line - * - * @param string $line - * - * @return string - */ - protected function getPaddingString($line) - { - $length = $this->util->width() - $this->lengthWithoutTags($line); - if ($length < 1) { - return ''; - } - - return str_repeat(' ', $length); - } - - /** - * Get the checkbox symbol - * - * @param bool $checked - * - * @return string - */ - protected function checkbox($checked) - { - if ($checked) { - return html_entity_decode("●"); - } - - return html_entity_decode("○"); - } - - /** - * Get the pointer symbol - * - * @return string - */ - protected function pointer() - { - return html_entity_decode("❯"); - } - - public function __toString() - { - if ($this->isFirst()) { - return $this->buildCheckboxString(); - } - - if ($this->isLast()) { - return $this->buildCheckboxString() . $this->util->cursor->left(10) . ''; - } - - return $this->buildCheckboxString(); - } -} diff --git a/source/vendor/league/climate/src/TerminalObject/Dynamic/Checkbox/CheckboxGroup.php b/source/vendor/league/climate/src/TerminalObject/Dynamic/Checkbox/CheckboxGroup.php deleted file mode 100644 index 3a09d68..0000000 --- a/source/vendor/league/climate/src/TerminalObject/Dynamic/Checkbox/CheckboxGroup.php +++ /dev/null @@ -1,191 +0,0 @@ - $option) { - $this->checkboxes[] = new Checkbox($option, $key); - } - - $this->count = count($this->checkboxes); - - $this->checkboxes[0]->setFirst()->setCurrent(); - $this->checkboxes[$this->count - 1]->setLast(); - } - - public function write() - { - array_map([$this, 'writeCheckbox'], $this->checkboxes); - } - - /** - * Retrieve the checked option values - * - * @return array - */ - public function getCheckedValues() - { - return array_values(array_map([$this, 'getValue'], $this->getChecked())); - } - - /** - * Set the newly selected option based on the direction - * - * @param string $direction 'previous' or 'next' - */ - public function setCurrent($direction) - { - list($option, $key) = $this->getCurrent(); - - $option->setCurrent(false); - - $new_key = $this->getCurrentKey($direction, $option, $key); - - $this->checkboxes[$new_key]->setCurrent(); - } - - /** - * Toggle the current option's checked status - */ - public function toggleCurrent() - { - list($option) = $this->getCurrent(); - - $option->setChecked(!$option->isChecked()); - } - - /** - * Get the number of checkboxes - * - * @return int - */ - public function count() - { - return $this->count; - } - - /** - * Retrieve the checked options - * - * @return array - */ - protected function getChecked() - { - return array_filter($this->checkboxes, [$this, 'isChecked']); - } - - /** - * Determine whether the option is checked - * - * @param Checkbox $option - * - * @return bool - */ - protected function isChecked($option) - { - return $option->isChecked(); - } - - /** - * Retrieve the option's value - * - * @param Checkbox $option - * - * @return mixed - */ - protected function getValue($option) - { - return $option->getValue(); - } - - /** - * Get the currently selected option - * - * @return array - */ - protected function getCurrent() - { - foreach ($this->checkboxes as $key => $option) { - if ($option->isCurrent()) { - return [$option, $key]; - } - } - } - - /** - * Retrieve the correct current key - * - * @param string $direction 'previous' or 'next' - * @param Checkbox $option - * @param int $key - * - * @return int - */ - protected function getCurrentKey($direction, $option, $key) - { - $method = 'get' . ucwords($direction). 'Key'; - - return $this->{$method}($option, $key); - } - - /** - * @param Checkbox $option - * @param int $key - * - * @return int - */ - protected function getPreviousKey($option, $key) - { - if ($option->isFirst()) { - return count($this->checkboxes) - 1; - } - - return --$key; - } - - /** - * @param Checkbox $option - * @param int $key - * - * @return int - */ - protected function getNextKey($option, $key) - { - if ($option->isLast()) { - return 0; - } - - return ++$key; - } - - /** - * @param Checkbox $checkbox - */ - protected function writeCheckbox($checkbox) - { - $checkbox->util($this->util); - $checkbox->parser($this->parser); - - $parsed = $this->parser->apply((string) $checkbox); - - if ($checkbox->isLast()) { - $this->output->sameLine()->write($parsed); - return; - } - - $this->output->write($parsed); - } -} diff --git a/source/vendor/league/climate/src/TerminalObject/Dynamic/Checkbox/RadioGroup.php b/source/vendor/league/climate/src/TerminalObject/Dynamic/Checkbox/RadioGroup.php deleted file mode 100644 index bf08611..0000000 --- a/source/vendor/league/climate/src/TerminalObject/Dynamic/Checkbox/RadioGroup.php +++ /dev/null @@ -1,38 +0,0 @@ -getCurrent(); - - $checkbox->setChecked(!$checkbox->isChecked()); - - foreach ($this->checkboxes as $key => $checkbox) { - if ($key == $checkbox_key) { - continue; - } - - $checkbox->setChecked(false); - } - } - - /** - * Get the checked option - * - * @return string|bool|int - */ - public function getCheckedValues() - { - if ($checked = $this->getChecked()) { - return reset($checked)->getValue(); - } - - return null; - } -} diff --git a/source/vendor/league/climate/src/TerminalObject/Dynamic/Checkboxes.php b/source/vendor/league/climate/src/TerminalObject/Dynamic/Checkboxes.php deleted file mode 100644 index 89c3bfe..0000000 --- a/source/vendor/league/climate/src/TerminalObject/Dynamic/Checkboxes.php +++ /dev/null @@ -1,159 +0,0 @@ -prompt = $prompt; - $this->reader = $reader ?: new Stdin(); - - $this->checkboxes = $this->buildCheckboxes($options); - } - - /** - * Do it! Prompt the user for information! - * - * @return string - */ - public function prompt() - { - $this->output->write($this->parser->apply($this->promptFormatted())); - - $this->writeCheckboxes(); - - $this->util->system->exec('stty sane'); - - return $this->checkboxes->getCheckedValues(); - } - - /** - * Build out the checkboxes - * - * @param array $options - * - * @return Checkbox\CheckboxGroup - */ - protected function buildCheckboxes(array $options) - { - return new Checkbox\CheckboxGroup($options); - } - - /** - * Format the prompt string - * - * @return string - */ - protected function promptFormatted() - { - return $this->prompt . ' (use to select)'; - } - - /** - * Output the checkboxes and listen for any keystrokes - */ - protected function writeCheckboxes() - { - $this->updateCheckboxView(); - - $this->util->system->exec('stty -icanon'); - $this->output->sameLine()->write($this->util->cursor->hide()); - - $this->listenForInput(); - } - - /** - * Listen for input and act on it - */ - protected function listenForInput() - { - while ($char = $this->reader->char(1)) { - if ($this->handleCharacter($char)) { - break; - } - - $this->moveCursorToTop(); - $this->updateCheckboxView(); - } - } - - /** - * Take the appropriate action based on the input character, - * returns whether to stop listening or not - * - * @param string $char - * - * @return bool - */ - protected function handleCharacter($char) - { - switch ($char) { - case "\n": - $this->output->sameLine()->write($this->util->cursor->defaultStyle()); - $this->output->sameLine()->write("\e[0m"); - return true; // Break the while loop as well - - case "\e": - $this->handleAnsi(); - break; - - case ' ': - $this->checkboxes->toggleCurrent(); - break; - } - - return false; - } - - /** - * Move the cursor to the top of the option list - */ - protected function moveCursorToTop() - { - $output = $this->util->cursor->up($this->checkboxes->count() - 1); - $output .= $this->util->cursor->startOfCurrentLine(); - - $this->output->sameLine()->write($output); - } - - /** - * Handle any ANSI characters - */ - protected function handleAnsi() - { - switch ($this->reader->char(2)) { - // Up arrow - case '[A': - $this->checkboxes->setCurrent('previous'); - break; - - // Down arrow - case '[B': - $this->checkboxes->setCurrent('next'); - break; - } - } - - /** - * Re-write the checkboxes based on the current objects - */ - protected function updateCheckboxView() - { - $this->checkboxes->util($this->util); - $this->checkboxes->output($this->output); - $this->checkboxes->parser($this->parser); - - $this->checkboxes->write(); - } -} diff --git a/source/vendor/league/climate/src/TerminalObject/Dynamic/Confirm.php b/source/vendor/league/climate/src/TerminalObject/Dynamic/Confirm.php deleted file mode 100644 index a917987..0000000 --- a/source/vendor/league/climate/src/TerminalObject/Dynamic/Confirm.php +++ /dev/null @@ -1,44 +0,0 @@ -default = "n"; - } - - - /** - * Let us know if the user confirmed. - * - * @return bool - */ - public function confirmed() - { - if (in_array($this->default, ["y", "yes"], true)) { - $this->prompt .= " [Y/n]"; - } else { - $this->prompt .= " [y/N]"; - } - - $this->accept(['y', 'yes', 'n', 'no'], false); - - $response = strtolower($this->prompt()); - - return (substr($response, 0, 1) === 'y'); - } -} diff --git a/source/vendor/league/climate/src/TerminalObject/Dynamic/DynamicTerminalObject.php b/source/vendor/league/climate/src/TerminalObject/Dynamic/DynamicTerminalObject.php deleted file mode 100644 index c8f8751..0000000 --- a/source/vendor/league/climate/src/TerminalObject/Dynamic/DynamicTerminalObject.php +++ /dev/null @@ -1,18 +0,0 @@ -prompt = $prompt; - $this->reader = $reader ?: new Stdin(); - } - - /** - * Do it! Prompt the user for information! - * - * @return string - */ - public function prompt() - { - $this->writePrompt(); - - $response = $this->valueOrDefault($this->getUserInput()); - - if ($this->isValidResponse($response)) { - return $response; - } - - return $this->prompt(); - } - - /** - * Define the acceptable responses and whether or not to - * display them to the user - * - * @param array|object $acceptable - * @param boolean $show - * - * @return \League\CLImate\TerminalObject\Dynamic\Input - */ - public function accept($acceptable, $show = false) - { - $this->acceptable = $acceptable; - $this->show_acceptable = $show; - - return $this; - } - - /** - * Define whether we should be strict about exact responses - * - * @return \League\CLImate\TerminalObject\Dynamic\Input - */ - public function strict() - { - $this->strict = true; - - return $this; - } - - /** - * Set a default response - * - * @param string $default - * - * @return \League\CLImate\TerminalObject\Dynamic\Input - */ - public function defaultTo($default) - { - $this->default = $default; - - return $this; - } - - /** - * Set multiline input to true - * - * @return \League\CLImate\TerminalObject\Dynamic\Input - */ - public function multiLine() - { - $this->multiLine = true; - - return $this; - } - - /** - * @return string - */ - protected function getUserInput() - { - if ($this->multiLine) { - return $this->reader->multiLine(); - } - - return $this->reader->line(); - } - - /** - * Write out the formatted prompt - */ - protected function writePrompt() - { - $prompt = $this->parser->apply($this->promptFormatted()); - - $this->output->sameLine()->write($prompt); - } - - /** - * If no response was given and there is a default, return it, - * otherwise return response - * - * @param string $response - * - * @return string - */ - protected function valueOrDefault($response) - { - if (strlen($response) == 0 && strlen($this->default)) { - return $this->default; - } - - return $response; - } - - /** - * Format the acceptable responses as options - * - * @return string - */ - protected function acceptableFormatted() - { - if (!is_array($this->acceptable)) { - return ''; - } - - $acceptable = array_map([$this, 'acceptableItemFormatted'], $this->acceptable); - - return '[' . implode('/', $acceptable) . ']'; - } - - /** - * Format the acceptable item depending on whether it is the default or not - * - * @param string $item - * - * @return string - */ - protected function acceptableItemFormatted($item) - { - if ($item == $this->default) { - return '' . $item . ''; - } - - return $item; - } - - /** - * Format the prompt incorporating spacing and any acceptable options - * - * @return string - */ - protected function promptFormatted() - { - $prompt = $this->prompt . ' '; - - if ($this->show_acceptable) { - $prompt .= $this->acceptableFormatted() . ' '; - } - - return $prompt; - } - - /** - * Apply some string manipulation functions for normalization - * - * @param string|array $var - * @return array - */ - protected function levelPlayingField($var) - { - $levelers = ['trim', 'mb_strtolower']; - - foreach ($levelers as $leveler) { - if (is_array($var)) { - $var = array_map($leveler, $var); - } else { - $var = $leveler($var); - } - } - - return $var; - } - - /** - * Determine whether or not the acceptable property is of type closure - * - * @return boolean - */ - protected function acceptableIsClosure() - { - return (is_object($this->acceptable) && $this->acceptable instanceof \Closure); - } - - /** - * Determine if the user's response is in the acceptable responses array - * - * @param string $response - * - * @return boolean $response - */ - protected function isAcceptableResponse($response) - { - if ($this->strict) { - return in_array($response, $this->acceptable); - } - - $acceptable = $this->levelPlayingField($this->acceptable); - $response = $this->levelPlayingField($response); - - return in_array($response, $acceptable); - } - - /** - * Determine if the user's response is valid based on the current settings - * - * @param string $response - * - * @return boolean $response - */ - protected function isValidResponse($response) - { - if (empty($this->acceptable)) { - return true; - } - - if ($this->acceptableIsClosure()) { - return call_user_func($this->acceptable, $response); - } - - return $this->isAcceptableResponse($response); - } -} diff --git a/source/vendor/league/climate/src/TerminalObject/Dynamic/InputAbstract.php b/source/vendor/league/climate/src/TerminalObject/Dynamic/InputAbstract.php deleted file mode 100644 index 230ed61..0000000 --- a/source/vendor/league/climate/src/TerminalObject/Dynamic/InputAbstract.php +++ /dev/null @@ -1,37 +0,0 @@ -length($length); - } - - if (is_string($char)) { - $this->char($char); - } - } - - /** - * Set the character(s) that should be used to pad - * - * @param string $char - * - * @return \League\CLImate\TerminalObject\Dynamic\Padding - */ - public function char($char) - { - $this->char = $char; - - return $this; - } - - /** - * Set the length of the line that should be generated - * - * @param integer $length - * - * @return \League\CLImate\TerminalObject\Dynamic\Padding - */ - public function length($length) - { - $this->length = $length; - - return $this; - } - - /** - * Get the length of the line based on the width of the terminal window - * - * @return integer - */ - protected function getLength() - { - if (!$this->length) { - $this->length = $this->util->width(); - } - - return $this->length; - } - - /** - * Pad the content with the characters - * - * @param string $content - * - * @return string - */ - protected function padContent($content) - { - if (strlen($this->char) > 0) { - $length = $this->getLength(); - $padding_length = ceil($length / mb_strlen($this->char)); - - $padding = str_repeat($this->char, $padding_length); - $content .= mb_substr($padding, 0, $length - mb_strlen($content)); - } - - return $content; - } - - /** - * Output the content and pad to the previously defined length - * - * @param string $content - * - * @return \League\CLImate\TerminalObject\Dynamic\Padding - */ - public function label($content) - { - // Handle long labels by splitting them across several lines - $lines = []; - $stop = mb_strlen($content); - $width = $this->util->width(); - for ($i = 0; $i < $stop; $i += $width) { - $lines[] = mb_substr($content, $i, $width); - } - $content = array_pop($lines); - - foreach ($lines as $line) { - $this->output->write($this->parser->apply($line)); - } - - $content = $this->padContent($content); - $content = $this->parser->apply($content); - - $this->output->sameLine(); - $this->output->write($content); - - return $this; - } - - /** - * Output result - * - * @param string $content - */ - public function result($content) - { - $this->output->write($this->parser->apply(' ' . $content)); - } -} diff --git a/source/vendor/league/climate/src/TerminalObject/Dynamic/Password.php b/source/vendor/league/climate/src/TerminalObject/Dynamic/Password.php deleted file mode 100644 index a8d714c..0000000 --- a/source/vendor/league/climate/src/TerminalObject/Dynamic/Password.php +++ /dev/null @@ -1,13 +0,0 @@ -writePrompt(); - - return $this->reader->hidden(); - } -} diff --git a/source/vendor/league/climate/src/TerminalObject/Dynamic/Progress.php b/source/vendor/league/climate/src/TerminalObject/Dynamic/Progress.php deleted file mode 100644 index e673eda..0000000 --- a/source/vendor/league/climate/src/TerminalObject/Dynamic/Progress.php +++ /dev/null @@ -1,315 +0,0 @@ -total($total); - } - } - - /** - * Set the total property - * - * @param integer $total - * - * @return Progress - */ - public function total($total) - { - $this->total = $total; - - return $this; - } - - /** - * Determines the current percentage we are at and re-writes the progress bar - * - * @param integer $current - * @param mixed $label - * - * @return void - * @throws UnexpectedValueException - */ - public function current($current, $label = null) - { - if ($this->total == 0) { - // Avoid dividing by 0 - throw new UnexpectedValueException('The progress total must be greater than zero.'); - } - - if ($current > $this->total) { - throw new UnexpectedValueException('The current is greater than the total.'); - } - - $this->drawProgressBar($current, $label); - - $this->current = $current; - $this->label = $label; - } - - /** - * Increments the current position we are at and re-writes the progress bar - * - * @param integer $increment The number of items to increment by - * @param string $label - */ - public function advance($increment = 1, $label = null) - { - $this->current($this->current + $increment, $label); - } - - /** - * Force the progress bar to redraw every time regardless of whether it has changed or not - * - * @param boolean $force - * @return Progress - */ - public function forceRedraw($force = true) - { - $this->force_redraw = !!$force; - - return $this; - } - - - /** - * Update a progress bar using an iterable. - * - * @param iterable $items Array or any other iterable object - * @param callable $callback A handler to run on each item - */ - public function each($items, callable $callback = null) - { - if ($items instanceof \Traversable) { - $items = iterator_to_array($items); - } - - $total = count($items); - if (!$total) { - return; - } - $this->total($total); - - foreach ($items as $key => $item) { - if ($callback) { - $label = $callback($item, $key); - } else { - $label = null; - } - - $this->advance(1, $label); - } - } - - - /** - * Draw the progress bar, if necessary - * - * @param string $current - * @param string $label - */ - protected function drawProgressBar($current, $label) - { - $percentage = $this->percentageFormatted($current / $this->total); - - if ($this->shouldRedraw($percentage, $label)) { - $progress_bar = $this->getProgressBar($current, $label); - $this->output->write($this->parser->apply($progress_bar)); - } - - $this->current_percentage = $percentage; - } - - /** - * Build the progress bar str and return it - * - * @param integer $current - * @param string $label - * - * @return string - */ - protected function getProgressBar($current, $label) - { - if ($this->first_line) { - // Drop down a line, we are about to - // re-write this line for the progress bar - $this->output->write(''); - $this->first_line = false; - } - - // Move the cursor up and clear it to the end - $line_count = $this->has_label_line ? 2 : 1; - - $progress_bar = $this->util->cursor->up($line_count); - $progress_bar .= $this->util->cursor->startOfCurrentLine(); - $progress_bar .= $this->util->cursor->deleteCurrentLine(); - $progress_bar .= $this->getProgressBarStr($current, $label); - - // If this line has a label then set that this progress bar has a label line - if (strlen($label) > 0) { - $this->has_label_line = true; - } - - return $progress_bar; - } - - /** - * Get the progress bar string, basically: - * =============> 50% label - * - * @param integer $current - * @param string $label - * - * @return string - */ - protected function getProgressBarStr($current, $label) - { - $percentage = $current / $this->total; - $bar_length = round($this->getBarStrLen() * $percentage); - - $bar = $this->getBar($bar_length); - $number = $this->percentageFormatted($percentage); - - if ($label) { - $label = $this->labelFormatted($label); - // If this line doesn't have a label, but we've had one before, - // then ensure the label line is cleared - } elseif ($this->has_label_line) { - $label = $this->labelFormatted(''); - } - - return trim("{$bar} {$number}{$label}"); - } - - /** - * Get the string for the actual bar based on the current length - * - * @param integer $length - * - * @return string - */ - protected function getBar($length) - { - $bar = str_repeat('=', $length); - $padding = str_repeat(' ', $this->getBarStrLen() - $length); - - return "{$bar}>{$padding}"; - } - - /** - * Get the length of the bar string based on the width of the terminal window - * - * @return integer - */ - protected function getBarStrLen() - { - if (!$this->bar_str_len) { - // Subtract 10 because of the '> 100%' plus some padding, max 100 - $this->bar_str_len = min($this->util->width() - 10, 100); - } - - return $this->bar_str_len; - } - - /** - * Format the percentage so it looks pretty - * - * @param integer $percentage - * @return float - */ - protected function percentageFormatted($percentage) - { - return round($percentage * 100) . '%'; - } - - /** - * Format the label so it is positioned correctly - * - * @param string $label - * @return string - */ - protected function labelFormatted($label) - { - return "\n" . $this->util->cursor->startOfCurrentLine() . $this->util->cursor->deleteCurrentLine() . $label; - } - - /** - * Determine whether the progress bar has changed and we need to redrew - * - * @param string $percentage - * @param string $label - * - * @return boolean - */ - protected function shouldRedraw($percentage, $label) - { - return ($this->force_redraw || $percentage != $this->current_percentage || $label != $this->label); - } -} diff --git a/source/vendor/league/climate/src/TerminalObject/Dynamic/Radio.php b/source/vendor/league/climate/src/TerminalObject/Dynamic/Radio.php deleted file mode 100644 index 29b0d17..0000000 --- a/source/vendor/league/climate/src/TerminalObject/Dynamic/Radio.php +++ /dev/null @@ -1,51 +0,0 @@ -checkboxes->toggleCurrent(); - } - - return parent::handleCharacter($char); - } - - /** - * Format the prompt string - * - * @return string - */ - protected function promptFormatted() - { - return $this->prompt . ' (press to select)'; - } -} diff --git a/source/vendor/league/climate/src/TerminalObject/Dynamic/Spinner.php b/source/vendor/league/climate/src/TerminalObject/Dynamic/Spinner.php deleted file mode 100644 index 66b6fac..0000000 --- a/source/vendor/league/climate/src/TerminalObject/Dynamic/Spinner.php +++ /dev/null @@ -1,159 +0,0 @@ -label = $label; - } - - if (count($characters) < 1) { - $characters = []; - $size = 5; - $positions = array_merge(range(0, $size - 1), range($size - 2, 1, -1)); - foreach ($positions as $pos) { - $line = str_repeat("-", $size); - $characters[] = "[" . substr($line, 0, $pos) . "=" . substr($line, $pos + 1) . "]"; - } - } - $this->characters(...$characters); - } - - - /** - * Set the length of time to wait between drawing each stage. - * - * @param float $timeLimit - * - * @return Spinner - */ - public function timeLimit($timeLimit) - { - $this->timeLimit = (float) $timeLimit; - - return $this; - } - - - /** - * Set the character to loop around. - * - * @param string $characters - * - * @return Spinner - */ - public function characters(...$characters) - { - if (count($characters) < 1) { - throw new UnexpectedValueException("You must specify the characters to use"); - } - - $this->characters = $characters; - - return $this; - } - - - /** - * Re-writes the spinner - * - * @param string $label - * - * @return void - */ - public function advance($label = null) - { - if ($label === null) { - $label = $this->label; - } - - if ($this->lastDrawn) { - $time = microtime(true) - $this->lastDrawn; - if ($time < $this->timeLimit) { - return; - } - } - - ++$this->current; - if ($this->current >= count($this->characters)) { - $this->current = 0; - } - - $characters = $this->characters[$this->current]; - $this->drawSpinner($characters, $label); - $this->lastDrawn = microtime(true); - } - - - /** - * Draw the spinner - * - * @param string $characters - * @param string $label - */ - private function drawSpinner($characters, $label) - { - $spinner = ""; - - if ($this->firstLine) { - $this->firstLine = false; - } else { - $spinner .= $this->util->cursor->up(1); - $spinner .= $this->util->cursor->startOfCurrentLine(); - $spinner .= $this->util->cursor->deleteCurrentLine(); - } - - $spinner .= trim("{$characters} {$label}"); - - $this->output->write($this->parser->apply($spinner)); - } -} diff --git a/source/vendor/league/climate/src/TerminalObject/Helper/Art.php b/source/vendor/league/climate/src/TerminalObject/Helper/Art.php deleted file mode 100644 index 0189b0e..0000000 --- a/source/vendor/league/climate/src/TerminalObject/Helper/Art.php +++ /dev/null @@ -1,160 +0,0 @@ -dirs as $dir) { - $this->addDir($dir); - } - } - - /** - * Add a directory to search for art in - * - * @param string $dir - */ - protected function addDir($dir) - { - // Add any additional directories to the top of the array - // so that the user can override art - array_unshift($this->art_dirs, rtrim($dir, \DIRECTORY_SEPARATOR)); - - // Keep the array clean - $this->art_dirs = array_unique($this->art_dirs); - $this->art_dirs = array_filter($this->art_dirs); - $this->art_dirs = array_values($this->art_dirs); - } - - /** - * Find a valid art path - * - * @param string $art - * - * @return array - */ - protected function artDir($art) - { - return $this->fileSearch($art, preg_quote(\DIRECTORY_SEPARATOR) . '*.*'); - } - - /** - * Find a valid art path - * - * @param string $art - * - * @return string - */ - protected function artFile($art) - { - $files = $this->fileSearch($art, '(\.[^' . preg_quote(\DIRECTORY_SEPARATOR) . ']*)?$'); - - if (count($files) === 0) { - $this->addDir(__DIR__ . \DIRECTORY_SEPARATOR . '..' . \DIRECTORY_SEPARATOR . '..' . \DIRECTORY_SEPARATOR . 'ASCII'); - $files = $this->fileSearch($this->default_art, '.*'); - } - - if (count($files) === 0) { - throw new UnexpectedValueException("Unable to find an art file with the name '{$art}'"); - } - - return reset($files); - } - - /** - * Find a set of files in the current art directories - * based on a pattern - * - * @param string $art - * @param string $pattern - * - * @return array - */ - protected function fileSearch($art, $pattern) - { - foreach ($this->art_dirs as $dir) { - $directory_iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($dir)); - - $paths = []; - $regex = '~' . preg_quote($art) . $pattern . '~'; - - foreach ($directory_iterator as $file) { - if ($file->isDir()) { - continue; - } - - // Look for anything that has the $art filename - if (preg_match($regex, $file)) { - $paths[] = $file->getPathname(); - } - } - - asort($paths); - - // If we've got one, no need to look any further - if (!empty($paths)) { - return $paths; - } - } - - return []; - } - - /** - * Parse the contents of the file and return each line - * - * @param string $path - * - * @return array - */ - protected function parse($path) - { - $output = file_get_contents($path); - $output = explode("\n", $output); - $output = array_map('rtrim', $output); - - return $output; - } -} diff --git a/source/vendor/league/climate/src/TerminalObject/Helper/Sleeper.php b/source/vendor/league/climate/src/TerminalObject/Helper/Sleeper.php deleted file mode 100644 index b0ae639..0000000 --- a/source/vendor/league/climate/src/TerminalObject/Helper/Sleeper.php +++ /dev/null @@ -1,37 +0,0 @@ - 0) { - $this->speed *= (100 / $percentage); - } - - return $this->speed; - } - - /** - * Sleep for the specified amount of time - */ - public function sleep() - { - usleep($this->speed); - } -} diff --git a/source/vendor/league/climate/src/TerminalObject/Helper/SleeperInterface.php b/source/vendor/league/climate/src/TerminalObject/Helper/SleeperInterface.php deleted file mode 100644 index b18135a..0000000 --- a/source/vendor/league/climate/src/TerminalObject/Helper/SleeperInterface.php +++ /dev/null @@ -1,13 +0,0 @@ -ignore_tags)) { - $this->ignore_tags = array_keys($this->parser->tags->all()); - } - } - - /** - * Determine the length of the string without any tags - * - * @param string $str - * - * @return integer - */ - protected function lengthWithoutTags($str) - { - $this->setIgnoreTags(); - - return mb_strwidth($this->withoutTags($str), 'UTF-8'); - } - - /** - * Get the string without the tags that are to be ignored - * - * @param string $str - * - * @return string - */ - protected function withoutTags($str) - { - $this->setIgnoreTags(); - - return str_replace($this->ignore_tags, '', $str); - } - - /** - * Apply padding to a string - * - * @param string $str - * @param string $final_length - * @param string $padding_side - * - * @return string - */ - protected function pad($str, $final_length, $padding_side = 'right') - { - $padding = $final_length - $this->lengthWithoutTags($str); - - if ($padding_side == 'left') { - return str_repeat(' ', $padding) . $str; - } - - return $str . str_repeat(' ', $padding); - } - - /** - * Apply padding to an array of strings - * - * @param array $arr - * @param integer $final_length - * @param string $padding_side - * - * @return array - */ - protected function padArray($arr, $final_length, $padding_side = 'right') - { - foreach ($arr as $key => $value) { - $arr[$key] = $this->pad($value, $final_length, $padding_side); - } - - return $arr; - } - - /** - * Find the max string length in an array - * - * @param array $arr - * @return int - */ - protected function maxStrLen(array $arr) - { - return max($this->arrayOfStrLens($arr)); - } - - /** - * Get an array of the string lengths from an array of strings - * - * @param array $arr - * @return array - */ - protected function arrayOfStrLens(array $arr) - { - return array_map([$this, 'lengthWithoutTags'], $arr); - } -} diff --git a/source/vendor/league/climate/src/TerminalObject/Router/BaseRouter.php b/source/vendor/league/climate/src/TerminalObject/Router/BaseRouter.php deleted file mode 100644 index cabbc7b..0000000 --- a/source/vendor/league/climate/src/TerminalObject/Router/BaseRouter.php +++ /dev/null @@ -1,89 +0,0 @@ -extensions[$key] = $class; - } - - /** - * Get the full path for the class based on the key - * - * @param string $class - * - * @return string - */ - public function path($class) - { - return $this->getExtension($class) ?: $this->getPath($this->shortName($class)); - } - - /** - * Determines if the requested class is a - * valid terminal object class - * - * @param string $class - * - * @return boolean - */ - public function exists($class) - { - $class = $this->path($class); - - return (is_object($class) || class_exists($class)); - } - - /** - * Get the full path for the terminal object class - * - * @param string $class - * - * @return string - */ - protected function getPath($class) - { - return 'League\CLImate\TerminalObject\\' . $this->pathPrefix() . '\\' . $class; - } - - /** - * Get an extension by its key - * - * @param string $key - * - * @return string|false Full class path to extension - */ - protected function getExtension($key) - { - if (array_key_exists($key, $this->extensions)) { - return $this->extensions[$key]; - } - - return false; - } - - /** - * Get the class short name - * - * @param string $name - * - * @return string - */ - protected function shortName($name) - { - $name = str_replace('_', ' ', $name); - $name = ucwords($name); - - return str_replace(' ', '', $name); - } -} diff --git a/source/vendor/league/climate/src/TerminalObject/Router/BasicRouter.php b/source/vendor/league/climate/src/TerminalObject/Router/BasicRouter.php deleted file mode 100644 index a30b9c9..0000000 --- a/source/vendor/league/climate/src/TerminalObject/Router/BasicRouter.php +++ /dev/null @@ -1,42 +0,0 @@ -result()); - - $this->output->persist(); - - foreach ($results as $result) { - if ($obj->sameLine()) { - $this->output->sameLine(); - } - - $this->output->write($obj->getParser()->apply($result)); - } - - $this->output->persist(false); - } -} diff --git a/source/vendor/league/climate/src/TerminalObject/Router/DynamicRouter.php b/source/vendor/league/climate/src/TerminalObject/Router/DynamicRouter.php deleted file mode 100644 index 8456fb7..0000000 --- a/source/vendor/league/climate/src/TerminalObject/Router/DynamicRouter.php +++ /dev/null @@ -1,32 +0,0 @@ -output($this->output); - - return $obj; - } -} diff --git a/source/vendor/league/climate/src/TerminalObject/Router/ExtensionCollection.php b/source/vendor/league/climate/src/TerminalObject/Router/ExtensionCollection.php deleted file mode 100644 index fea4f2a..0000000 --- a/source/vendor/league/climate/src/TerminalObject/Router/ExtensionCollection.php +++ /dev/null @@ -1,147 +0,0 @@ - [], 'dynamic' => []]; - - /** - * @var string $basic_interface - */ - protected $basic_interface = 'League\CLImate\TerminalObject\Basic\BasicTerminalObjectInterface'; - - /** - * @var string $dynamic_interface - */ - protected $dynamic_interface = 'League\CLImate\TerminalObject\Dynamic\DynamicTerminalObjectInterface'; - - public function __construct($key, $class) - { - $this->createCollection($key, $class); - } - - public function collection() - { - return $this->collection; - } - - /** - * Create the collection from the key/class - * - * @param string $original_key - * @param string|object|array $original_class - * - * @return void - */ - protected function createCollection($original_key, $original_class) - { - $collection = $this->convertToArray($original_key, $original_class); - - foreach ($collection as $key => $class) { - $this->validateExtension($class); - $this->collection[$this->getType($class)][$this->getKey($key, $class)] = $class; - } - } - - /** - * Convert the given class and key to an array of classes - * - * @param string|object|array $class - * @param string $key Optional custom key instead of class name - * - * @return array - */ - protected function convertToArray($key, $class) - { - if (is_array($class)) { - return $class; - } - - return [$this->getKey($key, $class) => $class]; - } - - /** - * Ensure that the extension is valid - * - * @param string|object|array $class - */ - protected function validateExtension($class) - { - $this->validateClassExists($class); - $this->validateClassImplementation($class); - } - - /** - * @param string|object $class - * - * @throws UnexpectedValueException if extension class does not exist - */ - protected function validateClassExists($class) - { - if (is_string($class) && !class_exists($class)) { - throw new UnexpectedValueException('Class does not exist: ' . $class); - } - } - - /** - * @param string|object $class - * - * @throws InvalidArgumentException if extension class does not implement either Dynamic or Basic interface - */ - protected function validateClassImplementation($class) - { - $str_class = is_string($class); - - $valid_implementation = (is_a($class, $this->basic_interface, $str_class) - || is_a($class, $this->dynamic_interface, $str_class)); - - if (!$valid_implementation) { - throw new InvalidArgumentException('Class must implement either ' - . $this->basic_interface . ' or ' . $this->dynamic_interface); - } - } - - /** - * Determine the extension key based on the class - * - * @param string|null $key - * @param string|object $class - * - * @return string - */ - protected function getKey($key, $class) - { - if ($key === null || !is_string($key)) { - $class_path = (is_string($class)) ? $class : get_class($class); - - $key = explode('\\', $class_path); - $key = end($key); - } - - return Helper::snakeCase($key); - } - - /** - * Get the type of class the extension implements - * - * @param string|object $class - * - * @return string 'basic' or 'dynamic' - */ - protected function getType($class) - { - if (is_a($class, $this->basic_interface, is_string($class))) { - return 'basic'; - } - - return 'dynamic'; - } -} diff --git a/source/vendor/league/climate/src/TerminalObject/Router/Router.php b/source/vendor/league/climate/src/TerminalObject/Router/Router.php deleted file mode 100644 index 0edc640..0000000 --- a/source/vendor/league/climate/src/TerminalObject/Router/Router.php +++ /dev/null @@ -1,157 +0,0 @@ -dynamic = $dynamic ?: new DynamicRouter(); - $this->basic = $basic ?: new BasicRouter(); - } - - /** - * Register a custom class with the router - * - * @param string $key - * @param string $class - */ - public function addExtension($key, $class) - { - $extension = new ExtensionCollection($key, $class); - - foreach ($extension->collection() as $obj_type => $collection) { - foreach ($collection as $obj_key => $obj_class) { - $this->{$obj_type}->addExtension($obj_key, $obj_class); - } - } - } - - /** - * Check if the name matches an existing terminal object - * - * @param string $name - * - * @return boolean - */ - public function exists($name) - { - return ($this->basic->exists($name) || $this->dynamic->exists($name)); - } - - /** - * Execute a terminal object using given arguments - * - * @param string $name - * @param mixed $arguments - * - * @return null|\League\CLImate\TerminalObject\Basic\BasicTerminalObjectInterface - */ - public function execute($name, $arguments) - { - $router = $this->getRouter($name); - - $router->output($this->output); - - $obj = $this->getObject($router, $name, $arguments); - - $obj->parser($this->parser); - $obj->util($this->util); - - // If the object needs any settings, import them - foreach ($obj->settings() as $obj_setting) { - $setting = $this->settings->get($obj_setting); - - if ($setting) { - $obj->importSetting($setting); - } - } - - return $router->execute($obj); - } - - /** - * Get the object whether it's a string or already instantiated - * - * @param \League\CLImate\TerminalObject\Router\RouterInterface $router - * @param string $name - * @param array $arguments - * - * @return \League\CLImate\TerminalObject\Dynamic\DynamicTerminalObjectInterface|\League\CLImate\TerminalObject\Basic\BasicTerminalObjectInterface - */ - protected function getObject($router, $name, $arguments) - { - $obj = $router->path($name); - - if (is_string($obj)) { - $obj = (new \ReflectionClass($obj))->newInstanceArgs($arguments); - } - - if (method_exists($obj, 'arguments')) { - call_user_func_array([$obj, 'arguments'], $arguments); - } - - return $obj; - } - - /** - * Determine which type of router we are using and return it - * - * @param string $name - * - * @return \League\CLImate\TerminalObject\Router\RouterInterface|null - */ - protected function getRouter($name) - { - if ($this->basic->exists($name)) { - return $this->basic; - } - - if ($this->dynamic->exists($name)) { - return $this->dynamic; - } - } - - /** - * Set the settings property - * - * @param \League\CLImate\Settings\Manager $settings - * - * @return Router - */ - public function settings(Manager $settings) - { - $this->settings = $settings; - - return $this; - } -} diff --git a/source/vendor/league/climate/src/TerminalObject/Router/RouterInterface.php b/source/vendor/league/climate/src/TerminalObject/Router/RouterInterface.php deleted file mode 100644 index 218f8ae..0000000 --- a/source/vendor/league/climate/src/TerminalObject/Router/RouterInterface.php +++ /dev/null @@ -1,29 +0,0 @@ -add('out', new Writer\StdOut); - $this->add('error', new Writer\StdErr); - $this->add('buffer', new Writer\Buffer); - - $this->defaultTo('out'); - } - - /** - * Dictate that a new line should not be added after the output - */ - public function sameLine() - { - $this->new_line = false; - - return $this; - } - - /** - * Add a writer to the available writers - * - * @param string $key - * @param WriterInterface|array $writer - * - * @return \League\CLImate\Util\Output - */ - public function add($key, $writer) - { - $this->writers[$key] = $this->resolve(Helper::toArray($writer)); - - return $this; - } - - /** - * Set the default writer - * - * @param string|array $keys - */ - public function defaultTo($keys) - { - $this->default = $this->getWriters($keys); - } - - /** - * Add a default writer - * - * @param string|array $keys - */ - public function addDefault($keys) - { - $this->default = array_merge($this->default, $this->getWriters($keys)); - } - - /** - * Register a writer to be used just once - * - * @param string|array $keys - * - * @return \League\CLImate\Util\Output - */ - public function once($keys) - { - $this->once = $this->getWriters($keys); - - return $this; - } - - /** - * Persist or un-persist one time writers (for multi-line output) - * - * @param bool $persist - * - * @return \League\CLImate\Util\Output - */ - public function persist($persist = true) - { - $this->persist = (bool) $persist; - - if (!$this->persist) { - $this->resetOneTimers(); - } - - return $this; - } - - /** - * Get a specific writer - * - * @param string $writer - * - * @return WriterInterface|array - * @throws UnexpectedValueException if writer key doesn't exist - */ - public function get($writer) - { - if (!array_key_exists($writer, $this->writers)) { - throw new UnexpectedValueException('Unknown writer [' . $writer . ']'); - } - - if (count($this->writers[$writer]) == 1) { - return reset($this->writers[$writer]); - } - - return $this->writers[$writer]; - } - - /** - * Get the currently available writers - * - * @return array - */ - public function getAvailable() - { - $writers = []; - - foreach ($this->writers as $key => $writer) { - $writers[$key] = $this->getReadable($writer); - } - - return $writers; - } - - /** - * Write the content using the provided writer - * - * @param string $content - */ - public function write($content) - { - if ($this->new_line) { - $content .= PHP_EOL; - } - - foreach ($this->getCurrentWriters() as $writer) { - $writer->write($content); - } - - $this->resetOneTimers(); - } - - /** - * Resolve the writer(s) down to an array of WriterInterface classes - * - * @param WriterInterface|array|string $writer - * - * @return array - */ - protected function resolve($writer) - { - $resolver = 'resolve' . ucwords(gettype($writer)) . 'Writer'; - - if (method_exists($this, $resolver) && $resolved = $this->{$resolver}($writer)) { - return $resolved; - } - - $this->handleUnknownWriter($writer); - } - - /** - * @param array $writer - * - * @return array - */ - protected function resolveArrayWriter($writer) - { - return Helper::flatten(array_map([$this, 'resolve'], $writer)); - } - - /** - * @param object $writer - * - * @return WriterInterface|false - */ - protected function resolveObjectWriter($writer) - { - if ($writer instanceof WriterInterface) { - return $writer; - } - - return false; - } - - /** - * @param string $writer - * - * @return array|false - */ - protected function resolveStringWriter($writer) - { - if (is_string($writer) && array_key_exists($writer, $this->writers)) { - return $this->writers[$writer]; - } - - return false; - } - - /** - * @param mixed $writer - * @throws InvalidArgumentException For non-valid writer - */ - protected function handleUnknownWriter($writer) - { - // If we've gotten this far and don't know what it is, - // let's at least try and give a helpful error message - if (is_object($writer)) { - throw new InvalidArgumentException('Class [' . get_class($writer) . '] must implement ' - . 'League\CLImate\Util\Writer\WriterInterface.'); - } - - // No idea, just tell them we can't resolve it - throw new InvalidArgumentException('Unable to resolve writer [' . $writer . ']'); - } - - /** - * Get the readable version of the writer(s) - * - * @param array $writer - * - * @return string|array - */ - protected function getReadable(array $writer) - { - $classes = array_map('get_class', $writer); - - if (count($classes) == 1) { - return reset($classes); - } - - return $classes; - } - - /** - * Get the writers based on their keys - * - * @param string|array $keys - * - * @return array - */ - protected function getWriters($keys) - { - $writers = array_flip(Helper::toArray($keys)); - - return Helper::flatten(array_intersect_key($this->writers, $writers)); - } - - /** - * @return WriterInterface[] - */ - protected function getCurrentWriters() - { - return $this->once ?: $this->default; - } - - /** - * Reset anything only used for the current content being written - */ - protected function resetOneTimers() - { - // Reset new line flag for next time - $this->new_line = true; - - if (!$this->persist) { - // Reset once since we only want to use it... once. - $this->once = null; - } - } -} diff --git a/source/vendor/league/climate/src/Util/OutputImporter.php b/source/vendor/league/climate/src/Util/OutputImporter.php deleted file mode 100644 index e508f16..0000000 --- a/source/vendor/league/climate/src/Util/OutputImporter.php +++ /dev/null @@ -1,23 +0,0 @@ -output = $output; - } -} diff --git a/source/vendor/league/climate/src/Util/Reader/ReaderInterface.php b/source/vendor/league/climate/src/Util/Reader/ReaderInterface.php deleted file mode 100644 index 6ef947f..0000000 --- a/source/vendor/league/climate/src/Util/Reader/ReaderInterface.php +++ /dev/null @@ -1,16 +0,0 @@ -getStdIn(), 1024)); - } - - /** - * Read from STDIN until EOF (^D) is reached - * - * @return string - */ - public function multiLine() - { - return trim(stream_get_contents($this->getStdIn())); - } - - /** - * Read one character - * - * @param int $count - * - * @return string - */ - public function char($count = 1) - { - return fread($this->getStdIn(), $count); - } - - /** - * Read the line, but hide what the user is typing - * - * @return string - */ - public function hidden() - { - return CliPrompt::hiddenPrompt(); - } - - /** - * Return a valid STDIN, even if it previously EOF'ed - * - * Lazily re-opens STDIN after hitting an EOF - * - * @return resource - * @throws RuntimeException - */ - protected function getStdIn() - { - if ($this->stdIn && !feof($this->stdIn)) { - return $this->stdIn; - } - - try { - $this->setStdIn(); - } catch (\Error $e) { - throw new RuntimeException('Unable to read from STDIN', 0, $e); - } - - return $this->stdIn; - } - - /** - * Attempt to set the stdin property - * - * @return void - * @throws RuntimeException - */ - protected function setStdIn() - { - if ($this->stdIn !== false) { - fclose($this->stdIn); - } - - $this->stdIn = fopen('php://stdin', 'r'); - - if (!$this->stdIn) { - throw new RuntimeException('Unable to read from STDIN'); - } - } -} diff --git a/source/vendor/league/climate/src/Util/System/Linux.php b/source/vendor/league/climate/src/Util/System/Linux.php deleted file mode 100644 index daf8523..0000000 --- a/source/vendor/league/climate/src/Util/System/Linux.php +++ /dev/null @@ -1,104 +0,0 @@ -getDimension($this->tput("cols")); - } - - /** - * Get the height of the terminal - * - * @return integer|null - */ - public function height() - { - return $this->getDimension($this->tput("lines")); - } - - /** - * Get a value from the tput command. - * - * @param string $type - * - * @return array|null|string - */ - private function tput($type) - { - return $this->exec("tput {$type} 2>/dev/null"); - } - - /** - * Determine if system has access to bash commands - * - * @return bool - */ - public function canAccessBash() - { - return (rtrim($this->exec("/usr/bin/env bash -c 'echo OK'")) === 'OK'); - } - - /** - * Display a hidden response prompt and return the response - * - * @param string $prompt - * - * @return string - */ - public function hiddenResponsePrompt($prompt) - { - $bash_command = 'read -s -p "' . $prompt . '" response && echo $response'; - - return rtrim($this->exec("/usr/bin/env bash -c '{$bash_command}'")); - } - - /** - * Determine if dimension is numeric and return it - * - * @param integer|string|null $dimension - * - * @return integer|null - */ - protected function getDimension($dimension) - { - return (is_numeric($dimension)) ? $dimension : null; - } - - /** - * Check if the stream supports ansi escape characters. - * - * Based on https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Console/Output/StreamOutput.php - * - * @return bool - */ - protected function systemHasAnsiSupport() - { - if ('Hyper' === getenv('TERM_PROGRAM')) { - return true; - } - - $stream = STDOUT; - - if (function_exists('stream_isatty')) { - return @stream_isatty($stream); - } - - if (function_exists('posix_isatty')) { - return @posix_isatty($stream); - } - - $stat = @fstat($stream); - // Check if formatted mode is S_IFCHR - return $stat ? 0020000 === ($stat['mode'] & 0170000) : false; - } -} diff --git a/source/vendor/league/climate/src/Util/System/System.php b/source/vendor/league/climate/src/Util/System/System.php deleted file mode 100644 index 1eaaf11..0000000 --- a/source/vendor/league/climate/src/Util/System/System.php +++ /dev/null @@ -1,68 +0,0 @@ -force_ansi = $force; - } - - /** - * @return integer|null - */ - abstract public function width(); - - /** - * @return integer|null - */ - abstract public function height(); - - /** - * Check if the stream supports ansi escape characters. - * - * @return bool - */ - abstract protected function systemHasAnsiSupport(); - - /** - * Check if we are forcing ansi, fallback to system support - * - * @return bool - */ - public function hasAnsiSupport() - { - if (is_bool($this->force_ansi)) { - return $this->force_ansi; - } - - return $this->systemHasAnsiSupport(); - } - - /** - * Wraps exec function, allowing the dimension methods to decouple - * - * @param string $command - * @param boolean $full - * - * @return string|array - */ - public function exec($command, $full = false) - { - if ($full) { - exec($command, $output); - - return $output; - } - - return exec($command); - } -} diff --git a/source/vendor/league/climate/src/Util/System/SystemFactory.php b/source/vendor/league/climate/src/Util/System/SystemFactory.php deleted file mode 100644 index b6137b3..0000000 --- a/source/vendor/league/climate/src/Util/System/SystemFactory.php +++ /dev/null @@ -1,44 +0,0 @@ -getDimension('width'); - } - - /** - * Get the height of the terminal - * - * @return integer|null - */ - public function height() - { - return $this->getDimension('height'); - } - - /** - * Get specified terminal dimension - * - * @param string $key - * - * @return integer|null - */ - - protected function getDimension($key) - { - $index = array_search($key, ['height', 'width']); - $dimensions = $this->getDimensions(); - - return (!empty($dimensions[$index])) ? $dimensions[$index] : null; - } - - /** - * Get information about the dimensions of the terminal - * - * @return array - */ - protected function getDimensions() - { - $output = $this->exec('mode CON', true); - - if (!is_array($output)) { - return []; - } - - $output = implode("\n", $output); - - preg_match_all('/.*:\s*(\d+)/', $output, $matches); - - return (!empty($matches[1])) ? $matches[1] : []; - } - - /** - * Check if the stream supports ansi escape characters. - * - * Based on https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Console/Output/StreamOutput.php - * - * @return bool - */ - protected function systemHasAnsiSupport() - { - return (function_exists('sapi_windows_vt100_support') && @sapi_windows_vt100_support(STDOUT)) - || false !== getenv('ANSICON') - || 'ON' === getenv('ConEmuANSI') - || 'Hyper' === getenv('TERM_PROGRAM') - || 'xterm' === getenv('TERM'); - } -} diff --git a/source/vendor/league/climate/src/Util/UtilFactory.php b/source/vendor/league/climate/src/Util/UtilFactory.php deleted file mode 100644 index 3584a6b..0000000 --- a/source/vendor/league/climate/src/Util/UtilFactory.php +++ /dev/null @@ -1,66 +0,0 @@ -system = $system ?: SystemFactory::getInstance(); - $this->cursor = $cursor ?: new Cursor(); - } - - /** - * Get the width of the terminal - * - * @return integer - */ - - public function width() - { - return (int) $this->getDimension($this->system->width(), 80); - } - - /** - * Get the height of the terminal - * - * @return integer - */ - - public function height() - { - return (int) $this->getDimension($this->system->height(), 25); - } - - /** - * Determine if the value is numeric, fallback to a default if not - * - * @param integer|null $dimension - * @param integer $default - * - * @return integer - */ - - protected function getDimension($dimension, $default) - { - return (is_numeric($dimension)) ? $dimension : $default; - } -} diff --git a/source/vendor/league/climate/src/Util/UtilImporter.php b/source/vendor/league/climate/src/Util/UtilImporter.php deleted file mode 100644 index 88debfc..0000000 --- a/source/vendor/league/climate/src/Util/UtilImporter.php +++ /dev/null @@ -1,23 +0,0 @@ -util = $util; - } -} diff --git a/source/vendor/league/climate/src/Util/Writer/Buffer.php b/source/vendor/league/climate/src/Util/Writer/Buffer.php deleted file mode 100644 index 58f1051..0000000 --- a/source/vendor/league/climate/src/Util/Writer/Buffer.php +++ /dev/null @@ -1,44 +0,0 @@ -contents .= $content; - } - - - /** - * Get the buffered data. - * - * @return string - */ - public function get() - { - return $this->contents; - } - - /** - * Clean the buffer and throw away any data. - * - * @return void - */ - public function clean() - { - $this->contents = ""; - } -} diff --git a/source/vendor/league/climate/src/Util/Writer/File.php b/source/vendor/league/climate/src/Util/Writer/File.php deleted file mode 100644 index 0550249..0000000 --- a/source/vendor/league/climate/src/Util/Writer/File.php +++ /dev/null @@ -1,101 +0,0 @@ -resource = $resource; - $this->use_locking = $use_locking; - $this->gzip_file = $gzip_file; - } - - public function lock() - { - $this->use_locking = true; - - return $this; - } - - public function gzipped() - { - $this->gzip_file = true; - - return $this; - } - - /** - * Write the content to the stream - * - * @param string $content - */ - public function write($content) - { - $resource = $this->getResource(); - - if ($this->use_locking) { - flock($resource, LOCK_EX); - } - - gzwrite($resource, $content); - - if ($this->use_locking) { - flock($resource, LOCK_UN); - } - } - - protected function getResource() - { - if (is_resource($this->resource)) { - return $this->resource; - } - - $this->close_locally = true; - - if (!is_writable($this->resource)) { - throw new RuntimeException("The resource [{$this->resource}] is not writable"); - } - - if (!($this->resource = $this->openResource())) { - throw new RuntimeException("The resource could not be opened"); - } - - return $this->resource; - } - - protected function openResource() - { - if ($this->gzip_file) { - return gzopen($this->resource, 'a'); - } - - return fopen($this->resource, 'a'); - } - - public function _destruct() - { - if ($this->close_locally) { - gzclose($this->getResource()); - } - } -} diff --git a/source/vendor/league/climate/src/Util/Writer/StdErr.php b/source/vendor/league/climate/src/Util/Writer/StdErr.php deleted file mode 100644 index 4e778a6..0000000 --- a/source/vendor/league/climate/src/Util/Writer/StdErr.php +++ /dev/null @@ -1,16 +0,0 @@ ->= ->>>= -&= -^= -|= -& -| -^ -~ -<< ->> ->>> -== -=== -!= -!== -> -< ->= -<= -&& -|| -! -. -[ -] -? -: -, -; -( -) -{ -} \ No newline at end of file diff --git a/source/vendor/matthiasmullie/minify/data/js/operators_after.txt b/source/vendor/matthiasmullie/minify/data/js/operators_after.txt deleted file mode 100644 index 71a9b70..0000000 --- a/source/vendor/matthiasmullie/minify/data/js/operators_after.txt +++ /dev/null @@ -1,43 +0,0 @@ -+ -- -* -/ -% -= -+= --= -*= -/= -%= -<<= ->>= ->>>= -&= -^= -|= -& -| -^ -<< ->> ->>> -== -=== -!= -!== -> -< ->= -<= -&& -|| -. -[ -] -? -: -, -; -( -) -} \ No newline at end of file diff --git a/source/vendor/matthiasmullie/minify/data/js/operators_before.txt b/source/vendor/matthiasmullie/minify/data/js/operators_before.txt deleted file mode 100644 index ff50d87..0000000 --- a/source/vendor/matthiasmullie/minify/data/js/operators_before.txt +++ /dev/null @@ -1,43 +0,0 @@ -+ -- -* -/ -% -= -+= --= -*= -/= -%= -<<= ->>= ->>>= -&= -^= -|= -& -| -^ -~ -<< ->> ->>> -== -=== -!= -!== -> -< ->= -<= -&& -|| -! -. -[ -? -: -, -; -( -{ diff --git a/source/vendor/matthiasmullie/minify/src/CSS.php b/source/vendor/matthiasmullie/minify/src/CSS.php deleted file mode 100644 index eb98e52..0000000 --- a/source/vendor/matthiasmullie/minify/src/CSS.php +++ /dev/null @@ -1,786 +0,0 @@ - - * @copyright Copyright (c) 2012, Matthias Mullie. All rights reserved - * @license MIT License - */ - -namespace MatthiasMullie\Minify; - -use MatthiasMullie\Minify\Exceptions\FileImportException; -use MatthiasMullie\PathConverter\ConverterInterface; -use MatthiasMullie\PathConverter\Converter; - -/** - * CSS minifier - * - * Please report bugs on https://github.com/matthiasmullie/minify/issues - * - * @package Minify - * @author Matthias Mullie - * @author Tijs Verkoyen - * @copyright Copyright (c) 2012, Matthias Mullie. All rights reserved - * @license MIT License - */ -class CSS extends Minify -{ - /** - * @var int maximum inport size in kB - */ - protected $maxImportSize = 5; - - /** - * @var string[] valid import extensions - */ - protected $importExtensions = array( - 'gif' => 'data:image/gif', - 'png' => 'data:image/png', - 'jpe' => 'data:image/jpeg', - 'jpg' => 'data:image/jpeg', - 'jpeg' => 'data:image/jpeg', - 'svg' => 'data:image/svg+xml', - 'woff' => 'data:application/x-font-woff', - 'tif' => 'image/tiff', - 'tiff' => 'image/tiff', - 'xbm' => 'image/x-xbitmap', - ); - - /** - * Set the maximum size if files to be imported. - * - * Files larger than this size (in kB) will not be imported into the CSS. - * Importing files into the CSS as data-uri will save you some connections, - * but we should only import relatively small decorative images so that our - * CSS file doesn't get too bulky. - * - * @param int $size Size in kB - */ - public function setMaxImportSize($size) - { - $this->maxImportSize = $size; - } - - /** - * Set the type of extensions to be imported into the CSS (to save network - * connections). - * Keys of the array should be the file extensions & respective values - * should be the data type. - * - * @param string[] $extensions Array of file extensions - */ - public function setImportExtensions(array $extensions) - { - $this->importExtensions = $extensions; - } - - /** - * Move any import statements to the top. - * - * @param string $content Nearly finished CSS content - * - * @return string - */ - protected function moveImportsToTop($content) - { - if (preg_match_all('/(;?)(@import (?url\()?(?P["\']?).+?(?P=quotes)(?(url)\)));?/', $content, $matches)) { - // remove from content - foreach ($matches[0] as $import) { - $content = str_replace($import, '', $content); - } - - // add to top - $content = implode(';', $matches[2]).';'.trim($content, ';'); - } - - return $content; - } - - /** - * Combine CSS from import statements. - * - * @import's will be loaded and their content merged into the original file, - * to save HTTP requests. - * - * @param string $source The file to combine imports for - * @param string $content The CSS content to combine imports for - * @param string[] $parents Parent paths, for circular reference checks - * - * @return string - * - * @throws FileImportException - */ - protected function combineImports($source, $content, $parents) - { - $importRegexes = array( - // @import url(xxx) - '/ - # import statement - @import - - # whitespace - \s+ - - # open url() - url\( - - # (optional) open path enclosure - (?P["\']?) - - # fetch path - (?P.+?) - - # (optional) close path enclosure - (?P=quotes) - - # close url() - \) - - # (optional) trailing whitespace - \s* - - # (optional) media statement(s) - (?P[^;]*) - - # (optional) trailing whitespace - \s* - - # (optional) closing semi-colon - ;? - - /ix', - - // @import 'xxx' - '/ - - # import statement - @import - - # whitespace - \s+ - - # open path enclosure - (?P["\']) - - # fetch path - (?P.+?) - - # close path enclosure - (?P=quotes) - - # (optional) trailing whitespace - \s* - - # (optional) media statement(s) - (?P[^;]*) - - # (optional) trailing whitespace - \s* - - # (optional) closing semi-colon - ;? - - /ix', - ); - - // find all relative imports in css - $matches = array(); - foreach ($importRegexes as $importRegex) { - if (preg_match_all($importRegex, $content, $regexMatches, PREG_SET_ORDER)) { - $matches = array_merge($matches, $regexMatches); - } - } - - $search = array(); - $replace = array(); - - // loop the matches - foreach ($matches as $match) { - // get the path for the file that will be imported - $importPath = dirname($source).'/'.$match['path']; - - // only replace the import with the content if we can grab the - // content of the file - if (!$this->canImportByPath($match['path']) || !$this->canImportFile($importPath)) { - continue; - } - - // check if current file was not imported previously in the same - // import chain. - if (in_array($importPath, $parents)) { - throw new FileImportException('Failed to import file "'.$importPath.'": circular reference detected.'); - } - - // grab referenced file & minify it (which may include importing - // yet other @import statements recursively) - $minifier = new self($importPath); - $minifier->setMaxImportSize($this->maxImportSize); - $minifier->setImportExtensions($this->importExtensions); - $importContent = $minifier->execute($source, $parents); - - // check if this is only valid for certain media - if (!empty($match['media'])) { - $importContent = '@media '.$match['media'].'{'.$importContent.'}'; - } - - // add to replacement array - $search[] = $match[0]; - $replace[] = $importContent; - } - - // replace the import statements - return str_replace($search, $replace, $content); - } - - /** - * Import files into the CSS, base64-ized. - * - * @url(image.jpg) images will be loaded and their content merged into the - * original file, to save HTTP requests. - * - * @param string $source The file to import files for - * @param string $content The CSS content to import files for - * - * @return string - */ - protected function importFiles($source, $content) - { - $regex = '/url\((["\']?)(.+?)\\1\)/i'; - if ($this->importExtensions && preg_match_all($regex, $content, $matches, PREG_SET_ORDER)) { - $search = array(); - $replace = array(); - - // loop the matches - foreach ($matches as $match) { - $extension = substr(strrchr($match[2], '.'), 1); - if ($extension && !array_key_exists($extension, $this->importExtensions)) { - continue; - } - - // get the path for the file that will be imported - $path = $match[2]; - $path = dirname($source).'/'.$path; - - // only replace the import with the content if we're able to get - // the content of the file, and it's relatively small - if ($this->canImportFile($path) && $this->canImportBySize($path)) { - // grab content && base64-ize - $importContent = $this->load($path); - $importContent = base64_encode($importContent); - - // build replacement - $search[] = $match[0]; - $replace[] = 'url('.$this->importExtensions[$extension].';base64,'.$importContent.')'; - } - } - - // replace the import statements - $content = str_replace($search, $replace, $content); - } - - return $content; - } - - /** - * Minify the data. - * Perform CSS optimizations. - * - * @param string[optional] $path Path to write the data to - * @param string[] $parents Parent paths, for circular reference checks - * - * @return string The minified data - */ - public function execute($path = null, $parents = array()) - { - $content = ''; - - // loop CSS data (raw data and files) - foreach ($this->data as $source => $css) { - /* - * Let's first take out strings & comments, since we can't just - * remove whitespace anywhere. If whitespace occurs inside a string, - * we should leave it alone. E.g.: - * p { content: "a test" } - */ - $this->extractStrings(); - $this->stripComments(); - $this->extractMath(); - $this->extractCustomProperties(); - $css = $this->replace($css); - - $css = $this->stripWhitespace($css); - $css = $this->shortenColors($css); - $css = $this->shortenZeroes($css); - $css = $this->shortenFontWeights($css); - $css = $this->stripEmptyTags($css); - - // restore the string we've extracted earlier - $css = $this->restoreExtractedData($css); - - $source = is_int($source) ? '' : $source; - $parents = $source ? array_merge($parents, array($source)) : $parents; - $css = $this->combineImports($source, $css, $parents); - $css = $this->importFiles($source, $css); - - /* - * If we'll save to a new path, we'll have to fix the relative paths - * to be relative no longer to the source file, but to the new path. - * If we don't write to a file, fall back to same path so no - * conversion happens (because we still want it to go through most - * of the move code, which also addresses url() & @import syntax...) - */ - $converter = $this->getPathConverter($source, $path ?: $source); - $css = $this->move($converter, $css); - - // combine css - $content .= $css; - } - - $content = $this->moveImportsToTop($content); - - return $content; - } - - /** - * Moving a css file should update all relative urls. - * Relative references (e.g. ../images/image.gif) in a certain css file, - * will have to be updated when a file is being saved at another location - * (e.g. ../../images/image.gif, if the new CSS file is 1 folder deeper). - * - * @param ConverterInterface $converter Relative path converter - * @param string $content The CSS content to update relative urls for - * - * @return string - */ - protected function move(ConverterInterface $converter, $content) - { - /* - * Relative path references will usually be enclosed by url(). @import - * is an exception, where url() is not necessary around the path (but is - * allowed). - * This *could* be 1 regular expression, where both regular expressions - * in this array are on different sides of a |. But we're using named - * patterns in both regexes, the same name on both regexes. This is only - * possible with a (?J) modifier, but that only works after a fairly - * recent PCRE version. That's why I'm doing 2 separate regular - * expressions & combining the matches after executing of both. - */ - $relativeRegexes = array( - // url(xxx) - '/ - # open url() - url\( - - \s* - - # open path enclosure - (?P["\'])? - - # fetch path - (?P.+?) - - # close path enclosure - (?(quotes)(?P=quotes)) - - \s* - - # close url() - \) - - /ix', - - // @import "xxx" - '/ - # import statement - @import - - # whitespace - \s+ - - # we don\'t have to check for @import url(), because the - # condition above will already catch these - - # open path enclosure - (?P["\']) - - # fetch path - (?P.+?) - - # close path enclosure - (?P=quotes) - - /ix', - ); - - // find all relative urls in css - $matches = array(); - foreach ($relativeRegexes as $relativeRegex) { - if (preg_match_all($relativeRegex, $content, $regexMatches, PREG_SET_ORDER)) { - $matches = array_merge($matches, $regexMatches); - } - } - - $search = array(); - $replace = array(); - - // loop all urls - foreach ($matches as $match) { - // determine if it's a url() or an @import match - $type = (strpos($match[0], '@import') === 0 ? 'import' : 'url'); - - $url = $match['path']; - if ($this->canImportByPath($url)) { - // attempting to interpret GET-params makes no sense, so let's discard them for awhile - $params = strrchr($url, '?'); - $url = $params ? substr($url, 0, -strlen($params)) : $url; - - // fix relative url - $url = $converter->convert($url); - - // now that the path has been converted, re-apply GET-params - $url .= $params; - } - - /* - * Urls with control characters above 0x7e should be quoted. - * According to Mozilla's parser, whitespace is only allowed at the - * end of unquoted urls. - * Urls with `)` (as could happen with data: uris) should also be - * quoted to avoid being confused for the url() closing parentheses. - * And urls with a # have also been reported to cause issues. - * Urls with quotes inside should also remain escaped. - * - * @see https://developer.mozilla.org/nl/docs/Web/CSS/url#The_url()_functional_notation - * @see https://hg.mozilla.org/mozilla-central/rev/14abca4e7378 - * @see https://github.com/matthiasmullie/minify/issues/193 - */ - $url = trim($url); - if (preg_match('/[\s\)\'"#\x{7f}-\x{9f}]/u', $url)) { - $url = $match['quotes'] . $url . $match['quotes']; - } - - // build replacement - $search[] = $match[0]; - if ($type === 'url') { - $replace[] = 'url('.$url.')'; - } elseif ($type === 'import') { - $replace[] = '@import "'.$url.'"'; - } - } - - // replace urls - return str_replace($search, $replace, $content); - } - - /** - * Shorthand hex color codes. - * #FF0000 -> #F00. - * - * @param string $content The CSS content to shorten the hex color codes for - * - * @return string - */ - protected function shortenColors($content) - { - $content = preg_replace('/(?<=[: ])#([0-9a-z])\\1([0-9a-z])\\2([0-9a-z])\\3(?:([0-9a-z])\\4)?(?=[; }])/i', '#$1$2$3$4', $content); - - // remove alpha channel if it's pointless... - $content = preg_replace('/(?<=[: ])#([0-9a-z]{6})ff?(?=[; }])/i', '#$1', $content); - $content = preg_replace('/(?<=[: ])#([0-9a-z]{3})f?(?=[; }])/i', '#$1', $content); - - $colors = array( - // we can shorten some even more by replacing them with their color name - '#F0FFFF' => 'azure', - '#F5F5DC' => 'beige', - '#A52A2A' => 'brown', - '#FF7F50' => 'coral', - '#FFD700' => 'gold', - '#808080' => 'gray', - '#008000' => 'green', - '#4B0082' => 'indigo', - '#FFFFF0' => 'ivory', - '#F0E68C' => 'khaki', - '#FAF0E6' => 'linen', - '#800000' => 'maroon', - '#000080' => 'navy', - '#808000' => 'olive', - '#CD853F' => 'peru', - '#FFC0CB' => 'pink', - '#DDA0DD' => 'plum', - '#800080' => 'purple', - '#F00' => 'red', - '#FA8072' => 'salmon', - '#A0522D' => 'sienna', - '#C0C0C0' => 'silver', - '#FFFAFA' => 'snow', - '#D2B48C' => 'tan', - '#FF6347' => 'tomato', - '#EE82EE' => 'violet', - '#F5DEB3' => 'wheat', - // or the other way around - 'WHITE' => '#fff', - 'BLACK' => '#000', - ); - - return preg_replace_callback( - '/(?<=[: ])('.implode('|', array_keys($colors)).')(?=[; }])/i', - function ($match) use ($colors) { - return $colors[strtoupper($match[0])]; - }, - $content - ); - } - - /** - * Shorten CSS font weights. - * - * @param string $content The CSS content to shorten the font weights for - * - * @return string - */ - protected function shortenFontWeights($content) - { - $weights = array( - 'normal' => 400, - 'bold' => 700, - ); - - $callback = function ($match) use ($weights) { - return $match[1].$weights[$match[2]]; - }; - - return preg_replace_callback('/(font-weight\s*:\s*)('.implode('|', array_keys($weights)).')(?=[;}])/', $callback, $content); - } - - /** - * Shorthand 0 values to plain 0, instead of e.g. -0em. - * - * @param string $content The CSS content to shorten the zero values for - * - * @return string - */ - protected function shortenZeroes($content) - { - // we don't want to strip units in `calc()` expressions: - // `5px - 0px` is valid, but `5px - 0` is not - // `10px * 0` is valid (equates to 0), and so is `10 * 0px`, but - // `10 * 0` is invalid - // we've extracted calcs earlier, so we don't need to worry about this - - // reusable bits of code throughout these regexes: - // before & after are used to make sure we don't match lose unintended - // 0-like values (e.g. in #000, or in http://url/1.0) - // units can be stripped from 0 values, or used to recognize non 0 - // values (where wa may be able to strip a .0 suffix) - $before = '(?<=[:(, ])'; - $after = '(?=[ ,);}])'; - $units = '(em|ex|%|px|cm|mm|in|pt|pc|ch|rem|vh|vw|vmin|vmax|vm)'; - - // strip units after zeroes (0px -> 0) - // NOTE: it should be safe to remove all units for a 0 value, but in - // practice, Webkit (especially Safari) seems to stumble over at least - // 0%, potentially other units as well. Only stripping 'px' for now. - // @see https://github.com/matthiasmullie/minify/issues/60 - $content = preg_replace('/'.$before.'(-?0*(\.0+)?)(?<=0)px'.$after.'/', '\\1', $content); - - // strip 0-digits (.0 -> 0) - $content = preg_replace('/'.$before.'\.0+'.$units.'?'.$after.'/', '0\\1', $content); - // strip trailing 0: 50.10 -> 50.1, 50.10px -> 50.1px - $content = preg_replace('/'.$before.'(-?[0-9]+\.[0-9]+)0+'.$units.'?'.$after.'/', '\\1\\2', $content); - // strip trailing 0: 50.00 -> 50, 50.00px -> 50px - $content = preg_replace('/'.$before.'(-?[0-9]+)\.0+'.$units.'?'.$after.'/', '\\1\\2', $content); - // strip leading 0: 0.1 -> .1, 01.1 -> 1.1 - $content = preg_replace('/'.$before.'(-?)0+([0-9]*\.[0-9]+)'.$units.'?'.$after.'/', '\\1\\2\\3', $content); - - // strip negative zeroes (-0 -> 0) & truncate zeroes (00 -> 0) - $content = preg_replace('/'.$before.'-?0+'.$units.'?'.$after.'/', '0\\1', $content); - - // IE doesn't seem to understand a unitless flex-basis value (correct - - // it goes against the spec), so let's add it in again (make it `%`, - // which is only 1 char: 0%, 0px, 0 anything, it's all just the same) - // @see https://developer.mozilla.org/nl/docs/Web/CSS/flex - $content = preg_replace('/flex:([0-9]+\s[0-9]+\s)0([;\}])/', 'flex:${1}0%${2}', $content); - $content = preg_replace('/flex-basis:0([;\}])/', 'flex-basis:0%${1}', $content); - - return $content; - } - - /** - * Strip empty tags from source code. - * - * @param string $content - * - * @return string - */ - protected function stripEmptyTags($content) - { - $content = preg_replace('/(?<=^)[^\{\};]+\{\s*\}/', '', $content); - $content = preg_replace('/(?<=(\}|;))[^\{\};]+\{\s*\}/', '', $content); - - return $content; - } - - /** - * Strip comments from source code. - */ - protected function stripComments() - { - // PHP only supports $this inside anonymous functions since 5.4 - $minifier = $this; - $callback = function ($match) use ($minifier) { - $count = count($minifier->extracted); - $placeholder = '/*'.$count.'*/'; - $minifier->extracted[$placeholder] = $match[0]; - - return $placeholder; - }; - $this->registerPattern('/\n?\/\*(!|.*?@license|.*?@preserve).*?\*\/\n?/s', $callback); - - $this->registerPattern('/\/\*.*?\*\//s', ''); - } - - /** - * Strip whitespace. - * - * @param string $content The CSS content to strip the whitespace for - * - * @return string - */ - protected function stripWhitespace($content) - { - // remove leading & trailing whitespace - $content = preg_replace('/^\s*/m', '', $content); - $content = preg_replace('/\s*$/m', '', $content); - - // replace newlines with a single space - $content = preg_replace('/\s+/', ' ', $content); - - // remove whitespace around meta characters - // inspired by stackoverflow.com/questions/15195750/minify-compress-css-with-regex - $content = preg_replace('/\s*([\*$~^|]?+=|[{};,>~]|!important\b)\s*/', '$1', $content); - $content = preg_replace('/([\[(:>\+])\s+/', '$1', $content); - $content = preg_replace('/\s+([\]\)>\+])/', '$1', $content); - $content = preg_replace('/\s+(:)(?![^\}]*\{)/', '$1', $content); - - // whitespace around + and - can only be stripped inside some pseudo- - // classes, like `:nth-child(3+2n)` - // not in things like `calc(3px + 2px)`, shorthands like `3px -2px`, or - // selectors like `div.weird- p` - $pseudos = array('nth-child', 'nth-last-child', 'nth-last-of-type', 'nth-of-type'); - $content = preg_replace('/:('.implode('|', $pseudos).')\(\s*([+-]?)\s*(.+?)\s*([+-]?)\s*(.*?)\s*\)/', ':$1($2$3$4$5)', $content); - - // remove semicolon/whitespace followed by closing bracket - $content = str_replace(';}', '}', $content); - - return trim($content); - } - - /** - * Replace all occurrences of functions that may contain math, where - * whitespace around operators needs to be preserved (e.g. calc, clamp) - */ - protected function extractMath() - { - $functions = array('calc', 'clamp', 'min', 'max'); - $pattern = '/\b('. implode('|', $functions) .')(\(.+?)(?=$|;|})/m'; - - // PHP only supports $this inside anonymous functions since 5.4 - $minifier = $this; - $callback = function ($match) use ($minifier, $pattern, &$callback) { - $function = $match[1]; - $length = strlen($match[2]); - $expr = ''; - $opened = 0; - - // the regular expression for extracting math has 1 significant problem: - // it can't determine the correct closing parenthesis... - // instead, it'll match a larger portion of code to where it's certain that - // the calc() musts have ended, and we'll figure out which is the correct - // closing parenthesis here, by counting how many have opened - for ($i = 0; $i < $length; $i++) { - $char = $match[2][$i]; - $expr .= $char; - if ($char === '(') { - $opened++; - } elseif ($char === ')' && --$opened === 0) { - break; - } - } - - // now that we've figured out where the calc() starts and ends, extract it - $count = count($minifier->extracted); - $placeholder = 'math('.$count.')'; - $minifier->extracted[$placeholder] = $function.'('.trim(substr($expr, 1, -1)).')'; - - // and since we've captured more code than required, we may have some leftover - // calc() in here too - go recursive on the remaining but of code to go figure - // that out and extract what is needed - $rest = str_replace($function.$expr, '', $match[0]); - $rest = preg_replace_callback($pattern, $callback, $rest); - - return $placeholder.$rest; - }; - - $this->registerPattern($pattern, $callback); - } - - /** - * Replace custom properties, whose values may be used in scenarios where - * we wouldn't want them to be minified (e.g. inside calc) - */ - protected function extractCustomProperties() - { - // PHP only supports $this inside anonymous functions since 5.4 - $minifier = $this; - $this->registerPattern( - '/(?<=^|[;}])(--[^:;{}"\'\s]+)\s*:([^;{}]+)/m', - function ($match) use ($minifier) { - $placeholder = '--custom-'. count($minifier->extracted) . ':0'; - $minifier->extracted[$placeholder] = $match[1] .':'. trim($match[2]); - return $placeholder; - - } - ); - } - - /** - * Check if file is small enough to be imported. - * - * @param string $path The path to the file - * - * @return bool - */ - protected function canImportBySize($path) - { - return ($size = @filesize($path)) && $size <= $this->maxImportSize * 1024; - } - - /** - * Check if file a file can be imported, going by the path. - * - * @param string $path - * - * @return bool - */ - protected function canImportByPath($path) - { - return preg_match('/^(data:|https?:|\\/)/', $path) === 0; - } - - /** - * Return a converter to update relative paths to be relative to the new - * destination. - * - * @param string $source - * @param string $target - * - * @return ConverterInterface - */ - protected function getPathConverter($source, $target) - { - return new Converter($source, $target); - } -} diff --git a/source/vendor/matthiasmullie/minify/src/Exception.php b/source/vendor/matthiasmullie/minify/src/Exception.php deleted file mode 100644 index d03898f..0000000 --- a/source/vendor/matthiasmullie/minify/src/Exception.php +++ /dev/null @@ -1,20 +0,0 @@ - - */ -namespace MatthiasMullie\Minify; - -/** - * Base Exception Class - * @deprecated Use Exceptions\BasicException instead - * - * @package Minify - * @author Matthias Mullie - */ -abstract class Exception extends \Exception -{ -} diff --git a/source/vendor/matthiasmullie/minify/src/Exceptions/BasicException.php b/source/vendor/matthiasmullie/minify/src/Exceptions/BasicException.php deleted file mode 100644 index af5e81b..0000000 --- a/source/vendor/matthiasmullie/minify/src/Exceptions/BasicException.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2012, Matthias Mullie. All rights reserved - * @license MIT License - */ -namespace MatthiasMullie\Minify\Exceptions; - -use MatthiasMullie\Minify\Exception; - -/** - * Basic Exception Class - * - * @package Minify\Exception - * @author Matthias Mullie - */ -abstract class BasicException extends Exception -{ -} diff --git a/source/vendor/matthiasmullie/minify/src/Exceptions/FileImportException.php b/source/vendor/matthiasmullie/minify/src/Exceptions/FileImportException.php deleted file mode 100644 index 912a2c9..0000000 --- a/source/vendor/matthiasmullie/minify/src/Exceptions/FileImportException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * @copyright Copyright (c) 2012, Matthias Mullie. All rights reserved - * @license MIT License - */ -namespace MatthiasMullie\Minify\Exceptions; - -/** - * File Import Exception Class - * - * @package Minify\Exception - * @author Matthias Mullie - */ -class FileImportException extends BasicException -{ -} diff --git a/source/vendor/matthiasmullie/minify/src/Exceptions/IOException.php b/source/vendor/matthiasmullie/minify/src/Exceptions/IOException.php deleted file mode 100644 index b172eb4..0000000 --- a/source/vendor/matthiasmullie/minify/src/Exceptions/IOException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * @copyright Copyright (c) 2012, Matthias Mullie. All rights reserved - * @license MIT License - */ -namespace MatthiasMullie\Minify\Exceptions; - -/** - * IO Exception Class - * - * @package Minify\Exception - * @author Matthias Mullie - */ -class IOException extends BasicException -{ -} diff --git a/source/vendor/matthiasmullie/minify/src/JS.php b/source/vendor/matthiasmullie/minify/src/JS.php deleted file mode 100644 index a0fa649..0000000 --- a/source/vendor/matthiasmullie/minify/src/JS.php +++ /dev/null @@ -1,612 +0,0 @@ - - * @copyright Copyright (c) 2012, Matthias Mullie. All rights reserved - * @license MIT License - */ -namespace MatthiasMullie\Minify; - -/** - * JavaScript Minifier Class - * - * Please report bugs on https://github.com/matthiasmullie/minify/issues - * - * @package Minify - * @author Matthias Mullie - * @author Tijs Verkoyen - * @copyright Copyright (c) 2012, Matthias Mullie. All rights reserved - * @license MIT License - */ -class JS extends Minify -{ - /** - * Var-matching regex based on http://stackoverflow.com/a/9337047/802993. - * - * Note that regular expressions using that bit must have the PCRE_UTF8 - * pattern modifier (/u) set. - * - * @var string - */ - const REGEX_VARIABLE = '\b[$A-Z\_a-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\x{02c1}\x{02c6}-\x{02d1}\x{02e0}-\x{02e4}\x{02ec}\x{02ee}\x{0370}-\x{0374}\x{0376}\x{0377}\x{037a}-\x{037d}\x{0386}\x{0388}-\x{038a}\x{038c}\x{038e}-\x{03a1}\x{03a3}-\x{03f5}\x{03f7}-\x{0481}\x{048a}-\x{0527}\x{0531}-\x{0556}\x{0559}\x{0561}-\x{0587}\x{05d0}-\x{05ea}\x{05f0}-\x{05f2}\x{0620}-\x{064a}\x{066e}\x{066f}\x{0671}-\x{06d3}\x{06d5}\x{06e5}\x{06e6}\x{06ee}\x{06ef}\x{06fa}-\x{06fc}\x{06ff}\x{0710}\x{0712}-\x{072f}\x{074d}-\x{07a5}\x{07b1}\x{07ca}-\x{07ea}\x{07f4}\x{07f5}\x{07fa}\x{0800}-\x{0815}\x{081a}\x{0824}\x{0828}\x{0840}-\x{0858}\x{08a0}\x{08a2}-\x{08ac}\x{0904}-\x{0939}\x{093d}\x{0950}\x{0958}-\x{0961}\x{0971}-\x{0977}\x{0979}-\x{097f}\x{0985}-\x{098c}\x{098f}\x{0990}\x{0993}-\x{09a8}\x{09aa}-\x{09b0}\x{09b2}\x{09b6}-\x{09b9}\x{09bd}\x{09ce}\x{09dc}\x{09dd}\x{09df}-\x{09e1}\x{09f0}\x{09f1}\x{0a05}-\x{0a0a}\x{0a0f}\x{0a10}\x{0a13}-\x{0a28}\x{0a2a}-\x{0a30}\x{0a32}\x{0a33}\x{0a35}\x{0a36}\x{0a38}\x{0a39}\x{0a59}-\x{0a5c}\x{0a5e}\x{0a72}-\x{0a74}\x{0a85}-\x{0a8d}\x{0a8f}-\x{0a91}\x{0a93}-\x{0aa8}\x{0aaa}-\x{0ab0}\x{0ab2}\x{0ab3}\x{0ab5}-\x{0ab9}\x{0abd}\x{0ad0}\x{0ae0}\x{0ae1}\x{0b05}-\x{0b0c}\x{0b0f}\x{0b10}\x{0b13}-\x{0b28}\x{0b2a}-\x{0b30}\x{0b32}\x{0b33}\x{0b35}-\x{0b39}\x{0b3d}\x{0b5c}\x{0b5d}\x{0b5f}-\x{0b61}\x{0b71}\x{0b83}\x{0b85}-\x{0b8a}\x{0b8e}-\x{0b90}\x{0b92}-\x{0b95}\x{0b99}\x{0b9a}\x{0b9c}\x{0b9e}\x{0b9f}\x{0ba3}\x{0ba4}\x{0ba8}-\x{0baa}\x{0bae}-\x{0bb9}\x{0bd0}\x{0c05}-\x{0c0c}\x{0c0e}-\x{0c10}\x{0c12}-\x{0c28}\x{0c2a}-\x{0c33}\x{0c35}-\x{0c39}\x{0c3d}\x{0c58}\x{0c59}\x{0c60}\x{0c61}\x{0c85}-\x{0c8c}\x{0c8e}-\x{0c90}\x{0c92}-\x{0ca8}\x{0caa}-\x{0cb3}\x{0cb5}-\x{0cb9}\x{0cbd}\x{0cde}\x{0ce0}\x{0ce1}\x{0cf1}\x{0cf2}\x{0d05}-\x{0d0c}\x{0d0e}-\x{0d10}\x{0d12}-\x{0d3a}\x{0d3d}\x{0d4e}\x{0d60}\x{0d61}\x{0d7a}-\x{0d7f}\x{0d85}-\x{0d96}\x{0d9a}-\x{0db1}\x{0db3}-\x{0dbb}\x{0dbd}\x{0dc0}-\x{0dc6}\x{0e01}-\x{0e30}\x{0e32}\x{0e33}\x{0e40}-\x{0e46}\x{0e81}\x{0e82}\x{0e84}\x{0e87}\x{0e88}\x{0e8a}\x{0e8d}\x{0e94}-\x{0e97}\x{0e99}-\x{0e9f}\x{0ea1}-\x{0ea3}\x{0ea5}\x{0ea7}\x{0eaa}\x{0eab}\x{0ead}-\x{0eb0}\x{0eb2}\x{0eb3}\x{0ebd}\x{0ec0}-\x{0ec4}\x{0ec6}\x{0edc}-\x{0edf}\x{0f00}\x{0f40}-\x{0f47}\x{0f49}-\x{0f6c}\x{0f88}-\x{0f8c}\x{1000}-\x{102a}\x{103f}\x{1050}-\x{1055}\x{105a}-\x{105d}\x{1061}\x{1065}\x{1066}\x{106e}-\x{1070}\x{1075}-\x{1081}\x{108e}\x{10a0}-\x{10c5}\x{10c7}\x{10cd}\x{10d0}-\x{10fa}\x{10fc}-\x{1248}\x{124a}-\x{124d}\x{1250}-\x{1256}\x{1258}\x{125a}-\x{125d}\x{1260}-\x{1288}\x{128a}-\x{128d}\x{1290}-\x{12b0}\x{12b2}-\x{12b5}\x{12b8}-\x{12be}\x{12c0}\x{12c2}-\x{12c5}\x{12c8}-\x{12d6}\x{12d8}-\x{1310}\x{1312}-\x{1315}\x{1318}-\x{135a}\x{1380}-\x{138f}\x{13a0}-\x{13f4}\x{1401}-\x{166c}\x{166f}-\x{167f}\x{1681}-\x{169a}\x{16a0}-\x{16ea}\x{16ee}-\x{16f0}\x{1700}-\x{170c}\x{170e}-\x{1711}\x{1720}-\x{1731}\x{1740}-\x{1751}\x{1760}-\x{176c}\x{176e}-\x{1770}\x{1780}-\x{17b3}\x{17d7}\x{17dc}\x{1820}-\x{1877}\x{1880}-\x{18a8}\x{18aa}\x{18b0}-\x{18f5}\x{1900}-\x{191c}\x{1950}-\x{196d}\x{1970}-\x{1974}\x{1980}-\x{19ab}\x{19c1}-\x{19c7}\x{1a00}-\x{1a16}\x{1a20}-\x{1a54}\x{1aa7}\x{1b05}-\x{1b33}\x{1b45}-\x{1b4b}\x{1b83}-\x{1ba0}\x{1bae}\x{1baf}\x{1bba}-\x{1be5}\x{1c00}-\x{1c23}\x{1c4d}-\x{1c4f}\x{1c5a}-\x{1c7d}\x{1ce9}-\x{1cec}\x{1cee}-\x{1cf1}\x{1cf5}\x{1cf6}\x{1d00}-\x{1dbf}\x{1e00}-\x{1f15}\x{1f18}-\x{1f1d}\x{1f20}-\x{1f45}\x{1f48}-\x{1f4d}\x{1f50}-\x{1f57}\x{1f59}\x{1f5b}\x{1f5d}\x{1f5f}-\x{1f7d}\x{1f80}-\x{1fb4}\x{1fb6}-\x{1fbc}\x{1fbe}\x{1fc2}-\x{1fc4}\x{1fc6}-\x{1fcc}\x{1fd0}-\x{1fd3}\x{1fd6}-\x{1fdb}\x{1fe0}-\x{1fec}\x{1ff2}-\x{1ff4}\x{1ff6}-\x{1ffc}\x{2071}\x{207f}\x{2090}-\x{209c}\x{2102}\x{2107}\x{210a}-\x{2113}\x{2115}\x{2119}-\x{211d}\x{2124}\x{2126}\x{2128}\x{212a}-\x{212d}\x{212f}-\x{2139}\x{213c}-\x{213f}\x{2145}-\x{2149}\x{214e}\x{2160}-\x{2188}\x{2c00}-\x{2c2e}\x{2c30}-\x{2c5e}\x{2c60}-\x{2ce4}\x{2ceb}-\x{2cee}\x{2cf2}\x{2cf3}\x{2d00}-\x{2d25}\x{2d27}\x{2d2d}\x{2d30}-\x{2d67}\x{2d6f}\x{2d80}-\x{2d96}\x{2da0}-\x{2da6}\x{2da8}-\x{2dae}\x{2db0}-\x{2db6}\x{2db8}-\x{2dbe}\x{2dc0}-\x{2dc6}\x{2dc8}-\x{2dce}\x{2dd0}-\x{2dd6}\x{2dd8}-\x{2dde}\x{2e2f}\x{3005}-\x{3007}\x{3021}-\x{3029}\x{3031}-\x{3035}\x{3038}-\x{303c}\x{3041}-\x{3096}\x{309d}-\x{309f}\x{30a1}-\x{30fa}\x{30fc}-\x{30ff}\x{3105}-\x{312d}\x{3131}-\x{318e}\x{31a0}-\x{31ba}\x{31f0}-\x{31ff}\x{3400}-\x{4db5}\x{4e00}-\x{9fcc}\x{a000}-\x{a48c}\x{a4d0}-\x{a4fd}\x{a500}-\x{a60c}\x{a610}-\x{a61f}\x{a62a}\x{a62b}\x{a640}-\x{a66e}\x{a67f}-\x{a697}\x{a6a0}-\x{a6ef}\x{a717}-\x{a71f}\x{a722}-\x{a788}\x{a78b}-\x{a78e}\x{a790}-\x{a793}\x{a7a0}-\x{a7aa}\x{a7f8}-\x{a801}\x{a803}-\x{a805}\x{a807}-\x{a80a}\x{a80c}-\x{a822}\x{a840}-\x{a873}\x{a882}-\x{a8b3}\x{a8f2}-\x{a8f7}\x{a8fb}\x{a90a}-\x{a925}\x{a930}-\x{a946}\x{a960}-\x{a97c}\x{a984}-\x{a9b2}\x{a9cf}\x{aa00}-\x{aa28}\x{aa40}-\x{aa42}\x{aa44}-\x{aa4b}\x{aa60}-\x{aa76}\x{aa7a}\x{aa80}-\x{aaaf}\x{aab1}\x{aab5}\x{aab6}\x{aab9}-\x{aabd}\x{aac0}\x{aac2}\x{aadb}-\x{aadd}\x{aae0}-\x{aaea}\x{aaf2}-\x{aaf4}\x{ab01}-\x{ab06}\x{ab09}-\x{ab0e}\x{ab11}-\x{ab16}\x{ab20}-\x{ab26}\x{ab28}-\x{ab2e}\x{abc0}-\x{abe2}\x{ac00}-\x{d7a3}\x{d7b0}-\x{d7c6}\x{d7cb}-\x{d7fb}\x{f900}-\x{fa6d}\x{fa70}-\x{fad9}\x{fb00}-\x{fb06}\x{fb13}-\x{fb17}\x{fb1d}\x{fb1f}-\x{fb28}\x{fb2a}-\x{fb36}\x{fb38}-\x{fb3c}\x{fb3e}\x{fb40}\x{fb41}\x{fb43}\x{fb44}\x{fb46}-\x{fbb1}\x{fbd3}-\x{fd3d}\x{fd50}-\x{fd8f}\x{fd92}-\x{fdc7}\x{fdf0}-\x{fdfb}\x{fe70}-\x{fe74}\x{fe76}-\x{fefc}\x{ff21}-\x{ff3a}\x{ff41}-\x{ff5a}\x{ff66}-\x{ffbe}\x{ffc2}-\x{ffc7}\x{ffca}-\x{ffcf}\x{ffd2}-\x{ffd7}\x{ffda}-\x{ffdc}][$A-Z\_a-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\x{02c1}\x{02c6}-\x{02d1}\x{02e0}-\x{02e4}\x{02ec}\x{02ee}\x{0370}-\x{0374}\x{0376}\x{0377}\x{037a}-\x{037d}\x{0386}\x{0388}-\x{038a}\x{038c}\x{038e}-\x{03a1}\x{03a3}-\x{03f5}\x{03f7}-\x{0481}\x{048a}-\x{0527}\x{0531}-\x{0556}\x{0559}\x{0561}-\x{0587}\x{05d0}-\x{05ea}\x{05f0}-\x{05f2}\x{0620}-\x{064a}\x{066e}\x{066f}\x{0671}-\x{06d3}\x{06d5}\x{06e5}\x{06e6}\x{06ee}\x{06ef}\x{06fa}-\x{06fc}\x{06ff}\x{0710}\x{0712}-\x{072f}\x{074d}-\x{07a5}\x{07b1}\x{07ca}-\x{07ea}\x{07f4}\x{07f5}\x{07fa}\x{0800}-\x{0815}\x{081a}\x{0824}\x{0828}\x{0840}-\x{0858}\x{08a0}\x{08a2}-\x{08ac}\x{0904}-\x{0939}\x{093d}\x{0950}\x{0958}-\x{0961}\x{0971}-\x{0977}\x{0979}-\x{097f}\x{0985}-\x{098c}\x{098f}\x{0990}\x{0993}-\x{09a8}\x{09aa}-\x{09b0}\x{09b2}\x{09b6}-\x{09b9}\x{09bd}\x{09ce}\x{09dc}\x{09dd}\x{09df}-\x{09e1}\x{09f0}\x{09f1}\x{0a05}-\x{0a0a}\x{0a0f}\x{0a10}\x{0a13}-\x{0a28}\x{0a2a}-\x{0a30}\x{0a32}\x{0a33}\x{0a35}\x{0a36}\x{0a38}\x{0a39}\x{0a59}-\x{0a5c}\x{0a5e}\x{0a72}-\x{0a74}\x{0a85}-\x{0a8d}\x{0a8f}-\x{0a91}\x{0a93}-\x{0aa8}\x{0aaa}-\x{0ab0}\x{0ab2}\x{0ab3}\x{0ab5}-\x{0ab9}\x{0abd}\x{0ad0}\x{0ae0}\x{0ae1}\x{0b05}-\x{0b0c}\x{0b0f}\x{0b10}\x{0b13}-\x{0b28}\x{0b2a}-\x{0b30}\x{0b32}\x{0b33}\x{0b35}-\x{0b39}\x{0b3d}\x{0b5c}\x{0b5d}\x{0b5f}-\x{0b61}\x{0b71}\x{0b83}\x{0b85}-\x{0b8a}\x{0b8e}-\x{0b90}\x{0b92}-\x{0b95}\x{0b99}\x{0b9a}\x{0b9c}\x{0b9e}\x{0b9f}\x{0ba3}\x{0ba4}\x{0ba8}-\x{0baa}\x{0bae}-\x{0bb9}\x{0bd0}\x{0c05}-\x{0c0c}\x{0c0e}-\x{0c10}\x{0c12}-\x{0c28}\x{0c2a}-\x{0c33}\x{0c35}-\x{0c39}\x{0c3d}\x{0c58}\x{0c59}\x{0c60}\x{0c61}\x{0c85}-\x{0c8c}\x{0c8e}-\x{0c90}\x{0c92}-\x{0ca8}\x{0caa}-\x{0cb3}\x{0cb5}-\x{0cb9}\x{0cbd}\x{0cde}\x{0ce0}\x{0ce1}\x{0cf1}\x{0cf2}\x{0d05}-\x{0d0c}\x{0d0e}-\x{0d10}\x{0d12}-\x{0d3a}\x{0d3d}\x{0d4e}\x{0d60}\x{0d61}\x{0d7a}-\x{0d7f}\x{0d85}-\x{0d96}\x{0d9a}-\x{0db1}\x{0db3}-\x{0dbb}\x{0dbd}\x{0dc0}-\x{0dc6}\x{0e01}-\x{0e30}\x{0e32}\x{0e33}\x{0e40}-\x{0e46}\x{0e81}\x{0e82}\x{0e84}\x{0e87}\x{0e88}\x{0e8a}\x{0e8d}\x{0e94}-\x{0e97}\x{0e99}-\x{0e9f}\x{0ea1}-\x{0ea3}\x{0ea5}\x{0ea7}\x{0eaa}\x{0eab}\x{0ead}-\x{0eb0}\x{0eb2}\x{0eb3}\x{0ebd}\x{0ec0}-\x{0ec4}\x{0ec6}\x{0edc}-\x{0edf}\x{0f00}\x{0f40}-\x{0f47}\x{0f49}-\x{0f6c}\x{0f88}-\x{0f8c}\x{1000}-\x{102a}\x{103f}\x{1050}-\x{1055}\x{105a}-\x{105d}\x{1061}\x{1065}\x{1066}\x{106e}-\x{1070}\x{1075}-\x{1081}\x{108e}\x{10a0}-\x{10c5}\x{10c7}\x{10cd}\x{10d0}-\x{10fa}\x{10fc}-\x{1248}\x{124a}-\x{124d}\x{1250}-\x{1256}\x{1258}\x{125a}-\x{125d}\x{1260}-\x{1288}\x{128a}-\x{128d}\x{1290}-\x{12b0}\x{12b2}-\x{12b5}\x{12b8}-\x{12be}\x{12c0}\x{12c2}-\x{12c5}\x{12c8}-\x{12d6}\x{12d8}-\x{1310}\x{1312}-\x{1315}\x{1318}-\x{135a}\x{1380}-\x{138f}\x{13a0}-\x{13f4}\x{1401}-\x{166c}\x{166f}-\x{167f}\x{1681}-\x{169a}\x{16a0}-\x{16ea}\x{16ee}-\x{16f0}\x{1700}-\x{170c}\x{170e}-\x{1711}\x{1720}-\x{1731}\x{1740}-\x{1751}\x{1760}-\x{176c}\x{176e}-\x{1770}\x{1780}-\x{17b3}\x{17d7}\x{17dc}\x{1820}-\x{1877}\x{1880}-\x{18a8}\x{18aa}\x{18b0}-\x{18f5}\x{1900}-\x{191c}\x{1950}-\x{196d}\x{1970}-\x{1974}\x{1980}-\x{19ab}\x{19c1}-\x{19c7}\x{1a00}-\x{1a16}\x{1a20}-\x{1a54}\x{1aa7}\x{1b05}-\x{1b33}\x{1b45}-\x{1b4b}\x{1b83}-\x{1ba0}\x{1bae}\x{1baf}\x{1bba}-\x{1be5}\x{1c00}-\x{1c23}\x{1c4d}-\x{1c4f}\x{1c5a}-\x{1c7d}\x{1ce9}-\x{1cec}\x{1cee}-\x{1cf1}\x{1cf5}\x{1cf6}\x{1d00}-\x{1dbf}\x{1e00}-\x{1f15}\x{1f18}-\x{1f1d}\x{1f20}-\x{1f45}\x{1f48}-\x{1f4d}\x{1f50}-\x{1f57}\x{1f59}\x{1f5b}\x{1f5d}\x{1f5f}-\x{1f7d}\x{1f80}-\x{1fb4}\x{1fb6}-\x{1fbc}\x{1fbe}\x{1fc2}-\x{1fc4}\x{1fc6}-\x{1fcc}\x{1fd0}-\x{1fd3}\x{1fd6}-\x{1fdb}\x{1fe0}-\x{1fec}\x{1ff2}-\x{1ff4}\x{1ff6}-\x{1ffc}\x{2071}\x{207f}\x{2090}-\x{209c}\x{2102}\x{2107}\x{210a}-\x{2113}\x{2115}\x{2119}-\x{211d}\x{2124}\x{2126}\x{2128}\x{212a}-\x{212d}\x{212f}-\x{2139}\x{213c}-\x{213f}\x{2145}-\x{2149}\x{214e}\x{2160}-\x{2188}\x{2c00}-\x{2c2e}\x{2c30}-\x{2c5e}\x{2c60}-\x{2ce4}\x{2ceb}-\x{2cee}\x{2cf2}\x{2cf3}\x{2d00}-\x{2d25}\x{2d27}\x{2d2d}\x{2d30}-\x{2d67}\x{2d6f}\x{2d80}-\x{2d96}\x{2da0}-\x{2da6}\x{2da8}-\x{2dae}\x{2db0}-\x{2db6}\x{2db8}-\x{2dbe}\x{2dc0}-\x{2dc6}\x{2dc8}-\x{2dce}\x{2dd0}-\x{2dd6}\x{2dd8}-\x{2dde}\x{2e2f}\x{3005}-\x{3007}\x{3021}-\x{3029}\x{3031}-\x{3035}\x{3038}-\x{303c}\x{3041}-\x{3096}\x{309d}-\x{309f}\x{30a1}-\x{30fa}\x{30fc}-\x{30ff}\x{3105}-\x{312d}\x{3131}-\x{318e}\x{31a0}-\x{31ba}\x{31f0}-\x{31ff}\x{3400}-\x{4db5}\x{4e00}-\x{9fcc}\x{a000}-\x{a48c}\x{a4d0}-\x{a4fd}\x{a500}-\x{a60c}\x{a610}-\x{a61f}\x{a62a}\x{a62b}\x{a640}-\x{a66e}\x{a67f}-\x{a697}\x{a6a0}-\x{a6ef}\x{a717}-\x{a71f}\x{a722}-\x{a788}\x{a78b}-\x{a78e}\x{a790}-\x{a793}\x{a7a0}-\x{a7aa}\x{a7f8}-\x{a801}\x{a803}-\x{a805}\x{a807}-\x{a80a}\x{a80c}-\x{a822}\x{a840}-\x{a873}\x{a882}-\x{a8b3}\x{a8f2}-\x{a8f7}\x{a8fb}\x{a90a}-\x{a925}\x{a930}-\x{a946}\x{a960}-\x{a97c}\x{a984}-\x{a9b2}\x{a9cf}\x{aa00}-\x{aa28}\x{aa40}-\x{aa42}\x{aa44}-\x{aa4b}\x{aa60}-\x{aa76}\x{aa7a}\x{aa80}-\x{aaaf}\x{aab1}\x{aab5}\x{aab6}\x{aab9}-\x{aabd}\x{aac0}\x{aac2}\x{aadb}-\x{aadd}\x{aae0}-\x{aaea}\x{aaf2}-\x{aaf4}\x{ab01}-\x{ab06}\x{ab09}-\x{ab0e}\x{ab11}-\x{ab16}\x{ab20}-\x{ab26}\x{ab28}-\x{ab2e}\x{abc0}-\x{abe2}\x{ac00}-\x{d7a3}\x{d7b0}-\x{d7c6}\x{d7cb}-\x{d7fb}\x{f900}-\x{fa6d}\x{fa70}-\x{fad9}\x{fb00}-\x{fb06}\x{fb13}-\x{fb17}\x{fb1d}\x{fb1f}-\x{fb28}\x{fb2a}-\x{fb36}\x{fb38}-\x{fb3c}\x{fb3e}\x{fb40}\x{fb41}\x{fb43}\x{fb44}\x{fb46}-\x{fbb1}\x{fbd3}-\x{fd3d}\x{fd50}-\x{fd8f}\x{fd92}-\x{fdc7}\x{fdf0}-\x{fdfb}\x{fe70}-\x{fe74}\x{fe76}-\x{fefc}\x{ff21}-\x{ff3a}\x{ff41}-\x{ff5a}\x{ff66}-\x{ffbe}\x{ffc2}-\x{ffc7}\x{ffca}-\x{ffcf}\x{ffd2}-\x{ffd7}\x{ffda}-\x{ffdc}0-9\x{0300}-\x{036f}\x{0483}-\x{0487}\x{0591}-\x{05bd}\x{05bf}\x{05c1}\x{05c2}\x{05c4}\x{05c5}\x{05c7}\x{0610}-\x{061a}\x{064b}-\x{0669}\x{0670}\x{06d6}-\x{06dc}\x{06df}-\x{06e4}\x{06e7}\x{06e8}\x{06ea}-\x{06ed}\x{06f0}-\x{06f9}\x{0711}\x{0730}-\x{074a}\x{07a6}-\x{07b0}\x{07c0}-\x{07c9}\x{07eb}-\x{07f3}\x{0816}-\x{0819}\x{081b}-\x{0823}\x{0825}-\x{0827}\x{0829}-\x{082d}\x{0859}-\x{085b}\x{08e4}-\x{08fe}\x{0900}-\x{0903}\x{093a}-\x{093c}\x{093e}-\x{094f}\x{0951}-\x{0957}\x{0962}\x{0963}\x{0966}-\x{096f}\x{0981}-\x{0983}\x{09bc}\x{09be}-\x{09c4}\x{09c7}\x{09c8}\x{09cb}-\x{09cd}\x{09d7}\x{09e2}\x{09e3}\x{09e6}-\x{09ef}\x{0a01}-\x{0a03}\x{0a3c}\x{0a3e}-\x{0a42}\x{0a47}\x{0a48}\x{0a4b}-\x{0a4d}\x{0a51}\x{0a66}-\x{0a71}\x{0a75}\x{0a81}-\x{0a83}\x{0abc}\x{0abe}-\x{0ac5}\x{0ac7}-\x{0ac9}\x{0acb}-\x{0acd}\x{0ae2}\x{0ae3}\x{0ae6}-\x{0aef}\x{0b01}-\x{0b03}\x{0b3c}\x{0b3e}-\x{0b44}\x{0b47}\x{0b48}\x{0b4b}-\x{0b4d}\x{0b56}\x{0b57}\x{0b62}\x{0b63}\x{0b66}-\x{0b6f}\x{0b82}\x{0bbe}-\x{0bc2}\x{0bc6}-\x{0bc8}\x{0bca}-\x{0bcd}\x{0bd7}\x{0be6}-\x{0bef}\x{0c01}-\x{0c03}\x{0c3e}-\x{0c44}\x{0c46}-\x{0c48}\x{0c4a}-\x{0c4d}\x{0c55}\x{0c56}\x{0c62}\x{0c63}\x{0c66}-\x{0c6f}\x{0c82}\x{0c83}\x{0cbc}\x{0cbe}-\x{0cc4}\x{0cc6}-\x{0cc8}\x{0cca}-\x{0ccd}\x{0cd5}\x{0cd6}\x{0ce2}\x{0ce3}\x{0ce6}-\x{0cef}\x{0d02}\x{0d03}\x{0d3e}-\x{0d44}\x{0d46}-\x{0d48}\x{0d4a}-\x{0d4d}\x{0d57}\x{0d62}\x{0d63}\x{0d66}-\x{0d6f}\x{0d82}\x{0d83}\x{0dca}\x{0dcf}-\x{0dd4}\x{0dd6}\x{0dd8}-\x{0ddf}\x{0df2}\x{0df3}\x{0e31}\x{0e34}-\x{0e3a}\x{0e47}-\x{0e4e}\x{0e50}-\x{0e59}\x{0eb1}\x{0eb4}-\x{0eb9}\x{0ebb}\x{0ebc}\x{0ec8}-\x{0ecd}\x{0ed0}-\x{0ed9}\x{0f18}\x{0f19}\x{0f20}-\x{0f29}\x{0f35}\x{0f37}\x{0f39}\x{0f3e}\x{0f3f}\x{0f71}-\x{0f84}\x{0f86}\x{0f87}\x{0f8d}-\x{0f97}\x{0f99}-\x{0fbc}\x{0fc6}\x{102b}-\x{103e}\x{1040}-\x{1049}\x{1056}-\x{1059}\x{105e}-\x{1060}\x{1062}-\x{1064}\x{1067}-\x{106d}\x{1071}-\x{1074}\x{1082}-\x{108d}\x{108f}-\x{109d}\x{135d}-\x{135f}\x{1712}-\x{1714}\x{1732}-\x{1734}\x{1752}\x{1753}\x{1772}\x{1773}\x{17b4}-\x{17d3}\x{17dd}\x{17e0}-\x{17e9}\x{180b}-\x{180d}\x{1810}-\x{1819}\x{18a9}\x{1920}-\x{192b}\x{1930}-\x{193b}\x{1946}-\x{194f}\x{19b0}-\x{19c0}\x{19c8}\x{19c9}\x{19d0}-\x{19d9}\x{1a17}-\x{1a1b}\x{1a55}-\x{1a5e}\x{1a60}-\x{1a7c}\x{1a7f}-\x{1a89}\x{1a90}-\x{1a99}\x{1b00}-\x{1b04}\x{1b34}-\x{1b44}\x{1b50}-\x{1b59}\x{1b6b}-\x{1b73}\x{1b80}-\x{1b82}\x{1ba1}-\x{1bad}\x{1bb0}-\x{1bb9}\x{1be6}-\x{1bf3}\x{1c24}-\x{1c37}\x{1c40}-\x{1c49}\x{1c50}-\x{1c59}\x{1cd0}-\x{1cd2}\x{1cd4}-\x{1ce8}\x{1ced}\x{1cf2}-\x{1cf4}\x{1dc0}-\x{1de6}\x{1dfc}-\x{1dff}\x{200c}\x{200d}\x{203f}\x{2040}\x{2054}\x{20d0}-\x{20dc}\x{20e1}\x{20e5}-\x{20f0}\x{2cef}-\x{2cf1}\x{2d7f}\x{2de0}-\x{2dff}\x{302a}-\x{302f}\x{3099}\x{309a}\x{a620}-\x{a629}\x{a66f}\x{a674}-\x{a67d}\x{a69f}\x{a6f0}\x{a6f1}\x{a802}\x{a806}\x{a80b}\x{a823}-\x{a827}\x{a880}\x{a881}\x{a8b4}-\x{a8c4}\x{a8d0}-\x{a8d9}\x{a8e0}-\x{a8f1}\x{a900}-\x{a909}\x{a926}-\x{a92d}\x{a947}-\x{a953}\x{a980}-\x{a983}\x{a9b3}-\x{a9c0}\x{a9d0}-\x{a9d9}\x{aa29}-\x{aa36}\x{aa43}\x{aa4c}\x{aa4d}\x{aa50}-\x{aa59}\x{aa7b}\x{aab0}\x{aab2}-\x{aab4}\x{aab7}\x{aab8}\x{aabe}\x{aabf}\x{aac1}\x{aaeb}-\x{aaef}\x{aaf5}\x{aaf6}\x{abe3}-\x{abea}\x{abec}\x{abed}\x{abf0}-\x{abf9}\x{fb1e}\x{fe00}-\x{fe0f}\x{fe20}-\x{fe26}\x{fe33}\x{fe34}\x{fe4d}-\x{fe4f}\x{ff10}-\x{ff19}\x{ff3f}]*\b'; - - /** - * Full list of JavaScript reserved words. - * Will be loaded from /data/js/keywords_reserved.txt. - * - * @see https://mathiasbynens.be/notes/reserved-keywords - * - * @var string[] - */ - protected $keywordsReserved = array(); - - /** - * List of JavaScript reserved words that accept a - * after them. Some end of lines are not the end of a statement, like with - * these keywords. - * - * E.g.: we shouldn't insert a ; after this else - * else - * console.log('this is quite fine') - * - * Will be loaded from /data/js/keywords_before.txt - * - * @var string[] - */ - protected $keywordsBefore = array(); - - /** - * List of JavaScript reserved words that accept a - * before them. Some end of lines are not the end of a statement, like when - * continued by one of these keywords on the newline. - * - * E.g.: we shouldn't insert a ; before this instanceof - * variable - * instanceof String - * - * Will be loaded from /data/js/keywords_after.txt - * - * @var string[] - */ - protected $keywordsAfter = array(); - - /** - * List of all JavaScript operators. - * - * Will be loaded from /data/js/operators.txt - * - * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Expressions_and_Operators - * - * @var string[] - */ - protected $operators = array(); - - /** - * List of JavaScript operators that accept a after - * them. Some end of lines are not the end of a statement, like with these - * operators. - * - * Note: Most operators are fine, we've only removed ++ and --. - * ++ & -- have to be joined with the value they're in-/decrementing. - * - * Will be loaded from /data/js/operators_before.txt - * - * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Expressions_and_Operators - * - * @var string[] - */ - protected $operatorsBefore = array(); - - /** - * List of JavaScript operators that accept a before - * them. Some end of lines are not the end of a statement, like when - * continued by one of these operators on the newline. - * - * Note: Most operators are fine, we've only removed ), ], ++, --, ! and ~. - * There can't be a newline separating ! or ~ and whatever it is negating. - * ++ & -- have to be joined with the value they're in-/decrementing. - * ) & ] are "special" in that they have lots or usecases. () for example - * is used for function calls, for grouping, in if () and for (), ... - * - * Will be loaded from /data/js/operators_after.txt - * - * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Expressions_and_Operators - * - * @var string[] - */ - protected $operatorsAfter = array(); - - /** - * {@inheritdoc} - */ - public function __construct() - { - call_user_func_array(array('parent', '__construct'), func_get_args()); - - $dataDir = __DIR__.'/../data/js/'; - $options = FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES; - $this->keywordsReserved = file($dataDir.'keywords_reserved.txt', $options); - $this->keywordsBefore = file($dataDir.'keywords_before.txt', $options); - $this->keywordsAfter = file($dataDir.'keywords_after.txt', $options); - $this->operators = file($dataDir.'operators.txt', $options); - $this->operatorsBefore = file($dataDir.'operators_before.txt', $options); - $this->operatorsAfter = file($dataDir.'operators_after.txt', $options); - } - - /** - * Minify the data. - * Perform JS optimizations. - * - * @param string[optional] $path Path to write the data to - * - * @return string The minified data - */ - public function execute($path = null) - { - $content = ''; - - /* - * Let's first take out strings, comments and regular expressions. - * All of these can contain JS code-like characters, and we should make - * sure any further magic ignores anything inside of these. - * - * Consider this example, where we should not strip any whitespace: - * var str = "a test"; - * - * Comments will be removed altogether, strings and regular expressions - * will be replaced by placeholder text, which we'll restore later. - */ - $this->extractStrings('\'"`'); - $this->stripComments(); - $this->extractRegex(); - - // loop files - foreach ($this->data as $source => $js) { - // take out strings, comments & regex (for which we've registered - // the regexes just a few lines earlier) - $js = $this->replace($js); - - $js = $this->propertyNotation($js); - $js = $this->shortenBools($js); - $js = $this->stripWhitespace($js); - - // combine js: separating the scripts by a ; - $content .= $js.";"; - } - - // clean up leftover `;`s from the combination of multiple scripts - $content = ltrim($content, ';'); - $content = (string) substr($content, 0, -1); - - /* - * Earlier, we extracted strings & regular expressions and replaced them - * with placeholder text. This will restore them. - */ - $content = $this->restoreExtractedData($content); - - return $content; - } - - /** - * Strip comments from source code. - */ - protected function stripComments() - { - // PHP only supports $this inside anonymous functions since 5.4 - $minifier = $this; - $callback = function ($match) use ($minifier) { - $count = count($minifier->extracted); - $placeholder = '/*'.$count.'*/'; - $minifier->extracted[$placeholder] = $match[0]; - - return $placeholder; - }; - // multi-line comments - $this->registerPattern('/\n?\/\*(!|.*?@license|.*?@preserve).*?\*\/\n?/s', $callback); - $this->registerPattern('/\/\*.*?\*\//s', ''); - - // single-line comments - $this->registerPattern('/\/\/.*$/m', ''); - } - - /** - * JS can have /-delimited regular expressions, like: /ab+c/.match(string). - * - * The content inside the regex can contain characters that may be confused - * for JS code: e.g. it could contain whitespace it needs to match & we - * don't want to strip whitespace in there. - * - * The regex can be pretty simple: we don't have to care about comments, - * (which also use slashes) because stripComments() will have stripped those - * already. - * - * This method will replace all string content with simple REGEX# - * placeholder text, so we've rid all regular expressions from characters - * that may be misinterpreted. Original regex content will be saved in - * $this->extracted and after doing all other minifying, we can restore the - * original content via restoreRegex() - */ - protected function extractRegex() - { - // PHP only supports $this inside anonymous functions since 5.4 - $minifier = $this; - $callback = function ($match) use ($minifier) { - $count = count($minifier->extracted); - $placeholder = '"'.$count.'"'; - $minifier->extracted[$placeholder] = $match[0]; - - return $placeholder; - }; - - // match all chars except `/` and `\` - // `\` is allowed though, along with whatever char follows (which is the - // one being escaped) - // this should allow all chars, except for an unescaped `/` (= the one - // closing the regex) - // then also ignore bare `/` inside `[]`, where they don't need to be - // escaped: anything inside `[]` can be ignored safely - $pattern = '\\/(?!\*)(?:[^\\[\\/\\\\\n\r]++|(?:\\\\.)++|(?:\\[(?:[^\\]\\\\\n\r]++|(?:\\\\.)++)++\\])++)++\\/[gimuy]*'; - - // a regular expression can only be followed by a few operators or some - // of the RegExp methods (a `\` followed by a variable or value is - // likely part of a division, not a regex) - $keywords = array('do', 'in', 'new', 'else', 'throw', 'yield', 'delete', 'return', 'typeof'); - $before = '(^|[=:,;\+\-\*\/\}\(\{\[&\|!]|'.implode('|', $keywords).')\s*'; - $propertiesAndMethods = array( - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#Properties_2 - 'constructor', - 'flags', - 'global', - 'ignoreCase', - 'multiline', - 'source', - 'sticky', - 'unicode', - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#Methods_2 - 'compile(', - 'exec(', - 'test(', - 'toSource(', - 'toString(', - ); - $delimiters = array_fill(0, count($propertiesAndMethods), '/'); - $propertiesAndMethods = array_map('preg_quote', $propertiesAndMethods, $delimiters); - $after = '(?=\s*([\.,;\)\}&\|+]|\/\/|$|\.('.implode('|', $propertiesAndMethods).')))'; - $this->registerPattern('/'.$before.'\K'.$pattern.$after.'/', $callback); - - // regular expressions following a `)` are rather annoying to detect... - // quite often, `/` after `)` is a division operator & if it happens to - // be followed by another one (or a comment), it is likely to be - // confused for a regular expression - // however, it's perfectly possible for a regex to follow a `)`: after - // a single-line `if()`, `while()`, ... statement, for example - // since, when they occur like that, they're always the start of a - // statement, there's only a limited amount of ways they can be useful: - // by calling the regex methods directly - // if a regex following `)` is not followed by `.`, - // it's quite likely not a regex - $before = '\)\s*'; - $after = '(?=\s*\.('.implode('|', $propertiesAndMethods).'))'; - $this->registerPattern('/'.$before.'\K'.$pattern.$after.'/', $callback); - - // 1 more edge case: a regex can be followed by a lot more operators or - // keywords if there's a newline (ASI) in between, where the operator - // actually starts a new statement - // (https://github.com/matthiasmullie/minify/issues/56) - $operators = $this->getOperatorsForRegex($this->operatorsBefore, '/'); - $operators += $this->getOperatorsForRegex($this->keywordsReserved, '/'); - $after = '(?=\s*\n\s*('.implode('|', $operators).'))'; - $this->registerPattern('/'.$pattern.$after.'/', $callback); - } - - /** - * Strip whitespace. - * - * We won't strip *all* whitespace, but as much as possible. The thing that - * we'll preserve are newlines we're unsure about. - * JavaScript doesn't require statements to be terminated with a semicolon. - * It will automatically fix missing semicolons with ASI (automatic semi- - * colon insertion) at the end of line causing errors (without semicolon.) - * - * Because it's sometimes hard to tell if a newline is part of a statement - * that should be terminated or not, we'll just leave some of them alone. - * - * @param string $content The content to strip the whitespace for - * - * @return string - */ - protected function stripWhitespace($content) - { - // uniform line endings, make them all line feed - $content = str_replace(array("\r\n", "\r"), "\n", $content); - - // collapse all non-line feed whitespace into a single space - $content = preg_replace('/[^\S\n]+/', ' ', $content); - - // strip leading & trailing whitespace - $content = str_replace(array(" \n", "\n "), "\n", $content); - - // collapse consecutive line feeds into just 1 - $content = preg_replace('/\n+/', "\n", $content); - - $operatorsBefore = $this->getOperatorsForRegex($this->operatorsBefore, '/'); - $operatorsAfter = $this->getOperatorsForRegex($this->operatorsAfter, '/'); - $operators = $this->getOperatorsForRegex($this->operators, '/'); - $keywordsBefore = $this->getKeywordsForRegex($this->keywordsBefore, '/'); - $keywordsAfter = $this->getKeywordsForRegex($this->keywordsAfter, '/'); - - // strip whitespace that ends in (or next line begin with) an operator - // that allows statements to be broken up over multiple lines - unset($operatorsBefore['+'], $operatorsBefore['-'], $operatorsAfter['+'], $operatorsAfter['-']); - $content = preg_replace( - array( - '/('.implode('|', $operatorsBefore).')\s+/', - '/\s+('.implode('|', $operatorsAfter).')/', - ), - '\\1', - $content - ); - - // make sure + and - can't be mistaken for, or joined into ++ and -- - $content = preg_replace( - array( - '/(?%&|', $delimiter); - $operators['='] = '(?keywordsReserved; - $callback = function ($match) use ($minifier, $keywords) { - $property = trim($minifier->extracted[$match[1]], '\'"'); - - /* - * Check if the property is a reserved keyword. In this context (as - * property of an object literal/array) it shouldn't matter, but IE8 - * freaks out with "Expected identifier". - */ - if (in_array($property, $keywords)) { - return $match[0]; - } - - /* - * See if the property is in a variable-like format (e.g. - * array['key-here'] can't be replaced by array.key-here since '-' - * is not a valid character there. - */ - if (!preg_match('/^'.$minifier::REGEX_VARIABLE.'$/u', $property)) { - return $match[0]; - } - - return '.'.$property; - }; - - /* - * Figure out if previous character is a variable name (of the array - * we want to use property notation on) - this is to make sure - * standalone ['value'] arrays aren't confused for keys-of-an-array. - * We can (and only have to) check the last character, because PHP's - * regex implementation doesn't allow unfixed-length look-behind - * assertions. - */ - preg_match('/(\[[^\]]+\])[^\]]*$/', static::REGEX_VARIABLE, $previousChar); - $previousChar = $previousChar[1]; - - /* - * Make sure word preceding the ['value'] is not a keyword, e.g. - * return['x']. Because -again- PHP's regex implementation doesn't allow - * unfixed-length look-behind assertions, I'm just going to do a lot of - * separate look-behind assertions, one for each keyword. - */ - $keywords = $this->getKeywordsForRegex($keywords); - $keywords = '(? - * @copyright Copyright (c) 2012, Matthias Mullie. All rights reserved - * @license MIT License - */ -namespace MatthiasMullie\Minify; - -use MatthiasMullie\Minify\Exceptions\IOException; -use Psr\Cache\CacheItemInterface; - -/** - * Abstract minifier class. - * - * Please report bugs on https://github.com/matthiasmullie/minify/issues - * - * @package Minify - * @author Matthias Mullie - * @copyright Copyright (c) 2012, Matthias Mullie. All rights reserved - * @license MIT License - */ -abstract class Minify -{ - /** - * The data to be minified. - * - * @var string[] - */ - protected $data = array(); - - /** - * Array of patterns to match. - * - * @var string[] - */ - protected $patterns = array(); - - /** - * This array will hold content of strings and regular expressions that have - * been extracted from the JS source code, so we can reliably match "code", - * without having to worry about potential "code-like" characters inside. - * - * @var string[] - */ - public $extracted = array(); - - /** - * Init the minify class - optionally, code may be passed along already. - */ - public function __construct(/* $data = null, ... */) - { - // it's possible to add the source through the constructor as well ;) - if (func_num_args()) { - call_user_func_array(array($this, 'add'), func_get_args()); - } - } - - /** - * Add a file or straight-up code to be minified. - * - * @param string|string[] $data - * - * @return static - */ - public function add($data /* $data = null, ... */) - { - // bogus "usage" of parameter $data: scrutinizer warns this variable is - // not used (we're using func_get_args instead to support overloading), - // but it still needs to be defined because it makes no sense to have - // this function without argument :) - $args = array($data) + func_get_args(); - - // this method can be overloaded - foreach ($args as $data) { - if (is_array($data)) { - call_user_func_array(array($this, 'add'), $data); - continue; - } - - // redefine var - $data = (string) $data; - - // load data - $value = $this->load($data); - $key = ($data != $value) ? $data : count($this->data); - - // replace CR linefeeds etc. - // @see https://github.com/matthiasmullie/minify/pull/139 - $value = str_replace(array("\r\n", "\r"), "\n", $value); - - // store data - $this->data[$key] = $value; - } - - return $this; - } - - /** - * Add a file to be minified. - * - * @param string|string[] $data - * - * @return static - * - * @throws IOException - */ - public function addFile($data /* $data = null, ... */) - { - // bogus "usage" of parameter $data: scrutinizer warns this variable is - // not used (we're using func_get_args instead to support overloading), - // but it still needs to be defined because it makes no sense to have - // this function without argument :) - $args = array($data) + func_get_args(); - - // this method can be overloaded - foreach ($args as $path) { - if (is_array($path)) { - call_user_func_array(array($this, 'addFile'), $path); - continue; - } - - // redefine var - $path = (string) $path; - - // check if we can read the file - if (!$this->canImportFile($path)) { - throw new IOException('The file "'.$path.'" could not be opened for reading. Check if PHP has enough permissions.'); - } - - $this->add($path); - } - - return $this; - } - - /** - * Minify the data & (optionally) saves it to a file. - * - * @param string[optional] $path Path to write the data to - * - * @return string The minified data - */ - public function minify($path = null) - { - $content = $this->execute($path); - - // save to path - if ($path !== null) { - $this->save($content, $path); - } - - return $content; - } - - /** - * Minify & gzip the data & (optionally) saves it to a file. - * - * @param string[optional] $path Path to write the data to - * @param int[optional] $level Compression level, from 0 to 9 - * - * @return string The minified & gzipped data - */ - public function gzip($path = null, $level = 9) - { - $content = $this->execute($path); - $content = gzencode($content, $level, FORCE_GZIP); - - // save to path - if ($path !== null) { - $this->save($content, $path); - } - - return $content; - } - - /** - * Minify the data & write it to a CacheItemInterface object. - * - * @param CacheItemInterface $item Cache item to write the data to - * - * @return CacheItemInterface Cache item with the minifier data - */ - public function cache(CacheItemInterface $item) - { - $content = $this->execute(); - $item->set($content); - - return $item; - } - - /** - * Minify the data. - * - * @param string[optional] $path Path to write the data to - * - * @return string The minified data - */ - abstract public function execute($path = null); - - /** - * Load data. - * - * @param string $data Either a path to a file or the content itself - * - * @return string - */ - protected function load($data) - { - // check if the data is a file - if ($this->canImportFile($data)) { - $data = file_get_contents($data); - - // strip BOM, if any - if (substr($data, 0, 3) == "\xef\xbb\xbf") { - $data = substr($data, 3); - } - } - - return $data; - } - - /** - * Save to file. - * - * @param string $content The minified data - * @param string $path The path to save the minified data to - * - * @throws IOException - */ - protected function save($content, $path) - { - $handler = $this->openFileForWriting($path); - - $this->writeToFile($handler, $content); - - @fclose($handler); - } - - /** - * Register a pattern to execute against the source content. - * - * @param string $pattern PCRE pattern - * @param string|callable $replacement Replacement value for matched pattern - */ - protected function registerPattern($pattern, $replacement = '') - { - // study the pattern, we'll execute it more than once - $pattern .= 'S'; - - $this->patterns[] = array($pattern, $replacement); - } - - /** - * We can't "just" run some regular expressions against JavaScript: it's a - * complex language. E.g. having an occurrence of // xyz would be a comment, - * unless it's used within a string. Of you could have something that looks - * like a 'string', but inside a comment. - * The only way to accurately replace these pieces is to traverse the JS one - * character at a time and try to find whatever starts first. - * - * @param string $content The content to replace patterns in - * - * @return string The (manipulated) content - */ - protected function replace($content) - { - $processed = ''; - $positions = array_fill(0, count($this->patterns), -1); - $matches = array(); - - while ($content) { - // find first match for all patterns - foreach ($this->patterns as $i => $pattern) { - list($pattern, $replacement) = $pattern; - - // we can safely ignore patterns for positions we've unset earlier, - // because we know these won't show up anymore - if (array_key_exists($i, $positions) == false) { - continue; - } - - // no need to re-run matches that are still in the part of the - // content that hasn't been processed - if ($positions[$i] >= 0) { - continue; - } - - $match = null; - if (preg_match($pattern, $content, $match, PREG_OFFSET_CAPTURE)) { - $matches[$i] = $match; - - // we'll store the match position as well; that way, we - // don't have to redo all preg_matches after changing only - // the first (we'll still know where those others are) - $positions[$i] = $match[0][1]; - } else { - // if the pattern couldn't be matched, there's no point in - // executing it again in later runs on this same content; - // ignore this one until we reach end of content - unset($matches[$i], $positions[$i]); - } - } - - // no more matches to find: everything's been processed, break out - if (!$matches) { - $processed .= $content; - break; - } - - // see which of the patterns actually found the first thing (we'll - // only want to execute that one, since we're unsure if what the - // other found was not inside what the first found) - $discardLength = min($positions); - $firstPattern = array_search($discardLength, $positions); - $match = $matches[$firstPattern][0][0]; - - // execute the pattern that matches earliest in the content string - list($pattern, $replacement) = $this->patterns[$firstPattern]; - $replacement = $this->replacePattern($pattern, $replacement, $content); - - // figure out which part of the string was unmatched; that's the - // part we'll execute the patterns on again next - $content = (string) substr($content, $discardLength); - $unmatched = (string) substr($content, strpos($content, $match) + strlen($match)); - - // move the replaced part to $processed and prepare $content to - // again match batch of patterns against - $processed .= substr($replacement, 0, strlen($replacement) - strlen($unmatched)); - $content = $unmatched; - - // first match has been replaced & that content is to be left alone, - // the next matches will start after this replacement, so we should - // fix their offsets - foreach ($positions as $i => $position) { - $positions[$i] -= $discardLength + strlen($match); - } - } - - return $processed; - } - - /** - * This is where a pattern is matched against $content and the matches - * are replaced by their respective value. - * This function will be called plenty of times, where $content will always - * move up 1 character. - * - * @param string $pattern Pattern to match - * @param string|callable $replacement Replacement value - * @param string $content Content to match pattern against - * - * @return string - */ - protected function replacePattern($pattern, $replacement, $content) - { - if (is_callable($replacement)) { - return preg_replace_callback($pattern, $replacement, $content, 1, $count); - } else { - return preg_replace($pattern, $replacement, $content, 1, $count); - } - } - - /** - * Strings are a pattern we need to match, in order to ignore potential - * code-like content inside them, but we just want all of the string - * content to remain untouched. - * - * This method will replace all string content with simple STRING# - * placeholder text, so we've rid all strings from characters that may be - * misinterpreted. Original string content will be saved in $this->extracted - * and after doing all other minifying, we can restore the original content - * via restoreStrings(). - * - * @param string[optional] $chars - * @param string[optional] $placeholderPrefix - */ - protected function extractStrings($chars = '\'"', $placeholderPrefix = '') - { - // PHP only supports $this inside anonymous functions since 5.4 - $minifier = $this; - $callback = function ($match) use ($minifier, $placeholderPrefix) { - // check the second index here, because the first always contains a quote - if ($match[2] === '') { - /* - * Empty strings need no placeholder; they can't be confused for - * anything else anyway. - * But we still needed to match them, for the extraction routine - * to skip over this particular string. - */ - return $match[0]; - } - - $count = count($minifier->extracted); - $placeholder = $match[1].$placeholderPrefix.$count.$match[1]; - $minifier->extracted[$placeholder] = $match[1].$match[2].$match[1]; - - return $placeholder; - }; - - /* - * The \\ messiness explained: - * * Don't count ' or " as end-of-string if it's escaped (has backslash - * in front of it) - * * Unless... that backslash itself is escaped (another leading slash), - * in which case it's no longer escaping the ' or " - * * So there can be either no backslash, or an even number - * * multiply all of that times 4, to account for the escaping that has - * to be done to pass the backslash into the PHP string without it being - * considered as escape-char (times 2) and to get it in the regex, - * escaped (times 2) - */ - $this->registerPattern('/(['.$chars.'])(.*?(?extracted. - * - * @param string $content - * - * @return string - */ - protected function restoreExtractedData($content) - { - if (!$this->extracted) { - // nothing was extracted, nothing to restore - return $content; - } - - $content = strtr($content, $this->extracted); - - $this->extracted = array(); - - return $content; - } - - /** - * Check if the path is a regular file and can be read. - * - * @param string $path - * - * @return bool - */ - protected function canImportFile($path) - { - $parsed = parse_url($path); - if ( - // file is elsewhere - isset($parsed['host']) || - // file responds to queries (may change, or need to bypass cache) - isset($parsed['query']) - ) { - return false; - } - - return strlen($path) < PHP_MAXPATHLEN && @is_file($path) && is_readable($path); - } - - /** - * Attempts to open file specified by $path for writing. - * - * @param string $path The path to the file - * - * @return resource Specifier for the target file - * - * @throws IOException - */ - protected function openFileForWriting($path) - { - if ($path === '' || ($handler = @fopen($path, 'w')) === false) { - throw new IOException('The file "'.$path.'" could not be opened for writing. Check if PHP has enough permissions.'); - } - - return $handler; - } - - /** - * Attempts to write $content to the file specified by $handler. $path is used for printing exceptions. - * - * @param resource $handler The resource to write to - * @param string $content The content to write - * @param string $path The path to the file (for exception printing only) - * - * @throws IOException - */ - protected function writeToFile($handler, $content, $path = '') - { - if ( - !is_resource($handler) || - ($result = @fwrite($handler, $content)) === false || - ($result < strlen($content)) - ) { - throw new IOException('The file "'.$path.'" could not be written to. Check your disk space and file permissions.'); - } - } -} diff --git a/source/vendor/matthiasmullie/path-converter/LICENSE b/source/vendor/matthiasmullie/path-converter/LICENSE deleted file mode 100644 index 491295a..0000000 --- a/source/vendor/matthiasmullie/path-converter/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright (c) 2015 Matthias Mullie - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/source/vendor/matthiasmullie/path-converter/src/Converter.php b/source/vendor/matthiasmullie/path-converter/src/Converter.php deleted file mode 100644 index 80cf269..0000000 --- a/source/vendor/matthiasmullie/path-converter/src/Converter.php +++ /dev/null @@ -1,204 +0,0 @@ - - * @copyright Copyright (c) 2015, Matthias Mullie. All rights reserved - * @license MIT License - */ -class Converter implements ConverterInterface -{ - /** - * @var string - */ - protected $from; - - /** - * @var string - */ - protected $to; - - /** - * @param string $from The original base path (directory, not file!) - * @param string $to The new base path (directory, not file!) - * @param string $root Root directory (defaults to `getcwd`) - */ - public function __construct($from, $to, $root = '') - { - $shared = $this->shared($from, $to); - if ($shared === '') { - // when both paths have nothing in common, one of them is probably - // absolute while the other is relative - $root = $root ?: getcwd(); - $from = strpos($from, $root) === 0 ? $from : preg_replace('/\/+/', '/', $root.'/'.$from); - $to = strpos($to, $root) === 0 ? $to : preg_replace('/\/+/', '/', $root.'/'.$to); - - // or traveling the tree via `..` - // attempt to resolve path, or assume it's fine if it doesn't exist - $from = @realpath($from) ?: $from; - $to = @realpath($to) ?: $to; - } - - $from = $this->dirname($from); - $to = $this->dirname($to); - - $from = $this->normalize($from); - $to = $this->normalize($to); - - $this->from = $from; - $this->to = $to; - } - - /** - * Normalize path. - * - * @param string $path - * - * @return string - */ - protected function normalize($path) - { - // deal with different operating systems' directory structure - $path = rtrim(str_replace(DIRECTORY_SEPARATOR, '/', $path), '/'); - - // remove leading current directory. - if (substr($path, 0, 2) === './') { - $path = substr($path, 2); - } - - // remove references to current directory in the path. - $path = str_replace('/./', '/', $path); - - /* - * Example: - * /home/forkcms/frontend/cache/compiled_templates/../../core/layout/css/../images/img.gif - * to - * /home/forkcms/frontend/core/layout/images/img.gif - */ - do { - $path = preg_replace('/[^\/]+(? $chunk) { - if (isset($path2[$i]) && $path1[$i] == $path2[$i]) { - $shared[] = $chunk; - } else { - break; - } - } - - return implode('/', $shared); - } - - /** - * Convert paths relative from 1 file to another. - * - * E.g. - * ../images/img.gif relative to /home/forkcms/frontend/core/layout/css - * should become: - * ../../core/layout/images/img.gif relative to - * /home/forkcms/frontend/cache/minified_css - * - * @param string $path The relative path that needs to be converted - * - * @return string The new relative path - */ - public function convert($path) - { - // quit early if conversion makes no sense - if ($this->from === $this->to) { - return $path; - } - - $path = $this->normalize($path); - // if we're not dealing with a relative path, just return absolute - if (strpos($path, '/') === 0) { - return $path; - } - - // normalize paths - $path = $this->normalize($this->from.'/'.$path); - - // strip shared ancestor paths - $shared = $this->shared($path, $this->to); - $path = mb_substr($path, mb_strlen($shared)); - $to = mb_substr($this->to, mb_strlen($shared)); - - // add .. for every directory that needs to be traversed to new path - $to = str_repeat('../', count(array_filter(explode('/', $to)))); - - return $to.ltrim($path, '/'); - } - - /** - * Attempt to get the directory name from a path. - * - * @param string $path - * - * @return string - */ - protected function dirname($path) - { - if (@is_file($path)) { - return dirname($path); - } - - if (@is_dir($path)) { - return rtrim($path, '/'); - } - - // no known file/dir, start making assumptions - - // ends in / = dir - if (mb_substr($path, -1) === '/') { - return rtrim($path, '/'); - } - - // has a dot in the name, likely a file - if (preg_match('/.*\..*$/', basename($path)) !== 0) { - return dirname($path); - } - - // you're on your own here! - return $path; - } -} diff --git a/source/vendor/matthiasmullie/path-converter/src/ConverterInterface.php b/source/vendor/matthiasmullie/path-converter/src/ConverterInterface.php deleted file mode 100644 index dc1b765..0000000 --- a/source/vendor/matthiasmullie/path-converter/src/ConverterInterface.php +++ /dev/null @@ -1,24 +0,0 @@ - - * @copyright Copyright (c) 2015, Matthias Mullie. All rights reserved - * @license MIT License - */ -interface ConverterInterface -{ - /** - * Convert file paths. - * - * @param string $path The path to be converted - * - * @return string The new path - */ - public function convert($path); -} diff --git a/source/vendor/matthiasmullie/path-converter/src/NoConverter.php b/source/vendor/matthiasmullie/path-converter/src/NoConverter.php deleted file mode 100644 index 2fcfd0f..0000000 --- a/source/vendor/matthiasmullie/path-converter/src/NoConverter.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @copyright Copyright (c) 2015, Matthias Mullie. All rights reserved - * @license MIT License - */ -class NoConverter implements ConverterInterface -{ - /** - * {@inheritdoc} - */ - public function convert($path) - { - return $path; - } -} diff --git a/source/vendor/maximebf/debugbar/LICENSE b/source/vendor/maximebf/debugbar/LICENSE deleted file mode 100644 index 1344c98..0000000 --- a/source/vendor/maximebf/debugbar/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (C) 2013 Maxime Bouroumeau-Fuseau - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/source/vendor/maximebf/debugbar/src/DebugBar/Bridge/CacheCacheCollector.php b/source/vendor/maximebf/debugbar/src/DebugBar/Bridge/CacheCacheCollector.php deleted file mode 100644 index 7e7f46f..0000000 --- a/source/vendor/maximebf/debugbar/src/DebugBar/Bridge/CacheCacheCollector.php +++ /dev/null @@ -1,75 +0,0 @@ - - * $debugbar->addCollector(new CacheCacheCollector(CacheManager::get('default'))); - * // or - * $debugbar->addCollector(new CacheCacheCollector()); - * $debugbar['cache']->addCache(CacheManager::get('default')); - * - */ -class CacheCacheCollector extends MonologCollector -{ - protected $logger; - - /** - * CacheCacheCollector constructor. - * @param Cache|null $cache - * @param Logger|null $logger - * @param bool $level - * @param bool $bubble - */ - public function __construct(Cache $cache = null, Logger $logger = null, $level = Logger::DEBUG, $bubble = true) - { - parent::__construct(null, $level, $bubble); - - if ($logger === null) { - $logger = new Logger('Cache'); - } - $this->logger = $logger; - - if ($cache !== null) { - $this->addCache($cache); - } - } - - /** - * @param Cache $cache - */ - public function addCache(Cache $cache) - { - $backend = $cache->getBackend(); - if (!($backend instanceof LoggingBackend)) { - $backend = new LoggingBackend($backend, $this->logger); - } - $cache->setBackend($backend); - $this->addLogger($backend->getLogger()); - } - - /** - * @return string - */ - public function getName() - { - return 'cache'; - } -} diff --git a/source/vendor/maximebf/debugbar/src/DebugBar/Bridge/DoctrineCollector.php b/source/vendor/maximebf/debugbar/src/DebugBar/Bridge/DoctrineCollector.php deleted file mode 100644 index 7c91da9..0000000 --- a/source/vendor/maximebf/debugbar/src/DebugBar/Bridge/DoctrineCollector.php +++ /dev/null @@ -1,115 +0,0 @@ - - * $debugStack = new Doctrine\DBAL\Logging\DebugStack(); - * $entityManager->getConnection()->getConfiguration()->setSQLLogger($debugStack); - * $debugbar->addCollector(new DoctrineCollector($debugStack)); - * - */ -class DoctrineCollector extends DataCollector implements Renderable, AssetProvider -{ - protected $debugStack; - - /** - * DoctrineCollector constructor. - * @param $debugStackOrEntityManager - * @throws DebugBarException - */ - public function __construct($debugStackOrEntityManager) - { - if ($debugStackOrEntityManager instanceof EntityManager) { - $debugStackOrEntityManager = $debugStackOrEntityManager->getConnection()->getConfiguration()->getSQLLogger(); - } - if (!($debugStackOrEntityManager instanceof DebugStack)) { - throw new DebugBarException("'DoctrineCollector' requires an 'EntityManager' or 'DebugStack' object"); - } - $this->debugStack = $debugStackOrEntityManager; - } - - /** - * @return array - */ - public function collect() - { - $queries = array(); - $totalExecTime = 0; - foreach ($this->debugStack->queries as $q) { - $queries[] = array( - 'sql' => $q['sql'], - 'params' => (object) $q['params'], - 'duration' => $q['executionMS'], - 'duration_str' => $this->formatDuration($q['executionMS']) - ); - $totalExecTime += $q['executionMS']; - } - - return array( - 'nb_statements' => count($queries), - 'accumulated_duration' => $totalExecTime, - 'accumulated_duration_str' => $this->formatDuration($totalExecTime), - 'statements' => $queries - ); - } - - /** - * @return string - */ - public function getName() - { - return 'doctrine'; - } - - /** - * @return array - */ - public function getWidgets() - { - return array( - "database" => array( - "icon" => "arrow-right", - "widget" => "PhpDebugBar.Widgets.SQLQueriesWidget", - "map" => "doctrine", - "default" => "[]" - ), - "database:badge" => array( - "map" => "doctrine.nb_statements", - "default" => 0 - ) - ); - } - - /** - * @return array - */ - public function getAssets() - { - return array( - 'css' => 'widgets/sqlqueries/widget.css', - 'js' => 'widgets/sqlqueries/widget.js' - ); - } -} diff --git a/source/vendor/maximebf/debugbar/src/DebugBar/Bridge/MonologCollector.php b/source/vendor/maximebf/debugbar/src/DebugBar/Bridge/MonologCollector.php deleted file mode 100644 index bbadbf8..0000000 --- a/source/vendor/maximebf/debugbar/src/DebugBar/Bridge/MonologCollector.php +++ /dev/null @@ -1,118 +0,0 @@ - - * $debugbar->addCollector(new MonologCollector($logger)); - * - */ -class MonologCollector extends AbstractProcessingHandler implements DataCollectorInterface, Renderable, MessagesAggregateInterface -{ - protected $name; - - protected $records = array(); - - /** - * @param Logger $logger - * @param int $level - * @param boolean $bubble - * @param string $name - */ - public function __construct(Logger $logger = null, $level = Logger::DEBUG, $bubble = true, $name = 'monolog') - { - parent::__construct($level, $bubble); - $this->name = $name; - if ($logger !== null) { - $this->addLogger($logger); - } - } - - /** - * Adds logger which messages you want to log - * - * @param Logger $logger - */ - public function addLogger(Logger $logger) - { - $logger->pushHandler($this); - } - - /** - * @param array $record - */ - protected function write(array $record): void - { - $this->records[] = array( - 'message' => $record['formatted'], - 'is_string' => true, - 'label' => strtolower($record['level_name']), - 'time' => $record['datetime']->format('U') - ); - } - - /** - * @return array - */ - public function getMessages() - { - return $this->records; - } - - /** - * @return array - */ - public function collect() - { - return array( - 'count' => count($this->records), - 'records' => $this->records - ); - } - - /** - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * @return array - */ - public function getWidgets() - { - $name = $this->getName(); - return array( - $name => array( - "icon" => "suitcase", - "widget" => "PhpDebugBar.Widgets.MessagesWidget", - "map" => "$name.records", - "default" => "[]" - ), - "$name:badge" => array( - "map" => "$name.count", - "default" => "null" - ) - ); - } -} diff --git a/source/vendor/maximebf/debugbar/src/DebugBar/Bridge/Propel2Collector.php b/source/vendor/maximebf/debugbar/src/DebugBar/Bridge/Propel2Collector.php deleted file mode 100644 index 3df4dcc..0000000 --- a/source/vendor/maximebf/debugbar/src/DebugBar/Bridge/Propel2Collector.php +++ /dev/null @@ -1,307 +0,0 @@ - - * $debugbar->addCollector(new \DebugBar\Bridge\Propel2Collector(\Propel\Runtime\Propel::getServiceContainer()->getReadConnection())); - * - */ -class Propel2Collector extends DataCollector implements Renderable, AssetProvider -{ - /** - * @var null|TestHandler - */ - protected $handler = null; - - /** - * @var null|Logger - */ - protected $logger = null; - - /** - * @var array - */ - protected $config = array(); - - /** - * @var array - */ - protected $errors = array(); - - /** - * @var int - */ - protected $queryCount = 0; - - /** - * @param ConnectionInterface $connection Propel connection - */ - public function __construct( - ConnectionInterface $connection, - array $logMethods = array( - 'beginTransaction', - 'commit', - 'rollBack', - 'forceRollBack', - 'exec', - 'query', - 'execute' - ) - ) { - if ($connection instanceof ProfilerConnectionWrapper) { - $connection->setLogMethods($logMethods); - - $this->config = $connection->getProfiler()->getConfiguration(); - - $this->handler = new TestHandler(); - - if ($connection->getLogger() instanceof Logger) { - $this->logger = $connection->getLogger(); - $this->logger->pushHandler($this->handler); - } else { - $this->errors[] = 'Supported only monolog logger'; - } - } else { - $this->errors[] = 'You need set ProfilerConnectionWrapper'; - } - } - - /** - * @return TestHandler|null - */ - public function getHandler() - { - return $this->handler; - } - - /** - * @return array - */ - public function getConfig() - { - return $this->config; - } - - /** - * @return Logger|null - */ - public function getLogger() - { - return $this->logger; - } - - /** - * @return LoggerInterface - */ - protected function getDefaultLogger() - { - return Propel::getServiceContainer()->getLogger(); - } - - /** - * @return int - */ - protected function getQueryCount() - { - return $this->queryCount; - } - - /** - * @param array $records - * @param array $config - * @return array - */ - protected function getStatements($records, $config) - { - $statements = array(); - foreach ($records as $record) { - $duration = null; - $memory = null; - - $isSuccess = ( LogLevel::INFO === strtolower($record['level_name']) ); - - $detailsCount = count($config['details']); - $parameters = explode($config['outerGlue'], $record['message'], $detailsCount + 1); - if (count($parameters) === ($detailsCount + 1)) { - $parameters = array_map('trim', $parameters); - $_details = array(); - foreach (array_splice($parameters, 0, $detailsCount) as $string) { - list($key, $value) = array_map('trim', explode($config['innerGlue'], $string, 2)); - $_details[$key] = $value; - } - - $details = array(); - foreach ($config['details'] as $key => $detail) { - if (isset($_details[$detail['name']])) { - $value = $_details[$detail['name']]; - if ('time' === $key) { - if (substr_count($value, 'ms')) { - $value = (float)$value / 1000; - } else { - $value = (float)$value; - } - } else { - $suffixes = array('B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'); - $suffix = substr($value, -2); - $i = array_search($suffix, $suffixes, true); - $i = (false === $i) ? 0 : $i; - - $value = ((float)$value) * pow(1024, $i); - } - $details[$key] = $value; - } - } - - if (isset($details['time'])) { - $duration = $details['time']; - } - if (isset($details['memDelta'])) { - $memory = $details['memDelta']; - } - - $message = end($parameters); - - if ($isSuccess) { - $this->queryCount++; - } - - } else { - $message = $record['message']; - } - - $statement = array( - 'sql' => $message, - 'is_success' => $isSuccess, - 'duration' => $duration, - 'duration_str' => $this->getDataFormatter()->formatDuration($duration), - 'memory' => $memory, - 'memory_str' => $this->getDataFormatter()->formatBytes($memory), - ); - - if (false === $isSuccess) { - $statement['sql'] = ''; - $statement['error_code'] = $record['level']; - $statement['error_message'] = $message; - } - - $statements[] = $statement; - } - return $statements; - } - - /** - * @return array - */ - public function collect() - { - if (count($this->errors)) { - return array( - 'statements' => array_map(function ($message) { - return array('sql' => '', 'is_success' => false, 'error_code' => 500, 'error_message' => $message); - }, $this->errors), - 'nb_statements' => 0, - 'nb_failed_statements' => count($this->errors), - ); - } - - if ($this->getHandler() === null) { - return array(); - } - - $statements = $this->getStatements($this->getHandler()->getRecords(), $this->getConfig()); - - $failedStatement = count(array_filter($statements, function ($statement) { - return false === $statement['is_success']; - })); - $accumulatedDuration = array_reduce($statements, function ($accumulatedDuration, $statement) { - - $time = isset($statement['duration']) ? $statement['duration'] : 0; - return $accumulatedDuration += $time; - }); - $memoryUsage = array_reduce($statements, function ($memoryUsage, $statement) { - - $time = isset($statement['memory']) ? $statement['memory'] : 0; - return $memoryUsage += $time; - }); - - return array( - 'nb_statements' => $this->getQueryCount(), - 'nb_failed_statements' => $failedStatement, - 'accumulated_duration' => $accumulatedDuration, - 'accumulated_duration_str' => $this->getDataFormatter()->formatDuration($accumulatedDuration), - 'memory_usage' => $memoryUsage, - 'memory_usage_str' => $this->getDataFormatter()->formatBytes($memoryUsage), - 'statements' => $statements - ); - } - - /** - * @return string - */ - public function getName() - { - $additionalName = ''; - if ($this->getLogger() !== $this->getDefaultLogger()) { - $additionalName = ' ('.$this->getLogger()->getName().')'; - } - - return 'propel2'.$additionalName; - } - - /** - * @return array - */ - public function getWidgets() - { - return array( - $this->getName() => array( - 'icon' => 'bolt', - 'widget' => 'PhpDebugBar.Widgets.SQLQueriesWidget', - 'map' => $this->getName(), - 'default' => '[]' - ), - $this->getName().':badge' => array( - 'map' => $this->getName().'.nb_statements', - 'default' => 0 - ), - ); - } - - /** - * @return array - */ - public function getAssets() - { - return array( - 'css' => 'widgets/sqlqueries/widget.css', - 'js' => 'widgets/sqlqueries/widget.js' - ); - } -} diff --git a/source/vendor/maximebf/debugbar/src/DebugBar/Bridge/PropelCollector.php b/source/vendor/maximebf/debugbar/src/DebugBar/Bridge/PropelCollector.php deleted file mode 100644 index 93ad4ff..0000000 --- a/source/vendor/maximebf/debugbar/src/DebugBar/Bridge/PropelCollector.php +++ /dev/null @@ -1,253 +0,0 @@ - - * $debugbar->addCollector(new PropelCollector($debugbar['messages'])); - * PropelCollector::enablePropelProfiling(); - * - */ -class PropelCollector extends DataCollector implements BasicLogger, Renderable, AssetProvider -{ - protected $logger; - - protected $statements = array(); - - protected $accumulatedTime = 0; - - protected $peakMemory = 0; - - /** - * Sets the needed configuration option in propel to enable query logging - * - * @param PropelConfiguration $config Apply profiling on a specific config - */ - public static function enablePropelProfiling(PropelConfiguration $config = null) - { - if ($config === null) { - $config = Propel::getConfiguration(PropelConfiguration::TYPE_OBJECT); - } - $config->setParameter('debugpdo.logging.details.method.enabled', true); - $config->setParameter('debugpdo.logging.details.time.enabled', true); - $config->setParameter('debugpdo.logging.details.mem.enabled', true); - $allMethods = array( - 'PropelPDO::__construct', // logs connection opening - 'PropelPDO::__destruct', // logs connection close - 'PropelPDO::exec', // logs a query - 'PropelPDO::query', // logs a query - 'PropelPDO::beginTransaction', // logs a transaction begin - 'PropelPDO::commit', // logs a transaction commit - 'PropelPDO::rollBack', // logs a transaction rollBack (watch out for the capital 'B') - 'DebugPDOStatement::execute', // logs a query from a prepared statement - ); - $config->setParameter('debugpdo.logging.methods', $allMethods, false); - } - - /** - * @param LoggerInterface $logger A logger to forward non-query log lines to - * @param PropelPDO $conn Bound this collector to a connection only - */ - public function __construct(LoggerInterface $logger = null, PropelPDO $conn = null) - { - if ($conn) { - $conn->setLogger($this); - } else { - Propel::setLogger($this); - } - $this->logger = $logger; - $this->logQueriesToLogger = false; - } - - public function setLogQueriesToLogger($enable = true) - { - $this->logQueriesToLogger = $enable; - return $this; - } - - public function isLogQueriesToLogger() - { - return $this->logQueriesToLogger; - } - - public function emergency($m) - { - $this->log($m, Propel::LOG_EMERG); - } - - public function alert($m) - { - $this->log($m, Propel::LOG_ALERT); - } - - public function crit($m) - { - $this->log($m, Propel::LOG_CRIT); - } - - public function err($m) - { - $this->log($m, Propel::LOG_ERR); - } - - public function warning($m) - { - $this->log($m, Propel::LOG_WARNING); - } - - public function notice($m) - { - $this->log($m, Propel::LOG_NOTICE); - } - - public function info($m) - { - $this->log($m, Propel::LOG_INFO); - } - - public function debug($m) - { - $this->log($m, Propel::LOG_DEBUG); - } - - public function log($message, $severity = null) - { - if (strpos($message, 'DebugPDOStatement::execute') !== false) { - list($sql, $duration_str) = $this->parseAndLogSqlQuery($message); - if (!$this->logQueriesToLogger) { - return; - } - $message = "$sql ($duration_str)"; - } - - if ($this->logger !== null) { - $this->logger->log($this->convertLogLevel($severity), $message); - } - } - - /** - * Converts Propel log levels to PSR log levels - * - * @param int $level - * @return string - */ - protected function convertLogLevel($level) - { - $map = array( - Propel::LOG_EMERG => LogLevel::EMERGENCY, - Propel::LOG_ALERT => LogLevel::ALERT, - Propel::LOG_CRIT => LogLevel::CRITICAL, - Propel::LOG_ERR => LogLevel::ERROR, - Propel::LOG_WARNING => LogLevel::WARNING, - Propel::LOG_NOTICE => LogLevel::NOTICE, - Propel::LOG_DEBUG => LogLevel::DEBUG - ); - return $map[$level]; - } - - /** - * Parse a log line to extract query information - * - * @param string $message - */ - protected function parseAndLogSqlQuery($message) - { - $parts = explode('|', $message, 4); - $sql = trim($parts[3]); - - $duration = 0; - if (preg_match('/([0-9]+\.[0-9]+)/', $parts[1], $matches)) { - $duration = (float) $matches[1]; - } - - $memory = 0; - if (preg_match('/([0-9]+\.[0-9]+) ([A-Z]{1,2})/', $parts[2], $matches)) { - $memory = (float) $matches[1]; - if ($matches[2] == 'KB') { - $memory *= 1024; - } elseif ($matches[2] == 'MB') { - $memory *= 1024 * 1024; - } - } - - $this->statements[] = array( - 'sql' => $sql, - 'is_success' => true, - 'duration' => $duration, - 'duration_str' => $this->formatDuration($duration), - 'memory' => $memory, - 'memory_str' => $this->formatBytes($memory) - ); - $this->accumulatedTime += $duration; - $this->peakMemory = max($this->peakMemory, $memory); - return array($sql, $this->formatDuration($duration)); - } - - public function collect() - { - return array( - 'nb_statements' => count($this->statements), - 'nb_failed_statements' => 0, - 'accumulated_duration' => $this->accumulatedTime, - 'accumulated_duration_str' => $this->formatDuration($this->accumulatedTime), - 'peak_memory_usage' => $this->peakMemory, - 'peak_memory_usage_str' => $this->formatBytes($this->peakMemory), - 'statements' => $this->statements - ); - } - - public function getName() - { - return 'propel'; - } - - public function getWidgets() - { - return array( - "propel" => array( - "icon" => "bolt", - "widget" => "PhpDebugBar.Widgets.SQLQueriesWidget", - "map" => "propel", - "default" => "[]" - ), - "propel:badge" => array( - "map" => "propel.nb_statements", - "default" => 0 - ) - ); - } - - public function getAssets() - { - return array( - 'css' => 'widgets/sqlqueries/widget.css', - 'js' => 'widgets/sqlqueries/widget.js' - ); - } -} diff --git a/source/vendor/maximebf/debugbar/src/DebugBar/Bridge/SlimCollector.php b/source/vendor/maximebf/debugbar/src/DebugBar/Bridge/SlimCollector.php deleted file mode 100644 index 030a3ba..0000000 --- a/source/vendor/maximebf/debugbar/src/DebugBar/Bridge/SlimCollector.php +++ /dev/null @@ -1,66 +0,0 @@ -slim = $slim; - if ($log = $slim->getLog()) { - $this->originalLogWriter = $log->getWriter(); - $log->setWriter($this); - $log->setEnabled(true); - } - } - - public function write($message, $level) - { - if ($this->originalLogWriter) { - $this->originalLogWriter->write($message, $level); - } - $this->addMessage($message, $this->getLevelName($level)); - } - - protected function getLevelName($level) - { - $map = array( - Log::EMERGENCY => LogLevel::EMERGENCY, - Log::ALERT => LogLevel::ALERT, - Log::CRITICAL => LogLevel::CRITICAL, - Log::ERROR => LogLevel::ERROR, - Log::WARN => LogLevel::WARNING, - Log::NOTICE => LogLevel::NOTICE, - Log::INFO => LogLevel::INFO, - Log::DEBUG => LogLevel::DEBUG - ); - return $map[$level]; - } - - public function getName() - { - return 'slim'; - } -} diff --git a/source/vendor/maximebf/debugbar/src/DebugBar/Bridge/SwiftMailer/SwiftLogCollector.php b/source/vendor/maximebf/debugbar/src/DebugBar/Bridge/SwiftMailer/SwiftLogCollector.php deleted file mode 100644 index e8c2fcd..0000000 --- a/source/vendor/maximebf/debugbar/src/DebugBar/Bridge/SwiftMailer/SwiftLogCollector.php +++ /dev/null @@ -1,53 +0,0 @@ -registerPlugin(new Swift_Plugins_LoggerPlugin($this)); - } - - public function add($entry) - { - $this->addMessage($entry); - } - - public function dump() - { - $dump = ''; - foreach ($this->messages as $message) { - if (!$message['is_string']) { - continue; - } - - $dump .= $message['message'] . PHP_EOL; - } - - return $dump; - } - - public function getName() - { - return 'swiftmailer_logs'; - } -} diff --git a/source/vendor/maximebf/debugbar/src/DebugBar/Bridge/SwiftMailer/SwiftMailCollector.php b/source/vendor/maximebf/debugbar/src/DebugBar/Bridge/SwiftMailer/SwiftMailCollector.php deleted file mode 100644 index 01a5e90..0000000 --- a/source/vendor/maximebf/debugbar/src/DebugBar/Bridge/SwiftMailer/SwiftMailCollector.php +++ /dev/null @@ -1,92 +0,0 @@ -messagesLogger = new Swift_Plugins_MessageLogger(); - $mailer->registerPlugin($this->messagesLogger); - } - - public function collect() - { - $mails = array(); - foreach ($this->messagesLogger->getMessages() as $msg) { - $mails[] = array( - 'to' => $this->formatTo($msg->getTo()), - 'subject' => $msg->getSubject(), - 'headers' => $msg->getHeaders()->toString() - ); - } - return array( - 'count' => count($mails), - 'mails' => $mails - ); - } - - protected function formatTo($to) - { - if (!$to) { - return ''; - } - - $f = array(); - foreach ($to as $k => $v) { - $f[] = (empty($v) ? '' : "$v ") . "<$k>"; - } - return implode(', ', $f); - } - - public function getName() - { - return 'swiftmailer_mails'; - } - - public function getWidgets() - { - return array( - 'emails' => array( - 'icon' => 'inbox', - 'widget' => 'PhpDebugBar.Widgets.MailsWidget', - 'map' => 'swiftmailer_mails.mails', - 'default' => '[]', - 'title' => 'Mails' - ), - 'emails:badge' => array( - 'map' => 'swiftmailer_mails.count', - 'default' => 'null' - ) - ); - } - - public function getAssets() - { - return array( - 'css' => 'widgets/mails/widget.css', - 'js' => 'widgets/mails/widget.js' - ); - } -} diff --git a/source/vendor/maximebf/debugbar/src/DebugBar/Bridge/Twig/TimeableTwigExtensionProfiler.php b/source/vendor/maximebf/debugbar/src/DebugBar/Bridge/Twig/TimeableTwigExtensionProfiler.php deleted file mode 100644 index 3611d2d..0000000 --- a/source/vendor/maximebf/debugbar/src/DebugBar/Bridge/Twig/TimeableTwigExtensionProfiler.php +++ /dev/null @@ -1,60 +0,0 @@ -timeDataCollector = $timeDataCollector; - } - - public function __construct(\Twig_Profiler_Profile $profile, TimeDataCollector $timeDataCollector = null) - { - parent::__construct($profile); - - $this->timeDataCollector = $timeDataCollector; - } - - public function enter(Twig_Profiler_Profile $profile) - { - if ($this->timeDataCollector && $profile->isTemplate()) { - $this->timeDataCollector->startMeasure($profile->getName(), 'template ' . $profile->getName()); - } - parent::enter($profile); - } - - public function leave(Twig_Profiler_Profile $profile) - { - parent::leave($profile); - if ($this->timeDataCollector && $profile->isTemplate()) { - $this->timeDataCollector->stopMeasure($profile->getName()); - } - } -} \ No newline at end of file diff --git a/source/vendor/maximebf/debugbar/src/DebugBar/Bridge/Twig/TraceableTwigEnvironment.php b/source/vendor/maximebf/debugbar/src/DebugBar/Bridge/Twig/TraceableTwigEnvironment.php deleted file mode 100644 index 9e98c19..0000000 --- a/source/vendor/maximebf/debugbar/src/DebugBar/Bridge/Twig/TraceableTwigEnvironment.php +++ /dev/null @@ -1,419 +0,0 @@ -twig = $twig; - $this->timeDataCollector = $timeDataCollector; - } - - public function __call($name, $arguments) - { - return call_user_func_array(array($this->twig, $name), $arguments); - } - - public function getRenderedTemplates() - { - return $this->renderedTemplates; - } - - public function addRenderedTemplate(array $info) - { - $this->renderedTemplates[] = $info; - } - - public function getTimeDataCollector() - { - return $this->timeDataCollector; - } - - public function getBaseTemplateClass() - { - return $this->twig->getBaseTemplateClass(); - } - - public function setBaseTemplateClass($class) - { - $this->twig->setBaseTemplateClass($class); - } - - public function enableDebug() - { - $this->twig->enableDebug(); - } - - public function disableDebug() - { - $this->twig->disableDebug(); - } - - public function isDebug() - { - return $this->twig->isDebug(); - } - - public function enableAutoReload() - { - $this->twig->enableAutoReload(); - } - - public function disableAutoReload() - { - $this->twig->disableAutoReload(); - } - - public function isAutoReload() - { - return $this->twig->isAutoReload(); - } - - public function enableStrictVariables() - { - $this->twig->enableStrictVariables(); - } - - public function disableStrictVariables() - { - $this->twig->disableStrictVariables(); - } - - public function isStrictVariables() - { - return $this->twig->isStrictVariables(); - } - - public function getCache($original = true) - { - return $this->twig->getCache($original); - } - - public function setCache($cache) - { - $this->twig->setCache($cache); - } - - public function getCacheFilename($name) - { - return $this->twig->getCacheFilename($name); - } - - public function getTemplateClass($name, $index = null) - { - return $this->twig->getTemplateClass($name, $index); - } - - public function getTemplateClassPrefix() - { - return $this->twig->getTemplateClassPrefix(); - } - - public function render($name, array $context = array()) - { - return $this->loadTemplate($name)->render($context); - } - - public function display($name, array $context = array()) - { - $this->loadTemplate($name)->display($context); - } - - public function loadTemplate($name, $index = null) - { - $cls = $this->twig->getTemplateClass($name, $index); - - if (isset($this->twig->loadedTemplates[$cls])) { - return $this->twig->loadedTemplates[$cls]; - } - - if (!class_exists($cls, false)) { - if (false === $cache = $this->getCacheFilename($name)) { - eval('?>'.$this->compileSource($this->getLoader()->getSource($name), $name)); - } else { - if (!is_file($cache) || ($this->isAutoReload() && !$this->isTemplateFresh($name, filemtime($cache)))) { - $this->writeCacheFile($cache, $this->compileSource($this->getLoader()->getSource($name), $name)); - } - - require_once $cache; - } - } - - if (!$this->twig->runtimeInitialized) { - $this->initRuntime(); - } - - return $this->twig->loadedTemplates[$cls] = new TraceableTwigTemplate($this, new $cls($this)); - } - - public function isTemplateFresh($name, $time) - { - return $this->twig->isTemplateFresh($name, $time); - } - - public function resolveTemplate($names) - { - return $this->twig->resolveTemplate($names); - } - - public function clearTemplateCache() - { - $this->twig->clearTemplateCache(); - } - - public function clearCacheFiles() - { - $this->twig->clearCacheFiles(); - } - - public function getLexer() - { - return $this->twig->getLexer(); - } - - public function setLexer(Twig_LexerInterface $lexer) - { - $this->twig->setLexer($lexer); - } - - public function tokenize($source, $name = null) - { - return $this->twig->tokenize($source, $name); - } - - public function getParser() - { - return $this->twig->getParser(); - } - - public function setParser(Twig_ParserInterface $parser) - { - $this->twig->setParser($parser); - } - - public function parse(Twig_TokenStream $tokens) - { - return $this->twig->parse($tokens); - } - - public function getCompiler() - { - return $this->twig->getCompiler(); - } - - public function setCompiler(Twig_CompilerInterface $compiler) - { - $this->twig->setCompiler($compiler); - } - - public function compile(Twig_NodeInterface $node) - { - return $this->twig->compile($node); - } - - public function compileSource($source, $name = null) - { - return $this->twig->compileSource($source, $name); - } - - public function setLoader(Twig_LoaderInterface $loader) - { - $this->twig->setLoader($loader); - } - - public function getLoader() - { - return $this->twig->getLoader(); - } - - public function setCharset($charset) - { - $this->twig->setCharset($charset); - } - - public function getCharset() - { - return $this->twig->getCharset(); - } - - public function initRuntime() - { - $this->twig->initRuntime(); - } - - public function hasExtension($name) - { - return $this->twig->hasExtension($name); - } - - public function getExtension($name) - { - return $this->twig->getExtension($name); - } - - public function addExtension(Twig_ExtensionInterface $extension) - { - $this->twig->addExtension($extension); - } - - public function removeExtension($name) - { - $this->twig->removeExtension($name); - } - - public function setExtensions(array $extensions) - { - $this->twig->setExtensions($extensions); - } - - public function getExtensions() - { - return $this->twig->getExtensions(); - } - - public function addTokenParser(Twig_TokenParserInterface $parser) - { - $this->twig->addTokenParser($parser); - } - - public function getTokenParsers() - { - return $this->twig->getTokenParsers(); - } - - public function getTags() - { - return $this->twig->getTags(); - } - - public function addNodeVisitor(Twig_NodeVisitorInterface $visitor) - { - $this->twig->addNodeVisitor($visitor); - } - - public function getNodeVisitors() - { - return $this->twig->getNodeVisitors(); - } - - public function addFilter($name, $filter = null) - { - $this->twig->addFilter($name, $filter); - } - - public function getFilter($name) - { - return $this->twig->getFilter($name); - } - - public function registerUndefinedFilterCallback($callable) - { - $this->twig->registerUndefinedFilterCallback($callable); - } - - public function getFilters() - { - return $this->twig->getFilters(); - } - - public function addTest($name, $test = null) - { - $this->twig->addTest($name, $test); - } - - public function getTests() - { - return $this->twig->getTests(); - } - - public function getTest($name) - { - return $this->twig->getTest($name); - } - - public function addFunction($name, $function = null) - { - $this->twig->addFunction($name, $function); - } - - public function getFunction($name) - { - return $this->twig->getFunction($name); - } - - public function registerUndefinedFunctionCallback($callable) - { - $this->twig->registerUndefinedFunctionCallback($callable); - } - - public function getFunctions() - { - return $this->twig->getFunctions(); - } - - public function addGlobal($name, $value) - { - $this->twig->addGlobal($name, $value); - } - - public function getGlobals() - { - return $this->twig->getGlobals(); - } - - public function mergeGlobals(array $context) - { - return $this->twig->mergeGlobals($context); - } - - public function getUnaryOperators() - { - return $this->twig->getUnaryOperators(); - } - - public function getBinaryOperators() - { - return $this->twig->getBinaryOperators(); - } - - public function computeAlternatives($name, $items) - { - return $this->twig->computeAlternatives($name, $items); - } -} diff --git a/source/vendor/maximebf/debugbar/src/DebugBar/Bridge/Twig/TraceableTwigTemplate.php b/source/vendor/maximebf/debugbar/src/DebugBar/Bridge/Twig/TraceableTwigTemplate.php deleted file mode 100644 index 1d57d2a..0000000 --- a/source/vendor/maximebf/debugbar/src/DebugBar/Bridge/Twig/TraceableTwigTemplate.php +++ /dev/null @@ -1,138 +0,0 @@ -env = $env; - $this->template = $template; - } - - public function __call($name, $arguments) - { - return call_user_func_array(array($this->template, $name), $arguments); - } - - public function doDisplay(array $context, array $blocks = array()) - { - return $this->template->doDisplay($context, $blocks); - } - - public function getTemplateName() - { - return $this->template->getTemplateName(); - } - - public function getEnvironment() - { - return $this->template->getEnvironment(); - } - - public function getParent(array $context) - { - return $this->template->getParent($context); - } - - public function isTraitable() - { - return $this->template->isTraitable(); - } - - public function displayParentBlock($name, array $context, array $blocks = array()) - { - $this->template->displayParentBlock($name, $context, $blocks); - } - - public function displayBlock($name, array $context, array $blocks = array(), $useBlocks = true) - { - $this->template->displayBlock($name, $context, $blocks, $useBlocks); - } - - public function renderParentBlock($name, array $context, array $blocks = array()) - { - return $this->template->renderParentBlock($name, $context, $blocks); - } - - public function renderBlock($name, array $context, array $blocks = array(), $useBlocks = true) - { - return $this->template->renderBlock($name, $context, $blocks, $useBlocks); - } - - public function hasBlock($name) - { - return $this->template->hasBlock($name); - } - - public function getBlockNames() - { - return $this->template->getBlockNames(); - } - - public function getBlocks() - { - return $this->template->getBlocks(); - } - - public function display(array $context, array $blocks = array()) - { - $start = microtime(true); - $this->template->display($context, $blocks); - $end = microtime(true); - - if ($timeDataCollector = $this->env->getTimeDataCollector()) { - $name = sprintf("twig.render(%s)", $this->template->getTemplateName()); - $timeDataCollector->addMeasure($name, $start, $end); - } - - $this->env->addRenderedTemplate(array( - 'name' => $this->template->getTemplateName(), - 'render_time' => $end - $start - )); - } - - public function render(array $context) - { - $level = ob_get_level(); - ob_start(); - try { - $this->display($context); - } catch (Exception $e) { - while (ob_get_level() > $level) { - ob_end_clean(); - } - - throw $e; - } - - return ob_get_clean(); - } - - public static function clearCache() - { - Twig_Template::clearCache(); - } -} diff --git a/source/vendor/maximebf/debugbar/src/DebugBar/Bridge/Twig/TwigCollector.php b/source/vendor/maximebf/debugbar/src/DebugBar/Bridge/Twig/TwigCollector.php deleted file mode 100644 index bb48ab7..0000000 --- a/source/vendor/maximebf/debugbar/src/DebugBar/Bridge/Twig/TwigCollector.php +++ /dev/null @@ -1,89 +0,0 @@ - - * $env = new TraceableTwigEnvironment(new Twig_Environment($loader)); - * $debugbar->addCollector(new TwigCollector($env)); - * - * - * @deprecated use DebugBar\Bridge\TwigProfileCollector instead - */ -class TwigCollector extends DataCollector implements Renderable, AssetProvider -{ - public function __construct(TraceableTwigEnvironment $twig) - { - $this->twig = $twig; - } - - public function collect() - { - $templates = array(); - $accuRenderTime = 0; - - foreach ($this->twig->getRenderedTemplates() as $tpl) { - $accuRenderTime += $tpl['render_time']; - $templates[] = array( - 'name' => $tpl['name'], - 'render_time' => $tpl['render_time'], - 'render_time_str' => $this->formatDuration($tpl['render_time']) - ); - } - - return array( - 'nb_templates' => count($templates), - 'templates' => $templates, - 'accumulated_render_time' => $accuRenderTime, - 'accumulated_render_time_str' => $this->formatDuration($accuRenderTime) - ); - } - - public function getName() - { - return 'twig'; - } - - public function getWidgets() - { - return array( - 'twig' => array( - 'icon' => 'leaf', - 'widget' => 'PhpDebugBar.Widgets.TemplatesWidget', - 'map' => 'twig', - 'default' => json_encode(array('templates' => array())), - ), - 'twig:badge' => array( - 'map' => 'twig.nb_templates', - 'default' => 0 - ) - ); - } - - public function getAssets() - { - return array( - 'css' => 'widgets/templates/widget.css', - 'js' => 'widgets/templates/widget.js' - ); - } -} diff --git a/source/vendor/maximebf/debugbar/src/DebugBar/Bridge/TwigProfileCollector.php b/source/vendor/maximebf/debugbar/src/DebugBar/Bridge/TwigProfileCollector.php deleted file mode 100644 index efd3a7d..0000000 --- a/source/vendor/maximebf/debugbar/src/DebugBar/Bridge/TwigProfileCollector.php +++ /dev/null @@ -1,197 +0,0 @@ - - * $env = new Twig_Environment($loader); // Or from a PSR11-container - * $profile = new Twig_Profiler_Profile(); - * $env->addExtension(new Twig_Extension_Profile($profile)); - * $debugbar->addCollector(new TwigProfileCollector($profile, $env)); - * // or: $debugbar->addCollector(new TwigProfileCollector($profile, $loader)); - * - */ -class TwigProfileCollector extends DataCollector implements Renderable, AssetProvider -{ - /** - * @var \Twig_Profiler_Profile - */ - private $profile; - /** - * @var \Twig_LoaderInterface - */ - private $loader; - /** @var int */ - private $templateCount; - /** @var int */ - private $blockCount; - /** @var int */ - private $macroCount; - /** - * @var array[] { - * @var string $name - * @var int $render_time - * @var string $render_time_str - * @var string $memory_str - * @var string $xdebug_link - * } - */ - private $templates; - - /** - * TwigProfileCollector constructor. - * - * @param \Twig_Profiler_Profile $profile - * @param \Twig_LoaderInterface|\Twig_Environment $loaderOrEnv - */ - public function __construct(\Twig_Profiler_Profile $profile, $loaderOrEnv = null) - { - $this->profile = $profile; - if ($loaderOrEnv instanceof \Twig_Environment) { - $loaderOrEnv = $loaderOrEnv->getLoader(); - } - $this->loader = $loaderOrEnv; - } - - /** - * Returns a hash where keys are control names and their values - * an array of options as defined in {@see DebugBar\JavascriptRenderer::addControl()} - * - * @return array - */ - public function getWidgets() - { - return array( - 'twig' => array( - 'icon' => 'leaf', - 'widget' => 'PhpDebugBar.Widgets.TemplatesWidget', - 'map' => 'twig', - 'default' => json_encode(array('templates' => array())), - ), - 'twig:badge' => array( - 'map' => 'twig.badge', - 'default' => 0, - ), - ); - } - - /** - * @return array - */ - public function getAssets() - { - return array( - 'css' => 'widgets/templates/widget.css', - 'js' => 'widgets/templates/widget.js', - ); - } - - /** - * Called by the DebugBar when data needs to be collected - * - * @return array Collected data - */ - public function collect() - { - $this->templateCount = $this->blockCount = $this->macroCount = 0; - $this->templates = array(); - $this->computeData($this->profile); - - return array( - 'nb_templates' => $this->templateCount, - 'nb_blocks' => $this->blockCount, - 'nb_macros' => $this->macroCount, - 'templates' => $this->templates, - 'accumulated_render_time' => $this->profile->getDuration(), - 'accumulated_render_time_str' => $this->getDataFormatter()->formatDuration($this->profile->getDuration()), - 'memory_usage_str' => $this->getDataFormatter()->formatBytes($this->profile->getMemoryUsage()), - 'callgraph' => $this->getHtmlCallGraph(), - 'badge' => implode( - '/', - array( - $this->templateCount, - $this->blockCount, - $this->macroCount, - ) - ), - ); - } - - /** - * Returns the unique name of the collector - * - * @return string - */ - public function getName() - { - return 'twig'; - } - - public function getHtmlCallGraph() - { - $dumper = new \Twig_Profiler_Dumper_Html(); - - return $dumper->dump($this->profile); - } - - /** - * Get an Xdebug Link to a file - * - * @return array { - * @var string url - * @var bool ajax - * } - */ - public function getXdebugLink($template, $line = 1) - { - if (is_null($this->loader)) { - return null; - } - $file = $this->loader->getSourceContext($template)->getPath(); - - return parent::getXdebugLink($file, $line); - } - - private function computeData(\Twig_Profiler_Profile $profile) - { - $this->templateCount += ($profile->isTemplate() ? 1 : 0); - $this->blockCount += ($profile->isBlock() ? 1 : 0); - $this->macroCount += ($profile->isMacro() ? 1 : 0); - if ($profile->isTemplate()) { - $this->templates[] = array( - 'name' => $profile->getName(), - 'render_time' => $profile->getDuration(), - 'render_time_str' => $this->getDataFormatter()->formatDuration($profile->getDuration()), - 'memory_str' => $this->getDataFormatter()->formatBytes($profile->getMemoryUsage()), - 'xdebug_link' => $this->getXdebugLink($profile->getTemplate()), - ); - } - foreach ($profile as $p) { - $this->computeData($p); - } - } -} diff --git a/source/vendor/maximebf/debugbar/src/DebugBar/DataCollector/AggregatedCollector.php b/source/vendor/maximebf/debugbar/src/DebugBar/DataCollector/AggregatedCollector.php deleted file mode 100644 index c1fd96a..0000000 --- a/source/vendor/maximebf/debugbar/src/DebugBar/DataCollector/AggregatedCollector.php +++ /dev/null @@ -1,189 +0,0 @@ - - * $aggcollector = new AggregateCollector('foobar'); - * $aggcollector->addCollector(new MessagesCollector('msg1')); - * $aggcollector->addCollector(new MessagesCollector('msg2')); - * $aggcollector['msg1']->addMessage('hello world'); - * - */ -class AggregatedCollector implements DataCollectorInterface, ArrayAccess -{ - protected $name; - - protected $mergeProperty; - - protected $sort; - - protected $collectors = array(); - - /** - * @param string $name - * @param string $mergeProperty - * @param boolean $sort - */ - public function __construct($name, $mergeProperty = null, $sort = false) - { - $this->name = $name; - $this->mergeProperty = $mergeProperty; - $this->sort = $sort; - } - - /** - * @param DataCollectorInterface $collector - */ - public function addCollector(DataCollectorInterface $collector) - { - $this->collectors[$collector->getName()] = $collector; - } - - /** - * @return array - */ - public function getCollectors() - { - return $this->collectors; - } - - /** - * Merge data from one of the key/value pair of the collected data - * - * @param string $property - */ - public function setMergeProperty($property) - { - $this->mergeProperty = $property; - } - - /** - * @return string - */ - public function getMergeProperty() - { - return $this->mergeProperty; - } - - /** - * Sorts the collected data - * - * If true, sorts using sort() - * If it is a string, sorts the data using the value from a key/value pair of the array - * - * @param bool|string $sort - */ - public function setSort($sort) - { - $this->sort = $sort; - } - - /** - * @return bool|string - */ - public function getSort() - { - return $this->sort; - } - - /** - * @return array - */ - public function collect() - { - $aggregate = array(); - foreach ($this->collectors as $collector) { - $data = $collector->collect(); - if ($this->mergeProperty !== null) { - $data = $data[$this->mergeProperty]; - } - $aggregate = array_merge($aggregate, $data); - } - - return $this->sort($aggregate); - } - - /** - * Sorts the collected data - * - * @param array $data - * @return array - */ - protected function sort($data) - { - if (is_string($this->sort)) { - $p = $this->sort; - usort($data, function ($a, $b) use ($p) { - if ($a[$p] == $b[$p]) { - return 0; - } - return $a[$p] < $b[$p] ? -1 : 1; - }); - } elseif ($this->sort === true) { - sort($data); - } - return $data; - } - - /** - * @return string - */ - public function getName() - { - return $this->name; - } - - // -------------------------------------------- - // ArrayAccess implementation - - /** - * @param mixed $key - * @param mixed $value - * @throws DebugBarException - */ - public function offsetSet($key, $value) - { - throw new DebugBarException("AggregatedCollector[] is read-only"); - } - - /** - * @param mixed $key - * @return mixed - */ - public function offsetGet($key) - { - return $this->collectors[$key]; - } - - /** - * @param mixed $key - * @return bool - */ - public function offsetExists($key) - { - return isset($this->collectors[$key]); - } - - /** - * @param mixed $key - * @throws DebugBarException - */ - public function offsetUnset($key) - { - throw new DebugBarException("AggregatedCollector[] is read-only"); - } -} diff --git a/source/vendor/maximebf/debugbar/src/DebugBar/DataCollector/AssetProvider.php b/source/vendor/maximebf/debugbar/src/DebugBar/DataCollector/AssetProvider.php deleted file mode 100644 index 58425d8..0000000 --- a/source/vendor/maximebf/debugbar/src/DebugBar/DataCollector/AssetProvider.php +++ /dev/null @@ -1,43 +0,0 @@ - tag) - * - inline_js: an array map of content ID to inline JS content (not including ' . "\n", $file); - } - - foreach ($inlineJs as $content) { - $html .= sprintf('' . "\n", $nonce, $content); - } - - foreach ($inlineHead as $content) { - $html .= $content . "\n"; - } - - if ($this->enableJqueryNoConflict && !$this->useRequireJs) { - $html .= '' . "\n"; - } - - return $html; - } - - /** - * Register shutdown to display the debug bar - * - * @param boolean $here Set position of HTML. True if is to current position or false for end file - * @param boolean $initialize Whether to render the de bug bar initialization code - * @param bool $renderStackedData - * @param bool $head - * @return string Return "{--DEBUGBAR_OB_START_REPLACE_ME--}" or return an empty string if $here == false - */ - public function renderOnShutdown($here = true, $initialize = true, $renderStackedData = true, $head = false) - { - register_shutdown_function(array($this, "replaceTagInBuffer"), $here, $initialize, $renderStackedData, $head); - - if (ob_get_level() === 0) { - ob_start(); - } - - return ($here) ? self::REPLACEABLE_TAG : ""; - } - - /** - * Same as renderOnShutdown() with $head = true - * - * @param boolean $here - * @param boolean $initialize - * @param boolean $renderStackedData - * @return string - */ - public function renderOnShutdownWithHead($here = true, $initialize = true, $renderStackedData = true) - { - return $this->renderOnShutdown($here, $initialize, $renderStackedData, true); - } - - /** - * Is callback function for register_shutdown_function(...) - * - * @param boolean $here Set position of HTML. True if is to current position or false for end file - * @param boolean $initialize Whether to render the de bug bar initialization code - * @param bool $renderStackedData - * @param bool $head - */ - public function replaceTagInBuffer($here = true, $initialize = true, $renderStackedData = true, $head = false) - { - $render = ($head ? $this->renderHead() : "") - . $this->render($initialize, $renderStackedData); - - $current = ($here && ob_get_level() > 0) ? ob_get_clean() : self::REPLACEABLE_TAG; - - echo str_replace(self::REPLACEABLE_TAG, $render, $current, $count); - - if ($count === 0) { - echo $render; - } - } - - /** - * Returns the code needed to display the debug bar - * - * AJAX request should not render the initialization code. - * - * @param boolean $initialize Whether or not to render the debug bar initialization code - * @param boolean $renderStackedData Whether or not to render the stacked data - * @return string - */ - public function render($initialize = true, $renderStackedData = true) - { - $js = ''; - - if ($initialize) { - $js = $this->getJsInitializationCode(); - } - - if ($renderStackedData && $this->debugBar->hasStackedData()) { - foreach ($this->debugBar->getStackedData() as $id => $data) { - $js .= $this->getAddDatasetCode($id, $data, '(stacked)'); - } - } - - $suffix = !$initialize ? '(ajax)' : null; - $js .= $this->getAddDatasetCode($this->debugBar->getCurrentRequestId(), $this->debugBar->getData(), $suffix); - - $nonce = $this->getNonceAttribute(); - - if ($this->useRequireJs){ - return "\n"; - } else { - return "\n"; - } - - } - - /** - * Returns the js code needed to initialize the debug bar - * - * @return string - */ - protected function getJsInitializationCode() - { - $js = ''; - - if (($this->initialization & self::INITIALIZE_CONSTRUCTOR) === self::INITIALIZE_CONSTRUCTOR) { - $js .= sprintf("var %s = new %s();\n", $this->variableName, $this->javascriptClass); - } - - if (($this->initialization & self::INITIALIZE_CONTROLS) === self::INITIALIZE_CONTROLS) { - $js .= $this->getJsControlsDefinitionCode($this->variableName); - } - - if ($this->ajaxHandlerClass) { - $js .= sprintf("%s.ajaxHandler = new %s(%s, undefined, %s);\n", - $this->variableName, - $this->ajaxHandlerClass, - $this->variableName, - $this->ajaxHandlerAutoShow ? 'true' : 'false' - ); - if ($this->ajaxHandlerBindToFetch) { - $js .= sprintf("%s.ajaxHandler.bindToFetch();\n", $this->variableName); - } - if ($this->ajaxHandlerBindToXHR) { - $js .= sprintf("%s.ajaxHandler.bindToXHR();\n", $this->variableName); - } elseif ($this->ajaxHandlerBindToJquery) { - $js .= sprintf("if (jQuery) %s.ajaxHandler.bindToJquery(jQuery);\n", $this->variableName); - } - } - - if ($this->openHandlerUrl !== null) { - $js .= sprintf("%s.setOpenHandler(new %s(%s));\n", $this->variableName, - $this->openHandlerClass, - json_encode(array("url" => $this->openHandlerUrl))); - } - - return $js; - } - - /** - * Returns the js code needed to initialized the controls and data mapping of the debug bar - * - * Controls can be defined by collectors themselves or using {@see addControl()} - * - * @param string $varname Debug bar's variable name - * @return string - */ - protected function getJsControlsDefinitionCode($varname) - { - $js = ''; - $dataMap = array(); - $excludedOptions = array('indicator', 'tab', 'map', 'default', 'widget', 'position'); - - // finds controls provided by collectors - $widgets = array(); - foreach ($this->debugBar->getCollectors() as $collector) { - if (($collector instanceof Renderable) && !in_array($collector->getName(), $this->ignoredCollectors)) { - if ($w = $collector->getWidgets()) { - $widgets = array_merge($widgets, $w); - } - } - } - $controls = array_merge($widgets, $this->controls); - - foreach (array_filter($controls) as $name => $options) { - $opts = array_diff_key($options, array_flip($excludedOptions)); - - if (isset($options['tab']) || isset($options['widget'])) { - if (!isset($opts['title'])) { - $opts['title'] = ucfirst(str_replace('_', ' ', $name)); - } - $js .= sprintf("%s.addTab(\"%s\", new %s({%s%s}));\n", - $varname, - $name, - isset($options['tab']) ? $options['tab'] : 'PhpDebugBar.DebugBar.Tab', - substr(json_encode($opts, JSON_FORCE_OBJECT), 1, -1), - isset($options['widget']) ? sprintf('%s"widget": new %s()', count($opts) ? ', ' : '', $options['widget']) : '' - ); - } elseif (isset($options['indicator']) || isset($options['icon'])) { - $js .= sprintf("%s.addIndicator(\"%s\", new %s(%s), \"%s\");\n", - $varname, - $name, - isset($options['indicator']) ? $options['indicator'] : 'PhpDebugBar.DebugBar.Indicator', - json_encode($opts, JSON_FORCE_OBJECT), - isset($options['position']) ? $options['position'] : 'right' - ); - } - - if (isset($options['map']) && isset($options['default'])) { - $dataMap[$name] = array($options['map'], $options['default']); - } - } - - // creates the data mapping object - $mapJson = array(); - foreach ($dataMap as $name => $values) { - $mapJson[] = sprintf('"%s": ["%s", %s]', $name, $values[0], $values[1]); - } - $js .= sprintf("%s.setDataMap({\n%s\n});\n", $varname, implode(",\n", $mapJson)); - - // activate state restoration - $js .= sprintf("%s.restoreState();\n", $varname); - - return $js; - } - - /** - * Returns the js code needed to add a dataset - * - * @param string $requestId - * @param array $data - * @param mixed $suffix - * @return string - */ - protected function getAddDatasetCode($requestId, $data, $suffix = null) - { - $js = sprintf("%s.addDataSet(%s, \"%s\"%s);\n", - $this->variableName, - json_encode($data), - $requestId, - $suffix ? ", " . json_encode($suffix) : '' - ); - return $js; - } - - /** - * If a nonce it set, create the correct attribute - * @return string - */ - protected function getNonceAttribute() - { - if ($nonce = $this->getCspNonce()) { - return ' nonce="' . $nonce .'"'; - } - - return ''; - } -} diff --git a/source/vendor/maximebf/debugbar/src/DebugBar/OpenHandler.php b/source/vendor/maximebf/debugbar/src/DebugBar/OpenHandler.php deleted file mode 100644 index ee4df41..0000000 --- a/source/vendor/maximebf/debugbar/src/DebugBar/OpenHandler.php +++ /dev/null @@ -1,117 +0,0 @@ -isDataPersisted()) { - throw new DebugBarException("DebugBar must have a storage backend to use OpenHandler"); - } - $this->debugBar = $debugBar; - } - - /** - * Handles the current request - * - * @param array $request Request data - * @param bool $echo - * @param bool $sendHeader - * @return string - * @throws DebugBarException - */ - public function handle($request = null, $echo = true, $sendHeader = true) - { - if ($request === null) { - $request = $_REQUEST; - } - - $op = 'find'; - if (isset($request['op'])) { - $op = $request['op']; - if (!in_array($op, array('find', 'get', 'clear'))) { - throw new DebugBarException("Invalid operation '{$request['op']}'"); - } - } - - if ($sendHeader) { - $this->debugBar->getHttpDriver()->setHeaders(array( - 'Content-Type' => 'application/json' - )); - } - - $response = json_encode(call_user_func(array($this, $op), $request)); - if ($echo) { - echo $response; - } - return $response; - } - - /** - * Find operation - * @param $request - * @return array - */ - protected function find($request) - { - $max = 20; - if (isset($request['max'])) { - $max = $request['max']; - } - - $offset = 0; - if (isset($request['offset'])) { - $offset = $request['offset']; - } - - $filters = array(); - foreach (array('utime', 'datetime', 'ip', 'uri', 'method') as $key) { - if (isset($request[$key])) { - $filters[$key] = $request[$key]; - } - } - - return $this->debugBar->getStorage()->find($filters, $max, $offset); - } - - /** - * Get operation - * @param $request - * @return array - * @throws DebugBarException - */ - protected function get($request) - { - if (!isset($request['id'])) { - throw new DebugBarException("Missing 'id' parameter in 'get' operation"); - } - return $this->debugBar->getStorage()->get($request['id']); - } - - /** - * Clear operation - */ - protected function clear($request) - { - $this->debugBar->getStorage()->clear(); - return array('success' => true); - } -} diff --git a/source/vendor/maximebf/debugbar/src/DebugBar/PhpHttpDriver.php b/source/vendor/maximebf/debugbar/src/DebugBar/PhpHttpDriver.php deleted file mode 100644 index 36e56f8..0000000 --- a/source/vendor/maximebf/debugbar/src/DebugBar/PhpHttpDriver.php +++ /dev/null @@ -1,70 +0,0 @@ - $value) { - header("$name: $value"); - } - } - - /** - * @return bool - */ - function isSessionStarted() - { - return isset($_SESSION); - } - - /** - * @param string $name - * @param string $value - */ - function setSessionValue($name, $value) - { - $_SESSION[$name] = $value; - } - - /** - * @param string $name - * @return bool - */ - function hasSessionValue($name) - { - return array_key_exists($name, $_SESSION); - } - - /** - * @param string $name - * @return mixed - */ - function getSessionValue($name) - { - return $_SESSION[$name]; - } - - /** - * @param string $name - */ - function deleteSessionValue($name) - { - unset($_SESSION[$name]); - } -} diff --git a/source/vendor/maximebf/debugbar/src/DebugBar/RequestIdGenerator.php b/source/vendor/maximebf/debugbar/src/DebugBar/RequestIdGenerator.php deleted file mode 100644 index 90c1728..0000000 --- a/source/vendor/maximebf/debugbar/src/DebugBar/RequestIdGenerator.php +++ /dev/null @@ -1,43 +0,0 @@ -= 5.3.0, but OpenSSL may not always be available - return 'X' . bin2hex(openssl_random_pseudo_bytes(16)); - } else { - // Fall back to a rudimentary ID generator: - // * $_SERVER array will make the ID unique to this request. - // * spl_object_hash($this) will make the ID unique to this object instance. - // (note that object hashes can be reused, but the other data here should prevent issues here). - // * uniqid('', true) will use the current microtime(), plus additional random data. - // * $this->index guarantees the uniqueness of IDs from the current object. - $this->index++; - $entropy = serialize($_SERVER) . uniqid('', true) . spl_object_hash($this) . $this->index; - return 'X' . md5($entropy); - } - } -} diff --git a/source/vendor/maximebf/debugbar/src/DebugBar/RequestIdGeneratorInterface.php b/source/vendor/maximebf/debugbar/src/DebugBar/RequestIdGeneratorInterface.php deleted file mode 100644 index 3d9b4af..0000000 --- a/source/vendor/maximebf/debugbar/src/DebugBar/RequestIdGeneratorInterface.php +++ /dev/null @@ -1,25 +0,0 @@ - value maps, the returned value must be - * guaranteed to not be all-numeric. - * - * @return string - */ - function generate(); -} diff --git a/source/vendor/maximebf/debugbar/src/DebugBar/Resources/debugbar.css b/source/vendor/maximebf/debugbar/src/DebugBar/Resources/debugbar.css deleted file mode 100644 index 502d248..0000000 --- a/source/vendor/maximebf/debugbar/src/DebugBar/Resources/debugbar.css +++ /dev/null @@ -1,314 +0,0 @@ -/* Hide debugbar when printing a page */ -@media print { - div.phpdebugbar { - display: none; - } -} - -div.phpdebugbar { - position: fixed; - bottom: 0; - left: 0; - width: 100%; - border-top: 0; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif; - background: #fff; - z-index: 10000; - font-size: 14px; - color: #000; - text-align: left; - line-height: 1; - letter-spacing: normal; - direction: ltr; -} - -div.phpdebugbar a, -div.phpdebugbar-openhandler { - cursor: pointer; -} - -div.phpdebugbar-drag-capture { - position: fixed; - top: 0; - bottom: 0; - left: 0; - right: 0; - z-index: 10001; - background: none; - display: none; - cursor: ns-resize; -} - -div.phpdebugbar-closed { - width: auto; -} - -div.phpdebugbar * { - margin: 0; - padding: 0; - border: 0; - font-weight: normal; - text-decoration: none; - clear: initial; - width: auto; - -moz-box-sizing: content-box; - box-sizing: content-box; -} - -div.phpdebugbar ol, div.phpdebugbar ul { - list-style: none; -} - -div.phpdebugbar table { - border-collapse: collapse; - border-spacing: 0; -} - -div.phpdebugbar input[type='text'], div.phpdebugbar input[type='password'] { - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif; - background: #fff; - font-size: 14px; - color: #000; - border: 0; - padding: 0; - margin: 0; -} - -div.phpdebugbar code, div.phpdebugbar pre, div.phpdebugbar samp { - background: none; - font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; - font-size: 1em; - border: 0; - padding: 0; - margin: 0; -} - -div.phpdebugbar code, div.phpdebugbar pre { - color: #000; -} - -div.phpdebugbar pre.sf-dump { - color: #a0a000; - outline: 0; -} - -a.phpdebugbar-restore-btn { - float: left; - padding: 5px 8px; - font-size: 14px; - color: #555; - text-decoration: none; - border-right: 1px solid #ddd; -} - -div.phpdebugbar-resize-handle { - display: none; - height: 4px; - margin-top: -4px; - width: 100%; - background: none; - border-bottom: 1px solid #ccc; - cursor: ns-resize; -} - -div.phpdebugbar-closed, div.phpdebugbar-minimized{ - border-top: 1px solid #ccc; -} -/* -------------------------------------- */ - -div.phpdebugbar-header, a.phpdebugbar-restore-btn { - background: #efefef url(data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%2020%2020%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Ccircle%20fill%3D%22%23000%22%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%229%22%2F%3E%3Cpath%20d%3D%22M6.039%208.342c.463%200%20.772.084.927.251.154.168.191.455.11.862-.084.424-.247.727-.487.908-.241.182-.608.272-1.1.272h-.743l.456-2.293h.837zm-2.975%204.615h1.22l.29-1.457H5.62c.461%200%20.84-.047%201.139-.142.298-.095.569-.254.812-.477.205-.184.37-.387.497-.608.127-.222.217-.466.27-.734.13-.65.032-1.155-.292-1.518-.324-.362-.84-.543-1.545-.543H4.153l-1.089%205.479zM9.235%206.02h1.21l-.289%201.458h1.079c.679%200%201.147.115%201.405.347.258.231.335.607.232%201.125l-.507%202.55h-1.23l.481-2.424c.055-.276.035-.464-.06-.565-.095-.1-.298-.15-.608-.15H9.98L9.356%2011.5h-1.21l1.089-5.48M15.566%208.342c.464%200%20.773.084.928.251.154.168.19.455.11.862-.084.424-.247.727-.488.908-.24.182-.607.272-1.1.272h-.742l.456-2.293h.836zm-2.974%204.615h1.22l.29-1.457h1.046c.461%200%20.84-.047%201.139-.142.298-.095.569-.254.812-.477.205-.184.37-.387.497-.608.127-.222.217-.466.27-.734.129-.65.032-1.155-.292-1.518-.324-.362-.84-.543-1.545-.543H13.68l-1.089%205.479z%22%20fill%3D%22%23FFF%22%2F%3E%3C%2Fsvg%3E) no-repeat 5px 4px / 20px 20px; -} -div.phpdebugbar-header { - padding-left: 29px; - min-height: 26px; - line-height: 16px; -} -div.phpdebugbar-header:before, div.phpdebugbar-header:after { - display: table; - line-height: 0; - content: ""; -} -div.phpdebugbar-header:after { - clear: both; -} -div.phpdebugbar-header-left { - float: left; -} -div.phpdebugbar-header-right { - float: right; -} -div.phpdebugbar-header > div > * { - padding: 5px 5px; - font-size: 14px; - color: #555; - text-decoration: none; -} -div.phpdebugbar-header-left > * { - float: left; -} -div.phpdebugbar-header-right > * { - float: right; -} -div.phpdebugbar-header-right > select { - padding: 0; -} - -/* -------------------------------------- */ - -span.phpdebugbar-indicator, -a.phpdebugbar-indicator, -a.phpdebugbar-close-btn { - border-right: 1px solid #ddd; -} - -a.phpdebugbar-tab.phpdebugbar-active { - background: #ccc; - color: #444; - background-image: linear-gradient(bottom, rgb(173,173,173) 41%, rgb(209,209,209) 71%); - background-image: -o-linear-gradient(bottom, rgb(173,173,173) 41%, rgb(209,209,209) 71%); - background-image: -moz-linear-gradient(bottom, rgb(173,173,173) 41%, rgb(209,209,209) 71%); - background-image: -webkit-linear-gradient(bottom, rgb(173,173,173) 41%, rgb(209,209,209) 71%); - background-image: -ms-linear-gradient(bottom, rgb(173,173,173) 41%, rgb(209,209,209) 71%); - background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.41, rgb(173,173,173)), color-stop(0.71, rgb(209,209,209))); -} - a.phpdebugbar-tab span.phpdebugbar-badge { - display: none; - margin-left: 5px; - font-size: 11px; - line-height: 14px; - padding: 0 6px; - background: #ccc; - border-radius: 4px; - color: #555; - font-weight: normal; - text-shadow: none; - vertical-align: middle; - } - a.phpdebugbar-tab i { - display: none; - vertical-align: middle; - } - a.phpdebugbar-tab span.phpdebugbar-badge.phpdebugbar-visible { - display: inline; - } - a.phpdebugbar-tab span.phpdebugbar-badge.phpdebugbar-important { - background: #ed6868; - color: white; - } - -a.phpdebugbar-close-btn, a.phpdebugbar-open-btn, a.phpdebugbar-restore-btn, a.phpdebugbar-minimize-btn , a.phpdebugbar-maximize-btn { - width: 16px; - height: 16px; -} - -a.phpdebugbar-minimize-btn , a.phpdebugbar-maximize-btn { - padding-right: 0 !important; -} - -a.phpdebugbar-maximize-btn { display: none} - -a.phpdebugbar-minimize-btn { display: block} - -div.phpdebugbar-minimized a.phpdebugbar-maximize-btn { display: block} - -div.phpdebugbar-minimized a.phpdebugbar-minimize-btn { display: none} - -a.phpdebugbar-minimize-btn { - background:url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201792%201792%22%20id%3D%22chevron-down%22%3E%3Cpath%20d%3D%22M1683%20808l-742%20741q-19%2019-45%2019t-45-19l-742-741q-19-19-19-45.5t19-45.5l166-165q19-19%2045-19t45%2019l531%20531%20531-531q19-19%2045-19t45%2019l166%20165q19%2019%2019%2045.5t-19%2045.5z%22%2F%3E%3C%2Fsvg%3E) no-repeat 6px 6px / 14px 14px; -} - -a.phpdebugbar-maximize-btn { - background:url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201792%201792%22%20id%3D%22chevron-up%22%3E%3Cpath%20d%3D%22M1683%201331l-166%20165q-19%2019-45%2019t-45-19l-531-531-531%20531q-19%2019-45%2019t-45-19l-166-165q-19-19-19-45.5t19-45.5l742-741q19-19%2045-19t45%2019l742%20741q19%2019%2019%2045.5t-19%2045.5z%22%2F%3E%3C%2Fsvg%3E) no-repeat 6px 6px / 14px 14px; -} - -a.phpdebugbar-close-btn { - background: url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201792%201792%22%20id%3D%22close%22%3E%3Cpath%20d%3D%22M1490%201322q0%2040-28%2068l-136%20136q-28%2028-68%2028t-68-28l-294-294-294%20294q-28%2028-68%2028t-68-28l-136-136q-28-28-28-68t28-68l294-294-294-294q-28-28-28-68t28-68l136-136q28-28%2068-28t68%2028l294%20294%20294-294q28-28%2068-28t68%2028l136%20136q28%2028%2028%2068t-28%2068l-294%20294%20294%20294q28%2028%2028%2068z%22%2F%3E%3C%2Fsvg%3E) no-repeat 9px 6px / 14px 14px; -} - -a.phpdebugbar-open-btn { - background: url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201792%201792%22%20id%3D%22folder-open%22%3E%3Cpath%20d%3D%22M1815%20952q0%2031-31%2066l-336%20396q-43%2051-120.5%2086.5t-143.5%2035.5h-1088q-34%200-60.5-13t-26.5-43q0-31%2031-66l336-396q43-51%20120.5-86.5t143.5-35.5h1088q34%200%2060.5%2013t26.5%2043zm-343-344v160h-832q-94%200-197%2047.5t-164%20119.5l-337%20396-5%206q0-4-.5-12.5t-.5-12.5v-960q0-92%2066-158t158-66h320q92%200%20158%2066t66%20158v32h544q92%200%20158%2066t66%20158z%22%2F%3E%3C%2Fsvg%3E) no-repeat 8px 6px / 14px 14px; -} - -.phpdebugbar-indicator { - position: relative; - cursor: pointer; -} - .phpdebugbar-indicator span.phpdebugbar-text { - margin-left: 5px; - } - .phpdebugbar-indicator span.phpdebugbar-tooltip { - display: none; - position: absolute; - top: -30px; - background: #efefef; - opacity: .7; - border: 1px solid #ccc; - color: #555; - font-size: 11px; - padding: 2px 3px; - z-index: 1000; - text-align: center; - width: 200%; - right: 0; - } - .phpdebugbar-indicator:hover span.phpdebugbar-tooltip:not(.phpdebugbar-disabled) { - display: block; - } - -select.phpdebugbar-datasets-switcher { - float: right; - display: none; - margin: 2px 0 0 7px; - max-width: 200px; - max-height: 23px; - padding: 0; -} - -/* -------------------------------------- */ - -div.phpdebugbar-body { - border-top: 1px solid #ccc; - display: none; - position: relative; - height: 300px; -} - -/* -------------------------------------- */ - -div.phpdebugbar-panel { - display: none; - height: 100%; - overflow: auto; - width: 100%; -} -div.phpdebugbar-panel.phpdebugbar-active { - display: block; -} - -/* -------------------------------------- */ - -div.phpdebugbar-mini-design a.phpdebugbar-tab { - position: relative; - border-right: 1px solid #ddd; -} - div.phpdebugbar-mini-design a.phpdebugbar-tab span.phpdebugbar-text { - display: none; - } - div.phpdebugbar-mini-design a.phpdebugbar-tab:hover span.phpdebugbar-text { - display: block; - position: absolute; - top: -30px; - background: #efefef; - opacity: .7; - border: 1px solid #ccc; - color: #555; - font-size: 11px; - padding: 2px 3px; - z-index: 1000; - text-align: center; - right: 0; - } - div.phpdebugbar-mini-design a.phpdebugbar-tab i { - display:inline-block; - } diff --git a/source/vendor/maximebf/debugbar/src/DebugBar/Resources/debugbar.js b/source/vendor/maximebf/debugbar/src/DebugBar/Resources/debugbar.js deleted file mode 100644 index 144b3f5..0000000 --- a/source/vendor/maximebf/debugbar/src/DebugBar/Resources/debugbar.js +++ /dev/null @@ -1,1216 +0,0 @@ -if (typeof(PhpDebugBar) == 'undefined') { - // namespace - var PhpDebugBar = {}; - PhpDebugBar.$ = jQuery; -} - -(function($) { - - if (typeof(localStorage) == 'undefined') { - // provide mock localStorage object for dumb browsers - localStorage = { - setItem: function(key, value) {}, - getItem: function(key) { return null; } - }; - } - - if (typeof(PhpDebugBar.utils) == 'undefined') { - PhpDebugBar.utils = {}; - } - - /** - * Returns the value from an object property. - * Using dots in the key, it is possible to retrieve nested property values - * - * @param {Object} dict - * @param {String} key - * @param {Object} default_value - * @return {Object} - */ - var getDictValue = PhpDebugBar.utils.getDictValue = function(dict, key, default_value) { - var d = dict, parts = key.split('.'); - for (var i = 0; i < parts.length; i++) { - if (!d[parts[i]]) { - return default_value; - } - d = d[parts[i]]; - } - return d; - } - - /** - * Counts the number of properties in an object - * - * @param {Object} obj - * @return {Integer} - */ - var getObjectSize = PhpDebugBar.utils.getObjectSize = function(obj) { - if (Object.keys) { - return Object.keys(obj).length; - } - var count = 0; - for (var k in obj) { - if (obj.hasOwnProperty(k)) { - count++; - } - } - return count; - } - - /** - * Returns a prefixed css class name - * - * @param {String} cls - * @return {String} - */ - PhpDebugBar.utils.csscls = function(cls, prefix) { - if (cls.indexOf(' ') > -1) { - var clss = cls.split(' '), out = []; - for (var i = 0, c = clss.length; i < c; i++) { - out.push(PhpDebugBar.utils.csscls(clss[i], prefix)); - } - return out.join(' '); - } - if (cls.indexOf('.') === 0) { - return '.' + prefix + cls.substr(1); - } - return prefix + cls; - }; - - /** - * Creates a partial function of csscls where the second - * argument is already defined - * - * @param {string} prefix - * @return {Function} - */ - PhpDebugBar.utils.makecsscls = function(prefix) { - var f = function(cls) { - return PhpDebugBar.utils.csscls(cls, prefix); - }; - return f; - } - - var csscls = PhpDebugBar.utils.makecsscls('phpdebugbar-'); - - - // ------------------------------------------------------------------ - - /** - * Base class for all elements with a visual component - * - * @param {Object} options - * @constructor - */ - var Widget = PhpDebugBar.Widget = function(options) { - this._attributes = $.extend({}, this.defaults); - this._boundAttributes = {}; - this.$el = $('<' + this.tagName + ' />'); - if (this.className) { - this.$el.addClass(this.className); - } - this.initialize.apply(this, [options || {}]); - this.render.apply(this); - }; - - $.extend(Widget.prototype, { - - tagName: 'div', - - className: null, - - defaults: {}, - - /** - * Called after the constructor - * - * @param {Object} options - */ - initialize: function(options) { - this.set(options); - }, - - /** - * Called after the constructor to render the element - */ - render: function() {}, - - /** - * Sets the value of an attribute - * - * @param {String} attr Can also be an object to set multiple attributes at once - * @param {Object} value - */ - set: function(attr, value) { - if (typeof(attr) != 'string') { - for (var k in attr) { - this.set(k, attr[k]); - } - return; - } - - this._attributes[attr] = value; - if (typeof(this._boundAttributes[attr]) !== 'undefined') { - for (var i = 0, c = this._boundAttributes[attr].length; i < c; i++) { - this._boundAttributes[attr][i].apply(this, [value]); - } - } - }, - - /** - * Checks if an attribute exists and is not null - * - * @param {String} attr - * @return {[type]} [description] - */ - has: function(attr) { - return typeof(this._attributes[attr]) !== 'undefined' && this._attributes[attr] !== null; - }, - - /** - * Returns the value of an attribute - * - * @param {String} attr - * @return {Object} - */ - get: function(attr) { - return this._attributes[attr]; - }, - - /** - * Registers a callback function that will be called whenever the value of the attribute changes - * - * If cb is a jQuery element, text() will be used to fill the element - * - * @param {String} attr - * @param {Function} cb - */ - bindAttr: function(attr, cb) { - if ($.isArray(attr)) { - for (var i = 0, c = attr.length; i < c; i++) { - this.bindAttr(attr[i], cb); - } - return; - } - - if (typeof(this._boundAttributes[attr]) == 'undefined') { - this._boundAttributes[attr] = []; - } - if (typeof(cb) == 'object') { - var el = cb; - cb = function(value) { el.text(value || ''); }; - } - this._boundAttributes[attr].push(cb); - if (this.has(attr)) { - cb.apply(this, [this._attributes[attr]]); - } - } - - }); - - - /** - * Creates a subclass - * - * Code from Backbone.js - * - * @param {Array} props Prototype properties - * @return {Function} - */ - Widget.extend = function(props) { - var parent = this; - - var child = function() { return parent.apply(this, arguments); }; - $.extend(child, parent); - - var Surrogate = function() { this.constructor = child; }; - Surrogate.prototype = parent.prototype; - child.prototype = new Surrogate; - $.extend(child.prototype, props); - - child.__super__ = parent.prototype; - - return child; - }; - - // ------------------------------------------------------------------ - - /** - * Tab - * - * A tab is composed of a tab label which is always visible and - * a tab panel which is visible only when the tab is active. - * - * The panel must contain a widget. A widget is an object which has - * an element property containing something appendable to a jQuery object. - * - * Options: - * - title - * - badge - * - widget - * - data: forward data to widget data - */ - var Tab = Widget.extend({ - - className: csscls('panel'), - - render: function() { - this.$tab = $('').addClass(csscls('tab')); - - this.$icon = $('').appendTo(this.$tab); - this.bindAttr('icon', function(icon) { - if (icon) { - this.$icon.attr('class', 'phpdebugbar-fa phpdebugbar-fa-' + icon); - } else { - this.$icon.attr('class', ''); - } - }); - - this.bindAttr('title', $('').addClass(csscls('text')).appendTo(this.$tab)); - - this.$badge = $('').addClass(csscls('badge')).appendTo(this.$tab); - this.bindAttr('badge', function(value) { - if (value !== null) { - this.$badge.text(value); - this.$badge.addClass(csscls('visible')); - } else { - this.$badge.removeClass(csscls('visible')); - } - }); - - this.bindAttr('widget', function(widget) { - this.$el.empty().append(widget.$el); - }); - - this.bindAttr('data', function(data) { - if (this.has('widget')) { - this.get('widget').set('data', data); - } - }) - } - - }); - - // ------------------------------------------------------------------ - - /** - * Indicator - * - * An indicator is a text and an icon to display single value information - * right inside the always visible part of the debug bar - * - * Options: - * - icon - * - title - * - tooltip - * - data: alias of title - */ - var Indicator = Widget.extend({ - - tagName: 'span', - - className: csscls('indicator'), - - render: function() { - this.$icon = $('').appendTo(this.$el); - this.bindAttr('icon', function(icon) { - if (icon) { - this.$icon.attr('class', 'phpdebugbar-fa phpdebugbar-fa-' + icon); - } else { - this.$icon.attr('class', ''); - } - }); - - this.bindAttr(['title', 'data'], $('').addClass(csscls('text')).appendTo(this.$el)); - - this.$tooltip = $('').addClass(csscls('tooltip disabled')).appendTo(this.$el); - this.bindAttr('tooltip', function(tooltip) { - if (tooltip) { - this.$tooltip.text(tooltip).removeClass(csscls('disabled')); - } else { - this.$tooltip.addClass(csscls('disabled')); - } - }); - } - - }); - - // ------------------------------------------------------------------ - - /** - * Dataset title formater - * - * Formats the title of a dataset for the select box - */ - var DatasetTitleFormater = PhpDebugBar.DatasetTitleFormater = function(debugbar) { - this.debugbar = debugbar; - }; - - $.extend(DatasetTitleFormater.prototype, { - - /** - * Formats the title of a dataset - * - * @this {DatasetTitleFormater} - * @param {String} id - * @param {Object} data - * @param {String} suffix - * @return {String} - */ - format: function(id, data, suffix) { - if (suffix) { - suffix = ' ' + suffix; - } else { - suffix = ''; - } - - var nb = getObjectSize(this.debugbar.datasets) + 1; - - if (typeof(data['__meta']) === 'undefined') { - return "#" + nb + suffix; - } - - var uri = data['__meta']['uri'], filename; - if (uri.length && uri.charAt(uri.length - 1) === '/') { - // URI ends in a trailing /: get the portion before then to avoid returning an empty string - filename = uri.substr(0, uri.length - 1); // strip trailing '/' - filename = filename.substr(filename.lastIndexOf('/') + 1); // get last path segment - filename += '/'; // add the trailing '/' back - } else { - filename = uri.substr(uri.lastIndexOf('/') + 1); - } - - // truncate the filename in the label, if it's too long - var maxLength = 150; - if (filename.length > maxLength) { - filename = filename.substr(0, maxLength) + '...'; - } - - var label = "#" + nb + " " + filename + suffix + ' (' + data['__meta']['datetime'].split(' ')[1] + ')'; - return label; - } - - }); - - // ------------------------------------------------------------------ - - - /** - * DebugBar - * - * Creates a bar that appends itself to the body of your page - * and sticks to the bottom. - * - * The bar can be customized by adding tabs and indicators. - * A data map is used to fill those controls with data provided - * from datasets. - */ - var DebugBar = PhpDebugBar.DebugBar = Widget.extend({ - - className: "phpdebugbar " + csscls('minimized'), - - options: { - bodyMarginBottom: true, - bodyMarginBottomHeight: 0 - }, - - initialize: function() { - this.controls = {}; - this.dataMap = {}; - this.datasets = {}; - this.firstTabName = null; - this.activePanelName = null; - this.datesetTitleFormater = new DatasetTitleFormater(this); - this.options.bodyMarginBottomHeight = parseInt($('body').css('margin-bottom')); - this.registerResizeHandler(); - }, - - /** - * Register resize event, for resize debugbar with reponsive css. - * - * @this {DebugBar} - */ - registerResizeHandler: function() { - if (typeof this.resize.bind == 'undefined') return; - - var f = this.resize.bind(this); - this.respCSSSize = 0; - $(window).resize(f); - setTimeout(f, 20); - }, - - /** - * Resizes the debugbar to fit the current browser window - */ - resize: function() { - var contentSize = this.respCSSSize; - if (this.respCSSSize == 0) { - this.$header.find("> div > *:visible").each(function () { - contentSize += $(this).outerWidth(); - }); - } - - var currentSize = this.$header.width(); - var cssClass = "phpdebugbar-mini-design"; - var bool = this.$header.hasClass(cssClass); - - if (currentSize <= contentSize && !bool) { - this.respCSSSize = contentSize; - this.$header.addClass(cssClass); - } else if (contentSize < currentSize && bool) { - this.respCSSSize = 0; - this.$header.removeClass(cssClass); - } - - // Reset height to ensure bar is still visible - this.setHeight(this.$body.height()); - }, - - /** - * Initialiazes the UI - * - * @this {DebugBar} - */ - render: function() { - var self = this; - this.$el.appendTo('body'); - this.$dragCapture = $('
    ').addClass(csscls('drag-capture')).appendTo(this.$el); - this.$resizehdle = $('
    ').addClass(csscls('resize-handle')).appendTo(this.$el); - this.$header = $('
    ').addClass(csscls('header')).appendTo(this.$el); - this.$headerLeft = $('
    ').addClass(csscls('header-left')).appendTo(this.$header); - this.$headerRight = $('
    ').addClass(csscls('header-right')).appendTo(this.$header); - var $body = this.$body = $('
    ').addClass(csscls('body')).appendTo(this.$el); - this.recomputeBottomOffset(); - - // dragging of resize handle - var pos_y, orig_h; - this.$resizehdle.on('mousedown', function(e) { - orig_h = $body.height(), pos_y = e.pageY; - $body.parents().on('mousemove', mousemove).on('mouseup', mouseup); - self.$dragCapture.show(); - e.preventDefault(); - }); - var mousemove = function(e) { - var h = orig_h + (pos_y - e.pageY); - self.setHeight(h); - }; - var mouseup = function() { - $body.parents().off('mousemove', mousemove).off('mouseup', mouseup); - self.$dragCapture.hide(); - }; - - // close button - this.$closebtn = $('').addClass(csscls('close-btn')).appendTo(this.$headerRight); - this.$closebtn.click(function() { - self.close(); - }); - - // minimize button - this.$minimizebtn = $('').addClass(csscls('minimize-btn') ).appendTo(this.$headerRight); - this.$minimizebtn.click(function() { - self.minimize(); - }); - - // maximize button - this.$maximizebtn = $('').addClass(csscls('maximize-btn') ).appendTo(this.$headerRight); - this.$maximizebtn.click(function() { - self.restore(); - }); - - // restore button - this.$restorebtn = $('').addClass(csscls('restore-btn')).hide().appendTo(this.$el); - this.$restorebtn.click(function() { - self.restore(); - }); - - // open button - this.$openbtn = $('').addClass(csscls('open-btn')).appendTo(this.$headerRight).hide(); - this.$openbtn.click(function() { - self.openHandler.show(function(id, dataset) { - self.addDataSet(dataset, id, "(opened)"); - self.showTab(); - }); - }); - - // select box for data sets - this.$datasets = $('
    ') - .append('Uri:
    ') - .append('IP:
    ') - .append(searchBtn) - .appendTo(this.$actions); - }, - - handleFind: function(data) { - var self = this; - $.each(data, function(i, meta) { - var a = $('
    ') - .text('Load dataset') - .on('click', function(e) { - self.hide(); - self.load(meta['id'], function(data) { - self.callback(meta['id'], data); - }); - e.preventDefault(); - }); - - var method = $('') - .text(meta['method']) - .on('click', function(e) { - self.$table.empty(); - self.find({method: meta['method']}, 0, self.handleFind.bind(self)); - e.preventDefault(); - }); - - var uri = $('') - .text(meta['uri']) - .on('click', function(e) { - self.hide(); - self.load(meta['id'], function(data) { - self.callback(meta['id'], data); - }); - e.preventDefault(); - }); - - var ip = $('') - .text(meta['ip']) - .on('click', function(e) { - self.$table.empty(); - self.find({ip: meta['ip']}, 0, self.handleFind.bind(self)); - e.preventDefault(); - }); - - var search = $('') - .text('Show URL') - .on('click', function(e) { - self.$table.empty(); - self.find({uri: meta['uri']}, 0, self.handleFind.bind(self)); - e.preventDefault(); - }); - - $('') - .append('' + meta['datetime'] + '') - .append('' + meta['method'] + '') - .append($('').append(uri)) - .append($('').append(ip)) - .append($('').append(search)) - .appendTo(self.$table); - }); - if (data.length < this.get('items_per_page')) { - this.$loadmorebtn.hide(); - } - }, - - show: function(callback) { - this.callback = callback; - this.$el.show(); - this.$overlay.show(); - this.refresh(); - }, - - hide: function() { - this.$el.hide(); - this.$overlay.hide(); - }, - - find: function(filters, offset, callback) { - var data = $.extend({}, filters, {max: this.get('items_per_page'), offset: offset || 0}); - this.last_find_request = data; - this.ajax(data, callback); - }, - - load: function(id, callback) { - this.ajax({op: "get", id: id}, callback); - }, - - clear: function(callback) { - this.ajax({op: "clear"}, callback); - }, - - ajax: function(data, callback) { - $.ajax({ - dataType: 'json', - url: this.get('url'), - data: data, - success: callback, - ignoreDebugBarAjaxHandler: true - }); - } - - }); - -})(PhpDebugBar.$); diff --git a/source/vendor/maximebf/debugbar/src/DebugBar/Resources/widgets.css b/source/vendor/maximebf/debugbar/src/DebugBar/Resources/widgets.css deleted file mode 100644 index b4d7b08..0000000 --- a/source/vendor/maximebf/debugbar/src/DebugBar/Resources/widgets.css +++ /dev/null @@ -1,261 +0,0 @@ -pre.phpdebugbar-widgets-code-block { - white-space: pre; - word-wrap: normal; - overflow: hidden; -} - pre.phpdebugbar-widgets-code-block code { - display: block; - overflow-x: auto; - overflow-y: hidden; - } - pre.phpdebugbar-widgets-code-block code.phpdebugbar-widgets-numbered-code { - padding: 5px; - } - pre.phpdebugbar-widgets-code-block code span.phpdebugbar-widgets-highlighted-line { - background: #800000; - color: #fff; - display: inline-block; - min-width: 100%; - } - pre.phpdebugbar-widgets-code-block code span.phpdebugbar-widgets-highlighted-line span { - background: none !important; - color: inherit !important; - } - pre.phpdebugbar-widgets-code-block ul { - float: left; - padding: 5px; - background: #cacaca; - border-right: 1px solid #aaa; - text-align: right; - } - -/* -------------------------------------- */ - -ul.phpdebugbar-widgets-list { - margin: 0; - padding: 0; - list-style: none; - font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; -} - ul.phpdebugbar-widgets-list li.phpdebugbar-widgets-list-item { - padding: 3px 6px; - border-bottom: 1px solid #eee; - position: relative; - overflow: hidden; - } - ul.phpdebugbar-widgets-list li.phpdebugbar-widgets-list-item:hover { - background: #fafafa; - } - -/* -------------------------------------- */ - -div.phpdebugbar-widgets-messages { - position: relative; - height: 100%; -} - div.phpdebugbar-widgets-messages ul.phpdebugbar-widgets-list { - padding-bottom: 20px; - } - div.phpdebugbar-widgets-messages li.phpdebugbar-widgets-list-item span.phpdebugbar-widgets-value.phpdebugbar-widgets-warning:before { - font-family: PhpDebugbarFontAwesome; - content: "\f071"; - margin-right: 8px; - font-size: 11px; - color: #ecb03d; - } - div.phpdebugbar-widgets-messages li.phpdebugbar-widgets-list-item span.phpdebugbar-widgets-value.phpdebugbar-widgets-error { - color: red; - } - div.phpdebugbar-widgets-messages li.phpdebugbar-widgets-list-item span.phpdebugbar-widgets-value.phpdebugbar-widgets-error:before { - font-family: PhpDebugbarFontAwesome; - content: "\f057"; - margin-right: 8px; - font-size: 11px; - color: red; - } - div.phpdebugbar-widgets-messages li.phpdebugbar-widgets-list-item pre.sf-dump { - display: inline; - } - div.phpdebugbar-widgets-messages li.phpdebugbar-widgets-list-item span.phpdebugbar-widgets-collector, - div.phpdebugbar-widgets-messages li.phpdebugbar-widgets-list-item span.phpdebugbar-widgets-label { - float: right; - font-size: 12px; - padding: 2px 4px; - color: #888; - margin: 0 2px; - text-decoration: none; - text-shadow: none; - background: none; - font-weight: normal; - } - div.phpdebugbar-widgets-messages li.phpdebugbar-widgets-list-item span.phpdebugbar-widgets-collector { - color: #555; - font-style: italic; - } - div.phpdebugbar-widgets-messages div.phpdebugbar-widgets-toolbar { - position: fixed; - bottom: 0; - width: 100%; - background: #fff; - } - div.phpdebugbar-widgets-messages div.phpdebugbar-widgets-toolbar input { - border: 0; - margin: 0; - margin-left: 7px; - width: 50%; - box-shadow: none; - } - div.phpdebugbar-widgets-messages div.phpdebugbar-widgets-toolbar input:focus { - outline: none; - } - div.phpdebugbar-widgets-messages div.phpdebugbar-widgets-toolbar a.phpdebugbar-widgets-filter { - float: right; - font-size: 12px; - padding: 2px 4px; - background: #7cacd5; - margin: 0 2px; - border-radius: 4px; - color: #fff; - text-decoration: none; - } - div.phpdebugbar-widgets-messages div.phpdebugbar-widgets-toolbar a.phpdebugbar-widgets-filter.phpdebugbar-widgets-excluded { - background: #eee; - color: #888; - } - -/* -------------------------------------- */ - -dl.phpdebugbar-widgets-kvlist { - margin: 0; -} - dl.phpdebugbar-widgets-kvlist dt { - float: left; - width: 150px; - padding: 5px; - border-top: 1px solid #eee; - font-weight: bold; - clear: both; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } - dl.phpdebugbar-widgets-kvlist dd { - margin-left: 160px; - padding: 5px; - border-top: 1px solid #eee; - cursor: pointer; - min-height: 17px; - } - -/* -------------------------------------- */ - -dl.phpdebugbar-widgets-varlist, -dl.phpdebugbar-widgets-htmlvarlist { - font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; -} - dl.phpdebugbar-widgets-htmlvarlist dd { - cursor: initial; - } - -/* -------------------------------------- */ - -ul.phpdebugbar-widgets-timeline { - margin: 0; - padding: 0; - list-style: none; -} - ul.phpdebugbar-widgets-timeline .phpdebugbar-widgets-measure { - height: 20px; - position: relative; - border-bottom: 1px solid #eee; - display: block; - } - ul.phpdebugbar-widgets-timeline li:hover { - background: #fafafa; - } - ul.phpdebugbar-widgets-timeline li span.phpdebugbar-widgets-label, - ul.phpdebugbar-widgets-timeline li span.phpdebugbar-widgets-collector { - position: absolute; - font-size: 12px; - font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; - color: #555; - top: 4px; - left: 5px; - background: none; - text-shadow: none; - font-weight: normal; - white-space: pre; - } - ul.phpdebugbar-widgets-timeline li span.phpdebugbar-widgets-collector { - left: initial; - right: 5px; - } - ul.phpdebugbar-widgets-timeline li span.phpdebugbar-widgets-value { - display: block; - position: absolute; - height: 10px; - background: #3db9ec; - top: 5px; - border-radius: 2px; - min-width: 1px; - } - ul.phpdebugbar-widgets-timeline table.phpdebugbar-widgets-params { - display: none; - width: 70%; - margin: 10px; - border: 1px solid #ddd; - font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; - border-collapse: collapse; - } - ul.phpdebugbar-widgets-timeline table.phpdebugbar-widgets-params td { - border: 1px solid #ddd; - padding: 0 5px; - } - ul.phpdebugbar-widgets-timeline table.phpdebugbar-widgets-params .phpdebugbar-widgets-name { - width: 20%; - font-weight: bold; - } - -/* -------------------------------------- */ - -div.phpdebugbar-widgets-exceptions li.phpdebugbar-widgets-list-item { - cursor: pointer; -} - div.phpdebugbar-widgets-exceptions li.phpdebugbar-widgets-list-item span.phpdebugbar-widgets-message { - display: block; - color: red; - } - - div.phpdebugbar-widgets-exceptions li.phpdebugbar-widgets-list-item span.phpdebugbar-widgets-filename { - display: block; - font-style: italic; - color: #555; - } - - div.phpdebugbar-widgets-exceptions li.phpdebugbar-widgets-list-item span.phpdebugbar-widgets-type { - display: block; - position: absolute; - right: 4px; - top: 4px; - font-weight: bold; - } - - div.phpdebugbar-widgets-exceptions li.phpdebugbar-widgets-list-item pre.phpdebugbar-widgets-file { - display: none; - margin: 10px; - padding: 5px; - border: 1px solid #ddd; - font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; - } - -div.phpdebugbar-widgets-exceptions a.phpdebugbar-widgets-editor-link:before { - font-family: PhpDebugbarFontAwesome; - margin-right: 4px; - font-size: 12px; - font-style: normal; -} - -div.phpdebugbar-widgets-exceptions a.phpdebugbar-widgets-editor-link:before { - content: "\f08e"; - margin-left: 4px; -} diff --git a/source/vendor/maximebf/debugbar/src/DebugBar/Resources/widgets.js b/source/vendor/maximebf/debugbar/src/DebugBar/Resources/widgets.js deleted file mode 100644 index 4fd69fa..0000000 --- a/source/vendor/maximebf/debugbar/src/DebugBar/Resources/widgets.js +++ /dev/null @@ -1,589 +0,0 @@ -if (typeof(PhpDebugBar) == 'undefined') { - // namespace - var PhpDebugBar = {}; - PhpDebugBar.$ = jQuery; -} - -(function($) { - - /** - * @namespace - */ - PhpDebugBar.Widgets = {}; - - var csscls = PhpDebugBar.utils.makecsscls('phpdebugbar-widgets-'); - - /** - * Replaces spaces with   and line breaks with
    - * - * @param {String} text - * @return {String} - */ - var htmlize = PhpDebugBar.Widgets.htmlize = function(text) { - return text.replace(/\n/g, '
    ').replace(/\s/g, " ") - }; - - /** - * Returns a string representation of value, using JSON.stringify - * if it's an object. - * - * @param {Object} value - * @param {Boolean} prettify Uses htmlize() if true - * @return {String} - */ - var renderValue = PhpDebugBar.Widgets.renderValue = function(value, prettify) { - if (typeof(value) !== 'string') { - if (prettify) { - return htmlize(JSON.stringify(value, undefined, 2)); - } - return JSON.stringify(value); - } - return value; - }; - - /** - * Highlights a block of code - * - * @param {String} code - * @param {String} lang - * @return {String} - */ - var highlight = PhpDebugBar.Widgets.highlight = function(code, lang) { - if (typeof(code) === 'string') { - if (typeof(hljs) === 'undefined') { - return htmlize(code); - } - if (lang) { - return hljs.highlight(lang, code).value; - } - return hljs.highlightAuto(code).value; - } - - if (typeof(hljs) === 'object') { - code.each(function(i, e) { hljs.highlightBlock(e); }); - } - return code; - }; - - /** - * Creates a
     element with a block of code
    -     *
    -     * @param  {String} code
    -     * @param  {String} lang
    -     * @param  {Number} [firstLineNumber] If provided, shows line numbers beginning with the given value.
    -     * @param  {Number} [highlightedLine] If provided, the given line number will be highlighted.
    -     * @return {String}
    -     */
    -    var createCodeBlock = PhpDebugBar.Widgets.createCodeBlock = function(code, lang, firstLineNumber, highlightedLine) {
    -        var pre = $('
    ').addClass(csscls('code-block'));
    -        // Add a newline to prevent  element from vertically collapsing too far if the last
    -        // code line was empty: that creates problems with the horizontal scrollbar being
    -        // incorrectly positioned - most noticeable when line numbers are shown.
    -        var codeElement = $('').text(code + '\n').appendTo(pre);
    -
    -        // Add a span with a special class if we are supposed to highlight a line.  highlight.js will
    -        // still correctly format code even with existing markup in it.
    -        if ($.isNumeric(highlightedLine)) {
    -            if ($.isNumeric(firstLineNumber)) {
    -                highlightedLine = highlightedLine - firstLineNumber + 1;
    -            }
    -            codeElement.html(function (index, html) {
    -                var currentLine = 1;
    -                return html.replace(/^.*$/gm, function(line) {
    -                    if (currentLine++ == highlightedLine) {
    -                        return '' + line + '';
    -                    } else {
    -                        return line;
    -                    }
    -                });
    -            });
    -        }
    -
    -        // Format the code
    -        if (lang) {
    -            pre.addClass("language-" + lang);
    -        }
    -        highlight(pre);
    -
    -        // Show line numbers in a list
    -        if ($.isNumeric(firstLineNumber)) {
    -            var lineCount = code.split('\n').length;
    -            var $lineNumbers = $('
      ').prependTo(pre); - pre.children().addClass(csscls('numbered-code')); - for (var i = firstLineNumber; i < firstLineNumber + lineCount; i++) { - $('
    • ').text(i).appendTo($lineNumbers); - } - } - - return pre; - }; - - // ------------------------------------------------------------------ - // Generic widgets - // ------------------------------------------------------------------ - - /** - * Displays array element in a
        list - * - * Options: - * - data - * - itemRenderer: a function used to render list items (optional) - */ - var ListWidget = PhpDebugBar.Widgets.ListWidget = PhpDebugBar.Widget.extend({ - - tagName: 'ul', - - className: csscls('list'), - - initialize: function(options) { - if (!options['itemRenderer']) { - options['itemRenderer'] = this.itemRenderer; - } - this.set(options); - }, - - render: function() { - this.bindAttr(['itemRenderer', 'data'], function() { - this.$el.empty(); - if (!this.has('data')) { - return; - } - - var data = this.get('data'); - for (var i = 0; i < data.length; i++) { - var li = $('
      • ').addClass(csscls('list-item')).appendTo(this.$el); - this.get('itemRenderer')(li, data[i]); - } - }); - }, - - /** - * Renders the content of a
      • element - * - * @param {jQuery} li The
      • element as a jQuery Object - * @param {Object} value An item from the data array - */ - itemRenderer: function(li, value) { - li.html(renderValue(value)); - } - - }); - - // ------------------------------------------------------------------ - - /** - * Displays object property/value paris in a
        list - * - * Options: - * - data - * - itemRenderer: a function used to render list items (optional) - */ - var KVListWidget = PhpDebugBar.Widgets.KVListWidget = ListWidget.extend({ - - tagName: 'dl', - - className: csscls('kvlist'), - - render: function() { - this.bindAttr(['itemRenderer', 'data'], function() { - this.$el.empty(); - if (!this.has('data')) { - return; - } - - var self = this; - $.each(this.get('data'), function(key, value) { - var dt = $('
        ').addClass(csscls('key')).appendTo(self.$el); - var dd = $('
        ').addClass(csscls('value')).appendTo(self.$el); - self.get('itemRenderer')(dt, dd, key, value); - }); - }); - }, - - /** - * Renders the content of the
        and
        elements - * - * @param {jQuery} dt The
        element as a jQuery Object - * @param {jQuery} dd The
        element as a jQuery Object - * @param {String} key Property name - * @param {Object} value Property value - */ - itemRenderer: function(dt, dd, key, value) { - dt.text(key); - dd.html(htmlize(value)); - } - - }); - - // ------------------------------------------------------------------ - - /** - * An extension of KVListWidget where the data represents a list - * of variables - * - * Options: - * - data - */ - var VariableListWidget = PhpDebugBar.Widgets.VariableListWidget = KVListWidget.extend({ - - className: csscls('kvlist varlist'), - - itemRenderer: function(dt, dd, key, value) { - $('').attr('title', key).text(key).appendTo(dt); - - var v = value; - if (v && v.length > 100) { - v = v.substr(0, 100) + "..."; - } - var prettyVal = null; - dd.text(v).click(function() { - if (dd.hasClass(csscls('pretty'))) { - dd.text(v).removeClass(csscls('pretty')); - } else { - prettyVal = prettyVal || createCodeBlock(value); - dd.addClass(csscls('pretty')).empty().append(prettyVal); - } - }); - } - - }); - - // ------------------------------------------------------------------ - - /** - * An extension of KVListWidget where the data represents a list - * of variables whose contents are HTML; this is useful for showing - * variable output from VarDumper's HtmlDumper. - * - * Options: - * - data - */ - var HtmlVariableListWidget = PhpDebugBar.Widgets.HtmlVariableListWidget = KVListWidget.extend({ - - className: csscls('kvlist htmlvarlist'), - - itemRenderer: function(dt, dd, key, value) { - $('').attr('title', key).text(key).appendTo(dt); - dd.html(value); - } - - }); - - // ------------------------------------------------------------------ - - /** - * Iframe widget - * - * Options: - * - data - */ - var IFrameWidget = PhpDebugBar.Widgets.IFrameWidget = PhpDebugBar.Widget.extend({ - - tagName: 'iframe', - - className: csscls('iframe'), - - render: function() { - this.$el.attr({ - seamless: "seamless", - border: "0", - width: "100%", - height: "100%" - }); - this.bindAttr('data', function(url) { this.$el.attr('src', url); }); - } - - }); - - - // ------------------------------------------------------------------ - // Collector specific widgets - // ------------------------------------------------------------------ - - /** - * Widget for the MessagesCollector - * - * Uses ListWidget under the hood - * - * Options: - * - data - */ - var MessagesWidget = PhpDebugBar.Widgets.MessagesWidget = PhpDebugBar.Widget.extend({ - - className: csscls('messages'), - - render: function() { - var self = this; - - this.$list = new ListWidget({ itemRenderer: function(li, value) { - if (value.message_html) { - var val = $('').addClass(csscls('value')).html(value.message_html).appendTo(li); - } else { - var m = value.message; - if (m.length > 100) { - m = m.substr(0, 100) + "..."; - } - - var val = $('').addClass(csscls('value')).text(m).appendTo(li); - if (!value.is_string || value.message.length > 100) { - var prettyVal = value.message; - if (!value.is_string) { - prettyVal = null; - } - li.css('cursor', 'pointer').click(function () { - if (val.hasClass(csscls('pretty'))) { - val.text(m).removeClass(csscls('pretty')); - } else { - prettyVal = prettyVal || createCodeBlock(value.message, 'php'); - val.addClass(csscls('pretty')).empty().append(prettyVal); - } - }); - } - } - - if (value.collector) { - $('').addClass(csscls('collector')).text(value.collector).prependTo(li); - } - if (value.label) { - val.addClass(csscls(value.label)); - $('').addClass(csscls('label')).text(value.label).prependTo(li); - } - }}); - - this.$list.$el.appendTo(this.$el); - this.$toolbar = $('
        ').addClass(csscls('toolbar')).appendTo(this.$el); - - $('') - .on('change', function() { self.set('search', this.value); }) - .appendTo(this.$toolbar); - - this.bindAttr('data', function(data) { - this.set({ exclude: [], search: '' }); - this.$toolbar.find(csscls('.filter')).remove(); - - var filters = [], self = this; - for (var i = 0; i < data.length; i++) { - if (!data[i].label || $.inArray(data[i].label, filters) > -1) { - continue; - } - filters.push(data[i].label); - $('') - .addClass(csscls('filter')) - .text(data[i].label) - .attr('rel', data[i].label) - .on('click', function() { self.onFilterClick(this); }) - .appendTo(this.$toolbar); - } - }); - - this.bindAttr(['exclude', 'search'], function() { - var data = this.get('data'), - exclude = this.get('exclude'), - search = this.get('search'), - caseless = false, - fdata = []; - - if (search && search === search.toLowerCase()) { - caseless = true; - } - - for (var i = 0; i < data.length; i++) { - var message = caseless ? data[i].message.toLowerCase() : data[i].message; - - if ((!data[i].label || $.inArray(data[i].label, exclude) === -1) && (!search || message.indexOf(search) > -1)) { - fdata.push(data[i]); - } - } - - this.$list.set('data', fdata); - }); - }, - - onFilterClick: function(el) { - $(el).toggleClass(csscls('excluded')); - - var excludedLabels = []; - this.$toolbar.find(csscls('.filter') + csscls('.excluded')).each(function() { - excludedLabels.push(this.rel); - }); - - this.set('exclude', excludedLabels); - } - - }); - - // ------------------------------------------------------------------ - - /** - * Widget for the TimeDataCollector - * - * Options: - * - data - */ - var TimelineWidget = PhpDebugBar.Widgets.TimelineWidget = PhpDebugBar.Widget.extend({ - - tagName: 'ul', - - className: csscls('timeline'), - - render: function() { - this.bindAttr('data', function(data) { - - // ported from php DataFormatter - var formatDuration = function(seconds) { - if (seconds < 0.001) - return (seconds * 1000000).toFixed() + 'μs'; - else if (seconds < 1) - return (seconds * 1000).toFixed(2) + 'ms'; - return (seconds).toFixed(2) + 's'; - }; - - this.$el.empty(); - if (data.measures) { - var aggregate = {}; - - for (var i = 0; i < data.measures.length; i++) { - var measure = data.measures[i]; - - if(!aggregate[measure.label]) - aggregate[measure.label] = { count: 0, duration: 0 }; - - aggregate[measure.label]['count'] += 1; - aggregate[measure.label]['duration'] += measure.duration; - - var m = $('
        ').addClass(csscls('measure')), - li = $('
      • '), - left = (measure.relative_start * 100 / data.duration).toFixed(2), - width = Math.min((measure.duration * 100 / data.duration).toFixed(2), 100 - left); - - m.append($('').addClass(csscls('value')).css({ - left: left + "%", - width: width + "%" - })); - m.append($('').addClass(csscls('label')).text(measure.label + " (" + measure.duration_str + ")")); - - if (measure.collector) { - $('').addClass(csscls('collector')).text(measure.collector).appendTo(m); - } - - m.appendTo(li); - this.$el.append(li); - - if (measure.params && !$.isEmptyObject(measure.params)) { - var table = $('
        Params
        ').addClass(csscls('params')).appendTo(li); - for (var key in measure.params) { - if (typeof measure.params[key] !== 'function') { - table.append('' + key + '
        ' + measure.params[key] + '
        '); - } - } - li.css('cursor', 'pointer').click(function() { - var table = $(this).find('table'); - if (table.is(':visible')) { - table.hide(); - } else { - table.show(); - } - }); - } - } - - // convert to array and sort by duration - aggregate = $.map(aggregate, function(data, label) { - return { - label: label, - data: data - } - }).sort(function(a, b) { - return b.data.duration - a.data.duration - }); - - // build table and add - var aggregateTable = $('
        ').addClass(csscls('params')); - $.each(aggregate, function(i, aggregate) { - width = Math.min((aggregate.data.duration * 100 / data.duration).toFixed(2), 100); - - aggregateTable.append('' + aggregate.data.count + ' x ' + aggregate.label + ' (' + width + '%)' + - '
        ' + - '' + - '' + formatDuration(aggregate.data.duration) + '' + - '
        '); - }); - - this.$el.append('
      • ').find('li:last').append(aggregateTable); - } - }); - } - - }); - - // ------------------------------------------------------------------ - - /** - * Widget for the displaying exceptions - * - * Options: - * - data - */ - var ExceptionsWidget = PhpDebugBar.Widgets.ExceptionsWidget = PhpDebugBar.Widget.extend({ - - className: csscls('exceptions'), - - render: function() { - this.$list = new ListWidget({ itemRenderer: function(li, e) { - $('').addClass(csscls('message')).text(e.message).appendTo(li); - if (e.file) { - var header = $('').addClass(csscls('filename')).text(e.file + "#" + e.line); - if (e.xdebug_link) { - if (e.xdebug_link.ajax) { - $('').on('click', function () { - $.ajax(e.xdebug_link.url); - }).addClass(csscls('editor-link')).appendTo(header); - } else { - $('').addClass(csscls('editor-link')).appendTo(header); - } - } - header.appendTo(li); - } - if (e.type) { - $('').addClass(csscls('type')).text(e.type).appendTo(li); - } - if (e.surrounding_lines) { - var pre = createCodeBlock(e.surrounding_lines.join(""), 'php').addClass(csscls('file')).appendTo(li); - if (!e.stack_trace_html) { - // This click event makes the var-dumper hard to use. - li.click(function () { - if (pre.is(':visible')) { - pre.hide(); - } else { - pre.show(); - } - }); - } - } - if (e.stack_trace_html) { - var $trace = $('').addClass(csscls('filename')).html(e.stack_trace_html); - $trace.appendTo(li); - } else if (e.stack_trace) { - e.stack_trace.split("\n").forEach(function (trace) { - var $traceLine = $('
        '); - $('').addClass(csscls('filename')).text(trace).appendTo($traceLine); - $traceLine.appendTo(li); - }); - } - }}); - this.$list.$el.appendTo(this.$el); - - this.bindAttr('data', function(data) { - this.$list.set('data', data); - if (data.length == 1) { - this.$list.$el.children().first().find(csscls('.file')).show(); - } - }); - - } - - }); - - -})(PhpDebugBar.$); diff --git a/source/vendor/maximebf/debugbar/src/DebugBar/Resources/widgets/mails/widget.css b/source/vendor/maximebf/debugbar/src/DebugBar/Resources/widgets/mails/widget.css deleted file mode 100644 index 8e91858..0000000 --- a/source/vendor/maximebf/debugbar/src/DebugBar/Resources/widgets/mails/widget.css +++ /dev/null @@ -1,12 +0,0 @@ - -div.phpdebugbar-widgets-mails span.phpdebugbar-widgets-subject { - display: block; -} - -div.phpdebugbar-widgets-mails li.phpdebugbar-widgets-list-item pre.phpdebugbar-widgets-headers { - display: none; - margin: 10px; - padding: 5px; - border: 1px solid #ddd; - font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; -} diff --git a/source/vendor/maximebf/debugbar/src/DebugBar/Resources/widgets/mails/widget.js b/source/vendor/maximebf/debugbar/src/DebugBar/Resources/widgets/mails/widget.js deleted file mode 100644 index 7a1a694..0000000 --- a/source/vendor/maximebf/debugbar/src/DebugBar/Resources/widgets/mails/widget.js +++ /dev/null @@ -1,40 +0,0 @@ -(function($) { - - var csscls = PhpDebugBar.utils.makecsscls('phpdebugbar-widgets-'); - - /** - * Widget for the displaying mails data - * - * Options: - * - data - */ - var MailsWidget = PhpDebugBar.Widgets.MailsWidget = PhpDebugBar.Widget.extend({ - - className: csscls('mails'), - - render: function() { - this.$list = new PhpDebugBar.Widgets.ListWidget({ itemRenderer: function(li, mail) { - $('').addClass(csscls('subject')).text(mail.subject).appendTo(li); - $('').addClass(csscls('to')).text(mail.to).appendTo(li); - if (mail.headers) { - var headers = $('
        ').addClass(csscls('headers')).appendTo(li);
        -                    $('').text(mail.headers).appendTo(headers);
        -                    li.click(function() {
        -                        if (headers.is(':visible')) {
        -                            headers.hide();
        -                        } else {
        -                            headers.show();
        -                        }
        -                    });
        -                }
        -            }});
        -            this.$list.$el.appendTo(this.$el);
        -
        -            this.bindAttr('data', function(data) {
        -                this.$list.set('data', data);
        -            });
        -        }
        -
        -    });
        -
        -})(PhpDebugBar.$);
        diff --git a/source/vendor/maximebf/debugbar/src/DebugBar/Resources/widgets/sqlqueries/widget.css b/source/vendor/maximebf/debugbar/src/DebugBar/Resources/widgets/sqlqueries/widget.css
        deleted file mode 100644
        index 04fd0af..0000000
        --- a/source/vendor/maximebf/debugbar/src/DebugBar/Resources/widgets/sqlqueries/widget.css
        +++ /dev/null
        @@ -1,118 +0,0 @@
        -div.phpdebugbar-widgets-sqlqueries .phpdebugbar-widgets-status {
        -  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
        -  padding: 6px 6px;
        -  border-bottom: 1px solid #ddd;
        -  font-weight: bold;
        -  color: #555;
        -  background: #fafafa;
        -}
        -
        -div.phpdebugbar-widgets-sqlqueries li.phpdebugbar-widgets-list-item.phpdebugbar-widgets-error {
        -  color: red;
        -}
        -
        -div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-database,
        -div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-duration,
        -div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-memory,
        -div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-row-count,
        -div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-copy-clipboard,
        -div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-stmt-id {
        -  float: right;
        -  margin-left: 8px;
        -  color: #888;
        -}
        -div.phpdebugbar-widgets-sqlqueries div.phpdebugbar-widgets-status span.phpdebugbar-widgets-database,
        -div.phpdebugbar-widgets-sqlqueries div.phpdebugbar-widgets-status span.phpdebugbar-widgets-duration,
        -div.phpdebugbar-widgets-sqlqueries div.phpdebugbar-widgets-status span.phpdebugbar-widgets-memory,
        -div.phpdebugbar-widgets-sqlqueries div.phpdebugbar-widgets-status span.phpdebugbar-widgets-row-count,
        -div.phpdebugbar-widgets-sqlqueries div.phpdebugbar-widgets-status span.phpdebugbar-widgets-copy-clipboard,
        -div.phpdebugbar-widgets-sqlqueries div.phpdebugbar-widgets-status span.phpdebugbar-widgets-stmt-id {
        -  color: #555;
        -}
        -div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-database:before,
        -div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-duration:before,
        -div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-memory:before,
        -div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-row-count:before,
        -div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-copy-clipboard:before,
        -div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-stmt-id:before {
        -  font-family: PhpDebugbarFontAwesome;
        -  margin-right: 4px;
        -  font-size: 12px;
        -}
        -div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-database:before {
        -  content: "\f1c0";
        -}
        -div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-duration:before {
        -  content: "\f017";
        -}
        -div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-memory:before {
        -  content: "\f085";
        -}
        -div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-row-count:before {
        -  content: "\f0ce";
        -}
        -div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-stmt-id:before {
        -  content: "\f08d";
        -}
        -div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-copy-clipboard:before {
        -  content: "\f0c5";
        -}
        -div.phpdebugbar-widgets-sqlqueries table.phpdebugbar-widgets-params {
        -  display: none;
        -  width: 70%;
        -  margin: 10px;
        -  border: 1px solid #ddd;
        -  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
        -  border-collapse: collapse;
        -}
        -  div.phpdebugbar-widgets-sqlqueries table.phpdebugbar-widgets-params td {
        -    border: 1px solid #ddd;
        -    text-align: center;
        -  }
        -  div.phpdebugbar-widgets-sqlqueries table.phpdebugbar-widgets-params .phpdebugbar-widgets-name {
        -    width: 20%;
        -    font-weight: bold;
        -  }
        -
        -div.phpdebugbar-widgets-sqlqueries li.phpdebugbar-widgets-list-item span.phpdebugbar-widgets-error {
        -  display: block;
        -  font-weight: bold;
        -}
        -
        -code.phpdebugbar-widgets-sql {
        -  white-space: pre-wrap;
        -  overflow-wrap: break-word;
        -  word-wrap: break-word;
        -}
        -
        -div.phpdebugbar-widgets-sqlqueries li.phpdebugbar-widgets-list-item.phpdebugbar-widgets-sql-duplicate {
        -  background-color: #edeff0;
        -}
        -
        -div.phpdebugbar-widgets-sqlqueries li.phpdebugbar-widgets-list-item.phpdebugbar-widgets-sql-duplicate:hover {
        -  background-color: #ffc;
        -}
        -
        -div.phpdebugbar-widgets-sqlqueries div.phpdebugbar-widgets-toolbar {
        -  display:none;
        -  position: fixed;
        -  bottom: 0;
        -  width: 100%;
        -  background: #fff;
        -  z-index: 1;
        -}
        -
        -div.phpdebugbar-widgets-sqlqueries div.phpdebugbar-widgets-toolbar a.phpdebugbar-widgets-filter {
        -  float: right;
        -  font-size: 12px;
        -  padding: 2px 4px;
        -  background: #7cacd5;
        -  margin: 0 2px;
        -  border-radius: 4px;
        -  color: #fff;
        -  text-decoration: none;
        -}
        -div.phpdebugbar-widgets-sqlqueries div.phpdebugbar-widgets-toolbar a.phpdebugbar-widgets-filter.phpdebugbar-widgets-excluded {
        -  background: #eee;
        -  color: #888;
        -}
        diff --git a/source/vendor/maximebf/debugbar/src/DebugBar/Resources/widgets/sqlqueries/widget.js b/source/vendor/maximebf/debugbar/src/DebugBar/Resources/widgets/sqlqueries/widget.js
        deleted file mode 100644
        index 514915c..0000000
        --- a/source/vendor/maximebf/debugbar/src/DebugBar/Resources/widgets/sqlqueries/widget.js
        +++ /dev/null
        @@ -1,171 +0,0 @@
        -(function($) {
        -
        -    var csscls = PhpDebugBar.utils.makecsscls('phpdebugbar-widgets-');
        -
        -    /**
        -     * Widget for the displaying sql queries
        -     *
        -     * Options:
        -     *  - data
        -     */
        -    var SQLQueriesWidget = PhpDebugBar.Widgets.SQLQueriesWidget = PhpDebugBar.Widget.extend({
        -
        -        className: csscls('sqlqueries'),
        -
        -        onFilterClick: function(el) {
        -            $(el).toggleClass(csscls('excluded'));
        -
        -            var excludedLabels = [];
        -            this.$toolbar.find(csscls('.filter') + csscls('.excluded')).each(function() {
        -                excludedLabels.push(this.rel);
        -            });
        -
        -            this.$list.$el.find("li[connection=" + $(el).attr("rel") + "]").toggle();
        -
        -            this.set('exclude', excludedLabels);
        -        },
        -        onCopyToClipboard: function (el) {
        -            var code = $(el).parent('li').find('code').get(0);
        -            var copy = function () {
        -                try {
        -                    document.execCommand('copy');
        -                    alert('Query copied to the clipboard');
        -                } catch (err) {
        -                    console.log('Oops, unable to copy');
        -                }
        -            };
        -            var select = function (node) {
        -                if (document.selection) {
        -                    var range = document.body.createTextRange();
        -                    range.moveToElementText(node);
        -                    range.select();
        -                } else if (window.getSelection) {
        -                    var range = document.createRange();
        -                    range.selectNodeContents(node);
        -                    window.getSelection().removeAllRanges();
        -                    window.getSelection().addRange(range);
        -                }
        -                copy();
        -                window.getSelection().removeAllRanges();
        -            };
        -            select(code);
        -        },
        -        render: function() {
        -            this.$status = $('
        ').addClass(csscls('status')).appendTo(this.$el); - - this.$toolbar = $('
        ').addClass(csscls('toolbar')).appendTo(this.$el); - - var filters = [], self = this; - - this.$list = new PhpDebugBar.Widgets.ListWidget({ itemRenderer: function(li, stmt) { - $('').addClass(csscls('sql')).html(PhpDebugBar.Widgets.highlight(stmt.sql, 'sql')).appendTo(li); - if (stmt.duration_str) { - $('').addClass(csscls('duration')).text(stmt.duration_str).appendTo(li); - } - if (stmt.memory_str) { - $('').addClass(csscls('memory')).text(stmt.memory_str).appendTo(li); - } - if (typeof(stmt.row_count) != 'undefined') { - $('').addClass(csscls('row-count')).text(stmt.row_count).appendTo(li); - } - if (typeof(stmt.stmt_id) != 'undefined' && stmt.stmt_id) { - $('').addClass(csscls('stmt-id')).text(stmt.stmt_id).appendTo(li); - } - if (stmt.connection) { - $('').addClass(csscls('database')).text(stmt.connection).appendTo(li); - li.attr("connection",stmt.connection); - if ( $.inArray(stmt.connection, filters) == -1 ) { - filters.push(stmt.connection); - $('') - .addClass(csscls('filter')) - .text(stmt.connection) - .attr('rel', stmt.connection) - .on('click', function() { self.onFilterClick(this); }) - .appendTo(self.$toolbar); - if (filters.length>1) { - self.$toolbar.show(); - self.$list.$el.css("margin-bottom","20px"); - } - } - } - if (typeof(stmt.is_success) != 'undefined' && !stmt.is_success) { - li.addClass(csscls('error')); - li.append($('').addClass(csscls('error')).text("[" + stmt.error_code + "] " + stmt.error_message)); - } - $('') - .addClass(csscls('copy-clipboard')) - .css('cursor', 'pointer') - .on('click', function (event) { - self.onCopyToClipboard(this); - event.stopPropagation(); - }) - .appendTo(li); - if (stmt.params && !$.isEmptyObject(stmt.params)) { - var table = $('
        Params
        ').addClass(csscls('params')).appendTo(li); - for (var key in stmt.params) { - if (typeof stmt.params[key] !== 'function') { - table.append('' + key + '' + stmt.params[key] + ''); - } - } - li.css('cursor', 'pointer').click(function() { - if (table.is(':visible')) { - table.hide(); - } else { - table.show(); - } - }); - } - }}); - this.$list.$el.appendTo(this.$el); - - this.bindAttr('data', function(data) { - // the PDO collector maybe is empty - if (data.length <= 0) { - return false; - } - this.$list.set('data', data.statements); - this.$status.empty(); - - // Search for duplicate statements. - for (var sql = {}, unique = 0, duplicate = 0, i = 0; i < data.statements.length; i++) { - var stmt = data.statements[i].sql; - if (data.statements[i].params && !$.isEmptyObject(data.statements[i].params)) { - stmt += ' {' + $.param(data.statements[i].params, false) + '}'; - } - sql[stmt] = sql[stmt] || { keys: [] }; - sql[stmt].keys.push(i); - } - // Add classes to all duplicate SQL statements. - for (var stmt in sql) { - if (sql[stmt].keys.length > 1) { - duplicate += sql[stmt].keys.length; - for (var i = 0; i < sql[stmt].keys.length; i++) { - this.$list.$el.find('.' + csscls('list-item')).eq(sql[stmt].keys[i]) - .addClass(csscls('sql-duplicate')); - } - } else { - unique++; - } - } - - var t = $('').text(data.nb_statements + " statements were executed").appendTo(this.$status); - if (data.nb_failed_statements) { - t.append(", " + data.nb_failed_statements + " of which failed"); - } - if (duplicate) { - t.append(", " + duplicate + " of which were duplicates"); - t.append(", " + unique + " unique"); - } - if (data.accumulated_duration_str) { - this.$status.append($('').addClass(csscls('duration')).text(data.accumulated_duration_str)); - } - if (data.memory_usage_str) { - this.$status.append($('').addClass(csscls('memory')).text(data.memory_usage_str)); - } - }); - } - - }); - -})(PhpDebugBar.$); diff --git a/source/vendor/maximebf/debugbar/src/DebugBar/Resources/widgets/templates/widget.css b/source/vendor/maximebf/debugbar/src/DebugBar/Resources/widgets/templates/widget.css deleted file mode 100644 index 29f6ab9..0000000 --- a/source/vendor/maximebf/debugbar/src/DebugBar/Resources/widgets/templates/widget.css +++ /dev/null @@ -1,66 +0,0 @@ - -div.phpdebugbar-widgets-templates div.phpdebugbar-widgets-status { - font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; - padding: 6px 6px; - border-bottom: 1px solid #ddd; - font-weight: bold; - color: #555; - background: #fafafa; -} - -div.phpdebugbar-widgets-templates span.phpdebugbar-widgets-render-time, -div.phpdebugbar-widgets-templates span.phpdebugbar-widgets-memory, -div.phpdebugbar-widgets-templates span.phpdebugbar-widgets-param-count, -div.phpdebugbar-widgets-templates span.phpdebugbar-widgets-type { - float: right; - margin-left: 8px; - color: #888; -} -div.phpdebugbar-widgets-templates div.phpdebugbar-widgets-status span.phpdebugbar-widgets-render-time, -div.phpdebugbar-widgets-templates div.phpdebugbar-widgets-status span.phpdebugbar-widgets-memory, -div.phpdebugbar-widgets-templates div.phpdebugbar-widgets-status span.phpdebugbar-widgets-param-count, -div.phpdebugbar-widgets-templates div.phpdebugbar-widgets-status span.phpdebugbar-widgets-type { - color: #555; -} -div.phpdebugbar-widgets-templates span.phpdebugbar-widgets-render-time:before, -div.phpdebugbar-widgets-templates span.phpdebugbar-widgets-memory:before, -div.phpdebugbar-widgets-templates span.phpdebugbar-widgets-param-count:before, -div.phpdebugbar-widgets-templates span.phpdebugbar-widgets-type:before, -div.phpdebugbar-widgets-templates a.phpdebugbar-widgets-editor-link:before -{ - font-family: PhpDebugbarFontAwesome; - margin-right: 4px; - font-size: 12px; -} -div.phpdebugbar-widgets-templates span.phpdebugbar-widgets-render-time:before { - content: "\f017"; -} -div.phpdebugbar-widgets-templates span.phpdebugbar-widgets-memory:before { - content: "\f085"; -} -div.phpdebugbar-widgets-templates span.phpdebugbar-widgets-param-count:before { - content: "\f0ce"; -} -div.phpdebugbar-widgets-templates span.phpdebugbar-widgets-type:before { - content: "\f121"; -} -div.phpdebugbar-widgets-templates a.phpdebugbar-widgets-editor-link:before { - content: "\f08e"; - margin-left: 4px; -} -div.phpdebugbar-widgets-templates table.phpdebugbar-widgets-params { - display: none; - width: 70%; - margin: 10px; - border: 1px solid #ddd; - font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; - border-collapse: collapse; -} -div.phpdebugbar-widgets-templates table.phpdebugbar-widgets-params td { - border: 1px solid #ddd; - padding: 0 5px; -} -div.phpdebugbar-widgets-templates table.phpdebugbar-widgets-params .phpdebugbar-widgets-name { - width: 20%; - font-weight: bold; -} diff --git a/source/vendor/maximebf/debugbar/src/DebugBar/Resources/widgets/templates/widget.js b/source/vendor/maximebf/debugbar/src/DebugBar/Resources/widgets/templates/widget.js deleted file mode 100644 index 8763e7e..0000000 --- a/source/vendor/maximebf/debugbar/src/DebugBar/Resources/widgets/templates/widget.js +++ /dev/null @@ -1,90 +0,0 @@ -(function($) { - - var csscls = PhpDebugBar.utils.makecsscls('phpdebugbar-widgets-'); - - /** - * Widget for the displaying templates data - * - * Options: - * - data - */ - var TemplatesWidget = PhpDebugBar.Widgets.TemplatesWidget = PhpDebugBar.Widget.extend({ - - className: csscls('templates'), - - render: function() { - this.$status = $('
        ').addClass(csscls('status')).appendTo(this.$el); - - this.$list = new PhpDebugBar.Widgets.ListWidget({ itemRenderer: function(li, tpl) { - $('').addClass(csscls('name')).text(tpl.name).appendTo(li); - - if (typeof tpl.xdebug_link !== 'undefined' && tpl.xdebug_link !== null) { - if (tpl.xdebug_link.ajax) { - $('').on('click', function () { - $.ajax(tpl.xdebug_link.url); - }).addClass(csscls('editor-link')).appendTo(li); - } else { - $('').addClass(csscls('editor-link')).appendTo(li); - } - } - if (tpl.render_time_str) { - $('').addClass(csscls('render-time')).text(tpl.render_time_str).appendTo(li); - } - if (tpl.memory_str) { - $('').addClass(csscls('memory')).text(tpl.memory_str).appendTo(li); - } - if (typeof(tpl.param_count) != 'undefined') { - $('').addClass(csscls('param-count')).text(tpl.param_count).appendTo(li); - } - if (typeof(tpl.type) != 'undefined' && tpl.type) { - $('').addClass(csscls('type')).text(tpl.type).appendTo(li); - } - if (tpl.params && !$.isEmptyObject(tpl.params)) { - var table = $('
        Params
        ').addClass(csscls('params')).appendTo(li); - for (var key in tpl.params) { - if (typeof tpl.params[key] !== 'function') { - table.append('' + key + '
        ' + tpl.params[key] + '
        '); - } - } - li.css('cursor', 'pointer').click(function() { - if (table.is(':visible')) { - table.hide(); - } else { - table.show(); - } - }); - } - }}); - this.$list.$el.appendTo(this.$el); - this.$callgraph = $('
        ').addClass(csscls('callgraph')).appendTo(this.$el); - - this.bindAttr('data', function(data) { - this.$list.set('data', data.templates); - this.$status.empty(); - this.$callgraph.empty(); - - var sentence = data.sentence || "templates were rendered"; - $('').text(data.nb_templates + " " + sentence).appendTo(this.$status); - - if (data.accumulated_render_time_str) { - this.$status.append($('').addClass(csscls('render-time')).text(data.accumulated_render_time_str)); - } - if (data.memory_usage_str) { - this.$status.append($('').addClass(csscls('memory')).text(data.memory_usage_str)); - } - if (data.nb_blocks > 0) { - $('
        ').text(data.nb_blocks + " blocks were rendered").appendTo(this.$status); - } - if (data.nb_macros > 0) { - $('
        ').text(data.nb_macros + " macros were rendered").appendTo(this.$status); - } - if (typeof data.callgraph !== 'undefined') { - this.$callgraph.html(data.callgraph); - } - }); - } - - }); - -})(PhpDebugBar.$); diff --git a/source/vendor/maximebf/debugbar/src/DebugBar/StandardDebugBar.php b/source/vendor/maximebf/debugbar/src/DebugBar/StandardDebugBar.php deleted file mode 100644 index d0f3e17..0000000 --- a/source/vendor/maximebf/debugbar/src/DebugBar/StandardDebugBar.php +++ /dev/null @@ -1,34 +0,0 @@ -addCollector(new PhpInfoCollector()); - $this->addCollector(new MessagesCollector()); - $this->addCollector(new RequestDataCollector()); - $this->addCollector(new TimeDataCollector()); - $this->addCollector(new MemoryCollector()); - $this->addCollector(new ExceptionsCollector()); - } -} diff --git a/source/vendor/maximebf/debugbar/src/DebugBar/Storage/FileStorage.php b/source/vendor/maximebf/debugbar/src/DebugBar/Storage/FileStorage.php deleted file mode 100644 index 98923e2..0000000 --- a/source/vendor/maximebf/debugbar/src/DebugBar/Storage/FileStorage.php +++ /dev/null @@ -1,128 +0,0 @@ -dirname = rtrim($dirname, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; - } - - /** - * {@inheritdoc} - */ - public function save($id, $data) - { - if (!file_exists($this->dirname)) { - mkdir($this->dirname, 0777, true); - } - file_put_contents($this->makeFilename($id), json_encode($data)); - } - - /** - * {@inheritdoc} - */ - public function get($id) - { - return json_decode(file_get_contents($this->makeFilename($id)), true); - } - - /** - * {@inheritdoc} - */ - public function find(array $filters = array(), $max = 20, $offset = 0) - { - //Loop through all .json files and remember the modified time and id. - $files = array(); - foreach (new \DirectoryIterator($this->dirname) as $file) { - if ($file->getExtension() == 'json') { - $files[] = array( - 'time' => $file->getMTime(), - 'id' => $file->getBasename('.json') - ); - } - } - - //Sort the files, newest first - usort($files, function ($a, $b) { - return $a['time'] < $b['time']; - }); - - //Load the metadata and filter the results. - $results = array(); - $i = 0; - foreach ($files as $file) { - //When filter is empty, skip loading the offset - if ($i++ < $offset && empty($filters)) { - $results[] = null; - continue; - } - $data = $this->get($file['id']); - $meta = $data['__meta']; - unset($data); - if ($this->filter($meta, $filters)) { - $results[] = $meta; - } - if (count($results) >= ($max + $offset)) { - break; - } - } - - return array_slice($results, $offset, $max); - } - - /** - * Filter the metadata for matches. - * - * @param array $meta - * @param array $filters - * @return bool - */ - protected function filter($meta, $filters) - { - foreach ($filters as $key => $value) { - if (!isset($meta[$key]) || fnmatch($value, $meta[$key]) === false) { - return false; - } - } - return true; - } - - /** - * {@inheritdoc} - */ - public function clear() - { - foreach (new \DirectoryIterator($this->dirname) as $file) { - if (substr($file->getFilename(), 0, 1) !== '.') { - unlink($file->getPathname()); - } - } - } - - /** - * @param string $id - * @return string - */ - public function makeFilename($id) - { - return $this->dirname . basename($id). ".json"; - } -} diff --git a/source/vendor/maximebf/debugbar/src/DebugBar/Storage/MemcachedStorage.php b/source/vendor/maximebf/debugbar/src/DebugBar/Storage/MemcachedStorage.php deleted file mode 100644 index c1ef873..0000000 --- a/source/vendor/maximebf/debugbar/src/DebugBar/Storage/MemcachedStorage.php +++ /dev/null @@ -1,158 +0,0 @@ -memcached = $memcached; - $this->keyNamespace = $keyNamespace; - $this->expiration = $expiration; - } - - /** - * {@inheritdoc} - */ - public function save($id, $data) - { - $key = $this->createKey($id); - $this->memcached->set($key, $data, $this->expiration); - if (!$this->memcached->append($this->keyNamespace, "|$key")) { - $this->memcached->set($this->keyNamespace, $key, $this->expiration); - } else if ($this->expiration) { - // append doesn't support updating expiration, so do it here: - $this->memcached->touch($this->keyNamespace, $this->expiration); - } - } - - /** - * {@inheritdoc} - */ - public function get($id) - { - return $this->memcached->get($this->createKey($id)); - } - - /** - * {@inheritdoc} - */ - public function find(array $filters = array(), $max = 20, $offset = 0) - { - if (!($keys = $this->memcached->get($this->keyNamespace))) { - return array(); - } - - $results = array(); - $keys = array_reverse(explode('|', $keys)); // Reverse so newest comes first - $keyPosition = 0; // Index in $keys to try to get next items from - $remainingItems = $max + $offset; // Try to obtain this many remaining items - // Loop until we've found $remainingItems matching items or no more items may exist. - while ($remainingItems > 0 && $keyPosition < count($keys)) { - // Consume some keys from $keys: - $itemsToGet = array_slice($keys, $keyPosition, $remainingItems); - $keyPosition += $remainingItems; - // Try to get them, and filter them: - $newItems = $this->memcachedGetMulti($itemsToGet, Memcached::GET_PRESERVE_ORDER); - if ($newItems) { - foreach ($newItems as $data) { - $meta = $data['__meta']; - if ($this->filter($meta, $filters)) { - $remainingItems--; - // Keep the result only if we've discarded $offset items first - if ($offset <= 0) { - $results[] = $meta; - } else { - $offset--; - } - } - } - } - } - return $results; - } - - /** - * Filter the metadata for matches. - * - * @param array $meta - * @param array $filters - * @return bool - */ - protected function filter($meta, $filters) - { - foreach ($filters as $key => $value) { - if (!isset($meta[$key]) || fnmatch($value, $meta[$key]) === false) { - return false; - } - } - return true; - } - - /** - * {@inheritdoc} - */ - public function clear() - { - if (!($keys = $this->memcached->get($this->keyNamespace))) { - return; - } - $this->memcached->delete($this->keyNamespace); - $this->memcached->deleteMulti(explode('|', $keys)); - } - - /** - * @param string $id - * @return string - */ - protected function createKey($id) - { - return md5("{$this->keyNamespace}.$id"); - } - - /** - * The memcached getMulti function changed in version 3.0.0 to only have two parameters. - * - * @param array $keys - * @param int $flags - */ - protected function memcachedGetMulti($keys, $flags) - { - if ($this->newGetMultiSignature === null) { - $this->newGetMultiSignature = (new ReflectionMethod('Memcached', 'getMulti'))->getNumberOfParameters() === 2; - } - if ($this->newGetMultiSignature) { - return $this->memcached->getMulti($keys, $flags); - } else { - $null = null; - return $this->memcached->getMulti($keys, $null, $flags); - } - } -} diff --git a/source/vendor/maximebf/debugbar/src/DebugBar/Storage/PdoStorage.php b/source/vendor/maximebf/debugbar/src/DebugBar/Storage/PdoStorage.php deleted file mode 100644 index ef9d568..0000000 --- a/source/vendor/maximebf/debugbar/src/DebugBar/Storage/PdoStorage.php +++ /dev/null @@ -1,137 +0,0 @@ - "INSERT INTO %tablename% (id, data, meta_utime, meta_datetime, meta_uri, meta_ip, meta_method) VALUES (?, ?, ?, ?, ?, ?, ?)", - 'get' => "SELECT data FROM %tablename% WHERE id = ?", - 'find' => "SELECT data FROM %tablename% %where% ORDER BY meta_datetime DESC LIMIT %limit% OFFSET %offset%", - 'clear' => "DELETE FROM %tablename%" - ); - - /** - * @param \PDO $pdo The PDO instance - * @param string $tableName - * @param array $sqlQueries - */ - public function __construct(PDO $pdo, $tableName = 'phpdebugbar', array $sqlQueries = array()) - { - $this->pdo = $pdo; - $this->tableName = $tableName; - $this->setSqlQueries($sqlQueries); - } - - /** - * Sets the sql queries to be used - * - * @param array $queries - */ - public function setSqlQueries(array $queries) - { - $this->sqlQueries = array_merge($this->sqlQueries, $queries); - } - - /** - * {@inheritdoc} - */ - public function save($id, $data) - { - $sql = $this->getSqlQuery('save'); - $stmt = $this->pdo->prepare($sql); - $meta = $data['__meta']; - $stmt->execute(array($id, serialize($data), $meta['utime'], $meta['datetime'], $meta['uri'], $meta['ip'], $meta['method'])); - } - - /** - * {@inheritdoc} - */ - public function get($id) - { - $sql = $this->getSqlQuery('get'); - $stmt = $this->pdo->prepare($sql); - $stmt->execute(array($id)); - if (($data = $stmt->fetchColumn(0)) !== false) { - return unserialize($data); - } - return null; - } - - /** - * {@inheritdoc} - */ - public function find(array $filters = array(), $max = 20, $offset = 0) - { - $where = array(); - $params = array(); - foreach ($filters as $key => $value) { - $where[] = "meta_$key = ?"; - $params[] = $value; - } - if (count($where)) { - $where = " WHERE " . implode(' AND ', $where); - } else { - $where = ''; - } - - $sql = $this->getSqlQuery('find', array( - 'where' => $where, - 'offset' => $offset, - 'limit' => $max - )); - - $stmt = $this->pdo->prepare($sql); - $stmt->execute($params); - - $results = array(); - foreach ($stmt->fetchAll() as $row) { - $data = unserialize($row['data']); - $results[] = $data['__meta']; - unset($data); - } - return $results; - } - - /** - * {@inheritdoc} - */ - public function clear() - { - $this->pdo->exec($this->getSqlQuery('clear')); - } - - /** - * Get a SQL Query for a task, with the variables replaced - * - * @param string $name - * @param array $vars - * @return string - */ - protected function getSqlQuery($name, array $vars = array()) - { - $sql = $this->sqlQueries[$name]; - $vars = array_merge(array('tablename' => $this->tableName), $vars); - foreach ($vars as $k => $v) { - $sql = str_replace("%$k%", $v, $sql); - } - return $sql; - } -} diff --git a/source/vendor/maximebf/debugbar/src/DebugBar/Storage/RedisStorage.php b/source/vendor/maximebf/debugbar/src/DebugBar/Storage/RedisStorage.php deleted file mode 100644 index f145369..0000000 --- a/source/vendor/maximebf/debugbar/src/DebugBar/Storage/RedisStorage.php +++ /dev/null @@ -1,97 +0,0 @@ -redis = $redis; - $this->hash = $hash; - } - - /** - * {@inheritdoc} - */ - public function save($id, $data) - { - $this->redis->hset("$this->hash:meta", $id, serialize($data['__meta'])); - unset($data['__meta']); - $this->redis->hset("$this->hash:data", $id, serialize($data)); - } - - /** - * {@inheritdoc} - */ - public function get($id) - { - return array_merge(unserialize($this->redis->hget("$this->hash:data", $id)), - array('__meta' => unserialize($this->redis->hget("$this->hash:meta", $id)))); - } - - /** - * {@inheritdoc} - */ - public function find(array $filters = array(), $max = 20, $offset = 0) - { - $results = array(); - $cursor = "0"; - do { - list($cursor, $data) = $this->redis->hscan("$this->hash:meta", $cursor); - - foreach ($data as $meta) { - if ($meta = unserialize($meta)) { - if ($this->filter($meta, $filters)) { - $results[] = $meta; - } - } - } - } while($cursor); - - usort($results, function ($a, $b) { - return $a['utime'] < $b['utime']; - }); - - return array_slice($results, $offset, $max); - } - - /** - * Filter the metadata for matches. - */ - protected function filter($meta, $filters) - { - foreach ($filters as $key => $value) { - if (!isset($meta[$key]) || fnmatch($value, $meta[$key]) === false) { - return false; - } - } - return true; - } - - /** - * {@inheritdoc} - */ - public function clear() - { - $this->redis->del($this->hash); - } -} diff --git a/source/vendor/maximebf/debugbar/src/DebugBar/Storage/StorageInterface.php b/source/vendor/maximebf/debugbar/src/DebugBar/Storage/StorageInterface.php deleted file mode 100644 index aef89bc..0000000 --- a/source/vendor/maximebf/debugbar/src/DebugBar/Storage/StorageInterface.php +++ /dev/null @@ -1,45 +0,0 @@ -pushHandler(new StreamHandler('path/to/your.log', Logger::WARNING)); - -// add records to the log -$log->addWarning('Foo'); -$log->addError('Bar'); -``` - -## Documentation - -- [Usage Instructions](doc/01-usage.md) -- [Handlers, Formatters and Processors](doc/02-handlers-formatters-processors.md) -- [Utility classes](doc/03-utilities.md) -- [Extending Monolog](doc/04-extending.md) - -## Third Party Packages - -Third party handlers, formatters and processors are -[listed in the wiki](https://github.com/Seldaek/monolog/wiki/Third-Party-Packages). You -can also add your own there if you publish one. - -## About - -### Requirements - -- Monolog works with PHP 5.3 or above, and is also tested to work with HHVM. - -### Submitting bugs and feature requests - -Bugs and feature request are tracked on [GitHub](https://github.com/Seldaek/monolog/issues) - -### Framework Integrations - -- Frameworks and libraries using [PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md) - can be used very easily with Monolog since it implements the interface. -- [Symfony2](http://symfony.com) comes out of the box with Monolog. -- [Silex](http://silex.sensiolabs.org/) comes out of the box with Monolog. -- [Laravel 4 & 5](http://laravel.com/) come out of the box with Monolog. -- [Lumen](http://lumen.laravel.com/) comes out of the box with Monolog. -- [PPI](http://www.ppi.io/) comes out of the box with Monolog. -- [CakePHP](http://cakephp.org/) is usable with Monolog via the [cakephp-monolog](https://github.com/jadb/cakephp-monolog) plugin. -- [Slim](http://www.slimframework.com/) is usable with Monolog via the [Slim-Monolog](https://github.com/Flynsarmy/Slim-Monolog) log writer. -- [XOOPS 2.6](http://xoops.org/) comes out of the box with Monolog. -- [Aura.Web_Project](https://github.com/auraphp/Aura.Web_Project) comes out of the box with Monolog. -- [Nette Framework](http://nette.org/en/) can be used with Monolog via [Kdyby/Monolog](https://github.com/Kdyby/Monolog) extension. -- [Proton Micro Framework](https://github.com/alexbilbie/Proton) comes out of the box with Monolog. - -### Author - -Jordi Boggiano - -
        -See also the list of [contributors](https://github.com/Seldaek/monolog/contributors) which participated in this project. - -### License - -Monolog is licensed under the MIT License - see the `LICENSE` file for details - -### Acknowledgements - -This library is heavily inspired by Python's [Logbook](https://logbook.readthedocs.io/en/stable/) -library, although most concepts have been adjusted to fit to the PHP world. diff --git a/source/vendor/monolog/monolog/src/Monolog/ErrorHandler.php b/source/vendor/monolog/monolog/src/Monolog/ErrorHandler.php deleted file mode 100644 index 5121c2c..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/ErrorHandler.php +++ /dev/null @@ -1,239 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog; - -use Psr\Log\LoggerInterface; -use Psr\Log\LogLevel; -use Monolog\Handler\AbstractHandler; - -/** - * Monolog error handler - * - * A facility to enable logging of runtime errors, exceptions and fatal errors. - * - * Quick setup: ErrorHandler::register($logger); - * - * @author Jordi Boggiano - */ -class ErrorHandler -{ - private $logger; - - private $previousExceptionHandler; - private $uncaughtExceptionLevel; - - private $previousErrorHandler; - private $errorLevelMap; - private $handleOnlyReportedErrors; - - private $hasFatalErrorHandler; - private $fatalLevel; - private $reservedMemory; - private $lastFatalTrace; - private static $fatalErrors = array(E_ERROR, E_PARSE, E_CORE_ERROR, E_COMPILE_ERROR, E_USER_ERROR); - - public function __construct(LoggerInterface $logger) - { - $this->logger = $logger; - } - - /** - * Registers a new ErrorHandler for a given Logger - * - * By default it will handle errors, exceptions and fatal errors - * - * @param LoggerInterface $logger - * @param array|false $errorLevelMap an array of E_* constant to LogLevel::* constant mapping, or false to disable error handling - * @param int|false $exceptionLevel a LogLevel::* constant, or false to disable exception handling - * @param int|false $fatalLevel a LogLevel::* constant, or false to disable fatal error handling - * @return ErrorHandler - */ - public static function register(LoggerInterface $logger, $errorLevelMap = array(), $exceptionLevel = null, $fatalLevel = null) - { - //Forces the autoloader to run for LogLevel. Fixes an autoload issue at compile-time on PHP5.3. See https://github.com/Seldaek/monolog/pull/929 - class_exists('\\Psr\\Log\\LogLevel', true); - - /** @phpstan-ignore-next-line */ - $handler = new static($logger); - if ($errorLevelMap !== false) { - $handler->registerErrorHandler($errorLevelMap); - } - if ($exceptionLevel !== false) { - $handler->registerExceptionHandler($exceptionLevel); - } - if ($fatalLevel !== false) { - $handler->registerFatalHandler($fatalLevel); - } - - return $handler; - } - - public function registerExceptionHandler($level = null, $callPrevious = true) - { - $prev = set_exception_handler(array($this, 'handleException')); - $this->uncaughtExceptionLevel = $level; - if ($callPrevious && $prev) { - $this->previousExceptionHandler = $prev; - } - } - - public function registerErrorHandler(array $levelMap = array(), $callPrevious = true, $errorTypes = -1, $handleOnlyReportedErrors = true) - { - $prev = set_error_handler(array($this, 'handleError'), $errorTypes); - $this->errorLevelMap = array_replace($this->defaultErrorLevelMap(), $levelMap); - if ($callPrevious) { - $this->previousErrorHandler = $prev ?: true; - } - - $this->handleOnlyReportedErrors = $handleOnlyReportedErrors; - } - - public function registerFatalHandler($level = null, $reservedMemorySize = 20) - { - register_shutdown_function(array($this, 'handleFatalError')); - - $this->reservedMemory = str_repeat(' ', 1024 * $reservedMemorySize); - $this->fatalLevel = $level; - $this->hasFatalErrorHandler = true; - } - - protected function defaultErrorLevelMap() - { - return array( - E_ERROR => LogLevel::CRITICAL, - E_WARNING => LogLevel::WARNING, - E_PARSE => LogLevel::ALERT, - E_NOTICE => LogLevel::NOTICE, - E_CORE_ERROR => LogLevel::CRITICAL, - E_CORE_WARNING => LogLevel::WARNING, - E_COMPILE_ERROR => LogLevel::ALERT, - E_COMPILE_WARNING => LogLevel::WARNING, - E_USER_ERROR => LogLevel::ERROR, - E_USER_WARNING => LogLevel::WARNING, - E_USER_NOTICE => LogLevel::NOTICE, - E_STRICT => LogLevel::NOTICE, - E_RECOVERABLE_ERROR => LogLevel::ERROR, - E_DEPRECATED => LogLevel::NOTICE, - E_USER_DEPRECATED => LogLevel::NOTICE, - ); - } - - /** - * @private - */ - public function handleException($e) - { - $this->logger->log( - $this->uncaughtExceptionLevel === null ? LogLevel::ERROR : $this->uncaughtExceptionLevel, - sprintf('Uncaught Exception %s: "%s" at %s line %s', Utils::getClass($e), $e->getMessage(), $e->getFile(), $e->getLine()), - array('exception' => $e) - ); - - if ($this->previousExceptionHandler) { - call_user_func($this->previousExceptionHandler, $e); - } - - exit(255); - } - - /** - * @private - */ - public function handleError($code, $message, $file = '', $line = 0, $context = array()) - { - if ($this->handleOnlyReportedErrors && !(error_reporting() & $code)) { - return; - } - - // fatal error codes are ignored if a fatal error handler is present as well to avoid duplicate log entries - if (!$this->hasFatalErrorHandler || !in_array($code, self::$fatalErrors, true)) { - $level = isset($this->errorLevelMap[$code]) ? $this->errorLevelMap[$code] : LogLevel::CRITICAL; - $this->logger->log($level, self::codeToString($code).': '.$message, array('code' => $code, 'message' => $message, 'file' => $file, 'line' => $line)); - } else { - // http://php.net/manual/en/function.debug-backtrace.php - // As of 5.3.6, DEBUG_BACKTRACE_IGNORE_ARGS option was added. - // Any version less than 5.3.6 must use the DEBUG_BACKTRACE_IGNORE_ARGS constant value '2'. - $trace = debug_backtrace((PHP_VERSION_ID < 50306) ? 2 : DEBUG_BACKTRACE_IGNORE_ARGS); - array_shift($trace); // Exclude handleError from trace - $this->lastFatalTrace = $trace; - } - - if ($this->previousErrorHandler === true) { - return false; - } elseif ($this->previousErrorHandler) { - return call_user_func($this->previousErrorHandler, $code, $message, $file, $line, $context); - } - } - - /** - * @private - */ - public function handleFatalError() - { - $this->reservedMemory = null; - - $lastError = error_get_last(); - if ($lastError && in_array($lastError['type'], self::$fatalErrors, true)) { - $this->logger->log( - $this->fatalLevel === null ? LogLevel::ALERT : $this->fatalLevel, - 'Fatal Error ('.self::codeToString($lastError['type']).'): '.$lastError['message'], - array('code' => $lastError['type'], 'message' => $lastError['message'], 'file' => $lastError['file'], 'line' => $lastError['line'], 'trace' => $this->lastFatalTrace) - ); - - if ($this->logger instanceof Logger) { - foreach ($this->logger->getHandlers() as $handler) { - if ($handler instanceof AbstractHandler) { - $handler->close(); - } - } - } - } - } - - private static function codeToString($code) - { - switch ($code) { - case E_ERROR: - return 'E_ERROR'; - case E_WARNING: - return 'E_WARNING'; - case E_PARSE: - return 'E_PARSE'; - case E_NOTICE: - return 'E_NOTICE'; - case E_CORE_ERROR: - return 'E_CORE_ERROR'; - case E_CORE_WARNING: - return 'E_CORE_WARNING'; - case E_COMPILE_ERROR: - return 'E_COMPILE_ERROR'; - case E_COMPILE_WARNING: - return 'E_COMPILE_WARNING'; - case E_USER_ERROR: - return 'E_USER_ERROR'; - case E_USER_WARNING: - return 'E_USER_WARNING'; - case E_USER_NOTICE: - return 'E_USER_NOTICE'; - case E_STRICT: - return 'E_STRICT'; - case E_RECOVERABLE_ERROR: - return 'E_RECOVERABLE_ERROR'; - case E_DEPRECATED: - return 'E_DEPRECATED'; - case E_USER_DEPRECATED: - return 'E_USER_DEPRECATED'; - } - - return 'Unknown PHP error'; - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php b/source/vendor/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php deleted file mode 100644 index 9beda1e..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php +++ /dev/null @@ -1,78 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\Logger; - -/** - * Formats a log message according to the ChromePHP array format - * - * @author Christophe Coevoet - */ -class ChromePHPFormatter implements FormatterInterface -{ - /** - * Translates Monolog log levels to Wildfire levels. - */ - private $logLevels = array( - Logger::DEBUG => 'log', - Logger::INFO => 'info', - Logger::NOTICE => 'info', - Logger::WARNING => 'warn', - Logger::ERROR => 'error', - Logger::CRITICAL => 'error', - Logger::ALERT => 'error', - Logger::EMERGENCY => 'error', - ); - - /** - * {@inheritdoc} - */ - public function format(array $record) - { - // Retrieve the line and file if set and remove them from the formatted extra - $backtrace = 'unknown'; - if (isset($record['extra']['file'], $record['extra']['line'])) { - $backtrace = $record['extra']['file'].' : '.$record['extra']['line']; - unset($record['extra']['file'], $record['extra']['line']); - } - - $message = array('message' => $record['message']); - if ($record['context']) { - $message['context'] = $record['context']; - } - if ($record['extra']) { - $message['extra'] = $record['extra']; - } - if (count($message) === 1) { - $message = reset($message); - } - - return array( - $record['channel'], - $message, - $backtrace, - $this->logLevels[$record['level']], - ); - } - - public function formatBatch(array $records) - { - $formatted = array(); - - foreach ($records as $record) { - $formatted[] = $this->format($record); - } - - return $formatted; - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Formatter/ElasticaFormatter.php b/source/vendor/monolog/monolog/src/Monolog/Formatter/ElasticaFormatter.php deleted file mode 100644 index 4c556cf..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Formatter/ElasticaFormatter.php +++ /dev/null @@ -1,89 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Elastica\Document; - -/** - * Format a log message into an Elastica Document - * - * @author Jelle Vink - */ -class ElasticaFormatter extends NormalizerFormatter -{ - /** - * @var string Elastic search index name - */ - protected $index; - - /** - * @var string Elastic search document type - */ - protected $type; - - /** - * @param string $index Elastic Search index name - * @param string $type Elastic Search document type - */ - public function __construct($index, $type) - { - // elasticsearch requires a ISO 8601 format date with optional millisecond precision. - parent::__construct('Y-m-d\TH:i:s.uP'); - - $this->index = $index; - $this->type = $type; - } - - /** - * {@inheritdoc} - */ - public function format(array $record) - { - $record = parent::format($record); - - return $this->getDocument($record); - } - - /** - * Getter index - * @return string - */ - public function getIndex() - { - return $this->index; - } - - /** - * Getter type - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Convert a log message into an Elastica Document - * - * @param array $record Log message - * @return Document - */ - protected function getDocument($record) - { - $document = new Document(); - $document->setData($record); - $document->setType($this->type); - $document->setIndex($this->index); - - return $document; - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Formatter/FlowdockFormatter.php b/source/vendor/monolog/monolog/src/Monolog/Formatter/FlowdockFormatter.php deleted file mode 100644 index 5094af3..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Formatter/FlowdockFormatter.php +++ /dev/null @@ -1,116 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -/** - * formats the record to be used in the FlowdockHandler - * - * @author Dominik Liebler - */ -class FlowdockFormatter implements FormatterInterface -{ - /** - * @var string - */ - private $source; - - /** - * @var string - */ - private $sourceEmail; - - /** - * @param string $source - * @param string $sourceEmail - */ - public function __construct($source, $sourceEmail) - { - $this->source = $source; - $this->sourceEmail = $sourceEmail; - } - - /** - * {@inheritdoc} - */ - public function format(array $record) - { - $tags = array( - '#logs', - '#' . strtolower($record['level_name']), - '#' . $record['channel'], - ); - - foreach ($record['extra'] as $value) { - $tags[] = '#' . $value; - } - - $subject = sprintf( - 'in %s: %s - %s', - $this->source, - $record['level_name'], - $this->getShortMessage($record['message']) - ); - - $record['flowdock'] = array( - 'source' => $this->source, - 'from_address' => $this->sourceEmail, - 'subject' => $subject, - 'content' => $record['message'], - 'tags' => $tags, - 'project' => $this->source, - ); - - return $record; - } - - /** - * {@inheritdoc} - */ - public function formatBatch(array $records) - { - $formatted = array(); - - foreach ($records as $record) { - $formatted[] = $this->format($record); - } - - return $formatted; - } - - /** - * @param string $message - * - * @return string - */ - public function getShortMessage($message) - { - static $hasMbString; - - if (null === $hasMbString) { - $hasMbString = function_exists('mb_strlen'); - } - - $maxLength = 45; - - if ($hasMbString) { - if (mb_strlen($message, 'UTF-8') > $maxLength) { - $message = mb_substr($message, 0, $maxLength - 4, 'UTF-8') . ' ...'; - } - } else { - if (strlen($message) > $maxLength) { - $message = substr($message, 0, $maxLength - 4) . ' ...'; - } - } - - return $message; - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Formatter/FluentdFormatter.php b/source/vendor/monolog/monolog/src/Monolog/Formatter/FluentdFormatter.php deleted file mode 100644 index f8ead47..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Formatter/FluentdFormatter.php +++ /dev/null @@ -1,88 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\Utils; - -/** - * Class FluentdFormatter - * - * Serializes a log message to Fluentd unix socket protocol - * - * Fluentd config: - * - * - * type unix - * path /var/run/td-agent/td-agent.sock - * - * - * Monolog setup: - * - * $logger = new Monolog\Logger('fluent.tag'); - * $fluentHandler = new Monolog\Handler\SocketHandler('unix:///var/run/td-agent/td-agent.sock'); - * $fluentHandler->setFormatter(new Monolog\Formatter\FluentdFormatter()); - * $logger->pushHandler($fluentHandler); - * - * @author Andrius Putna - */ -class FluentdFormatter implements FormatterInterface -{ - /** - * @var bool $levelTag should message level be a part of the fluentd tag - */ - protected $levelTag = false; - - public function __construct($levelTag = false) - { - if (!function_exists('json_encode')) { - throw new \RuntimeException('PHP\'s json extension is required to use Monolog\'s FluentdUnixFormatter'); - } - - $this->levelTag = (bool) $levelTag; - } - - public function isUsingLevelsInTag() - { - return $this->levelTag; - } - - public function format(array $record) - { - $tag = $record['channel']; - if ($this->levelTag) { - $tag .= '.' . strtolower($record['level_name']); - } - - $message = array( - 'message' => $record['message'], - 'context' => $record['context'], - 'extra' => $record['extra'], - ); - - if (!$this->levelTag) { - $message['level'] = $record['level']; - $message['level_name'] = $record['level_name']; - } - - return Utils::jsonEncode(array($tag, $record['datetime']->getTimestamp(), $message)); - } - - public function formatBatch(array $records) - { - $message = ''; - foreach ($records as $record) { - $message .= $this->format($record); - } - - return $message; - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Formatter/FormatterInterface.php b/source/vendor/monolog/monolog/src/Monolog/Formatter/FormatterInterface.php deleted file mode 100644 index b5de751..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Formatter/FormatterInterface.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -/** - * Interface for formatters - * - * @author Jordi Boggiano - */ -interface FormatterInterface -{ - /** - * Formats a log record. - * - * @param array $record A record to format - * @return mixed The formatted record - */ - public function format(array $record); - - /** - * Formats a set of log records. - * - * @param array $records A set of records to format - * @return mixed The formatted set of records - */ - public function formatBatch(array $records); -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php b/source/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php deleted file mode 100644 index 2c1b0e8..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php +++ /dev/null @@ -1,138 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\Logger; -use Gelf\Message; - -/** - * Serializes a log message to GELF - * @see http://www.graylog2.org/about/gelf - * - * @author Matt Lehner - */ -class GelfMessageFormatter extends NormalizerFormatter -{ - const DEFAULT_MAX_LENGTH = 32766; - - /** - * @var string the name of the system for the Gelf log message - */ - protected $systemName; - - /** - * @var string a prefix for 'extra' fields from the Monolog record (optional) - */ - protected $extraPrefix; - - /** - * @var string a prefix for 'context' fields from the Monolog record (optional) - */ - protected $contextPrefix; - - /** - * @var int max length per field - */ - protected $maxLength; - - /** - * Translates Monolog log levels to Graylog2 log priorities. - */ - private $logLevels = array( - Logger::DEBUG => 7, - Logger::INFO => 6, - Logger::NOTICE => 5, - Logger::WARNING => 4, - Logger::ERROR => 3, - Logger::CRITICAL => 2, - Logger::ALERT => 1, - Logger::EMERGENCY => 0, - ); - - public function __construct($systemName = null, $extraPrefix = null, $contextPrefix = 'ctxt_', $maxLength = null) - { - parent::__construct('U.u'); - - $this->systemName = $systemName ?: gethostname(); - - $this->extraPrefix = $extraPrefix; - $this->contextPrefix = $contextPrefix; - $this->maxLength = is_null($maxLength) ? self::DEFAULT_MAX_LENGTH : $maxLength; - } - - /** - * {@inheritdoc} - */ - public function format(array $record) - { - $record = parent::format($record); - - if (!isset($record['datetime'], $record['message'], $record['level'])) { - throw new \InvalidArgumentException('The record should at least contain datetime, message and level keys, '.var_export($record, true).' given'); - } - - $message = new Message(); - $message - ->setTimestamp($record['datetime']) - ->setShortMessage((string) $record['message']) - ->setHost($this->systemName) - ->setLevel($this->logLevels[$record['level']]); - - // message length + system name length + 200 for padding / metadata - $len = 200 + strlen((string) $record['message']) + strlen($this->systemName); - - if ($len > $this->maxLength) { - $message->setShortMessage(substr($record['message'], 0, $this->maxLength)); - } - - if (isset($record['channel'])) { - $message->setFacility($record['channel']); - } - if (isset($record['extra']['line'])) { - $message->setLine($record['extra']['line']); - unset($record['extra']['line']); - } - if (isset($record['extra']['file'])) { - $message->setFile($record['extra']['file']); - unset($record['extra']['file']); - } - - foreach ($record['extra'] as $key => $val) { - $val = is_scalar($val) || null === $val ? $val : $this->toJson($val); - $len = strlen($this->extraPrefix . $key . $val); - if ($len > $this->maxLength) { - $message->setAdditional($this->extraPrefix . $key, substr($val, 0, $this->maxLength)); - break; - } - $message->setAdditional($this->extraPrefix . $key, $val); - } - - foreach ($record['context'] as $key => $val) { - $val = is_scalar($val) || null === $val ? $val : $this->toJson($val); - $len = strlen($this->contextPrefix . $key . $val); - if ($len > $this->maxLength) { - $message->setAdditional($this->contextPrefix . $key, substr($val, 0, $this->maxLength)); - break; - } - $message->setAdditional($this->contextPrefix . $key, $val); - } - - if (null === $message->getFile() && isset($record['context']['exception']['file'])) { - if (preg_match("/^(.+):([0-9]+)$/", $record['context']['exception']['file'], $matches)) { - $message->setFile($matches[1]); - $message->setLine($matches[2]); - } - } - - return $message; - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Formatter/HtmlFormatter.php b/source/vendor/monolog/monolog/src/Monolog/Formatter/HtmlFormatter.php deleted file mode 100644 index 9e8d2d0..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Formatter/HtmlFormatter.php +++ /dev/null @@ -1,142 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\Logger; -use Monolog\Utils; - -/** - * Formats incoming records into an HTML table - * - * This is especially useful for html email logging - * - * @author Tiago Brito - */ -class HtmlFormatter extends NormalizerFormatter -{ - /** - * Translates Monolog log levels to html color priorities. - */ - protected $logLevels = array( - Logger::DEBUG => '#cccccc', - Logger::INFO => '#468847', - Logger::NOTICE => '#3a87ad', - Logger::WARNING => '#c09853', - Logger::ERROR => '#f0ad4e', - Logger::CRITICAL => '#FF7708', - Logger::ALERT => '#C12A19', - Logger::EMERGENCY => '#000000', - ); - - /** - * @param string $dateFormat The format of the timestamp: one supported by DateTime::format - */ - public function __construct($dateFormat = null) - { - parent::__construct($dateFormat); - } - - /** - * Creates an HTML table row - * - * @param string $th Row header content - * @param string $td Row standard cell content - * @param bool $escapeTd false if td content must not be html escaped - * @return string - */ - protected function addRow($th, $td = ' ', $escapeTd = true) - { - $th = htmlspecialchars($th, ENT_NOQUOTES, 'UTF-8'); - if ($escapeTd) { - $td = '
        '.htmlspecialchars($td, ENT_NOQUOTES, 'UTF-8').'
        '; - } - - return "\n$th:\n".$td."\n"; - } - - /** - * Create a HTML h1 tag - * - * @param string $title Text to be in the h1 - * @param int $level Error level - * @return string - */ - protected function addTitle($title, $level) - { - $title = htmlspecialchars($title, ENT_NOQUOTES, 'UTF-8'); - - return '

        '.$title.'

        '; - } - - /** - * Formats a log record. - * - * @param array $record A record to format - * @return mixed The formatted record - */ - public function format(array $record) - { - $output = $this->addTitle($record['level_name'], $record['level']); - $output .= ''; - - $output .= $this->addRow('Message', (string) $record['message']); - $output .= $this->addRow('Time', $record['datetime']->format($this->dateFormat)); - $output .= $this->addRow('Channel', $record['channel']); - if ($record['context']) { - $embeddedTable = '
        '; - foreach ($record['context'] as $key => $value) { - $embeddedTable .= $this->addRow($key, $this->convertToString($value)); - } - $embeddedTable .= '
        '; - $output .= $this->addRow('Context', $embeddedTable, false); - } - if ($record['extra']) { - $embeddedTable = ''; - foreach ($record['extra'] as $key => $value) { - $embeddedTable .= $this->addRow($key, $this->convertToString($value)); - } - $embeddedTable .= '
        '; - $output .= $this->addRow('Extra', $embeddedTable, false); - } - - return $output.''; - } - - /** - * Formats a set of log records. - * - * @param array $records A set of records to format - * @return mixed The formatted set of records - */ - public function formatBatch(array $records) - { - $message = ''; - foreach ($records as $record) { - $message .= $this->format($record); - } - - return $message; - } - - protected function convertToString($data) - { - if (null === $data || is_scalar($data)) { - return (string) $data; - } - - $data = $this->normalize($data); - if (version_compare(PHP_VERSION, '5.4.0', '>=')) { - return Utils::jsonEncode($data, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE, true); - } - - return str_replace('\\/', '/', Utils::jsonEncode($data, null, true)); - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php b/source/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php deleted file mode 100644 index 86966b0..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php +++ /dev/null @@ -1,212 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Exception; -use Monolog\Utils; -use Throwable; - -/** - * Encodes whatever record data is passed to it as json - * - * This can be useful to log to databases or remote APIs - * - * @author Jordi Boggiano - */ -class JsonFormatter extends NormalizerFormatter -{ - const BATCH_MODE_JSON = 1; - const BATCH_MODE_NEWLINES = 2; - - protected $batchMode; - protected $appendNewline; - - /** - * @var bool - */ - protected $includeStacktraces = false; - - /** - * @param int $batchMode - * @param bool $appendNewline - */ - public function __construct($batchMode = self::BATCH_MODE_JSON, $appendNewline = true) - { - $this->batchMode = $batchMode; - $this->appendNewline = $appendNewline; - } - - /** - * The batch mode option configures the formatting style for - * multiple records. By default, multiple records will be - * formatted as a JSON-encoded array. However, for - * compatibility with some API endpoints, alternative styles - * are available. - * - * @return int - */ - public function getBatchMode() - { - return $this->batchMode; - } - - /** - * True if newlines are appended to every formatted record - * - * @return bool - */ - public function isAppendingNewlines() - { - return $this->appendNewline; - } - - /** - * {@inheritdoc} - */ - public function format(array $record) - { - return $this->toJson($this->normalize($record), true) . ($this->appendNewline ? "\n" : ''); - } - - /** - * {@inheritdoc} - */ - public function formatBatch(array $records) - { - switch ($this->batchMode) { - case static::BATCH_MODE_NEWLINES: - return $this->formatBatchNewlines($records); - - case static::BATCH_MODE_JSON: - default: - return $this->formatBatchJson($records); - } - } - - /** - * @param bool $include - */ - public function includeStacktraces($include = true) - { - $this->includeStacktraces = $include; - } - - /** - * Return a JSON-encoded array of records. - * - * @param array $records - * @return string - */ - protected function formatBatchJson(array $records) - { - return $this->toJson($this->normalize($records), true); - } - - /** - * Use new lines to separate records instead of a - * JSON-encoded array. - * - * @param array $records - * @return string - */ - protected function formatBatchNewlines(array $records) - { - $instance = $this; - - $oldNewline = $this->appendNewline; - $this->appendNewline = false; - array_walk($records, function (&$value, $key) use ($instance) { - $value = $instance->format($value); - }); - $this->appendNewline = $oldNewline; - - return implode("\n", $records); - } - - /** - * Normalizes given $data. - * - * @param mixed $data - * - * @return mixed - */ - protected function normalize($data, $depth = 0) - { - if ($depth > 9) { - return 'Over 9 levels deep, aborting normalization'; - } - - if (is_array($data)) { - $normalized = array(); - - $count = 1; - foreach ($data as $key => $value) { - if ($count++ > 1000) { - $normalized['...'] = 'Over 1000 items ('.count($data).' total), aborting normalization'; - break; - } - - $normalized[$key] = $this->normalize($value, $depth+1); - } - - return $normalized; - } - - if ($data instanceof Exception || $data instanceof Throwable) { - return $this->normalizeException($data); - } - - if (is_resource($data)) { - return parent::normalize($data); - } - - return $data; - } - - /** - * Normalizes given exception with or without its own stack trace based on - * `includeStacktraces` property. - * - * @param Exception|Throwable $e - * - * @return array - */ - protected function normalizeException($e) - { - // TODO 2.0 only check for Throwable - if (!$e instanceof Exception && !$e instanceof Throwable) { - throw new \InvalidArgumentException('Exception/Throwable expected, got '.gettype($e).' / '.Utils::getClass($e)); - } - - $data = array( - 'class' => Utils::getClass($e), - 'message' => $e->getMessage(), - 'code' => (int) $e->getCode(), - 'file' => $e->getFile().':'.$e->getLine(), - ); - - if ($this->includeStacktraces) { - $trace = $e->getTrace(); - foreach ($trace as $frame) { - if (isset($frame['file'])) { - $data['trace'][] = $frame['file'].':'.$frame['line']; - } - } - } - - if ($previous = $e->getPrevious()) { - $data['previous'] = $this->normalizeException($previous); - } - - return $data; - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php b/source/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php deleted file mode 100644 index acc1fd3..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php +++ /dev/null @@ -1,181 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\Utils; - -/** - * Formats incoming records into a one-line string - * - * This is especially useful for logging to files - * - * @author Jordi Boggiano - * @author Christophe Coevoet - */ -class LineFormatter extends NormalizerFormatter -{ - const SIMPLE_FORMAT = "[%datetime%] %channel%.%level_name%: %message% %context% %extra%\n"; - - protected $format; - protected $allowInlineLineBreaks; - protected $ignoreEmptyContextAndExtra; - protected $includeStacktraces; - - /** - * @param string $format The format of the message - * @param string $dateFormat The format of the timestamp: one supported by DateTime::format - * @param bool $allowInlineLineBreaks Whether to allow inline line breaks in log entries - * @param bool $ignoreEmptyContextAndExtra - */ - public function __construct($format = null, $dateFormat = null, $allowInlineLineBreaks = false, $ignoreEmptyContextAndExtra = false) - { - $this->format = $format ?: static::SIMPLE_FORMAT; - $this->allowInlineLineBreaks = $allowInlineLineBreaks; - $this->ignoreEmptyContextAndExtra = $ignoreEmptyContextAndExtra; - parent::__construct($dateFormat); - } - - public function includeStacktraces($include = true) - { - $this->includeStacktraces = $include; - if ($this->includeStacktraces) { - $this->allowInlineLineBreaks = true; - } - } - - public function allowInlineLineBreaks($allow = true) - { - $this->allowInlineLineBreaks = $allow; - } - - public function ignoreEmptyContextAndExtra($ignore = true) - { - $this->ignoreEmptyContextAndExtra = $ignore; - } - - /** - * {@inheritdoc} - */ - public function format(array $record) - { - $vars = parent::format($record); - - $output = $this->format; - - foreach ($vars['extra'] as $var => $val) { - if (false !== strpos($output, '%extra.'.$var.'%')) { - $output = str_replace('%extra.'.$var.'%', $this->stringify($val), $output); - unset($vars['extra'][$var]); - } - } - - - foreach ($vars['context'] as $var => $val) { - if (false !== strpos($output, '%context.'.$var.'%')) { - $output = str_replace('%context.'.$var.'%', $this->stringify($val), $output); - unset($vars['context'][$var]); - } - } - - if ($this->ignoreEmptyContextAndExtra) { - if (empty($vars['context'])) { - unset($vars['context']); - $output = str_replace('%context%', '', $output); - } - - if (empty($vars['extra'])) { - unset($vars['extra']); - $output = str_replace('%extra%', '', $output); - } - } - - foreach ($vars as $var => $val) { - if (false !== strpos($output, '%'.$var.'%')) { - $output = str_replace('%'.$var.'%', $this->stringify($val), $output); - } - } - - // remove leftover %extra.xxx% and %context.xxx% if any - if (false !== strpos($output, '%')) { - $output = preg_replace('/%(?:extra|context)\..+?%/', '', $output); - } - - return $output; - } - - public function formatBatch(array $records) - { - $message = ''; - foreach ($records as $record) { - $message .= $this->format($record); - } - - return $message; - } - - public function stringify($value) - { - return $this->replaceNewlines($this->convertToString($value)); - } - - protected function normalizeException($e) - { - // TODO 2.0 only check for Throwable - if (!$e instanceof \Exception && !$e instanceof \Throwable) { - throw new \InvalidArgumentException('Exception/Throwable expected, got '.gettype($e).' / '.Utils::getClass($e)); - } - - $previousText = ''; - if ($previous = $e->getPrevious()) { - do { - $previousText .= ', '.Utils::getClass($previous).'(code: '.$previous->getCode().'): '.$previous->getMessage().' at '.$previous->getFile().':'.$previous->getLine(); - } while ($previous = $previous->getPrevious()); - } - - $str = '[object] ('.Utils::getClass($e).'(code: '.$e->getCode().'): '.$e->getMessage().' at '.$e->getFile().':'.$e->getLine().$previousText.')'; - if ($this->includeStacktraces) { - $str .= "\n[stacktrace]\n".$e->getTraceAsString()."\n"; - } - - return $str; - } - - protected function convertToString($data) - { - if (null === $data || is_bool($data)) { - return var_export($data, true); - } - - if (is_scalar($data)) { - return (string) $data; - } - - if (version_compare(PHP_VERSION, '5.4.0', '>=')) { - return $this->toJson($data, true); - } - - return str_replace('\\/', '/', $this->toJson($data, true)); - } - - protected function replaceNewlines($str) - { - if ($this->allowInlineLineBreaks) { - if (0 === strpos($str, '{')) { - return str_replace(array('\r', '\n'), array("\r", "\n"), $str); - } - - return $str; - } - - return str_replace(array("\r\n", "\r", "\n"), ' ', $str); - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Formatter/LogglyFormatter.php b/source/vendor/monolog/monolog/src/Monolog/Formatter/LogglyFormatter.php deleted file mode 100644 index 401859b..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Formatter/LogglyFormatter.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -/** - * Encodes message information into JSON in a format compatible with Loggly. - * - * @author Adam Pancutt - */ -class LogglyFormatter extends JsonFormatter -{ - /** - * Overrides the default batch mode to new lines for compatibility with the - * Loggly bulk API. - * - * @param int $batchMode - */ - public function __construct($batchMode = self::BATCH_MODE_NEWLINES, $appendNewline = false) - { - parent::__construct($batchMode, $appendNewline); - } - - /** - * Appends the 'timestamp' parameter for indexing by Loggly. - * - * @see https://www.loggly.com/docs/automated-parsing/#json - * @see \Monolog\Formatter\JsonFormatter::format() - */ - public function format(array $record) - { - if (isset($record["datetime"]) && ($record["datetime"] instanceof \DateTime)) { - $record["timestamp"] = $record["datetime"]->format("Y-m-d\TH:i:s.uO"); - // TODO 2.0 unset the 'datetime' parameter, retained for BC - } - - return parent::format($record); - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Formatter/LogstashFormatter.php b/source/vendor/monolog/monolog/src/Monolog/Formatter/LogstashFormatter.php deleted file mode 100644 index 8f83bec..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Formatter/LogstashFormatter.php +++ /dev/null @@ -1,166 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -/** - * Serializes a log message to Logstash Event Format - * - * @see http://logstash.net/ - * @see https://github.com/logstash/logstash/blob/master/lib/logstash/event.rb - * - * @author Tim Mower - */ -class LogstashFormatter extends NormalizerFormatter -{ - const V0 = 0; - const V1 = 1; - - /** - * @var string the name of the system for the Logstash log message, used to fill the @source field - */ - protected $systemName; - - /** - * @var string an application name for the Logstash log message, used to fill the @type field - */ - protected $applicationName; - - /** - * @var string a prefix for 'extra' fields from the Monolog record (optional) - */ - protected $extraPrefix; - - /** - * @var string a prefix for 'context' fields from the Monolog record (optional) - */ - protected $contextPrefix; - - /** - * @var int logstash format version to use - */ - protected $version; - - /** - * @param string $applicationName the application that sends the data, used as the "type" field of logstash - * @param string $systemName the system/machine name, used as the "source" field of logstash, defaults to the hostname of the machine - * @param string $extraPrefix prefix for extra keys inside logstash "fields" - * @param string $contextPrefix prefix for context keys inside logstash "fields", defaults to ctxt_ - * @param int $version the logstash format version to use, defaults to 0 - */ - public function __construct($applicationName, $systemName = null, $extraPrefix = null, $contextPrefix = 'ctxt_', $version = self::V0) - { - // logstash requires a ISO 8601 format date with optional millisecond precision. - parent::__construct('Y-m-d\TH:i:s.uP'); - - $this->systemName = $systemName ?: gethostname(); - $this->applicationName = $applicationName; - $this->extraPrefix = $extraPrefix; - $this->contextPrefix = $contextPrefix; - $this->version = $version; - } - - /** - * {@inheritdoc} - */ - public function format(array $record) - { - $record = parent::format($record); - - if ($this->version === self::V1) { - $message = $this->formatV1($record); - } else { - $message = $this->formatV0($record); - } - - return $this->toJson($message) . "\n"; - } - - protected function formatV0(array $record) - { - if (empty($record['datetime'])) { - $record['datetime'] = gmdate('c'); - } - $message = array( - '@timestamp' => $record['datetime'], - '@source' => $this->systemName, - '@fields' => array(), - ); - if (isset($record['message'])) { - $message['@message'] = $record['message']; - } - if (isset($record['channel'])) { - $message['@tags'] = array($record['channel']); - $message['@fields']['channel'] = $record['channel']; - } - if (isset($record['level'])) { - $message['@fields']['level'] = $record['level']; - } - if ($this->applicationName) { - $message['@type'] = $this->applicationName; - } - if (isset($record['extra']['server'])) { - $message['@source_host'] = $record['extra']['server']; - } - if (isset($record['extra']['url'])) { - $message['@source_path'] = $record['extra']['url']; - } - if (!empty($record['extra'])) { - foreach ($record['extra'] as $key => $val) { - $message['@fields'][$this->extraPrefix . $key] = $val; - } - } - if (!empty($record['context'])) { - foreach ($record['context'] as $key => $val) { - $message['@fields'][$this->contextPrefix . $key] = $val; - } - } - - return $message; - } - - protected function formatV1(array $record) - { - if (empty($record['datetime'])) { - $record['datetime'] = gmdate('c'); - } - $message = array( - '@timestamp' => $record['datetime'], - '@version' => 1, - 'host' => $this->systemName, - ); - if (isset($record['message'])) { - $message['message'] = $record['message']; - } - if (isset($record['channel'])) { - $message['type'] = $record['channel']; - $message['channel'] = $record['channel']; - } - if (isset($record['level_name'])) { - $message['level'] = $record['level_name']; - } - if ($this->applicationName) { - $message['type'] = $this->applicationName; - } - if (!empty($record['extra'])) { - foreach ($record['extra'] as $key => $val) { - $message[$this->extraPrefix . $key] = $val; - } - } - if (!empty($record['context'])) { - foreach ($record['context'] as $key => $val) { - $message[$this->contextPrefix . $key] = $val; - } - } - - return $message; - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Formatter/MongoDBFormatter.php b/source/vendor/monolog/monolog/src/Monolog/Formatter/MongoDBFormatter.php deleted file mode 100644 index bd9e4c0..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Formatter/MongoDBFormatter.php +++ /dev/null @@ -1,107 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\Utils; - -/** - * Formats a record for use with the MongoDBHandler. - * - * @author Florian Plattner - */ -class MongoDBFormatter implements FormatterInterface -{ - private $exceptionTraceAsString; - private $maxNestingLevel; - - /** - * @param int $maxNestingLevel 0 means infinite nesting, the $record itself is level 1, $record['context'] is 2 - * @param bool $exceptionTraceAsString set to false to log exception traces as a sub documents instead of strings - */ - public function __construct($maxNestingLevel = 3, $exceptionTraceAsString = true) - { - $this->maxNestingLevel = max($maxNestingLevel, 0); - $this->exceptionTraceAsString = (bool) $exceptionTraceAsString; - } - - /** - * {@inheritDoc} - */ - public function format(array $record) - { - return $this->formatArray($record); - } - - /** - * {@inheritDoc} - */ - public function formatBatch(array $records) - { - foreach ($records as $key => $record) { - $records[$key] = $this->format($record); - } - - return $records; - } - - protected function formatArray(array $record, $nestingLevel = 0) - { - if ($this->maxNestingLevel == 0 || $nestingLevel <= $this->maxNestingLevel) { - foreach ($record as $name => $value) { - if ($value instanceof \DateTime) { - $record[$name] = $this->formatDate($value, $nestingLevel + 1); - } elseif ($value instanceof \Exception) { - $record[$name] = $this->formatException($value, $nestingLevel + 1); - } elseif (is_array($value)) { - $record[$name] = $this->formatArray($value, $nestingLevel + 1); - } elseif (is_object($value)) { - $record[$name] = $this->formatObject($value, $nestingLevel + 1); - } - } - } else { - $record = '[...]'; - } - - return $record; - } - - protected function formatObject($value, $nestingLevel) - { - $objectVars = get_object_vars($value); - $objectVars['class'] = Utils::getClass($value); - - return $this->formatArray($objectVars, $nestingLevel); - } - - protected function formatException(\Exception $exception, $nestingLevel) - { - $formattedException = array( - 'class' => Utils::getClass($exception), - 'message' => $exception->getMessage(), - 'code' => (int) $exception->getCode(), - 'file' => $exception->getFile() . ':' . $exception->getLine(), - ); - - if ($this->exceptionTraceAsString === true) { - $formattedException['trace'] = $exception->getTraceAsString(); - } else { - $formattedException['trace'] = $exception->getTrace(); - } - - return $this->formatArray($formattedException, $nestingLevel); - } - - protected function formatDate(\DateTime $value, $nestingLevel) - { - return new \MongoDate($value->getTimestamp()); - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php b/source/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php deleted file mode 100644 index 3a01f2c..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php +++ /dev/null @@ -1,180 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Exception; -use Monolog\Utils; - -/** - * Normalizes incoming records to remove objects/resources so it's easier to dump to various targets - * - * @author Jordi Boggiano - */ -class NormalizerFormatter implements FormatterInterface -{ - const SIMPLE_DATE = "Y-m-d H:i:s"; - - protected $dateFormat; - - /** - * @param string $dateFormat The format of the timestamp: one supported by DateTime::format - */ - public function __construct($dateFormat = null) - { - $this->dateFormat = $dateFormat ?: static::SIMPLE_DATE; - if (!function_exists('json_encode')) { - throw new \RuntimeException('PHP\'s json extension is required to use Monolog\'s NormalizerFormatter'); - } - } - - /** - * {@inheritdoc} - */ - public function format(array $record) - { - return $this->normalize($record); - } - - /** - * {@inheritdoc} - */ - public function formatBatch(array $records) - { - foreach ($records as $key => $record) { - $records[$key] = $this->format($record); - } - - return $records; - } - - protected function normalize($data, $depth = 0) - { - if ($depth > 9) { - return 'Over 9 levels deep, aborting normalization'; - } - - if (null === $data || is_scalar($data)) { - if (is_float($data)) { - if (is_infinite($data)) { - return ($data > 0 ? '' : '-') . 'INF'; - } - if (is_nan($data)) { - return 'NaN'; - } - } - - return $data; - } - - if (is_array($data)) { - $normalized = array(); - - $count = 1; - foreach ($data as $key => $value) { - if ($count++ > 1000) { - $normalized['...'] = 'Over 1000 items ('.count($data).' total), aborting normalization'; - break; - } - - $normalized[$key] = $this->normalize($value, $depth+1); - } - - return $normalized; - } - - if ($data instanceof \DateTime) { - return $data->format($this->dateFormat); - } - - if (is_object($data)) { - // TODO 2.0 only check for Throwable - if ($data instanceof Exception || (PHP_VERSION_ID > 70000 && $data instanceof \Throwable)) { - return $this->normalizeException($data); - } - - // non-serializable objects that implement __toString stringified - if (method_exists($data, '__toString') && !$data instanceof \JsonSerializable) { - $value = $data->__toString(); - } else { - // the rest is json-serialized in some way - $value = $this->toJson($data, true); - } - - return sprintf("[object] (%s: %s)", Utils::getClass($data), $value); - } - - if (is_resource($data)) { - return sprintf('[resource] (%s)', get_resource_type($data)); - } - - return '[unknown('.gettype($data).')]'; - } - - protected function normalizeException($e) - { - // TODO 2.0 only check for Throwable - if (!$e instanceof Exception && !$e instanceof \Throwable) { - throw new \InvalidArgumentException('Exception/Throwable expected, got '.gettype($e).' / '.Utils::getClass($e)); - } - - $data = array( - 'class' => Utils::getClass($e), - 'message' => $e->getMessage(), - 'code' => (int) $e->getCode(), - 'file' => $e->getFile().':'.$e->getLine(), - ); - - if ($e instanceof \SoapFault) { - if (isset($e->faultcode)) { - $data['faultcode'] = $e->faultcode; - } - - if (isset($e->faultactor)) { - $data['faultactor'] = $e->faultactor; - } - - if (isset($e->detail)) { - if (is_string($e->detail)) { - $data['detail'] = $e->detail; - } elseif (is_object($e->detail) || is_array($e->detail)) { - $data['detail'] = $this->toJson($e->detail, true); - } - } - } - - $trace = $e->getTrace(); - foreach ($trace as $frame) { - if (isset($frame['file'])) { - $data['trace'][] = $frame['file'].':'.$frame['line']; - } - } - - if ($previous = $e->getPrevious()) { - $data['previous'] = $this->normalizeException($previous); - } - - return $data; - } - - /** - * Return the JSON representation of a value - * - * @param mixed $data - * @param bool $ignoreErrors - * @throws \RuntimeException if encoding fails and errors are not ignored - * @return string - */ - protected function toJson($data, $ignoreErrors = false) - { - return Utils::jsonEncode($data, null, $ignoreErrors); - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Formatter/ScalarFormatter.php b/source/vendor/monolog/monolog/src/Monolog/Formatter/ScalarFormatter.php deleted file mode 100644 index 5d345d5..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Formatter/ScalarFormatter.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -/** - * Formats data into an associative array of scalar values. - * Objects and arrays will be JSON encoded. - * - * @author Andrew Lawson - */ -class ScalarFormatter extends NormalizerFormatter -{ - /** - * {@inheritdoc} - */ - public function format(array $record) - { - foreach ($record as $key => $value) { - $record[$key] = $this->normalizeValue($value); - } - - return $record; - } - - /** - * @param mixed $value - * @return mixed - */ - protected function normalizeValue($value) - { - $normalized = $this->normalize($value); - - if (is_array($normalized) || is_object($normalized)) { - return $this->toJson($normalized, true); - } - - return $normalized; - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php b/source/vendor/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php deleted file mode 100644 index 65dba99..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php +++ /dev/null @@ -1,113 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\Logger; - -/** - * Serializes a log message according to Wildfire's header requirements - * - * @author Eric Clemmons (@ericclemmons) - * @author Christophe Coevoet - * @author Kirill chEbba Chebunin - */ -class WildfireFormatter extends NormalizerFormatter -{ - const TABLE = 'table'; - - /** - * Translates Monolog log levels to Wildfire levels. - */ - private $logLevels = array( - Logger::DEBUG => 'LOG', - Logger::INFO => 'INFO', - Logger::NOTICE => 'INFO', - Logger::WARNING => 'WARN', - Logger::ERROR => 'ERROR', - Logger::CRITICAL => 'ERROR', - Logger::ALERT => 'ERROR', - Logger::EMERGENCY => 'ERROR', - ); - - /** - * {@inheritdoc} - */ - public function format(array $record) - { - // Retrieve the line and file if set and remove them from the formatted extra - $file = $line = ''; - if (isset($record['extra']['file'])) { - $file = $record['extra']['file']; - unset($record['extra']['file']); - } - if (isset($record['extra']['line'])) { - $line = $record['extra']['line']; - unset($record['extra']['line']); - } - - $record = $this->normalize($record); - $message = array('message' => $record['message']); - $handleError = false; - if ($record['context']) { - $message['context'] = $record['context']; - $handleError = true; - } - if ($record['extra']) { - $message['extra'] = $record['extra']; - $handleError = true; - } - if (count($message) === 1) { - $message = reset($message); - } - - if (isset($record['context'][self::TABLE])) { - $type = 'TABLE'; - $label = $record['channel'] .': '. $record['message']; - $message = $record['context'][self::TABLE]; - } else { - $type = $this->logLevels[$record['level']]; - $label = $record['channel']; - } - - // Create JSON object describing the appearance of the message in the console - $json = $this->toJson(array( - array( - 'Type' => $type, - 'File' => $file, - 'Line' => $line, - 'Label' => $label, - ), - $message, - ), $handleError); - - // The message itself is a serialization of the above JSON object + it's length - return sprintf( - '%s|%s|', - strlen($json), - $json - ); - } - - public function formatBatch(array $records) - { - throw new \BadMethodCallException('Batch formatting does not make sense for the WildfireFormatter'); - } - - protected function normalize($data, $depth = 0) - { - if (is_object($data) && !$data instanceof \DateTime) { - return $data; - } - - return parent::normalize($data, $depth); - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php deleted file mode 100644 index cdd9f7d..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php +++ /dev/null @@ -1,196 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\LineFormatter; -use Monolog\Logger; -use Monolog\ResettableInterface; - -/** - * Base Handler class providing the Handler structure - * - * @author Jordi Boggiano - */ -abstract class AbstractHandler implements HandlerInterface, ResettableInterface -{ - protected $level = Logger::DEBUG; - protected $bubble = true; - - /** - * @var FormatterInterface - */ - protected $formatter; - protected $processors = array(); - - /** - * @param int|string $level The minimum logging level at which this handler will be triggered - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - */ - public function __construct($level = Logger::DEBUG, $bubble = true) - { - $this->setLevel($level); - $this->bubble = $bubble; - } - - /** - * {@inheritdoc} - */ - public function isHandling(array $record) - { - return $record['level'] >= $this->level; - } - - /** - * {@inheritdoc} - */ - public function handleBatch(array $records) - { - foreach ($records as $record) { - $this->handle($record); - } - } - - /** - * Closes the handler. - * - * This will be called automatically when the object is destroyed - */ - public function close() - { - } - - /** - * {@inheritdoc} - */ - public function pushProcessor($callback) - { - if (!is_callable($callback)) { - throw new \InvalidArgumentException('Processors must be valid callables (callback or object with an __invoke method), '.var_export($callback, true).' given'); - } - array_unshift($this->processors, $callback); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function popProcessor() - { - if (!$this->processors) { - throw new \LogicException('You tried to pop from an empty processor stack.'); - } - - return array_shift($this->processors); - } - - /** - * {@inheritdoc} - */ - public function setFormatter(FormatterInterface $formatter) - { - $this->formatter = $formatter; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function getFormatter() - { - if (!$this->formatter) { - $this->formatter = $this->getDefaultFormatter(); - } - - return $this->formatter; - } - - /** - * Sets minimum logging level at which this handler will be triggered. - * - * @param int|string $level Level or level name - * @return self - */ - public function setLevel($level) - { - $this->level = Logger::toMonologLevel($level); - - return $this; - } - - /** - * Gets minimum logging level at which this handler will be triggered. - * - * @return int - */ - public function getLevel() - { - return $this->level; - } - - /** - * Sets the bubbling behavior. - * - * @param bool $bubble true means that this handler allows bubbling. - * false means that bubbling is not permitted. - * @return self - */ - public function setBubble($bubble) - { - $this->bubble = $bubble; - - return $this; - } - - /** - * Gets the bubbling behavior. - * - * @return bool true means that this handler allows bubbling. - * false means that bubbling is not permitted. - */ - public function getBubble() - { - return $this->bubble; - } - - public function __destruct() - { - try { - $this->close(); - } catch (\Exception $e) { - // do nothing - } catch (\Throwable $e) { - // do nothing - } - } - - public function reset() - { - foreach ($this->processors as $processor) { - if ($processor instanceof ResettableInterface) { - $processor->reset(); - } - } - } - - /** - * Gets the default formatter. - * - * @return FormatterInterface - */ - protected function getDefaultFormatter() - { - return new LineFormatter(); - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php deleted file mode 100644 index e1e8953..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\ResettableInterface; - -/** - * Base Handler class providing the Handler structure - * - * Classes extending it should (in most cases) only implement write($record) - * - * @author Jordi Boggiano - * @author Christophe Coevoet - */ -abstract class AbstractProcessingHandler extends AbstractHandler -{ - /** - * {@inheritdoc} - */ - public function handle(array $record) - { - if (!$this->isHandling($record)) { - return false; - } - - $record = $this->processRecord($record); - - $record['formatted'] = $this->getFormatter()->format($record); - - $this->write($record); - - return false === $this->bubble; - } - - /** - * Writes the record down to the log of the implementing handler - * - * @param array $record - * @return void - */ - abstract protected function write(array $record); - - /** - * Processes a record. - * - * @param array $record - * @return array - */ - protected function processRecord(array $record) - { - if ($this->processors) { - foreach ($this->processors as $processor) { - $record = call_user_func($processor, $record); - } - } - - return $record; - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/AbstractSyslogHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/AbstractSyslogHandler.php deleted file mode 100644 index 8c76aca..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/AbstractSyslogHandler.php +++ /dev/null @@ -1,101 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Formatter\LineFormatter; - -/** - * Common syslog functionality - */ -abstract class AbstractSyslogHandler extends AbstractProcessingHandler -{ - protected $facility; - - /** - * Translates Monolog log levels to syslog log priorities. - */ - protected $logLevels = array( - Logger::DEBUG => LOG_DEBUG, - Logger::INFO => LOG_INFO, - Logger::NOTICE => LOG_NOTICE, - Logger::WARNING => LOG_WARNING, - Logger::ERROR => LOG_ERR, - Logger::CRITICAL => LOG_CRIT, - Logger::ALERT => LOG_ALERT, - Logger::EMERGENCY => LOG_EMERG, - ); - - /** - * List of valid log facility names. - */ - protected $facilities = array( - 'auth' => LOG_AUTH, - 'authpriv' => LOG_AUTHPRIV, - 'cron' => LOG_CRON, - 'daemon' => LOG_DAEMON, - 'kern' => LOG_KERN, - 'lpr' => LOG_LPR, - 'mail' => LOG_MAIL, - 'news' => LOG_NEWS, - 'syslog' => LOG_SYSLOG, - 'user' => LOG_USER, - 'uucp' => LOG_UUCP, - ); - - /** - * @param mixed $facility - * @param int $level The minimum logging level at which this handler will be triggered - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - */ - public function __construct($facility = LOG_USER, $level = Logger::DEBUG, $bubble = true) - { - parent::__construct($level, $bubble); - - if (!defined('PHP_WINDOWS_VERSION_BUILD')) { - $this->facilities['local0'] = LOG_LOCAL0; - $this->facilities['local1'] = LOG_LOCAL1; - $this->facilities['local2'] = LOG_LOCAL2; - $this->facilities['local3'] = LOG_LOCAL3; - $this->facilities['local4'] = LOG_LOCAL4; - $this->facilities['local5'] = LOG_LOCAL5; - $this->facilities['local6'] = LOG_LOCAL6; - $this->facilities['local7'] = LOG_LOCAL7; - } else { - $this->facilities['local0'] = 128; // LOG_LOCAL0 - $this->facilities['local1'] = 136; // LOG_LOCAL1 - $this->facilities['local2'] = 144; // LOG_LOCAL2 - $this->facilities['local3'] = 152; // LOG_LOCAL3 - $this->facilities['local4'] = 160; // LOG_LOCAL4 - $this->facilities['local5'] = 168; // LOG_LOCAL5 - $this->facilities['local6'] = 176; // LOG_LOCAL6 - $this->facilities['local7'] = 184; // LOG_LOCAL7 - } - - // convert textual description of facility to syslog constant - if (array_key_exists(strtolower($facility), $this->facilities)) { - $facility = $this->facilities[strtolower($facility)]; - } elseif (!in_array($facility, array_values($this->facilities), true)) { - throw new \UnexpectedValueException('Unknown facility value "'.$facility.'" given'); - } - - $this->facility = $facility; - } - - /** - * {@inheritdoc} - */ - protected function getDefaultFormatter() - { - return new LineFormatter('%channel%.%level_name%: %message% %context% %extra%'); - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/AmqpHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/AmqpHandler.php deleted file mode 100644 index e5a46bc..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/AmqpHandler.php +++ /dev/null @@ -1,148 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Formatter\JsonFormatter; -use PhpAmqpLib\Message\AMQPMessage; -use PhpAmqpLib\Channel\AMQPChannel; -use AMQPExchange; - -class AmqpHandler extends AbstractProcessingHandler -{ - /** - * @var AMQPExchange|AMQPChannel $exchange - */ - protected $exchange; - - /** - * @var string - */ - protected $exchangeName; - - /** - * @param AMQPExchange|AMQPChannel $exchange AMQPExchange (php AMQP ext) or PHP AMQP lib channel, ready for use - * @param string $exchangeName - * @param int $level - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - */ - public function __construct($exchange, $exchangeName = 'log', $level = Logger::DEBUG, $bubble = true) - { - if ($exchange instanceof AMQPExchange) { - $exchange->setName($exchangeName); - } elseif ($exchange instanceof AMQPChannel) { - $this->exchangeName = $exchangeName; - } else { - throw new \InvalidArgumentException('PhpAmqpLib\Channel\AMQPChannel or AMQPExchange instance required'); - } - $this->exchange = $exchange; - - parent::__construct($level, $bubble); - } - - /** - * {@inheritDoc} - */ - protected function write(array $record) - { - $data = $record["formatted"]; - $routingKey = $this->getRoutingKey($record); - - if ($this->exchange instanceof AMQPExchange) { - $this->exchange->publish( - $data, - $routingKey, - 0, - array( - 'delivery_mode' => 2, - 'content_type' => 'application/json', - ) - ); - } else { - $this->exchange->basic_publish( - $this->createAmqpMessage($data), - $this->exchangeName, - $routingKey - ); - } - } - - /** - * {@inheritDoc} - */ - public function handleBatch(array $records) - { - if ($this->exchange instanceof AMQPExchange) { - parent::handleBatch($records); - - return; - } - - foreach ($records as $record) { - if (!$this->isHandling($record)) { - continue; - } - - $record = $this->processRecord($record); - $data = $this->getFormatter()->format($record); - - $this->exchange->batch_basic_publish( - $this->createAmqpMessage($data), - $this->exchangeName, - $this->getRoutingKey($record) - ); - } - - $this->exchange->publish_batch(); - } - - /** - * Gets the routing key for the AMQP exchange - * - * @param array $record - * @return string - */ - protected function getRoutingKey(array $record) - { - $routingKey = sprintf( - '%s.%s', - // TODO 2.0 remove substr call - substr($record['level_name'], 0, 4), - $record['channel'] - ); - - return strtolower($routingKey); - } - - /** - * @param string $data - * @return AMQPMessage - */ - private function createAmqpMessage($data) - { - return new AMQPMessage( - (string) $data, - array( - 'delivery_mode' => 2, - 'content_type' => 'application/json', - ) - ); - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter() - { - return new JsonFormatter(JsonFormatter::BATCH_MODE_JSON, false); - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php deleted file mode 100644 index 68feb48..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php +++ /dev/null @@ -1,241 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\LineFormatter; - -/** - * Handler sending logs to browser's javascript console with no browser extension required - * - * @author Olivier Poitrey - */ -class BrowserConsoleHandler extends AbstractProcessingHandler -{ - protected static $initialized = false; - protected static $records = array(); - - /** - * {@inheritDoc} - * - * Formatted output may contain some formatting markers to be transferred to `console.log` using the %c format. - * - * Example of formatted string: - * - * You can do [[blue text]]{color: blue} or [[green background]]{background-color: green; color: white} - */ - protected function getDefaultFormatter() - { - return new LineFormatter('[[%channel%]]{macro: autolabel} [[%level_name%]]{font-weight: bold} %message%'); - } - - /** - * {@inheritDoc} - */ - protected function write(array $record) - { - // Accumulate records - static::$records[] = $record; - - // Register shutdown handler if not already done - if (!static::$initialized) { - static::$initialized = true; - $this->registerShutdownFunction(); - } - } - - /** - * Convert records to javascript console commands and send it to the browser. - * This method is automatically called on PHP shutdown if output is HTML or Javascript. - */ - public static function send() - { - $format = static::getResponseFormat(); - if ($format === 'unknown') { - return; - } - - if (count(static::$records)) { - if ($format === 'html') { - static::writeOutput(''); - } elseif ($format === 'js') { - static::writeOutput(static::generateScript()); - } - static::resetStatic(); - } - } - - public function close() - { - self::resetStatic(); - } - - public function reset() - { - self::resetStatic(); - } - - /** - * Forget all logged records - */ - public static function resetStatic() - { - static::$records = array(); - } - - /** - * Wrapper for register_shutdown_function to allow overriding - */ - protected function registerShutdownFunction() - { - if (PHP_SAPI !== 'cli') { - register_shutdown_function(array('Monolog\Handler\BrowserConsoleHandler', 'send')); - } - } - - /** - * Wrapper for echo to allow overriding - * - * @param string $str - */ - protected static function writeOutput($str) - { - echo $str; - } - - /** - * Checks the format of the response - * - * If Content-Type is set to application/javascript or text/javascript -> js - * If Content-Type is set to text/html, or is unset -> html - * If Content-Type is anything else -> unknown - * - * @return string One of 'js', 'html' or 'unknown' - */ - protected static function getResponseFormat() - { - // Check content type - foreach (headers_list() as $header) { - if (stripos($header, 'content-type:') === 0) { - // This handler only works with HTML and javascript outputs - // text/javascript is obsolete in favour of application/javascript, but still used - if (stripos($header, 'application/javascript') !== false || stripos($header, 'text/javascript') !== false) { - return 'js'; - } - if (stripos($header, 'text/html') === false) { - return 'unknown'; - } - break; - } - } - - return 'html'; - } - - private static function generateScript() - { - $script = array(); - foreach (static::$records as $record) { - $context = static::dump('Context', $record['context']); - $extra = static::dump('Extra', $record['extra']); - - if (empty($context) && empty($extra)) { - $script[] = static::call_array('log', static::handleStyles($record['formatted'])); - } else { - $script = array_merge($script, - array(static::call_array('groupCollapsed', static::handleStyles($record['formatted']))), - $context, - $extra, - array(static::call('groupEnd')) - ); - } - } - - return "(function (c) {if (c && c.groupCollapsed) {\n" . implode("\n", $script) . "\n}})(console);"; - } - - private static function handleStyles($formatted) - { - $args = array(); - $format = '%c' . $formatted; - preg_match_all('/\[\[(.*?)\]\]\{([^}]*)\}/s', $format, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER); - - foreach (array_reverse($matches) as $match) { - $args[] = '"font-weight: normal"'; - $args[] = static::quote(static::handleCustomStyles($match[2][0], $match[1][0])); - - $pos = $match[0][1]; - $format = substr($format, 0, $pos) . '%c' . $match[1][0] . '%c' . substr($format, $pos + strlen($match[0][0])); - } - - $args[] = static::quote('font-weight: normal'); - $args[] = static::quote($format); - - return array_reverse($args); - } - - private static function handleCustomStyles($style, $string) - { - static $colors = array('blue', 'green', 'red', 'magenta', 'orange', 'black', 'grey'); - static $labels = array(); - - return preg_replace_callback('/macro\s*:(.*?)(?:;|$)/', function ($m) use ($string, &$colors, &$labels) { - if (trim($m[1]) === 'autolabel') { - // Format the string as a label with consistent auto assigned background color - if (!isset($labels[$string])) { - $labels[$string] = $colors[count($labels) % count($colors)]; - } - $color = $labels[$string]; - - return "background-color: $color; color: white; border-radius: 3px; padding: 0 2px 0 2px"; - } - - return $m[1]; - }, $style); - } - - private static function dump($title, array $dict) - { - $script = array(); - $dict = array_filter($dict); - if (empty($dict)) { - return $script; - } - $script[] = static::call('log', static::quote('%c%s'), static::quote('font-weight: bold'), static::quote($title)); - foreach ($dict as $key => $value) { - $value = json_encode($value); - if (empty($value)) { - $value = static::quote(''); - } - $script[] = static::call('log', static::quote('%s: %o'), static::quote($key), $value); - } - - return $script; - } - - private static function quote($arg) - { - return '"' . addcslashes($arg, "\"\n\\") . '"'; - } - - private static function call() - { - $args = func_get_args(); - $method = array_shift($args); - - return static::call_array($method, $args); - } - - private static function call_array($method, array $args) - { - return 'c.' . $method . '(' . implode(', ', $args) . ');'; - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php deleted file mode 100644 index 0957e55..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php +++ /dev/null @@ -1,148 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\ResettableInterface; -use Monolog\Formatter\FormatterInterface; - -/** - * Buffers all records until closing the handler and then pass them as batch. - * - * This is useful for a MailHandler to send only one mail per request instead of - * sending one per log message. - * - * @author Christophe Coevoet - */ -class BufferHandler extends AbstractHandler -{ - protected $handler; - protected $bufferSize = 0; - protected $bufferLimit; - protected $flushOnOverflow; - protected $buffer = array(); - protected $initialized = false; - - /** - * @param HandlerInterface $handler Handler. - * @param int $bufferLimit How many entries should be buffered at most, beyond that the oldest items are removed from the buffer. - * @param int $level The minimum logging level at which this handler will be triggered - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - * @param bool $flushOnOverflow If true, the buffer is flushed when the max size has been reached, by default oldest entries are discarded - */ - public function __construct(HandlerInterface $handler, $bufferLimit = 0, $level = Logger::DEBUG, $bubble = true, $flushOnOverflow = false) - { - parent::__construct($level, $bubble); - $this->handler = $handler; - $this->bufferLimit = (int) $bufferLimit; - $this->flushOnOverflow = $flushOnOverflow; - } - - /** - * {@inheritdoc} - */ - public function handle(array $record) - { - if ($record['level'] < $this->level) { - return false; - } - - if (!$this->initialized) { - // __destructor() doesn't get called on Fatal errors - register_shutdown_function(array($this, 'close')); - $this->initialized = true; - } - - if ($this->bufferLimit > 0 && $this->bufferSize === $this->bufferLimit) { - if ($this->flushOnOverflow) { - $this->flush(); - } else { - array_shift($this->buffer); - $this->bufferSize--; - } - } - - if ($this->processors) { - foreach ($this->processors as $processor) { - $record = call_user_func($processor, $record); - } - } - - $this->buffer[] = $record; - $this->bufferSize++; - - return false === $this->bubble; - } - - public function flush() - { - if ($this->bufferSize === 0) { - return; - } - - $this->handler->handleBatch($this->buffer); - $this->clear(); - } - - public function __destruct() - { - // suppress the parent behavior since we already have register_shutdown_function() - // to call close(), and the reference contained there will prevent this from being - // GC'd until the end of the request - } - - /** - * {@inheritdoc} - */ - public function close() - { - $this->flush(); - } - - /** - * Clears the buffer without flushing any messages down to the wrapped handler. - */ - public function clear() - { - $this->bufferSize = 0; - $this->buffer = array(); - } - - public function reset() - { - $this->flush(); - - parent::reset(); - - if ($this->handler instanceof ResettableInterface) { - $this->handler->reset(); - } - } - - /** - * {@inheritdoc} - */ - public function setFormatter(FormatterInterface $formatter) - { - $this->handler->setFormatter($formatter); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function getFormatter() - { - return $this->handler->getFormatter(); - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php deleted file mode 100644 index 47120e5..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php +++ /dev/null @@ -1,212 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\ChromePHPFormatter; -use Monolog\Logger; -use Monolog\Utils; - -/** - * Handler sending logs to the ChromePHP extension (http://www.chromephp.com/) - * - * This also works out of the box with Firefox 43+ - * - * @author Christophe Coevoet - */ -class ChromePHPHandler extends AbstractProcessingHandler -{ - /** - * Version of the extension - */ - const VERSION = '4.0'; - - /** - * Header name - */ - const HEADER_NAME = 'X-ChromeLogger-Data'; - - /** - * Regular expression to detect supported browsers (matches any Chrome, or Firefox 43+) - */ - const USER_AGENT_REGEX = '{\b(?:Chrome/\d+(?:\.\d+)*|HeadlessChrome|Firefox/(?:4[3-9]|[5-9]\d|\d{3,})(?:\.\d)*)\b}'; - - protected static $initialized = false; - - /** - * Tracks whether we sent too much data - * - * Chrome limits the headers to 4KB, so when we sent 3KB we stop sending - * - * @var bool - */ - protected static $overflowed = false; - - protected static $json = array( - 'version' => self::VERSION, - 'columns' => array('label', 'log', 'backtrace', 'type'), - 'rows' => array(), - ); - - protected static $sendHeaders = true; - - /** - * @param int $level The minimum logging level at which this handler will be triggered - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - */ - public function __construct($level = Logger::DEBUG, $bubble = true) - { - parent::__construct($level, $bubble); - if (!function_exists('json_encode')) { - throw new \RuntimeException('PHP\'s json extension is required to use Monolog\'s ChromePHPHandler'); - } - } - - /** - * {@inheritdoc} - */ - public function handleBatch(array $records) - { - $messages = array(); - - foreach ($records as $record) { - if ($record['level'] < $this->level) { - continue; - } - $messages[] = $this->processRecord($record); - } - - if (!empty($messages)) { - $messages = $this->getFormatter()->formatBatch($messages); - self::$json['rows'] = array_merge(self::$json['rows'], $messages); - $this->send(); - } - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter() - { - return new ChromePHPFormatter(); - } - - /** - * Creates & sends header for a record - * - * @see sendHeader() - * @see send() - * @param array $record - */ - protected function write(array $record) - { - self::$json['rows'][] = $record['formatted']; - - $this->send(); - } - - /** - * Sends the log header - * - * @see sendHeader() - */ - protected function send() - { - if (self::$overflowed || !self::$sendHeaders) { - return; - } - - if (!self::$initialized) { - self::$initialized = true; - - self::$sendHeaders = $this->headersAccepted(); - if (!self::$sendHeaders) { - return; - } - - self::$json['request_uri'] = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : ''; - } - - $json = Utils::jsonEncode(self::$json, null, true); - $data = base64_encode(utf8_encode($json)); - if (strlen($data) > 3 * 1024) { - self::$overflowed = true; - - $record = array( - 'message' => 'Incomplete logs, chrome header size limit reached', - 'context' => array(), - 'level' => Logger::WARNING, - 'level_name' => Logger::getLevelName(Logger::WARNING), - 'channel' => 'monolog', - 'datetime' => new \DateTime(), - 'extra' => array(), - ); - self::$json['rows'][count(self::$json['rows']) - 1] = $this->getFormatter()->format($record); - $json = Utils::jsonEncode(self::$json, null, true); - $data = base64_encode(utf8_encode($json)); - } - - if (trim($data) !== '') { - $this->sendHeader(self::HEADER_NAME, $data); - } - } - - /** - * Send header string to the client - * - * @param string $header - * @param string $content - */ - protected function sendHeader($header, $content) - { - if (!headers_sent() && self::$sendHeaders) { - header(sprintf('%s: %s', $header, $content)); - } - } - - /** - * Verifies if the headers are accepted by the current user agent - * - * @return bool - */ - protected function headersAccepted() - { - if (empty($_SERVER['HTTP_USER_AGENT'])) { - return false; - } - - return preg_match(self::USER_AGENT_REGEX, $_SERVER['HTTP_USER_AGENT']); - } - - /** - * BC getter for the sendHeaders property that has been made static - */ - public function __get($property) - { - if ('sendHeaders' !== $property) { - throw new \InvalidArgumentException('Undefined property '.$property); - } - - return static::$sendHeaders; - } - - /** - * BC setter for the sendHeaders property that has been made static - */ - public function __set($property, $value) - { - if ('sendHeaders' !== $property) { - throw new \InvalidArgumentException('Undefined property '.$property); - } - - static::$sendHeaders = $value; - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/CouchDBHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/CouchDBHandler.php deleted file mode 100644 index cc98697..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/CouchDBHandler.php +++ /dev/null @@ -1,72 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\JsonFormatter; -use Monolog\Logger; - -/** - * CouchDB handler - * - * @author Markus Bachmann - */ -class CouchDBHandler extends AbstractProcessingHandler -{ - private $options; - - public function __construct(array $options = array(), $level = Logger::DEBUG, $bubble = true) - { - $this->options = array_merge(array( - 'host' => 'localhost', - 'port' => 5984, - 'dbname' => 'logger', - 'username' => null, - 'password' => null, - ), $options); - - parent::__construct($level, $bubble); - } - - /** - * {@inheritDoc} - */ - protected function write(array $record) - { - $basicAuth = null; - if ($this->options['username']) { - $basicAuth = sprintf('%s:%s@', $this->options['username'], $this->options['password']); - } - - $url = 'http://'.$basicAuth.$this->options['host'].':'.$this->options['port'].'/'.$this->options['dbname']; - $context = stream_context_create(array( - 'http' => array( - 'method' => 'POST', - 'content' => $record['formatted'], - 'ignore_errors' => true, - 'max_redirects' => 0, - 'header' => 'Content-type: application/json', - ), - )); - - if (false === @file_get_contents($url, null, $context)) { - throw new \RuntimeException(sprintf('Could not connect to %s', $url)); - } - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter() - { - return new JsonFormatter(JsonFormatter::BATCH_MODE_JSON, false); - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/CubeHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/CubeHandler.php deleted file mode 100644 index 44928ef..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/CubeHandler.php +++ /dev/null @@ -1,152 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Utils; - -/** - * Logs to Cube. - * - * @link http://square.github.com/cube/ - * @author Wan Chen - */ -class CubeHandler extends AbstractProcessingHandler -{ - private $udpConnection; - private $httpConnection; - private $scheme; - private $host; - private $port; - private $acceptedSchemes = array('http', 'udp'); - - /** - * Create a Cube handler - * - * @throws \UnexpectedValueException when given url is not a valid url. - * A valid url must consist of three parts : protocol://host:port - * Only valid protocols used by Cube are http and udp - */ - public function __construct($url, $level = Logger::DEBUG, $bubble = true) - { - $urlInfo = parse_url($url); - - if (!isset($urlInfo['scheme'], $urlInfo['host'], $urlInfo['port'])) { - throw new \UnexpectedValueException('URL "'.$url.'" is not valid'); - } - - if (!in_array($urlInfo['scheme'], $this->acceptedSchemes)) { - throw new \UnexpectedValueException( - 'Invalid protocol (' . $urlInfo['scheme'] . ').' - . ' Valid options are ' . implode(', ', $this->acceptedSchemes)); - } - - $this->scheme = $urlInfo['scheme']; - $this->host = $urlInfo['host']; - $this->port = $urlInfo['port']; - - parent::__construct($level, $bubble); - } - - /** - * Establish a connection to an UDP socket - * - * @throws \LogicException when unable to connect to the socket - * @throws MissingExtensionException when there is no socket extension - */ - protected function connectUdp() - { - if (!extension_loaded('sockets')) { - throw new MissingExtensionException('The sockets extension is required to use udp URLs with the CubeHandler'); - } - - $this->udpConnection = socket_create(AF_INET, SOCK_DGRAM, 0); - if (!$this->udpConnection) { - throw new \LogicException('Unable to create a socket'); - } - - if (!socket_connect($this->udpConnection, $this->host, $this->port)) { - throw new \LogicException('Unable to connect to the socket at ' . $this->host . ':' . $this->port); - } - } - - /** - * Establish a connection to a http server - * @throws \LogicException when no curl extension - */ - protected function connectHttp() - { - if (!extension_loaded('curl')) { - throw new \LogicException('The curl extension is needed to use http URLs with the CubeHandler'); - } - - $this->httpConnection = curl_init('http://'.$this->host.':'.$this->port.'/1.0/event/put'); - - if (!$this->httpConnection) { - throw new \LogicException('Unable to connect to ' . $this->host . ':' . $this->port); - } - - curl_setopt($this->httpConnection, CURLOPT_CUSTOMREQUEST, "POST"); - curl_setopt($this->httpConnection, CURLOPT_RETURNTRANSFER, true); - } - - /** - * {@inheritdoc} - */ - protected function write(array $record) - { - $date = $record['datetime']; - - $data = array('time' => $date->format('Y-m-d\TH:i:s.uO')); - unset($record['datetime']); - - if (isset($record['context']['type'])) { - $data['type'] = $record['context']['type']; - unset($record['context']['type']); - } else { - $data['type'] = $record['channel']; - } - - $data['data'] = $record['context']; - $data['data']['level'] = $record['level']; - - if ($this->scheme === 'http') { - $this->writeHttp(Utils::jsonEncode($data)); - } else { - $this->writeUdp(Utils::jsonEncode($data)); - } - } - - private function writeUdp($data) - { - if (!$this->udpConnection) { - $this->connectUdp(); - } - - socket_send($this->udpConnection, $data, strlen($data), 0); - } - - private function writeHttp($data) - { - if (!$this->httpConnection) { - $this->connectHttp(); - } - - curl_setopt($this->httpConnection, CURLOPT_POSTFIELDS, '['.$data.']'); - curl_setopt($this->httpConnection, CURLOPT_HTTPHEADER, array( - 'Content-Type: application/json', - 'Content-Length: ' . strlen('['.$data.']'), - )); - - Curl\Util::execute($this->httpConnection, 5, false); - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/Curl/Util.php b/source/vendor/monolog/monolog/src/Monolog/Handler/Curl/Util.php deleted file mode 100644 index 48d30b3..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/Curl/Util.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler\Curl; - -class Util -{ - private static $retriableErrorCodes = array( - CURLE_COULDNT_RESOLVE_HOST, - CURLE_COULDNT_CONNECT, - CURLE_HTTP_NOT_FOUND, - CURLE_READ_ERROR, - CURLE_OPERATION_TIMEOUTED, - CURLE_HTTP_POST_ERROR, - CURLE_SSL_CONNECT_ERROR, - ); - - /** - * Executes a CURL request with optional retries and exception on failure - * - * @param resource $ch curl handler - * @throws \RuntimeException - */ - public static function execute($ch, $retries = 5, $closeAfterDone = true) - { - while ($retries--) { - if (curl_exec($ch) === false) { - $curlErrno = curl_errno($ch); - - if (false === in_array($curlErrno, self::$retriableErrorCodes, true) || !$retries) { - $curlError = curl_error($ch); - - if ($closeAfterDone) { - curl_close($ch); - } - - throw new \RuntimeException(sprintf('Curl error (code %s): %s', $curlErrno, $curlError)); - } - - continue; - } - - if ($closeAfterDone) { - curl_close($ch); - } - break; - } - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/DeduplicationHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/DeduplicationHandler.php deleted file mode 100644 index 35b55cb..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/DeduplicationHandler.php +++ /dev/null @@ -1,169 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; - -/** - * Simple handler wrapper that deduplicates log records across multiple requests - * - * It also includes the BufferHandler functionality and will buffer - * all messages until the end of the request or flush() is called. - * - * This works by storing all log records' messages above $deduplicationLevel - * to the file specified by $deduplicationStore. When further logs come in at the end of the - * request (or when flush() is called), all those above $deduplicationLevel are checked - * against the existing stored logs. If they match and the timestamps in the stored log is - * not older than $time seconds, the new log record is discarded. If no log record is new, the - * whole data set is discarded. - * - * This is mainly useful in combination with Mail handlers or things like Slack or HipChat handlers - * that send messages to people, to avoid spamming with the same message over and over in case of - * a major component failure like a database server being down which makes all requests fail in the - * same way. - * - * @author Jordi Boggiano - */ -class DeduplicationHandler extends BufferHandler -{ - /** - * @var string - */ - protected $deduplicationStore; - - /** - * @var int - */ - protected $deduplicationLevel; - - /** - * @var int - */ - protected $time; - - /** - * @var bool - */ - private $gc = false; - - /** - * @param HandlerInterface $handler Handler. - * @param string $deduplicationStore The file/path where the deduplication log should be kept - * @param int $deduplicationLevel The minimum logging level for log records to be looked at for deduplication purposes - * @param int $time The period (in seconds) during which duplicate entries should be suppressed after a given log is sent through - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - */ - public function __construct(HandlerInterface $handler, $deduplicationStore = null, $deduplicationLevel = Logger::ERROR, $time = 60, $bubble = true) - { - parent::__construct($handler, 0, Logger::DEBUG, $bubble, false); - - $this->deduplicationStore = $deduplicationStore === null ? sys_get_temp_dir() . '/monolog-dedup-' . substr(md5(__FILE__), 0, 20) .'.log' : $deduplicationStore; - $this->deduplicationLevel = Logger::toMonologLevel($deduplicationLevel); - $this->time = $time; - } - - public function flush() - { - if ($this->bufferSize === 0) { - return; - } - - $passthru = null; - - foreach ($this->buffer as $record) { - if ($record['level'] >= $this->deduplicationLevel) { - - $passthru = $passthru || !$this->isDuplicate($record); - if ($passthru) { - $this->appendRecord($record); - } - } - } - - // default of null is valid as well as if no record matches duplicationLevel we just pass through - if ($passthru === true || $passthru === null) { - $this->handler->handleBatch($this->buffer); - } - - $this->clear(); - - if ($this->gc) { - $this->collectLogs(); - } - } - - private function isDuplicate(array $record) - { - if (!file_exists($this->deduplicationStore)) { - return false; - } - - $store = file($this->deduplicationStore, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); - if (!is_array($store)) { - return false; - } - - $yesterday = time() - 86400; - $timestampValidity = $record['datetime']->getTimestamp() - $this->time; - $expectedMessage = preg_replace('{[\r\n].*}', '', $record['message']); - - for ($i = count($store) - 1; $i >= 0; $i--) { - list($timestamp, $level, $message) = explode(':', $store[$i], 3); - - if ($level === $record['level_name'] && $message === $expectedMessage && $timestamp > $timestampValidity) { - return true; - } - - if ($timestamp < $yesterday) { - $this->gc = true; - } - } - - return false; - } - - private function collectLogs() - { - if (!file_exists($this->deduplicationStore)) { - return false; - } - - $handle = fopen($this->deduplicationStore, 'rw+'); - flock($handle, LOCK_EX); - $validLogs = array(); - - $timestampValidity = time() - $this->time; - - while (!feof($handle)) { - $log = fgets($handle); - if (substr($log, 0, 10) >= $timestampValidity) { - $validLogs[] = $log; - } - } - - ftruncate($handle, 0); - rewind($handle); - foreach ($validLogs as $log) { - fwrite($handle, $log); - } - - flock($handle, LOCK_UN); - fclose($handle); - - $this->gc = false; - } - - private function appendRecord(array $record) - { - file_put_contents($this->deduplicationStore, $record['datetime']->getTimestamp() . ':' . $record['level_name'] . ':' . preg_replace('{[\r\n].*}', '', $record['message']) . "\n", FILE_APPEND); - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/DoctrineCouchDBHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/DoctrineCouchDBHandler.php deleted file mode 100644 index b91ffec..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/DoctrineCouchDBHandler.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Formatter\NormalizerFormatter; -use Doctrine\CouchDB\CouchDBClient; - -/** - * CouchDB handler for Doctrine CouchDB ODM - * - * @author Markus Bachmann - */ -class DoctrineCouchDBHandler extends AbstractProcessingHandler -{ - private $client; - - public function __construct(CouchDBClient $client, $level = Logger::DEBUG, $bubble = true) - { - $this->client = $client; - parent::__construct($level, $bubble); - } - - /** - * {@inheritDoc} - */ - protected function write(array $record) - { - $this->client->postDocument($record['formatted']); - } - - protected function getDefaultFormatter() - { - return new NormalizerFormatter; - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php deleted file mode 100644 index 8846e0a..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php +++ /dev/null @@ -1,108 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Aws\Sdk; -use Aws\DynamoDb\DynamoDbClient; -use Aws\DynamoDb\Marshaler; -use Monolog\Formatter\ScalarFormatter; -use Monolog\Logger; - -/** - * Amazon DynamoDB handler (http://aws.amazon.com/dynamodb/) - * - * @link https://github.com/aws/aws-sdk-php/ - * @author Andrew Lawson - */ -class DynamoDbHandler extends AbstractProcessingHandler -{ - const DATE_FORMAT = 'Y-m-d\TH:i:s.uO'; - - /** - * @var DynamoDbClient - */ - protected $client; - - /** - * @var string - */ - protected $table; - - /** - * @var int - */ - protected $version; - - /** - * @var Marshaler - */ - protected $marshaler; - - /** - * @param DynamoDbClient $client - * @param string $table - * @param int $level - * @param bool $bubble - */ - public function __construct(DynamoDbClient $client, $table, $level = Logger::DEBUG, $bubble = true) - { - if (defined('Aws\Sdk::VERSION') && version_compare(Sdk::VERSION, '3.0', '>=')) { - $this->version = 3; - $this->marshaler = new Marshaler; - } else { - $this->version = 2; - } - - $this->client = $client; - $this->table = $table; - - parent::__construct($level, $bubble); - } - - /** - * {@inheritdoc} - */ - protected function write(array $record) - { - $filtered = $this->filterEmptyFields($record['formatted']); - if ($this->version === 3) { - $formatted = $this->marshaler->marshalItem($filtered); - } else { - /** @phpstan-ignore-next-line */ - $formatted = $this->client->formatAttributes($filtered); - } - - $this->client->putItem(array( - 'TableName' => $this->table, - 'Item' => $formatted, - )); - } - - /** - * @param array $record - * @return array - */ - protected function filterEmptyFields(array $record) - { - return array_filter($record, function ($value) { - return !empty($value) || false === $value || 0 === $value; - }); - } - - /** - * {@inheritdoc} - */ - protected function getDefaultFormatter() - { - return new ScalarFormatter(self::DATE_FORMAT); - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/ElasticSearchHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/ElasticSearchHandler.php deleted file mode 100644 index bb0f83e..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/ElasticSearchHandler.php +++ /dev/null @@ -1,128 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\ElasticaFormatter; -use Monolog\Logger; -use Elastica\Client; -use Elastica\Exception\ExceptionInterface; - -/** - * Elastic Search handler - * - * Usage example: - * - * $client = new \Elastica\Client(); - * $options = array( - * 'index' => 'elastic_index_name', - * 'type' => 'elastic_doc_type', - * ); - * $handler = new ElasticSearchHandler($client, $options); - * $log = new Logger('application'); - * $log->pushHandler($handler); - * - * @author Jelle Vink - */ -class ElasticSearchHandler extends AbstractProcessingHandler -{ - /** - * @var Client - */ - protected $client; - - /** - * @var array Handler config options - */ - protected $options = array(); - - /** - * @param Client $client Elastica Client object - * @param array $options Handler configuration - * @param int $level The minimum logging level at which this handler will be triggered - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - */ - public function __construct(Client $client, array $options = array(), $level = Logger::DEBUG, $bubble = true) - { - parent::__construct($level, $bubble); - $this->client = $client; - $this->options = array_merge( - array( - 'index' => 'monolog', // Elastic index name - 'type' => 'record', // Elastic document type - 'ignore_error' => false, // Suppress Elastica exceptions - ), - $options - ); - } - - /** - * {@inheritDoc} - */ - protected function write(array $record) - { - $this->bulkSend(array($record['formatted'])); - } - - /** - * {@inheritdoc} - */ - public function setFormatter(FormatterInterface $formatter) - { - if ($formatter instanceof ElasticaFormatter) { - return parent::setFormatter($formatter); - } - throw new \InvalidArgumentException('ElasticSearchHandler is only compatible with ElasticaFormatter'); - } - - /** - * Getter options - * @return array - */ - public function getOptions() - { - return $this->options; - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter() - { - return new ElasticaFormatter($this->options['index'], $this->options['type']); - } - - /** - * {@inheritdoc} - */ - public function handleBatch(array $records) - { - $documents = $this->getFormatter()->formatBatch($records); - $this->bulkSend($documents); - } - - /** - * Use Elasticsearch bulk API to send list of documents - * @param array $documents - * @throws \RuntimeException - */ - protected function bulkSend(array $documents) - { - try { - $this->client->addDocuments($documents); - } catch (ExceptionInterface $e) { - if (!$this->options['ignore_error']) { - throw new \RuntimeException("Error sending messages to Elasticsearch", 0, $e); - } - } - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php deleted file mode 100644 index b2986b0..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php +++ /dev/null @@ -1,82 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\LineFormatter; -use Monolog\Logger; - -/** - * Stores to PHP error_log() handler. - * - * @author Elan Ruusamäe - */ -class ErrorLogHandler extends AbstractProcessingHandler -{ - const OPERATING_SYSTEM = 0; - const SAPI = 4; - - protected $messageType; - protected $expandNewlines; - - /** - * @param int $messageType Says where the error should go. - * @param int $level The minimum logging level at which this handler will be triggered - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - * @param bool $expandNewlines If set to true, newlines in the message will be expanded to be take multiple log entries - */ - public function __construct($messageType = self::OPERATING_SYSTEM, $level = Logger::DEBUG, $bubble = true, $expandNewlines = false) - { - parent::__construct($level, $bubble); - - if (false === in_array($messageType, self::getAvailableTypes())) { - $message = sprintf('The given message type "%s" is not supported', print_r($messageType, true)); - throw new \InvalidArgumentException($message); - } - - $this->messageType = $messageType; - $this->expandNewlines = $expandNewlines; - } - - /** - * @return array With all available types - */ - public static function getAvailableTypes() - { - return array( - self::OPERATING_SYSTEM, - self::SAPI, - ); - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter() - { - return new LineFormatter('[%datetime%] %channel%.%level_name%: %message% %context% %extra%'); - } - - /** - * {@inheritdoc} - */ - protected function write(array $record) - { - if ($this->expandNewlines) { - $lines = preg_split('{[\r\n]+}', (string) $record['formatted']); - foreach ($lines as $line) { - error_log($line, $this->messageType); - } - } else { - error_log((string) $record['formatted'], $this->messageType); - } - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php deleted file mode 100644 index 949f227..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php +++ /dev/null @@ -1,172 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Formatter\FormatterInterface; - -/** - * Simple handler wrapper that filters records based on a list of levels - * - * It can be configured with an exact list of levels to allow, or a min/max level. - * - * @author Hennadiy Verkh - * @author Jordi Boggiano - */ -class FilterHandler extends AbstractHandler -{ - /** - * Handler or factory callable($record, $this) - * - * @var callable|\Monolog\Handler\HandlerInterface - */ - protected $handler; - - /** - * Minimum level for logs that are passed to handler - * - * @var int[] - */ - protected $acceptedLevels; - - /** - * Whether the messages that are handled can bubble up the stack or not - * - * @var bool - */ - protected $bubble; - - /** - * @param callable|HandlerInterface $handler Handler or factory callable($record|null, $filterHandler). - * @param int|array $minLevelOrList A list of levels to accept or a minimum level if maxLevel is provided - * @param int $maxLevel Maximum level to accept, only used if $minLevelOrList is not an array - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - */ - public function __construct($handler, $minLevelOrList = Logger::DEBUG, $maxLevel = Logger::EMERGENCY, $bubble = true) - { - $this->handler = $handler; - $this->bubble = $bubble; - $this->setAcceptedLevels($minLevelOrList, $maxLevel); - - if (!$this->handler instanceof HandlerInterface && !is_callable($this->handler)) { - throw new \RuntimeException("The given handler (".json_encode($this->handler).") is not a callable nor a Monolog\Handler\HandlerInterface object"); - } - } - - /** - * @return array - */ - public function getAcceptedLevels() - { - return array_flip($this->acceptedLevels); - } - - /** - * @param int|string|array $minLevelOrList A list of levels to accept or a minimum level or level name if maxLevel is provided - * @param int|string $maxLevel Maximum level or level name to accept, only used if $minLevelOrList is not an array - */ - public function setAcceptedLevels($minLevelOrList = Logger::DEBUG, $maxLevel = Logger::EMERGENCY) - { - if (is_array($minLevelOrList)) { - $acceptedLevels = array_map('Monolog\Logger::toMonologLevel', $minLevelOrList); - } else { - $minLevelOrList = Logger::toMonologLevel($minLevelOrList); - $maxLevel = Logger::toMonologLevel($maxLevel); - $acceptedLevels = array_values(array_filter(Logger::getLevels(), function ($level) use ($minLevelOrList, $maxLevel) { - return $level >= $minLevelOrList && $level <= $maxLevel; - })); - } - $this->acceptedLevels = array_flip($acceptedLevels); - } - - /** - * {@inheritdoc} - */ - public function isHandling(array $record) - { - return isset($this->acceptedLevels[$record['level']]); - } - - /** - * {@inheritdoc} - */ - public function handle(array $record) - { - if (!$this->isHandling($record)) { - return false; - } - - if ($this->processors) { - foreach ($this->processors as $processor) { - $record = call_user_func($processor, $record); - } - } - - $this->getHandler($record)->handle($record); - - return false === $this->bubble; - } - - /** - * {@inheritdoc} - */ - public function handleBatch(array $records) - { - $filtered = array(); - foreach ($records as $record) { - if ($this->isHandling($record)) { - $filtered[] = $record; - } - } - - if (count($filtered) > 0) { - $this->getHandler($filtered[count($filtered) - 1])->handleBatch($filtered); - } - } - - /** - * Return the nested handler - * - * If the handler was provided as a factory callable, this will trigger the handler's instantiation. - * - * @return HandlerInterface - */ - public function getHandler(array $record = null) - { - if (!$this->handler instanceof HandlerInterface) { - $this->handler = call_user_func($this->handler, $record, $this); - if (!$this->handler instanceof HandlerInterface) { - throw new \RuntimeException("The factory callable should return a HandlerInterface"); - } - } - - return $this->handler; - } - - /** - * {@inheritdoc} - */ - public function setFormatter(FormatterInterface $formatter) - { - $this->getHandler()->setFormatter($formatter); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function getFormatter() - { - return $this->getHandler()->getFormatter(); - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php b/source/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php deleted file mode 100644 index aaca12c..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler\FingersCrossed; - -/** - * Interface for activation strategies for the FingersCrossedHandler. - * - * @author Johannes M. Schmitt - */ -interface ActivationStrategyInterface -{ - /** - * Returns whether the given record activates the handler. - * - * @param array $record - * @return bool - */ - public function isHandlerActivated(array $record); -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php b/source/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php deleted file mode 100644 index 2a2a64d..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php +++ /dev/null @@ -1,59 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler\FingersCrossed; - -use Monolog\Logger; - -/** - * Channel and Error level based monolog activation strategy. Allows to trigger activation - * based on level per channel. e.g. trigger activation on level 'ERROR' by default, except - * for records of the 'sql' channel; those should trigger activation on level 'WARN'. - * - * Example: - * - * - * $activationStrategy = new ChannelLevelActivationStrategy( - * Logger::CRITICAL, - * array( - * 'request' => Logger::ALERT, - * 'sensitive' => Logger::ERROR, - * ) - * ); - * $handler = new FingersCrossedHandler(new StreamHandler('php://stderr'), $activationStrategy); - * - * - * @author Mike Meessen - */ -class ChannelLevelActivationStrategy implements ActivationStrategyInterface -{ - private $defaultActionLevel; - private $channelToActionLevel; - - /** - * @param int $defaultActionLevel The default action level to be used if the record's category doesn't match any - * @param array $channelToActionLevel An array that maps channel names to action levels. - */ - public function __construct($defaultActionLevel, $channelToActionLevel = array()) - { - $this->defaultActionLevel = Logger::toMonologLevel($defaultActionLevel); - $this->channelToActionLevel = array_map('Monolog\Logger::toMonologLevel', $channelToActionLevel); - } - - public function isHandlerActivated(array $record) - { - if (isset($this->channelToActionLevel[$record['channel']])) { - return $record['level'] >= $this->channelToActionLevel[$record['channel']]; - } - - return $record['level'] >= $this->defaultActionLevel; - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php b/source/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php deleted file mode 100644 index 6e63085..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler\FingersCrossed; - -use Monolog\Logger; - -/** - * Error level based activation strategy. - * - * @author Johannes M. Schmitt - */ -class ErrorLevelActivationStrategy implements ActivationStrategyInterface -{ - private $actionLevel; - - public function __construct($actionLevel) - { - $this->actionLevel = Logger::toMonologLevel($actionLevel); - } - - public function isHandlerActivated(array $record) - { - return $record['level'] >= $this->actionLevel; - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php deleted file mode 100644 index cdabc44..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php +++ /dev/null @@ -1,207 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Handler\FingersCrossed\ErrorLevelActivationStrategy; -use Monolog\Handler\FingersCrossed\ActivationStrategyInterface; -use Monolog\Logger; -use Monolog\ResettableInterface; -use Monolog\Formatter\FormatterInterface; - -/** - * Buffers all records until a certain level is reached - * - * The advantage of this approach is that you don't get any clutter in your log files. - * Only requests which actually trigger an error (or whatever your actionLevel is) will be - * in the logs, but they will contain all records, not only those above the level threshold. - * - * You can find the various activation strategies in the - * Monolog\Handler\FingersCrossed\ namespace. - * - * @author Jordi Boggiano - */ -class FingersCrossedHandler extends AbstractHandler -{ - protected $handler; - protected $activationStrategy; - protected $buffering = true; - protected $bufferSize; - protected $buffer = array(); - protected $stopBuffering; - protected $passthruLevel; - - /** - * @param callable|HandlerInterface $handler Handler or factory callable($record|null, $fingersCrossedHandler). - * @param int|ActivationStrategyInterface $activationStrategy Strategy which determines when this handler takes action - * @param int $bufferSize How many entries should be buffered at most, beyond that the oldest items are removed from the buffer. - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - * @param bool $stopBuffering Whether the handler should stop buffering after being triggered (default true) - * @param int $passthruLevel Minimum level to always flush to handler on close, even if strategy not triggered - */ - public function __construct($handler, $activationStrategy = null, $bufferSize = 0, $bubble = true, $stopBuffering = true, $passthruLevel = null) - { - if (null === $activationStrategy) { - $activationStrategy = new ErrorLevelActivationStrategy(Logger::WARNING); - } - - // convert simple int activationStrategy to an object - if (!$activationStrategy instanceof ActivationStrategyInterface) { - $activationStrategy = new ErrorLevelActivationStrategy($activationStrategy); - } - - $this->handler = $handler; - $this->activationStrategy = $activationStrategy; - $this->bufferSize = $bufferSize; - $this->bubble = $bubble; - $this->stopBuffering = $stopBuffering; - - if ($passthruLevel !== null) { - $this->passthruLevel = Logger::toMonologLevel($passthruLevel); - } - - if (!$this->handler instanceof HandlerInterface && !is_callable($this->handler)) { - throw new \RuntimeException("The given handler (".json_encode($this->handler).") is not a callable nor a Monolog\Handler\HandlerInterface object"); - } - } - - /** - * {@inheritdoc} - */ - public function isHandling(array $record) - { - return true; - } - - /** - * Manually activate this logger regardless of the activation strategy - */ - public function activate() - { - if ($this->stopBuffering) { - $this->buffering = false; - } - $this->getHandler(end($this->buffer) ?: null)->handleBatch($this->buffer); - $this->buffer = array(); - } - - /** - * {@inheritdoc} - */ - public function handle(array $record) - { - if ($this->processors) { - foreach ($this->processors as $processor) { - $record = call_user_func($processor, $record); - } - } - - if ($this->buffering) { - $this->buffer[] = $record; - if ($this->bufferSize > 0 && count($this->buffer) > $this->bufferSize) { - array_shift($this->buffer); - } - if ($this->activationStrategy->isHandlerActivated($record)) { - $this->activate(); - } - } else { - $this->getHandler($record)->handle($record); - } - - return false === $this->bubble; - } - - /** - * {@inheritdoc} - */ - public function close() - { - $this->flushBuffer(); - } - - public function reset() - { - $this->flushBuffer(); - - parent::reset(); - - if ($this->getHandler() instanceof ResettableInterface) { - $this->getHandler()->reset(); - } - } - - /** - * Clears the buffer without flushing any messages down to the wrapped handler. - * - * It also resets the handler to its initial buffering state. - */ - public function clear() - { - $this->buffer = array(); - $this->reset(); - } - - /** - * Resets the state of the handler. Stops forwarding records to the wrapped handler. - */ - private function flushBuffer() - { - if (null !== $this->passthruLevel) { - $level = $this->passthruLevel; - $this->buffer = array_filter($this->buffer, function ($record) use ($level) { - return $record['level'] >= $level; - }); - if (count($this->buffer) > 0) { - $this->getHandler(end($this->buffer) ?: null)->handleBatch($this->buffer); - } - } - - $this->buffer = array(); - $this->buffering = true; - } - - /** - * Return the nested handler - * - * If the handler was provided as a factory callable, this will trigger the handler's instantiation. - * - * @return HandlerInterface - */ - public function getHandler(array $record = null) - { - if (!$this->handler instanceof HandlerInterface) { - $this->handler = call_user_func($this->handler, $record, $this); - if (!$this->handler instanceof HandlerInterface) { - throw new \RuntimeException("The factory callable should return a HandlerInterface"); - } - } - - return $this->handler; - } - - /** - * {@inheritdoc} - */ - public function setFormatter(FormatterInterface $formatter) - { - $this->getHandler()->setFormatter($formatter); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function getFormatter() - { - return $this->getHandler()->getFormatter(); - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php deleted file mode 100644 index 2a171bd..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php +++ /dev/null @@ -1,195 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\WildfireFormatter; - -/** - * Simple FirePHP Handler (http://www.firephp.org/), which uses the Wildfire protocol. - * - * @author Eric Clemmons (@ericclemmons) - */ -class FirePHPHandler extends AbstractProcessingHandler -{ - /** - * WildFire JSON header message format - */ - const PROTOCOL_URI = 'http://meta.wildfirehq.org/Protocol/JsonStream/0.2'; - - /** - * FirePHP structure for parsing messages & their presentation - */ - const STRUCTURE_URI = 'http://meta.firephp.org/Wildfire/Structure/FirePHP/FirebugConsole/0.1'; - - /** - * Must reference a "known" plugin, otherwise headers won't display in FirePHP - */ - const PLUGIN_URI = 'http://meta.firephp.org/Wildfire/Plugin/FirePHP/Library-FirePHPCore/0.3'; - - /** - * Header prefix for Wildfire to recognize & parse headers - */ - const HEADER_PREFIX = 'X-Wf'; - - /** - * Whether or not Wildfire vendor-specific headers have been generated & sent yet - */ - protected static $initialized = false; - - /** - * Shared static message index between potentially multiple handlers - * @var int - */ - protected static $messageIndex = 1; - - protected static $sendHeaders = true; - - /** - * Base header creation function used by init headers & record headers - * - * @param array $meta Wildfire Plugin, Protocol & Structure Indexes - * @param string $message Log message - * @return array Complete header string ready for the client as key and message as value - */ - protected function createHeader(array $meta, $message) - { - $header = sprintf('%s-%s', self::HEADER_PREFIX, join('-', $meta)); - - return array($header => $message); - } - - /** - * Creates message header from record - * - * @see createHeader() - * @param array $record - * @return array - */ - protected function createRecordHeader(array $record) - { - // Wildfire is extensible to support multiple protocols & plugins in a single request, - // but we're not taking advantage of that (yet), so we're using "1" for simplicity's sake. - return $this->createHeader( - array(1, 1, 1, self::$messageIndex++), - $record['formatted'] - ); - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter() - { - return new WildfireFormatter(); - } - - /** - * Wildfire initialization headers to enable message parsing - * - * @see createHeader() - * @see sendHeader() - * @return array - */ - protected function getInitHeaders() - { - // Initial payload consists of required headers for Wildfire - return array_merge( - $this->createHeader(array('Protocol', 1), self::PROTOCOL_URI), - $this->createHeader(array(1, 'Structure', 1), self::STRUCTURE_URI), - $this->createHeader(array(1, 'Plugin', 1), self::PLUGIN_URI) - ); - } - - /** - * Send header string to the client - * - * @param string $header - * @param string $content - */ - protected function sendHeader($header, $content) - { - if (!headers_sent() && self::$sendHeaders) { - header(sprintf('%s: %s', $header, $content)); - } - } - - /** - * Creates & sends header for a record, ensuring init headers have been sent prior - * - * @see sendHeader() - * @see sendInitHeaders() - * @param array $record - */ - protected function write(array $record) - { - if (!self::$sendHeaders) { - return; - } - - // WildFire-specific headers must be sent prior to any messages - if (!self::$initialized) { - self::$initialized = true; - - self::$sendHeaders = $this->headersAccepted(); - if (!self::$sendHeaders) { - return; - } - - foreach ($this->getInitHeaders() as $header => $content) { - $this->sendHeader($header, $content); - } - } - - $header = $this->createRecordHeader($record); - if (trim(current($header)) !== '') { - $this->sendHeader(key($header), current($header)); - } - } - - /** - * Verifies if the headers are accepted by the current user agent - * - * @return bool - */ - protected function headersAccepted() - { - if (!empty($_SERVER['HTTP_USER_AGENT']) && preg_match('{\bFirePHP/\d+\.\d+\b}', $_SERVER['HTTP_USER_AGENT'])) { - return true; - } - - return isset($_SERVER['HTTP_X_FIREPHP_VERSION']); - } - - /** - * BC getter for the sendHeaders property that has been made static - */ - public function __get($property) - { - if ('sendHeaders' !== $property) { - throw new \InvalidArgumentException('Undefined property '.$property); - } - - return static::$sendHeaders; - } - - /** - * BC setter for the sendHeaders property that has been made static - */ - public function __set($property, $value) - { - if ('sendHeaders' !== $property) { - throw new \InvalidArgumentException('Undefined property '.$property); - } - - static::$sendHeaders = $value; - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/FleepHookHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/FleepHookHandler.php deleted file mode 100644 index c43c013..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/FleepHookHandler.php +++ /dev/null @@ -1,126 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\LineFormatter; -use Monolog\Logger; - -/** - * Sends logs to Fleep.io using Webhook integrations - * - * You'll need a Fleep.io account to use this handler. - * - * @see https://fleep.io/integrations/webhooks/ Fleep Webhooks Documentation - * @author Ando Roots - */ -class FleepHookHandler extends SocketHandler -{ - const FLEEP_HOST = 'fleep.io'; - - const FLEEP_HOOK_URI = '/hook/'; - - /** - * @var string Webhook token (specifies the conversation where logs are sent) - */ - protected $token; - - /** - * Construct a new Fleep.io Handler. - * - * For instructions on how to create a new web hook in your conversations - * see https://fleep.io/integrations/webhooks/ - * - * @param string $token Webhook token - * @param bool|int $level The minimum logging level at which this handler will be triggered - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - * @throws MissingExtensionException - */ - public function __construct($token, $level = Logger::DEBUG, $bubble = true) - { - if (!extension_loaded('openssl')) { - throw new MissingExtensionException('The OpenSSL PHP extension is required to use the FleepHookHandler'); - } - - $this->token = $token; - - $connectionString = 'ssl://' . self::FLEEP_HOST . ':443'; - parent::__construct($connectionString, $level, $bubble); - } - - /** - * Returns the default formatter to use with this handler - * - * Overloaded to remove empty context and extra arrays from the end of the log message. - * - * @return LineFormatter - */ - protected function getDefaultFormatter() - { - return new LineFormatter(null, null, true, true); - } - - /** - * Handles a log record - * - * @param array $record - */ - public function write(array $record) - { - parent::write($record); - $this->closeSocket(); - } - - /** - * {@inheritdoc} - * - * @param array $record - * @return string - */ - protected function generateDataStream($record) - { - $content = $this->buildContent($record); - - return $this->buildHeader($content) . $content; - } - - /** - * Builds the header of the API Call - * - * @param string $content - * @return string - */ - private function buildHeader($content) - { - $header = "POST " . self::FLEEP_HOOK_URI . $this->token . " HTTP/1.1\r\n"; - $header .= "Host: " . self::FLEEP_HOST . "\r\n"; - $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; - $header .= "Content-Length: " . strlen($content) . "\r\n"; - $header .= "\r\n"; - - return $header; - } - - /** - * Builds the body of API call - * - * @param array $record - * @return string - */ - private function buildContent($record) - { - $dataArray = array( - 'message' => $record['formatted'], - ); - - return http_build_query($dataArray); - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php deleted file mode 100644 index f0f010c..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php +++ /dev/null @@ -1,128 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Utils; -use Monolog\Formatter\FlowdockFormatter; -use Monolog\Formatter\FormatterInterface; - -/** - * Sends notifications through the Flowdock push API - * - * This must be configured with a FlowdockFormatter instance via setFormatter() - * - * Notes: - * API token - Flowdock API token - * - * @author Dominik Liebler - * @see https://www.flowdock.com/api/push - */ -class FlowdockHandler extends SocketHandler -{ - /** - * @var string - */ - protected $apiToken; - - /** - * @param string $apiToken - * @param bool|int $level The minimum logging level at which this handler will be triggered - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - * - * @throws MissingExtensionException if OpenSSL is missing - */ - public function __construct($apiToken, $level = Logger::DEBUG, $bubble = true) - { - if (!extension_loaded('openssl')) { - throw new MissingExtensionException('The OpenSSL PHP extension is required to use the FlowdockHandler'); - } - - parent::__construct('ssl://api.flowdock.com:443', $level, $bubble); - $this->apiToken = $apiToken; - } - - /** - * {@inheritdoc} - */ - public function setFormatter(FormatterInterface $formatter) - { - if (!$formatter instanceof FlowdockFormatter) { - throw new \InvalidArgumentException('The FlowdockHandler requires an instance of Monolog\Formatter\FlowdockFormatter to function correctly'); - } - - return parent::setFormatter($formatter); - } - - /** - * Gets the default formatter. - * - * @return FormatterInterface - */ - protected function getDefaultFormatter() - { - throw new \InvalidArgumentException('The FlowdockHandler must be configured (via setFormatter) with an instance of Monolog\Formatter\FlowdockFormatter to function correctly'); - } - - /** - * {@inheritdoc} - * - * @param array $record - */ - protected function write(array $record) - { - parent::write($record); - - $this->closeSocket(); - } - - /** - * {@inheritdoc} - * - * @param array $record - * @return string - */ - protected function generateDataStream($record) - { - $content = $this->buildContent($record); - - return $this->buildHeader($content) . $content; - } - - /** - * Builds the body of API call - * - * @param array $record - * @return string - */ - private function buildContent($record) - { - return Utils::jsonEncode($record['formatted']['flowdock']); - } - - /** - * Builds the header of the API Call - * - * @param string $content - * @return string - */ - private function buildHeader($content) - { - $header = "POST /v1/messages/team_inbox/" . $this->apiToken . " HTTP/1.1\r\n"; - $header .= "Host: api.flowdock.com\r\n"; - $header .= "Content-Type: application/json\r\n"; - $header .= "Content-Length: " . strlen($content) . "\r\n"; - $header .= "\r\n"; - - return $header; - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/FormattableHandlerInterface.php b/source/vendor/monolog/monolog/src/Monolog/Handler/FormattableHandlerInterface.php deleted file mode 100644 index 3e2f1b2..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/FormattableHandlerInterface.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; - -/** - * Interface to describe loggers that have a formatter - * - * This interface is present in monolog 1.x to ease forward compatibility. - * - * @author Jordi Boggiano - */ -interface FormattableHandlerInterface -{ - /** - * Sets the formatter. - * - * @param FormatterInterface $formatter - * @return HandlerInterface self - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface; - - /** - * Gets the formatter. - * - * @return FormatterInterface - */ - public function getFormatter(): FormatterInterface; -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/FormattableHandlerTrait.php b/source/vendor/monolog/monolog/src/Monolog/Handler/FormattableHandlerTrait.php deleted file mode 100644 index e9ec5e7..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/FormattableHandlerTrait.php +++ /dev/null @@ -1,63 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\LineFormatter; - -/** - * Helper trait for implementing FormattableInterface - * - * This trait is present in monolog 1.x to ease forward compatibility. - * - * @author Jordi Boggiano - */ -trait FormattableHandlerTrait -{ - /** - * @var FormatterInterface - */ - protected $formatter; - - /** - * {@inheritdoc} - * @suppress PhanTypeMismatchReturn - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - $this->formatter = $formatter; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function getFormatter(): FormatterInterface - { - if (!$this->formatter) { - $this->formatter = $this->getDefaultFormatter(); - } - - return $this->formatter; - } - - /** - * Gets the default formatter. - * - * Overwrite this if the LineFormatter is not a good default for your handler. - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new LineFormatter(); - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.php deleted file mode 100644 index b6cde7c..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Gelf\IMessagePublisher; -use Gelf\PublisherInterface; -use Gelf\Publisher; -use InvalidArgumentException; -use Monolog\Logger; -use Monolog\Formatter\GelfMessageFormatter; - -/** - * Handler to send messages to a Graylog2 (http://www.graylog2.org) server - * - * @author Matt Lehner - * @author Benjamin Zikarsky - */ -class GelfHandler extends AbstractProcessingHandler -{ - /** - * @var Publisher|PublisherInterface|IMessagePublisher the publisher object that sends the message to the server - */ - protected $publisher; - - /** - * @param PublisherInterface|IMessagePublisher|Publisher $publisher a publisher object - * @param int $level The minimum logging level at which this handler will be triggered - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - */ - public function __construct($publisher, $level = Logger::DEBUG, $bubble = true) - { - parent::__construct($level, $bubble); - - if (!$publisher instanceof Publisher && !$publisher instanceof IMessagePublisher && !$publisher instanceof PublisherInterface) { - throw new InvalidArgumentException('Invalid publisher, expected a Gelf\Publisher, Gelf\IMessagePublisher or Gelf\PublisherInterface instance'); - } - - $this->publisher = $publisher; - } - - /** - * {@inheritdoc} - */ - protected function write(array $record) - { - $this->publisher->publish($record['formatted']); - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter() - { - return new GelfMessageFormatter(); - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php deleted file mode 100644 index 0d461f9..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php +++ /dev/null @@ -1,117 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; -use Monolog\ResettableInterface; - -/** - * Forwards records to multiple handlers - * - * @author Lenar Lõhmus - */ -class GroupHandler extends AbstractHandler -{ - protected $handlers; - - /** - * @param array $handlers Array of Handlers. - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - */ - public function __construct(array $handlers, $bubble = true) - { - foreach ($handlers as $handler) { - if (!$handler instanceof HandlerInterface) { - throw new \InvalidArgumentException('The first argument of the GroupHandler must be an array of HandlerInterface instances.'); - } - } - - $this->handlers = $handlers; - $this->bubble = $bubble; - } - - /** - * {@inheritdoc} - */ - public function isHandling(array $record) - { - foreach ($this->handlers as $handler) { - if ($handler->isHandling($record)) { - return true; - } - } - - return false; - } - - /** - * {@inheritdoc} - */ - public function handle(array $record) - { - if ($this->processors) { - foreach ($this->processors as $processor) { - $record = call_user_func($processor, $record); - } - } - - foreach ($this->handlers as $handler) { - $handler->handle($record); - } - - return false === $this->bubble; - } - - /** - * {@inheritdoc} - */ - public function handleBatch(array $records) - { - if ($this->processors) { - $processed = array(); - foreach ($records as $record) { - foreach ($this->processors as $processor) { - $record = call_user_func($processor, $record); - } - $processed[] = $record; - } - $records = $processed; - } - - foreach ($this->handlers as $handler) { - $handler->handleBatch($records); - } - } - - public function reset() - { - parent::reset(); - - foreach ($this->handlers as $handler) { - if ($handler instanceof ResettableInterface) { - $handler->reset(); - } - } - } - - /** - * {@inheritdoc} - */ - public function setFormatter(FormatterInterface $formatter) - { - foreach ($this->handlers as $handler) { - $handler->setFormatter($formatter); - } - - return $this; - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/HandlerInterface.php b/source/vendor/monolog/monolog/src/Monolog/Handler/HandlerInterface.php deleted file mode 100644 index 8d5a4a0..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/HandlerInterface.php +++ /dev/null @@ -1,90 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; - -/** - * Interface that all Monolog Handlers must implement - * - * @author Jordi Boggiano - */ -interface HandlerInterface -{ - /** - * Checks whether the given record will be handled by this handler. - * - * This is mostly done for performance reasons, to avoid calling processors for nothing. - * - * Handlers should still check the record levels within handle(), returning false in isHandling() - * is no guarantee that handle() will not be called, and isHandling() might not be called - * for a given record. - * - * @param array $record Partial log record containing only a level key - * - * @return bool - */ - public function isHandling(array $record); - - /** - * Handles a record. - * - * All records may be passed to this method, and the handler should discard - * those that it does not want to handle. - * - * The return value of this function controls the bubbling process of the handler stack. - * Unless the bubbling is interrupted (by returning true), the Logger class will keep on - * calling further handlers in the stack with a given log record. - * - * @param array $record The record to handle - * @return bool true means that this handler handled the record, and that bubbling is not permitted. - * false means the record was either not processed or that this handler allows bubbling. - */ - public function handle(array $record); - - /** - * Handles a set of records at once. - * - * @param array $records The records to handle (an array of record arrays) - */ - public function handleBatch(array $records); - - /** - * Adds a processor in the stack. - * - * @param callable $callback - * @return self - */ - public function pushProcessor($callback); - - /** - * Removes the processor on top of the stack and returns it. - * - * @return callable - */ - public function popProcessor(); - - /** - * Sets the formatter. - * - * @param FormatterInterface $formatter - * @return self - */ - public function setFormatter(FormatterInterface $formatter); - - /** - * Gets the formatter. - * - * @return FormatterInterface - */ - public function getFormatter(); -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php b/source/vendor/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php deleted file mode 100644 index 55e6498..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php +++ /dev/null @@ -1,116 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\ResettableInterface; -use Monolog\Formatter\FormatterInterface; - -/** - * This simple wrapper class can be used to extend handlers functionality. - * - * Example: A custom filtering that can be applied to any handler. - * - * Inherit from this class and override handle() like this: - * - * public function handle(array $record) - * { - * if ($record meets certain conditions) { - * return false; - * } - * return $this->handler->handle($record); - * } - * - * @author Alexey Karapetov - */ -class HandlerWrapper implements HandlerInterface, ResettableInterface -{ - /** - * @var HandlerInterface - */ - protected $handler; - - /** - * HandlerWrapper constructor. - * @param HandlerInterface $handler - */ - public function __construct(HandlerInterface $handler) - { - $this->handler = $handler; - } - - /** - * {@inheritdoc} - */ - public function isHandling(array $record) - { - return $this->handler->isHandling($record); - } - - /** - * {@inheritdoc} - */ - public function handle(array $record) - { - return $this->handler->handle($record); - } - - /** - * {@inheritdoc} - */ - public function handleBatch(array $records) - { - return $this->handler->handleBatch($records); - } - - /** - * {@inheritdoc} - */ - public function pushProcessor($callback) - { - $this->handler->pushProcessor($callback); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function popProcessor() - { - return $this->handler->popProcessor(); - } - - /** - * {@inheritdoc} - */ - public function setFormatter(FormatterInterface $formatter) - { - $this->handler->setFormatter($formatter); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function getFormatter() - { - return $this->handler->getFormatter(); - } - - public function reset() - { - if ($this->handler instanceof ResettableInterface) { - return $this->handler->reset(); - } - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/HipChatHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/HipChatHandler.php deleted file mode 100644 index 30258e3..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/HipChatHandler.php +++ /dev/null @@ -1,367 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; - -/** - * Sends notifications through the hipchat api to a hipchat room - * - * Notes: - * API token - HipChat API token - * Room - HipChat Room Id or name, where messages are sent - * Name - Name used to send the message (from) - * notify - Should the message trigger a notification in the clients - * version - The API version to use (HipChatHandler::API_V1 | HipChatHandler::API_V2) - * - * @author Rafael Dohms - * @see https://www.hipchat.com/docs/api - */ -class HipChatHandler extends SocketHandler -{ - /** - * Use API version 1 - */ - const API_V1 = 'v1'; - - /** - * Use API version v2 - */ - const API_V2 = 'v2'; - - /** - * The maximum allowed length for the name used in the "from" field. - */ - const MAXIMUM_NAME_LENGTH = 15; - - /** - * The maximum allowed length for the message. - */ - const MAXIMUM_MESSAGE_LENGTH = 9500; - - /** - * @var string - */ - private $token; - - /** - * @var string - */ - private $room; - - /** - * @var string - */ - private $name; - - /** - * @var bool - */ - private $notify; - - /** - * @var string - */ - private $format; - - /** - * @var string - */ - private $host; - - /** - * @var string - */ - private $version; - - /** - * @param string $token HipChat API Token - * @param string $room The room that should be alerted of the message (Id or Name) - * @param string $name Name used in the "from" field. - * @param bool $notify Trigger a notification in clients or not - * @param int $level The minimum logging level at which this handler will be triggered - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - * @param bool $useSSL Whether to connect via SSL. - * @param string $format The format of the messages (default to text, can be set to html if you have html in the messages) - * @param string $host The HipChat server hostname. - * @param string $version The HipChat API version (default HipChatHandler::API_V1) - */ - public function __construct($token, $room, $name = 'Monolog', $notify = false, $level = Logger::CRITICAL, $bubble = true, $useSSL = true, $format = 'text', $host = 'api.hipchat.com', $version = self::API_V1) - { - @trigger_error('The Monolog\Handler\HipChatHandler class is deprecated. You should migrate to Slack and the SlackWebhookHandler / SlackbotHandler, see https://www.atlassian.com/partnerships/slack', E_USER_DEPRECATED); - - if ($version == self::API_V1 && !$this->validateStringLength($name, static::MAXIMUM_NAME_LENGTH)) { - throw new \InvalidArgumentException('The supplied name is too long. HipChat\'s v1 API supports names up to 15 UTF-8 characters.'); - } - - $connectionString = $useSSL ? 'ssl://'.$host.':443' : $host.':80'; - parent::__construct($connectionString, $level, $bubble); - - $this->token = $token; - $this->name = $name; - $this->notify = $notify; - $this->room = $room; - $this->format = $format; - $this->host = $host; - $this->version = $version; - } - - /** - * {@inheritdoc} - * - * @param array $record - * @return string - */ - protected function generateDataStream($record) - { - $content = $this->buildContent($record); - - return $this->buildHeader($content) . $content; - } - - /** - * Builds the body of API call - * - * @param array $record - * @return string - */ - private function buildContent($record) - { - $dataArray = array( - 'notify' => $this->version == self::API_V1 ? - ($this->notify ? 1 : 0) : - ($this->notify ? 'true' : 'false'), - 'message' => $record['formatted'], - 'message_format' => $this->format, - 'color' => $this->getAlertColor($record['level']), - ); - - if (!$this->validateStringLength($dataArray['message'], static::MAXIMUM_MESSAGE_LENGTH)) { - if (function_exists('mb_substr')) { - $dataArray['message'] = mb_substr($dataArray['message'], 0, static::MAXIMUM_MESSAGE_LENGTH).' [truncated]'; - } else { - $dataArray['message'] = substr($dataArray['message'], 0, static::MAXIMUM_MESSAGE_LENGTH).' [truncated]'; - } - } - - // if we are using the legacy API then we need to send some additional information - if ($this->version == self::API_V1) { - $dataArray['room_id'] = $this->room; - } - - // append the sender name if it is set - // always append it if we use the v1 api (it is required in v1) - if ($this->version == self::API_V1 || $this->name !== null) { - $dataArray['from'] = (string) $this->name; - } - - return http_build_query($dataArray); - } - - /** - * Builds the header of the API Call - * - * @param string $content - * @return string - */ - private function buildHeader($content) - { - if ($this->version == self::API_V1) { - $header = "POST /v1/rooms/message?format=json&auth_token={$this->token} HTTP/1.1\r\n"; - } else { - // needed for rooms with special (spaces, etc) characters in the name - $room = rawurlencode($this->room); - $header = "POST /v2/room/{$room}/notification?auth_token={$this->token} HTTP/1.1\r\n"; - } - - $header .= "Host: {$this->host}\r\n"; - $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; - $header .= "Content-Length: " . strlen($content) . "\r\n"; - $header .= "\r\n"; - - return $header; - } - - /** - * Assigns a color to each level of log records. - * - * @param int $level - * @return string - */ - protected function getAlertColor($level) - { - switch (true) { - case $level >= Logger::ERROR: - return 'red'; - case $level >= Logger::WARNING: - return 'yellow'; - case $level >= Logger::INFO: - return 'green'; - case $level == Logger::DEBUG: - return 'gray'; - default: - return 'yellow'; - } - } - - /** - * {@inheritdoc} - * - * @param array $record - */ - protected function write(array $record) - { - parent::write($record); - $this->finalizeWrite(); - } - - /** - * Finalizes the request by reading some bytes and then closing the socket - * - * If we do not read some but close the socket too early, hipchat sometimes - * drops the request entirely. - */ - protected function finalizeWrite() - { - $res = $this->getResource(); - if (is_resource($res)) { - @fread($res, 2048); - } - $this->closeSocket(); - } - - /** - * {@inheritdoc} - */ - public function handleBatch(array $records) - { - if (count($records) == 0) { - return true; - } - - $batchRecords = $this->combineRecords($records); - - $handled = false; - foreach ($batchRecords as $batchRecord) { - if ($this->isHandling($batchRecord)) { - $this->write($batchRecord); - $handled = true; - } - } - - if (!$handled) { - return false; - } - - return false === $this->bubble; - } - - /** - * Combines multiple records into one. Error level of the combined record - * will be the highest level from the given records. Datetime will be taken - * from the first record. - * - * @param array $records - * @return array - */ - private function combineRecords(array $records) - { - $batchRecord = null; - $batchRecords = array(); - $messages = array(); - $formattedMessages = array(); - $level = 0; - $levelName = null; - $datetime = null; - - foreach ($records as $record) { - $record = $this->processRecord($record); - - if ($record['level'] > $level) { - $level = $record['level']; - $levelName = $record['level_name']; - } - - if (null === $datetime) { - $datetime = $record['datetime']; - } - - $messages[] = $record['message']; - $messageStr = implode(PHP_EOL, $messages); - $formattedMessages[] = $this->getFormatter()->format($record); - $formattedMessageStr = implode('', $formattedMessages); - - $batchRecord = array( - 'message' => $messageStr, - 'formatted' => $formattedMessageStr, - 'context' => array(), - 'extra' => array(), - ); - - if (!$this->validateStringLength($batchRecord['formatted'], static::MAXIMUM_MESSAGE_LENGTH)) { - // Pop the last message and implode the remaining messages - $lastMessage = array_pop($messages); - $lastFormattedMessage = array_pop($formattedMessages); - $batchRecord['message'] = implode(PHP_EOL, $messages); - $batchRecord['formatted'] = implode('', $formattedMessages); - - $batchRecords[] = $batchRecord; - $messages = array($lastMessage); - $formattedMessages = array($lastFormattedMessage); - - $batchRecord = null; - } - } - - if (null !== $batchRecord) { - $batchRecords[] = $batchRecord; - } - - // Set the max level and datetime for all records - foreach ($batchRecords as &$batchRecord) { - $batchRecord = array_merge( - $batchRecord, - array( - 'level' => $level, - 'level_name' => $levelName, - 'datetime' => $datetime, - ) - ); - } - - return $batchRecords; - } - - /** - * Validates the length of a string. - * - * If the `mb_strlen()` function is available, it will use that, as HipChat - * allows UTF-8 characters. Otherwise, it will fall back to `strlen()`. - * - * Note that this might cause false failures in the specific case of using - * a valid name with less than 16 characters, but 16 or more bytes, on a - * system where `mb_strlen()` is unavailable. - * - * @param string $str - * @param int $length - * - * @return bool - */ - private function validateStringLength($str, $length) - { - if (function_exists('mb_strlen')) { - return (mb_strlen($str) <= $length); - } - - return (strlen($str) <= $length); - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php deleted file mode 100644 index f4d3b97..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php +++ /dev/null @@ -1,70 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Utils; - -/** - * IFTTTHandler uses cURL to trigger IFTTT Maker actions - * - * Register a secret key and trigger/event name at https://ifttt.com/maker - * - * value1 will be the channel from monolog's Logger constructor, - * value2 will be the level name (ERROR, WARNING, ..) - * value3 will be the log record's message - * - * @author Nehal Patel - */ -class IFTTTHandler extends AbstractProcessingHandler -{ - private $eventName; - private $secretKey; - - /** - * @param string $eventName The name of the IFTTT Maker event that should be triggered - * @param string $secretKey A valid IFTTT secret key - * @param int $level The minimum logging level at which this handler will be triggered - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - */ - public function __construct($eventName, $secretKey, $level = Logger::ERROR, $bubble = true) - { - $this->eventName = $eventName; - $this->secretKey = $secretKey; - - parent::__construct($level, $bubble); - } - - /** - * {@inheritdoc} - */ - public function write(array $record) - { - $postData = array( - "value1" => $record["channel"], - "value2" => $record["level_name"], - "value3" => $record["message"], - ); - $postString = Utils::jsonEncode($postData); - - $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, "https://maker.ifttt.com/trigger/" . $this->eventName . "/with/key/" . $this->secretKey); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $postString); - curl_setopt($ch, CURLOPT_HTTPHEADER, array( - "Content-Type: application/json", - )); - - Curl\Util::execute($ch); - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/InsightOpsHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/InsightOpsHandler.php deleted file mode 100644 index 8f683dc..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/InsightOpsHandler.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - - namespace Monolog\Handler; - - use Monolog\Logger; - -/** - * Inspired on LogEntriesHandler. - * - * @author Robert Kaufmann III - * @author Gabriel Machado - */ -class InsightOpsHandler extends SocketHandler -{ - /** - * @var string - */ - protected $logToken; - - /** - * @param string $token Log token supplied by InsightOps - * @param string $region Region where InsightOps account is hosted. Could be 'us' or 'eu'. - * @param bool $useSSL Whether or not SSL encryption should be used - * @param int $level The minimum logging level to trigger this handler - * @param bool $bubble Whether or not messages that are handled should bubble up the stack. - * - * @throws MissingExtensionException If SSL encryption is set to true and OpenSSL is missing - */ - public function __construct($token, $region = 'us', $useSSL = true, $level = Logger::DEBUG, $bubble = true) - { - if ($useSSL && !extension_loaded('openssl')) { - throw new MissingExtensionException('The OpenSSL PHP plugin is required to use SSL encrypted connection for InsightOpsHandler'); - } - - $endpoint = $useSSL - ? 'ssl://' . $region . '.data.logs.insight.rapid7.com:443' - : $region . '.data.logs.insight.rapid7.com:80'; - - parent::__construct($endpoint, $level, $bubble); - $this->logToken = $token; - } - - /** - * {@inheritdoc} - * - * @param array $record - * @return string - */ - protected function generateDataStream($record) - { - return $this->logToken . ' ' . $record['formatted']; - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php deleted file mode 100644 index ea89fb3..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; - -/** - * @author Robert Kaufmann III - */ -class LogEntriesHandler extends SocketHandler -{ - /** - * @var string - */ - protected $logToken; - - /** - * @param string $token Log token supplied by LogEntries - * @param bool $useSSL Whether or not SSL encryption should be used. - * @param int $level The minimum logging level to trigger this handler - * @param bool $bubble Whether or not messages that are handled should bubble up the stack. - * - * @throws MissingExtensionException If SSL encryption is set to true and OpenSSL is missing - */ - public function __construct($token, $useSSL = true, $level = Logger::DEBUG, $bubble = true, $host = 'data.logentries.com') - { - if ($useSSL && !extension_loaded('openssl')) { - throw new MissingExtensionException('The OpenSSL PHP plugin is required to use SSL encrypted connection for LogEntriesHandler'); - } - - $endpoint = $useSSL ? 'ssl://' . $host . ':443' : $host . ':80'; - parent::__construct($endpoint, $level, $bubble); - $this->logToken = $token; - } - - /** - * {@inheritdoc} - * - * @param array $record - * @return string - */ - protected function generateDataStream($record) - { - return $this->logToken . ' ' . $record['formatted']; - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/LogglyHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/LogglyHandler.php deleted file mode 100644 index bcd62e1..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/LogglyHandler.php +++ /dev/null @@ -1,102 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Formatter\LogglyFormatter; - -/** - * Sends errors to Loggly. - * - * @author Przemek Sobstel - * @author Adam Pancutt - * @author Gregory Barchard - */ -class LogglyHandler extends AbstractProcessingHandler -{ - const HOST = 'logs-01.loggly.com'; - const ENDPOINT_SINGLE = 'inputs'; - const ENDPOINT_BATCH = 'bulk'; - - protected $token; - - protected $tag = array(); - - public function __construct($token, $level = Logger::DEBUG, $bubble = true) - { - if (!extension_loaded('curl')) { - throw new \LogicException('The curl extension is needed to use the LogglyHandler'); - } - - $this->token = $token; - - parent::__construct($level, $bubble); - } - - public function setTag($tag) - { - $tag = !empty($tag) ? $tag : array(); - $this->tag = is_array($tag) ? $tag : array($tag); - } - - public function addTag($tag) - { - if (!empty($tag)) { - $tag = is_array($tag) ? $tag : array($tag); - $this->tag = array_unique(array_merge($this->tag, $tag)); - } - } - - protected function write(array $record) - { - $this->send($record["formatted"], self::ENDPOINT_SINGLE); - } - - public function handleBatch(array $records) - { - $level = $this->level; - - $records = array_filter($records, function ($record) use ($level) { - return ($record['level'] >= $level); - }); - - if ($records) { - $this->send($this->getFormatter()->formatBatch($records), self::ENDPOINT_BATCH); - } - } - - protected function send($data, $endpoint) - { - $url = sprintf("https://%s/%s/%s/", self::HOST, $endpoint, $this->token); - - $headers = array('Content-Type: application/json'); - - if (!empty($this->tag)) { - $headers[] = 'X-LOGGLY-TAG: '.implode(',', $this->tag); - } - - $ch = curl_init(); - - curl_setopt($ch, CURLOPT_URL, $url); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $data); - curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - - Curl\Util::execute($ch); - } - - protected function getDefaultFormatter() - { - return new LogglyFormatter(); - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/MailHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/MailHandler.php deleted file mode 100644 index 9e23283..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/MailHandler.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -/** - * Base class for all mail handlers - * - * @author Gyula Sallai - */ -abstract class MailHandler extends AbstractProcessingHandler -{ - /** - * {@inheritdoc} - */ - public function handleBatch(array $records) - { - $messages = array(); - - foreach ($records as $record) { - if ($record['level'] < $this->level) { - continue; - } - $messages[] = $this->processRecord($record); - } - - if (!empty($messages)) { - $this->send((string) $this->getFormatter()->formatBatch($messages), $messages); - } - } - - /** - * Send a mail with the given content - * - * @param string $content formatted email body to be sent - * @param array $records the array of log records that formed this content - */ - abstract protected function send($content, array $records); - - /** - * {@inheritdoc} - */ - protected function write(array $record) - { - $this->send((string) $record['formatted'], array($record)); - } - - protected function getHighestRecord(array $records) - { - $highestRecord = null; - foreach ($records as $record) { - if ($highestRecord === null || $highestRecord['level'] < $record['level']) { - $highestRecord = $record; - } - } - - return $highestRecord; - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/MandrillHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/MandrillHandler.php deleted file mode 100644 index 3f0956a..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/MandrillHandler.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; - -/** - * MandrillHandler uses cURL to send the emails to the Mandrill API - * - * @author Adam Nicholson - */ -class MandrillHandler extends MailHandler -{ - protected $message; - protected $apiKey; - - /** - * @param string $apiKey A valid Mandrill API key - * @param callable|\Swift_Message $message An example message for real messages, only the body will be replaced - * @param int $level The minimum logging level at which this handler will be triggered - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - */ - public function __construct($apiKey, $message, $level = Logger::ERROR, $bubble = true) - { - parent::__construct($level, $bubble); - - if (!$message instanceof \Swift_Message && is_callable($message)) { - $message = call_user_func($message); - } - if (!$message instanceof \Swift_Message) { - throw new \InvalidArgumentException('You must provide either a Swift_Message instance or a callable returning it'); - } - $this->message = $message; - $this->apiKey = $apiKey; - } - - /** - * {@inheritdoc} - */ - protected function send($content, array $records) - { - $message = clone $this->message; - $message->setBody($content); - $message->setDate(time()); - - $ch = curl_init(); - - curl_setopt($ch, CURLOPT_URL, 'https://mandrillapp.com/api/1.0/messages/send-raw.json'); - curl_setopt($ch, CURLOPT_POST, 1); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); - curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(array( - 'key' => $this->apiKey, - 'raw_message' => (string) $message, - 'async' => false, - ))); - - Curl\Util::execute($ch); - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/MissingExtensionException.php b/source/vendor/monolog/monolog/src/Monolog/Handler/MissingExtensionException.php deleted file mode 100644 index 4724a7e..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/MissingExtensionException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -/** - * Exception can be thrown if an extension for an handler is missing - * - * @author Christian Bergau - */ -class MissingExtensionException extends \Exception -{ -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php deleted file mode 100644 index 56fe755..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php +++ /dev/null @@ -1,59 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Formatter\NormalizerFormatter; - -/** - * Logs to a MongoDB database. - * - * usage example: - * - * $log = new Logger('application'); - * $mongodb = new MongoDBHandler(new \Mongo("mongodb://localhost:27017"), "logs", "prod"); - * $log->pushHandler($mongodb); - * - * @author Thomas Tourlourat - */ -class MongoDBHandler extends AbstractProcessingHandler -{ - protected $mongoCollection; - - public function __construct($mongo, $database, $collection, $level = Logger::DEBUG, $bubble = true) - { - if (!($mongo instanceof \MongoClient || $mongo instanceof \Mongo || $mongo instanceof \MongoDB\Client)) { - throw new \InvalidArgumentException('MongoClient, Mongo or MongoDB\Client instance required'); - } - - $this->mongoCollection = $mongo->selectCollection($database, $collection); - - parent::__construct($level, $bubble); - } - - protected function write(array $record) - { - if ($this->mongoCollection instanceof \MongoDB\Collection) { - $this->mongoCollection->insertOne($record["formatted"]); - } else { - $this->mongoCollection->save($record["formatted"]); - } - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter() - { - return new NormalizerFormatter(); - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php deleted file mode 100644 index d7807fd..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php +++ /dev/null @@ -1,185 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Formatter\LineFormatter; - -/** - * NativeMailerHandler uses the mail() function to send the emails - * - * @author Christophe Coevoet - * @author Mark Garrett - */ -class NativeMailerHandler extends MailHandler -{ - /** - * The email addresses to which the message will be sent - * @var array - */ - protected $to; - - /** - * The subject of the email - * @var string - */ - protected $subject; - - /** - * Optional headers for the message - * @var array - */ - protected $headers = array(); - - /** - * Optional parameters for the message - * @var array - */ - protected $parameters = array(); - - /** - * The wordwrap length for the message - * @var int - */ - protected $maxColumnWidth; - - /** - * The Content-type for the message - * @var string - */ - protected $contentType = 'text/plain'; - - /** - * The encoding for the message - * @var string - */ - protected $encoding = 'utf-8'; - - /** - * @param string|array $to The receiver of the mail - * @param string $subject The subject of the mail - * @param string $from The sender of the mail - * @param int $level The minimum logging level at which this handler will be triggered - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - * @param int $maxColumnWidth The maximum column width that the message lines will have - */ - public function __construct($to, $subject, $from, $level = Logger::ERROR, $bubble = true, $maxColumnWidth = 70) - { - parent::__construct($level, $bubble); - $this->to = is_array($to) ? $to : array($to); - $this->subject = $subject; - $this->addHeader(sprintf('From: %s', $from)); - $this->maxColumnWidth = $maxColumnWidth; - } - - /** - * Add headers to the message - * - * @param string|array $headers Custom added headers - * @return self - */ - public function addHeader($headers) - { - foreach ((array) $headers as $header) { - if (strpos($header, "\n") !== false || strpos($header, "\r") !== false) { - throw new \InvalidArgumentException('Headers can not contain newline characters for security reasons'); - } - $this->headers[] = $header; - } - - return $this; - } - - /** - * Add parameters to the message - * - * @param string|array $parameters Custom added parameters - * @return self - */ - public function addParameter($parameters) - { - $this->parameters = array_merge($this->parameters, (array) $parameters); - - return $this; - } - - /** - * {@inheritdoc} - */ - protected function send($content, array $records) - { - $content = wordwrap($content, $this->maxColumnWidth); - $headers = ltrim(implode("\r\n", $this->headers) . "\r\n", "\r\n"); - $headers .= 'Content-type: ' . $this->getContentType() . '; charset=' . $this->getEncoding() . "\r\n"; - if ($this->getContentType() == 'text/html' && false === strpos($headers, 'MIME-Version:')) { - $headers .= 'MIME-Version: 1.0' . "\r\n"; - } - - $subject = $this->subject; - if ($records) { - $subjectFormatter = new LineFormatter($this->subject); - $subject = $subjectFormatter->format($this->getHighestRecord($records)); - } - - $parameters = implode(' ', $this->parameters); - foreach ($this->to as $to) { - mail($to, $subject, $content, $headers, $parameters); - } - } - - /** - * @return string $contentType - */ - public function getContentType() - { - return $this->contentType; - } - - /** - * @return string $encoding - */ - public function getEncoding() - { - return $this->encoding; - } - - /** - * @param string $contentType The content type of the email - Defaults to text/plain. Use text/html for HTML - * messages. - * @return self - */ - public function setContentType($contentType) - { - if (strpos($contentType, "\n") !== false || strpos($contentType, "\r") !== false) { - throw new \InvalidArgumentException('The content type can not contain newline characters to prevent email header injection'); - } - - $this->contentType = $contentType; - - return $this; - } - - /** - * @param string $encoding - * @return self - */ - public function setEncoding($encoding) - { - if (strpos($encoding, "\n") !== false || strpos($encoding, "\r") !== false) { - throw new \InvalidArgumentException('The encoding can not contain newline characters to prevent email header injection'); - } - - $this->encoding = $encoding; - - return $this; - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php deleted file mode 100644 index 64dc138..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php +++ /dev/null @@ -1,205 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Utils; -use Monolog\Formatter\NormalizerFormatter; - -/** - * Class to record a log on a NewRelic application. - * Enabling New Relic High Security mode may prevent capture of useful information. - * - * This handler requires a NormalizerFormatter to function and expects an array in $record['formatted'] - * - * @see https://docs.newrelic.com/docs/agents/php-agent - * @see https://docs.newrelic.com/docs/accounts-partnerships/accounts/security/high-security - */ -class NewRelicHandler extends AbstractProcessingHandler -{ - /** - * Name of the New Relic application that will receive logs from this handler. - * - * @var string - */ - protected $appName; - - /** - * Name of the current transaction - * - * @var string - */ - protected $transactionName; - - /** - * Some context and extra data is passed into the handler as arrays of values. Do we send them as is - * (useful if we are using the API), or explode them for display on the NewRelic RPM website? - * - * @var bool - */ - protected $explodeArrays; - - /** - * {@inheritDoc} - * - * @param string $appName - * @param bool $explodeArrays - * @param string $transactionName - */ - public function __construct( - $level = Logger::ERROR, - $bubble = true, - $appName = null, - $explodeArrays = false, - $transactionName = null - ) { - parent::__construct($level, $bubble); - - $this->appName = $appName; - $this->explodeArrays = $explodeArrays; - $this->transactionName = $transactionName; - } - - /** - * {@inheritDoc} - */ - protected function write(array $record) - { - if (!$this->isNewRelicEnabled()) { - throw new MissingExtensionException('The newrelic PHP extension is required to use the NewRelicHandler'); - } - - if ($appName = $this->getAppName($record['context'])) { - $this->setNewRelicAppName($appName); - } - - if ($transactionName = $this->getTransactionName($record['context'])) { - $this->setNewRelicTransactionName($transactionName); - unset($record['formatted']['context']['transaction_name']); - } - - if (isset($record['context']['exception']) && ($record['context']['exception'] instanceof \Exception || (PHP_VERSION_ID >= 70000 && $record['context']['exception'] instanceof \Throwable))) { - newrelic_notice_error($record['message'], $record['context']['exception']); - unset($record['formatted']['context']['exception']); - } else { - newrelic_notice_error($record['message']); - } - - if (isset($record['formatted']['context']) && is_array($record['formatted']['context'])) { - foreach ($record['formatted']['context'] as $key => $parameter) { - if (is_array($parameter) && $this->explodeArrays) { - foreach ($parameter as $paramKey => $paramValue) { - $this->setNewRelicParameter('context_' . $key . '_' . $paramKey, $paramValue); - } - } else { - $this->setNewRelicParameter('context_' . $key, $parameter); - } - } - } - - if (isset($record['formatted']['extra']) && is_array($record['formatted']['extra'])) { - foreach ($record['formatted']['extra'] as $key => $parameter) { - if (is_array($parameter) && $this->explodeArrays) { - foreach ($parameter as $paramKey => $paramValue) { - $this->setNewRelicParameter('extra_' . $key . '_' . $paramKey, $paramValue); - } - } else { - $this->setNewRelicParameter('extra_' . $key, $parameter); - } - } - } - } - - /** - * Checks whether the NewRelic extension is enabled in the system. - * - * @return bool - */ - protected function isNewRelicEnabled() - { - return extension_loaded('newrelic'); - } - - /** - * Returns the appname where this log should be sent. Each log can override the default appname, set in this - * handler's constructor, by providing the appname in it's context. - * - * @param array $context - * @return null|string - */ - protected function getAppName(array $context) - { - if (isset($context['appname'])) { - return $context['appname']; - } - - return $this->appName; - } - - /** - * Returns the name of the current transaction. Each log can override the default transaction name, set in this - * handler's constructor, by providing the transaction_name in it's context - * - * @param array $context - * - * @return null|string - */ - protected function getTransactionName(array $context) - { - if (isset($context['transaction_name'])) { - return $context['transaction_name']; - } - - return $this->transactionName; - } - - /** - * Sets the NewRelic application that should receive this log. - * - * @param string $appName - */ - protected function setNewRelicAppName($appName) - { - newrelic_set_appname($appName); - } - - /** - * Overwrites the name of the current transaction - * - * @param string $transactionName - */ - protected function setNewRelicTransactionName($transactionName) - { - newrelic_name_transaction($transactionName); - } - - /** - * @param string $key - * @param mixed $value - */ - protected function setNewRelicParameter($key, $value) - { - if (null === $value || is_scalar($value)) { - newrelic_add_custom_parameter($key, $value); - } else { - newrelic_add_custom_parameter($key, Utils::jsonEncode($value, null, true)); - } - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter() - { - return new NormalizerFormatter(); - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/NullHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/NullHandler.php deleted file mode 100644 index 4b84588..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/NullHandler.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; - -/** - * Blackhole - * - * Any record it can handle will be thrown away. This can be used - * to put on top of an existing stack to override it temporarily. - * - * @author Jordi Boggiano - */ -class NullHandler extends AbstractHandler -{ - /** - * @param int $level The minimum logging level at which this handler will be triggered - */ - public function __construct($level = Logger::DEBUG) - { - parent::__construct($level, false); - } - - /** - * {@inheritdoc} - */ - public function handle(array $record) - { - if ($record['level'] < $this->level) { - return false; - } - - return true; - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/PHPConsoleHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/PHPConsoleHandler.php deleted file mode 100644 index d0a8b43..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/PHPConsoleHandler.php +++ /dev/null @@ -1,243 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Exception; -use Monolog\Formatter\LineFormatter; -use Monolog\Logger; -use Monolog\Utils; -use PhpConsole\Connector; -use PhpConsole\Handler; -use PhpConsole\Helper; - -/** - * Monolog handler for Google Chrome extension "PHP Console" - * - * Display PHP error/debug log messages in Google Chrome console and notification popups, executes PHP code remotely - * - * Usage: - * 1. Install Google Chrome extension https://chrome.google.com/webstore/detail/php-console/nfhmhhlpfleoednkpnnnkolmclajemef - * 2. See overview https://github.com/barbushin/php-console#overview - * 3. Install PHP Console library https://github.com/barbushin/php-console#installation - * 4. Example (result will looks like http://i.hizliresim.com/vg3Pz4.png) - * - * $logger = new \Monolog\Logger('all', array(new \Monolog\Handler\PHPConsoleHandler())); - * \Monolog\ErrorHandler::register($logger); - * echo $undefinedVar; - * $logger->addDebug('SELECT * FROM users', array('db', 'time' => 0.012)); - * PC::debug($_SERVER); // PHP Console debugger for any type of vars - * - * @author Sergey Barbushin https://www.linkedin.com/in/barbushin - */ -class PHPConsoleHandler extends AbstractProcessingHandler -{ - private $options = array( - 'enabled' => true, // bool Is PHP Console server enabled - 'classesPartialsTraceIgnore' => array('Monolog\\'), // array Hide calls of classes started with... - 'debugTagsKeysInContext' => array(0, 'tag'), // bool Is PHP Console server enabled - 'useOwnErrorsHandler' => false, // bool Enable errors handling - 'useOwnExceptionsHandler' => false, // bool Enable exceptions handling - 'sourcesBasePath' => null, // string Base path of all project sources to strip in errors source paths - 'registerHelper' => true, // bool Register PhpConsole\Helper that allows short debug calls like PC::debug($var, 'ta.g.s') - 'serverEncoding' => null, // string|null Server internal encoding - 'headersLimit' => null, // int|null Set headers size limit for your web-server - 'password' => null, // string|null Protect PHP Console connection by password - 'enableSslOnlyMode' => false, // bool Force connection by SSL for clients with PHP Console installed - 'ipMasks' => array(), // array Set IP masks of clients that will be allowed to connect to PHP Console: array('192.168.*.*', '127.0.0.1') - 'enableEvalListener' => false, // bool Enable eval request to be handled by eval dispatcher(if enabled, 'password' option is also required) - 'dumperDetectCallbacks' => false, // bool Convert callback items in dumper vars to (callback SomeClass::someMethod) strings - 'dumperLevelLimit' => 5, // int Maximum dumped vars array or object nested dump level - 'dumperItemsCountLimit' => 100, // int Maximum dumped var same level array items or object properties number - 'dumperItemSizeLimit' => 5000, // int Maximum length of any string or dumped array item - 'dumperDumpSizeLimit' => 500000, // int Maximum approximate size of dumped vars result formatted in JSON - 'detectDumpTraceAndSource' => false, // bool Autodetect and append trace data to debug - 'dataStorage' => null, // PhpConsole\Storage|null Fixes problem with custom $_SESSION handler(see http://goo.gl/Ne8juJ) - ); - - /** @var Connector */ - private $connector; - - /** - * @param array $options See \Monolog\Handler\PHPConsoleHandler::$options for more details - * @param Connector|null $connector Instance of \PhpConsole\Connector class (optional) - * @param int $level - * @param bool $bubble - * @throws Exception - */ - public function __construct(array $options = array(), Connector $connector = null, $level = Logger::DEBUG, $bubble = true) - { - if (!class_exists('PhpConsole\Connector')) { - throw new Exception('PHP Console library not found. See https://github.com/barbushin/php-console#installation'); - } - parent::__construct($level, $bubble); - $this->options = $this->initOptions($options); - $this->connector = $this->initConnector($connector); - } - - private function initOptions(array $options) - { - $wrongOptions = array_diff(array_keys($options), array_keys($this->options)); - if ($wrongOptions) { - throw new Exception('Unknown options: ' . implode(', ', $wrongOptions)); - } - - return array_replace($this->options, $options); - } - - private function initConnector(Connector $connector = null) - { - if (!$connector) { - if ($this->options['dataStorage']) { - Connector::setPostponeStorage($this->options['dataStorage']); - } - $connector = Connector::getInstance(); - } - - if ($this->options['registerHelper'] && !Helper::isRegistered()) { - Helper::register(); - } - - if ($this->options['enabled'] && $connector->isActiveClient()) { - if ($this->options['useOwnErrorsHandler'] || $this->options['useOwnExceptionsHandler']) { - $handler = Handler::getInstance(); - $handler->setHandleErrors($this->options['useOwnErrorsHandler']); - $handler->setHandleExceptions($this->options['useOwnExceptionsHandler']); - $handler->start(); - } - if ($this->options['sourcesBasePath']) { - $connector->setSourcesBasePath($this->options['sourcesBasePath']); - } - if ($this->options['serverEncoding']) { - $connector->setServerEncoding($this->options['serverEncoding']); - } - if ($this->options['password']) { - $connector->setPassword($this->options['password']); - } - if ($this->options['enableSslOnlyMode']) { - $connector->enableSslOnlyMode(); - } - if ($this->options['ipMasks']) { - $connector->setAllowedIpMasks($this->options['ipMasks']); - } - if ($this->options['headersLimit']) { - $connector->setHeadersLimit($this->options['headersLimit']); - } - if ($this->options['detectDumpTraceAndSource']) { - $connector->getDebugDispatcher()->detectTraceAndSource = true; - } - $dumper = $connector->getDumper(); - $dumper->levelLimit = $this->options['dumperLevelLimit']; - $dumper->itemsCountLimit = $this->options['dumperItemsCountLimit']; - $dumper->itemSizeLimit = $this->options['dumperItemSizeLimit']; - $dumper->dumpSizeLimit = $this->options['dumperDumpSizeLimit']; - $dumper->detectCallbacks = $this->options['dumperDetectCallbacks']; - if ($this->options['enableEvalListener']) { - $connector->startEvalRequestsListener(); - } - } - - return $connector; - } - - public function getConnector() - { - return $this->connector; - } - - public function getOptions() - { - return $this->options; - } - - public function handle(array $record) - { - if ($this->options['enabled'] && $this->connector->isActiveClient()) { - return parent::handle($record); - } - - return !$this->bubble; - } - - /** - * Writes the record down to the log of the implementing handler - * - * @param array $record - * @return void - */ - protected function write(array $record) - { - if ($record['level'] < Logger::NOTICE) { - $this->handleDebugRecord($record); - } elseif (isset($record['context']['exception']) && $record['context']['exception'] instanceof Exception) { - $this->handleExceptionRecord($record); - } else { - $this->handleErrorRecord($record); - } - } - - private function handleDebugRecord(array $record) - { - $tags = $this->getRecordTags($record); - $message = $record['message']; - if ($record['context']) { - $message .= ' ' . Utils::jsonEncode($this->connector->getDumper()->dump(array_filter($record['context'])), null, true); - } - $this->connector->getDebugDispatcher()->dispatchDebug($message, $tags, $this->options['classesPartialsTraceIgnore']); - } - - private function handleExceptionRecord(array $record) - { - $this->connector->getErrorsDispatcher()->dispatchException($record['context']['exception']); - } - - private function handleErrorRecord(array $record) - { - $context = $record['context']; - - $this->connector->getErrorsDispatcher()->dispatchError( - isset($context['code']) ? $context['code'] : null, - isset($context['message']) ? $context['message'] : $record['message'], - isset($context['file']) ? $context['file'] : null, - isset($context['line']) ? $context['line'] : null, - $this->options['classesPartialsTraceIgnore'] - ); - } - - private function getRecordTags(array &$record) - { - $tags = null; - if (!empty($record['context'])) { - $context = & $record['context']; - foreach ($this->options['debugTagsKeysInContext'] as $key) { - if (!empty($context[$key])) { - $tags = $context[$key]; - if ($key === 0) { - array_shift($context); - } else { - unset($context[$key]); - } - break; - } - } - } - - return $tags ?: strtolower($record['level_name']); - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter() - { - return new LineFormatter('%message%'); - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/ProcessableHandlerInterface.php b/source/vendor/monolog/monolog/src/Monolog/Handler/ProcessableHandlerInterface.php deleted file mode 100644 index 66a3d83..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/ProcessableHandlerInterface.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Processor\ProcessorInterface; - -/** - * Interface to describe loggers that have processors - * - * This interface is present in monolog 1.x to ease forward compatibility. - * - * @author Jordi Boggiano - */ -interface ProcessableHandlerInterface -{ - /** - * Adds a processor in the stack. - * - * @param ProcessorInterface|callable $callback - * @return HandlerInterface self - */ - public function pushProcessor($callback): HandlerInterface; - - /** - * Removes the processor on top of the stack and returns it. - * - * @throws \LogicException In case the processor stack is empty - * @return callable - */ - public function popProcessor(): callable; -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/ProcessableHandlerTrait.php b/source/vendor/monolog/monolog/src/Monolog/Handler/ProcessableHandlerTrait.php deleted file mode 100644 index 09f32a1..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/ProcessableHandlerTrait.php +++ /dev/null @@ -1,73 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\ResettableInterface; - -/** - * Helper trait for implementing ProcessableInterface - * - * This trait is present in monolog 1.x to ease forward compatibility. - * - * @author Jordi Boggiano - */ -trait ProcessableHandlerTrait -{ - /** - * @var callable[] - */ - protected $processors = []; - - /** - * {@inheritdoc} - * @suppress PhanTypeMismatchReturn - */ - public function pushProcessor($callback): HandlerInterface - { - array_unshift($this->processors, $callback); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function popProcessor(): callable - { - if (!$this->processors) { - throw new \LogicException('You tried to pop from an empty processor stack.'); - } - - return array_shift($this->processors); - } - - /** - * Processes a record. - */ - protected function processRecord(array $record): array - { - foreach ($this->processors as $processor) { - $record = $processor($record); - } - - return $record; - } - - protected function resetProcessors(): void - { - foreach ($this->processors as $processor) { - if ($processor instanceof ResettableInterface) { - $processor->reset(); - } - } - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/PsrHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/PsrHandler.php deleted file mode 100644 index a99e6ab..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/PsrHandler.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Psr\Log\LoggerInterface; - -/** - * Proxies log messages to an existing PSR-3 compliant logger. - * - * @author Michael Moussa - */ -class PsrHandler extends AbstractHandler -{ - /** - * PSR-3 compliant logger - * - * @var LoggerInterface - */ - protected $logger; - - /** - * @param LoggerInterface $logger The underlying PSR-3 compliant logger to which messages will be proxied - * @param int $level The minimum logging level at which this handler will be triggered - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - */ - public function __construct(LoggerInterface $logger, $level = Logger::DEBUG, $bubble = true) - { - parent::__construct($level, $bubble); - - $this->logger = $logger; - } - - /** - * {@inheritDoc} - */ - public function handle(array $record) - { - if (!$this->isHandling($record)) { - return false; - } - - $this->logger->log(strtolower($record['level_name']), $record['message'], $record['context']); - - return false === $this->bubble; - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/PushoverHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/PushoverHandler.php deleted file mode 100644 index f27bb3d..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/PushoverHandler.php +++ /dev/null @@ -1,185 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; - -/** - * Sends notifications through the pushover api to mobile phones - * - * @author Sebastian Göttschkes - * @see https://www.pushover.net/api - */ -class PushoverHandler extends SocketHandler -{ - private $token; - private $users; - private $title; - private $user; - private $retry; - private $expire; - - private $highPriorityLevel; - private $emergencyLevel; - private $useFormattedMessage = false; - - /** - * All parameters that can be sent to Pushover - * @see https://pushover.net/api - * @var array - */ - private $parameterNames = array( - 'token' => true, - 'user' => true, - 'message' => true, - 'device' => true, - 'title' => true, - 'url' => true, - 'url_title' => true, - 'priority' => true, - 'timestamp' => true, - 'sound' => true, - 'retry' => true, - 'expire' => true, - 'callback' => true, - ); - - /** - * Sounds the api supports by default - * @see https://pushover.net/api#sounds - * @var array - */ - private $sounds = array( - 'pushover', 'bike', 'bugle', 'cashregister', 'classical', 'cosmic', 'falling', 'gamelan', 'incoming', - 'intermission', 'magic', 'mechanical', 'pianobar', 'siren', 'spacealarm', 'tugboat', 'alien', 'climb', - 'persistent', 'echo', 'updown', 'none', - ); - - /** - * @param string $token Pushover api token - * @param string|array $users Pushover user id or array of ids the message will be sent to - * @param string $title Title sent to the Pushover API - * @param int $level The minimum logging level at which this handler will be triggered - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - * @param bool $useSSL Whether to connect via SSL. Required when pushing messages to users that are not - * the pushover.net app owner. OpenSSL is required for this option. - * @param int $highPriorityLevel The minimum logging level at which this handler will start - * sending "high priority" requests to the Pushover API - * @param int $emergencyLevel The minimum logging level at which this handler will start - * sending "emergency" requests to the Pushover API - * @param int $retry The retry parameter specifies how often (in seconds) the Pushover servers will send the same notification to the user. - * @param int $expire The expire parameter specifies how many seconds your notification will continue to be retried for (every retry seconds). - */ - public function __construct($token, $users, $title = null, $level = Logger::CRITICAL, $bubble = true, $useSSL = true, $highPriorityLevel = Logger::CRITICAL, $emergencyLevel = Logger::EMERGENCY, $retry = 30, $expire = 25200) - { - $connectionString = $useSSL ? 'ssl://api.pushover.net:443' : 'api.pushover.net:80'; - parent::__construct($connectionString, $level, $bubble); - - $this->token = $token; - $this->users = (array) $users; - $this->title = $title ?: gethostname(); - $this->highPriorityLevel = Logger::toMonologLevel($highPriorityLevel); - $this->emergencyLevel = Logger::toMonologLevel($emergencyLevel); - $this->retry = $retry; - $this->expire = $expire; - } - - protected function generateDataStream($record) - { - $content = $this->buildContent($record); - - return $this->buildHeader($content) . $content; - } - - private function buildContent($record) - { - // Pushover has a limit of 512 characters on title and message combined. - $maxMessageLength = 512 - strlen($this->title); - - $message = ($this->useFormattedMessage) ? $record['formatted'] : $record['message']; - $message = substr($message, 0, $maxMessageLength); - - $timestamp = $record['datetime']->getTimestamp(); - - $dataArray = array( - 'token' => $this->token, - 'user' => $this->user, - 'message' => $message, - 'title' => $this->title, - 'timestamp' => $timestamp, - ); - - if (isset($record['level']) && $record['level'] >= $this->emergencyLevel) { - $dataArray['priority'] = 2; - $dataArray['retry'] = $this->retry; - $dataArray['expire'] = $this->expire; - } elseif (isset($record['level']) && $record['level'] >= $this->highPriorityLevel) { - $dataArray['priority'] = 1; - } - - // First determine the available parameters - $context = array_intersect_key($record['context'], $this->parameterNames); - $extra = array_intersect_key($record['extra'], $this->parameterNames); - - // Least important info should be merged with subsequent info - $dataArray = array_merge($extra, $context, $dataArray); - - // Only pass sounds that are supported by the API - if (isset($dataArray['sound']) && !in_array($dataArray['sound'], $this->sounds)) { - unset($dataArray['sound']); - } - - return http_build_query($dataArray); - } - - private function buildHeader($content) - { - $header = "POST /1/messages.json HTTP/1.1\r\n"; - $header .= "Host: api.pushover.net\r\n"; - $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; - $header .= "Content-Length: " . strlen($content) . "\r\n"; - $header .= "\r\n"; - - return $header; - } - - protected function write(array $record) - { - foreach ($this->users as $user) { - $this->user = $user; - - parent::write($record); - $this->closeSocket(); - } - - $this->user = null; - } - - public function setHighPriorityLevel($value) - { - $this->highPriorityLevel = $value; - } - - public function setEmergencyLevel($value) - { - $this->emergencyLevel = $value; - } - - /** - * Use the formatted message? - * @param bool $value - */ - public function useFormattedMessage($value) - { - $this->useFormattedMessage = (bool) $value; - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/RavenHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/RavenHandler.php deleted file mode 100644 index b0298fa..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/RavenHandler.php +++ /dev/null @@ -1,234 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\LineFormatter; -use Monolog\Formatter\FormatterInterface; -use Monolog\Logger; -use Raven_Client; - -/** - * Handler to send messages to a Sentry (https://github.com/getsentry/sentry) server - * using sentry-php (https://github.com/getsentry/sentry-php) - * - * @author Marc Abramowitz - */ -class RavenHandler extends AbstractProcessingHandler -{ - /** - * Translates Monolog log levels to Raven log levels. - */ - protected $logLevels = array( - Logger::DEBUG => Raven_Client::DEBUG, - Logger::INFO => Raven_Client::INFO, - Logger::NOTICE => Raven_Client::INFO, - Logger::WARNING => Raven_Client::WARNING, - Logger::ERROR => Raven_Client::ERROR, - Logger::CRITICAL => Raven_Client::FATAL, - Logger::ALERT => Raven_Client::FATAL, - Logger::EMERGENCY => Raven_Client::FATAL, - ); - - /** - * @var string should represent the current version of the calling - * software. Can be any string (git commit, version number) - */ - protected $release; - - /** - * @var Raven_Client the client object that sends the message to the server - */ - protected $ravenClient; - - /** - * @var FormatterInterface The formatter to use for the logs generated via handleBatch() - */ - protected $batchFormatter; - - /** - * @param Raven_Client $ravenClient - * @param int $level The minimum logging level at which this handler will be triggered - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - */ - public function __construct(Raven_Client $ravenClient, $level = Logger::DEBUG, $bubble = true) - { - @trigger_error('The Monolog\Handler\RavenHandler class is deprecated. You should rather upgrade to the sentry/sentry 2.x and use Sentry\Monolog\Handler, see https://github.com/getsentry/sentry-php/blob/master/src/Monolog/Handler.php', E_USER_DEPRECATED); - - parent::__construct($level, $bubble); - - $this->ravenClient = $ravenClient; - } - - /** - * {@inheritdoc} - */ - public function handleBatch(array $records) - { - $level = $this->level; - - // filter records based on their level - $records = array_filter($records, function ($record) use ($level) { - return $record['level'] >= $level; - }); - - if (!$records) { - return; - } - - // the record with the highest severity is the "main" one - $record = array_reduce($records, function ($highest, $record) { - if (null === $highest || $record['level'] > $highest['level']) { - return $record; - } - - return $highest; - }); - - // the other ones are added as a context item - $logs = array(); - foreach ($records as $r) { - $logs[] = $this->processRecord($r); - } - - if ($logs) { - $record['context']['logs'] = (string) $this->getBatchFormatter()->formatBatch($logs); - } - - $this->handle($record); - } - - /** - * Sets the formatter for the logs generated by handleBatch(). - * - * @param FormatterInterface $formatter - */ - public function setBatchFormatter(FormatterInterface $formatter) - { - $this->batchFormatter = $formatter; - } - - /** - * Gets the formatter for the logs generated by handleBatch(). - * - * @return FormatterInterface - */ - public function getBatchFormatter() - { - if (!$this->batchFormatter) { - $this->batchFormatter = $this->getDefaultBatchFormatter(); - } - - return $this->batchFormatter; - } - - /** - * {@inheritdoc} - */ - protected function write(array $record) - { - $previousUserContext = false; - $options = array(); - $options['level'] = $this->logLevels[$record['level']]; - $options['tags'] = array(); - if (!empty($record['extra']['tags'])) { - $options['tags'] = array_merge($options['tags'], $record['extra']['tags']); - unset($record['extra']['tags']); - } - if (!empty($record['context']['tags'])) { - $options['tags'] = array_merge($options['tags'], $record['context']['tags']); - unset($record['context']['tags']); - } - if (!empty($record['context']['fingerprint'])) { - $options['fingerprint'] = $record['context']['fingerprint']; - unset($record['context']['fingerprint']); - } - if (!empty($record['context']['logger'])) { - $options['logger'] = $record['context']['logger']; - unset($record['context']['logger']); - } else { - $options['logger'] = $record['channel']; - } - foreach ($this->getExtraParameters() as $key) { - foreach (array('extra', 'context') as $source) { - if (!empty($record[$source][$key])) { - $options[$key] = $record[$source][$key]; - unset($record[$source][$key]); - } - } - } - if (!empty($record['context'])) { - $options['extra']['context'] = $record['context']; - if (!empty($record['context']['user'])) { - $previousUserContext = $this->ravenClient->context->user; - $this->ravenClient->user_context($record['context']['user']); - unset($options['extra']['context']['user']); - } - } - if (!empty($record['extra'])) { - $options['extra']['extra'] = $record['extra']; - } - - if (!empty($this->release) && !isset($options['release'])) { - $options['release'] = $this->release; - } - - if (isset($record['context']['exception']) && ($record['context']['exception'] instanceof \Exception || (PHP_VERSION_ID >= 70000 && $record['context']['exception'] instanceof \Throwable))) { - $options['message'] = $record['formatted']; - $this->ravenClient->captureException($record['context']['exception'], $options); - } else { - $this->ravenClient->captureMessage($record['formatted'], array(), $options); - } - - if ($previousUserContext !== false) { - $this->ravenClient->user_context($previousUserContext); - } - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter() - { - return new LineFormatter('[%channel%] %message%'); - } - - /** - * Gets the default formatter for the logs generated by handleBatch(). - * - * @return FormatterInterface - */ - protected function getDefaultBatchFormatter() - { - return new LineFormatter(); - } - - /** - * Gets extra parameters supported by Raven that can be found in "extra" and "context" - * - * @return array - */ - protected function getExtraParameters() - { - return array('contexts', 'checksum', 'release', 'event_id'); - } - - /** - * @param string $value - * @return self - */ - public function setRelease($value) - { - $this->release = $value; - - return $this; - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php deleted file mode 100644 index 3725db2..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php +++ /dev/null @@ -1,98 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\LineFormatter; -use Monolog\Logger; - -/** - * Logs to a Redis key using rpush - * - * usage example: - * - * $log = new Logger('application'); - * $redis = new RedisHandler(new Predis\Client("tcp://localhost:6379"), "logs", "prod"); - * $log->pushHandler($redis); - * - * @author Thomas Tourlourat - */ -class RedisHandler extends AbstractProcessingHandler -{ - private $redisClient; - private $redisKey; - protected $capSize; - - /** - * @param \Predis\Client|\Redis $redis The redis instance - * @param string $key The key name to push records to - * @param int $level The minimum logging level at which this handler will be triggered - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - * @param int|false $capSize Number of entries to limit list size to - */ - public function __construct($redis, $key, $level = Logger::DEBUG, $bubble = true, $capSize = false) - { - if (!(($redis instanceof \Predis\Client) || ($redis instanceof \Redis))) { - throw new \InvalidArgumentException('Predis\Client or Redis instance required'); - } - - $this->redisClient = $redis; - $this->redisKey = $key; - $this->capSize = $capSize; - - parent::__construct($level, $bubble); - } - - /** - * {@inheritDoc} - */ - protected function write(array $record) - { - if ($this->capSize) { - $this->writeCapped($record); - } else { - $this->redisClient->rpush($this->redisKey, $record["formatted"]); - } - } - - /** - * Write and cap the collection - * Writes the record to the redis list and caps its - * - * @param array $record associative record array - * @return void - */ - protected function writeCapped(array $record) - { - if ($this->redisClient instanceof \Redis) { - $mode = defined('\Redis::MULTI') ? \Redis::MULTI : 1; - $this->redisClient->multi($mode) - ->rpush($this->redisKey, $record["formatted"]) - ->ltrim($this->redisKey, -$this->capSize, -1) - ->exec(); - } else { - $redisKey = $this->redisKey; - $capSize = $this->capSize; - $this->redisClient->transaction(function ($tx) use ($record, $redisKey, $capSize) { - $tx->rpush($redisKey, $record["formatted"]); - $tx->ltrim($redisKey, -$capSize, -1); - }); - } - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter() - { - return new LineFormatter(); - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/RollbarHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/RollbarHandler.php deleted file mode 100644 index 65073ff..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/RollbarHandler.php +++ /dev/null @@ -1,144 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use RollbarNotifier; -use Exception; -use Monolog\Logger; - -/** - * Sends errors to Rollbar - * - * If the context data contains a `payload` key, that is used as an array - * of payload options to RollbarNotifier's report_message/report_exception methods. - * - * Rollbar's context info will contain the context + extra keys from the log record - * merged, and then on top of that a few keys: - * - * - level (rollbar level name) - * - monolog_level (monolog level name, raw level, as rollbar only has 5 but monolog 8) - * - channel - * - datetime (unix timestamp) - * - * @author Paul Statezny - */ -class RollbarHandler extends AbstractProcessingHandler -{ - /** - * Rollbar notifier - * - * @var RollbarNotifier - */ - protected $rollbarNotifier; - - protected $levelMap = array( - Logger::DEBUG => 'debug', - Logger::INFO => 'info', - Logger::NOTICE => 'info', - Logger::WARNING => 'warning', - Logger::ERROR => 'error', - Logger::CRITICAL => 'critical', - Logger::ALERT => 'critical', - Logger::EMERGENCY => 'critical', - ); - - /** - * Records whether any log records have been added since the last flush of the rollbar notifier - * - * @var bool - */ - private $hasRecords = false; - - protected $initialized = false; - - /** - * @param RollbarNotifier $rollbarNotifier RollbarNotifier object constructed with valid token - * @param int $level The minimum logging level at which this handler will be triggered - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - */ - public function __construct(RollbarNotifier $rollbarNotifier, $level = Logger::ERROR, $bubble = true) - { - $this->rollbarNotifier = $rollbarNotifier; - - parent::__construct($level, $bubble); - } - - /** - * {@inheritdoc} - */ - protected function write(array $record) - { - if (!$this->initialized) { - // __destructor() doesn't get called on Fatal errors - register_shutdown_function(array($this, 'close')); - $this->initialized = true; - } - - $context = $record['context']; - $payload = array(); - if (isset($context['payload'])) { - $payload = $context['payload']; - unset($context['payload']); - } - $context = array_merge($context, $record['extra'], array( - 'level' => $this->levelMap[$record['level']], - 'monolog_level' => $record['level_name'], - 'channel' => $record['channel'], - 'datetime' => $record['datetime']->format('U'), - )); - - if (isset($context['exception']) && $context['exception'] instanceof Exception) { - $payload['level'] = $context['level']; - $exception = $context['exception']; - unset($context['exception']); - - $this->rollbarNotifier->report_exception($exception, $context, $payload); - } else { - $this->rollbarNotifier->report_message( - $record['message'], - $context['level'], - $context, - $payload - ); - } - - $this->hasRecords = true; - } - - public function flush() - { - if ($this->hasRecords) { - $this->rollbarNotifier->flush(); - $this->hasRecords = false; - } - } - - /** - * {@inheritdoc} - */ - public function close() - { - $this->flush(); - } - - /** - * {@inheritdoc} - */ - public function reset() - { - $this->flush(); - - parent::reset(); - } - - -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php deleted file mode 100644 index b8253ba..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php +++ /dev/null @@ -1,191 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Utils; - -/** - * Stores logs to files that are rotated every day and a limited number of files are kept. - * - * This rotation is only intended to be used as a workaround. Using logrotate to - * handle the rotation is strongly encouraged when you can use it. - * - * @author Christophe Coevoet - * @author Jordi Boggiano - */ -class RotatingFileHandler extends StreamHandler -{ - const FILE_PER_DAY = 'Y-m-d'; - const FILE_PER_MONTH = 'Y-m'; - const FILE_PER_YEAR = 'Y'; - - protected $filename; - protected $maxFiles; - protected $mustRotate; - protected $nextRotation; - protected $filenameFormat; - protected $dateFormat; - - /** - * @param string $filename - * @param int $maxFiles The maximal amount of files to keep (0 means unlimited) - * @param int $level The minimum logging level at which this handler will be triggered - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - * @param int|null $filePermission Optional file permissions (default (0644) are only for owner read/write) - * @param bool $useLocking Try to lock log file before doing any writes - */ - public function __construct($filename, $maxFiles = 0, $level = Logger::DEBUG, $bubble = true, $filePermission = null, $useLocking = false) - { - $this->filename = Utils::canonicalizePath($filename); - $this->maxFiles = (int) $maxFiles; - $this->nextRotation = new \DateTime('tomorrow'); - $this->filenameFormat = '{filename}-{date}'; - $this->dateFormat = 'Y-m-d'; - - parent::__construct($this->getTimedFilename(), $level, $bubble, $filePermission, $useLocking); - } - - /** - * {@inheritdoc} - */ - public function close() - { - parent::close(); - - if (true === $this->mustRotate) { - $this->rotate(); - } - } - - /** - * {@inheritdoc} - */ - public function reset() - { - parent::reset(); - - if (true === $this->mustRotate) { - $this->rotate(); - } - } - - public function setFilenameFormat($filenameFormat, $dateFormat) - { - if (!preg_match('{^Y(([/_.-]?m)([/_.-]?d)?)?$}', $dateFormat)) { - trigger_error( - 'Invalid date format - format must be one of '. - 'RotatingFileHandler::FILE_PER_DAY ("Y-m-d"), RotatingFileHandler::FILE_PER_MONTH ("Y-m") '. - 'or RotatingFileHandler::FILE_PER_YEAR ("Y"), or you can set one of the '. - 'date formats using slashes, underscores and/or dots instead of dashes.', - E_USER_DEPRECATED - ); - } - if (substr_count($filenameFormat, '{date}') === 0) { - trigger_error( - 'Invalid filename format - format should contain at least `{date}`, because otherwise rotating is impossible.', - E_USER_DEPRECATED - ); - } - $this->filenameFormat = $filenameFormat; - $this->dateFormat = $dateFormat; - $this->url = $this->getTimedFilename(); - $this->close(); - } - - /** - * {@inheritdoc} - */ - protected function write(array $record) - { - // on the first record written, if the log is new, we should rotate (once per day) - if (null === $this->mustRotate) { - $this->mustRotate = !file_exists($this->url); - } - - if ($this->nextRotation < $record['datetime']) { - $this->mustRotate = true; - $this->close(); - } - - parent::write($record); - } - - /** - * Rotates the files. - */ - protected function rotate() - { - // update filename - $this->url = $this->getTimedFilename(); - $this->nextRotation = new \DateTime('tomorrow'); - - // skip GC of old logs if files are unlimited - if (0 === $this->maxFiles) { - return; - } - - $logFiles = glob($this->getGlobPattern()); - if ($this->maxFiles >= count($logFiles)) { - // no files to remove - return; - } - - // Sorting the files by name to remove the older ones - usort($logFiles, function ($a, $b) { - return strcmp($b, $a); - }); - - foreach (array_slice($logFiles, $this->maxFiles) as $file) { - if (is_writable($file)) { - // suppress errors here as unlink() might fail if two processes - // are cleaning up/rotating at the same time - set_error_handler(function ($errno, $errstr, $errfile, $errline) {}); - unlink($file); - restore_error_handler(); - } - } - - $this->mustRotate = false; - } - - protected function getTimedFilename() - { - $fileInfo = pathinfo($this->filename); - $timedFilename = str_replace( - array('{filename}', '{date}'), - array($fileInfo['filename'], date($this->dateFormat)), - $fileInfo['dirname'] . '/' . $this->filenameFormat - ); - - if (!empty($fileInfo['extension'])) { - $timedFilename .= '.'.$fileInfo['extension']; - } - - return $timedFilename; - } - - protected function getGlobPattern() - { - $fileInfo = pathinfo($this->filename); - $glob = str_replace( - array('{filename}', '{date}'), - array($fileInfo['filename'], '[0-9][0-9][0-9][0-9]*'), - $fileInfo['dirname'] . '/' . $this->filenameFormat - ); - if (!empty($fileInfo['extension'])) { - $glob .= '.'.$fileInfo['extension']; - } - - return $glob; - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/SamplingHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/SamplingHandler.php deleted file mode 100644 index b547ed7..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/SamplingHandler.php +++ /dev/null @@ -1,113 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; - -/** - * Sampling handler - * - * A sampled event stream can be useful for logging high frequency events in - * a production environment where you only need an idea of what is happening - * and are not concerned with capturing every occurrence. Since the decision to - * handle or not handle a particular event is determined randomly, the - * resulting sampled log is not guaranteed to contain 1/N of the events that - * occurred in the application, but based on the Law of large numbers, it will - * tend to be close to this ratio with a large number of attempts. - * - * @author Bryan Davis - * @author Kunal Mehta - */ -class SamplingHandler extends AbstractHandler -{ - /** - * @var callable|HandlerInterface $handler - */ - protected $handler; - - /** - * @var int $factor - */ - protected $factor; - - /** - * @param callable|HandlerInterface $handler Handler or factory callable($record|null, $samplingHandler). - * @param int $factor Sample factor - */ - public function __construct($handler, $factor) - { - parent::__construct(); - $this->handler = $handler; - $this->factor = $factor; - - if (!$this->handler instanceof HandlerInterface && !is_callable($this->handler)) { - throw new \RuntimeException("The given handler (".json_encode($this->handler).") is not a callable nor a Monolog\Handler\HandlerInterface object"); - } - } - - public function isHandling(array $record) - { - return $this->getHandler($record)->isHandling($record); - } - - public function handle(array $record) - { - if ($this->isHandling($record) && mt_rand(1, $this->factor) === 1) { - if ($this->processors) { - foreach ($this->processors as $processor) { - $record = call_user_func($processor, $record); - } - } - - $this->getHandler($record)->handle($record); - } - - return false === $this->bubble; - } - - /** - * Return the nested handler - * - * If the handler was provided as a factory callable, this will trigger the handler's instantiation. - * - * @return HandlerInterface - */ - public function getHandler(array $record = null) - { - if (!$this->handler instanceof HandlerInterface) { - $this->handler = call_user_func($this->handler, $record, $this); - if (!$this->handler instanceof HandlerInterface) { - throw new \RuntimeException("The factory callable should return a HandlerInterface"); - } - } - - return $this->handler; - } - - /** - * {@inheritdoc} - */ - public function setFormatter(FormatterInterface $formatter) - { - $this->getHandler()->setFormatter($formatter); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function getFormatter() - { - return $this->getHandler()->getFormatter(); - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php b/source/vendor/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php deleted file mode 100644 index 3945550..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php +++ /dev/null @@ -1,299 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler\Slack; - -use Monolog\Logger; -use Monolog\Utils; -use Monolog\Formatter\NormalizerFormatter; -use Monolog\Formatter\FormatterInterface; - -/** - * Slack record utility helping to log to Slack webhooks or API. - * - * @author Greg Kedzierski - * @author Haralan Dobrev - * @see https://api.slack.com/incoming-webhooks - * @see https://api.slack.com/docs/message-attachments - */ -class SlackRecord -{ - const COLOR_DANGER = 'danger'; - - const COLOR_WARNING = 'warning'; - - const COLOR_GOOD = 'good'; - - const COLOR_DEFAULT = '#e3e4e6'; - - /** - * Slack channel (encoded ID or name) - * @var string|null - */ - private $channel; - - /** - * Name of a bot - * @var string|null - */ - private $username; - - /** - * User icon e.g. 'ghost', 'http://example.com/user.png' - * @var string - */ - private $userIcon; - - /** - * Whether the message should be added to Slack as attachment (plain text otherwise) - * @var bool - */ - private $useAttachment; - - /** - * Whether the the context/extra messages added to Slack as attachments are in a short style - * @var bool - */ - private $useShortAttachment; - - /** - * Whether the attachment should include context and extra data - * @var bool - */ - private $includeContextAndExtra; - - /** - * Dot separated list of fields to exclude from slack message. E.g. ['context.field1', 'extra.field2'] - * @var array - */ - private $excludeFields; - - /** - * @var FormatterInterface - */ - private $formatter; - - /** - * @var NormalizerFormatter - */ - private $normalizerFormatter; - - public function __construct($channel = null, $username = null, $useAttachment = true, $userIcon = null, $useShortAttachment = false, $includeContextAndExtra = false, array $excludeFields = array(), FormatterInterface $formatter = null) - { - $this->channel = $channel; - $this->username = $username; - $this->userIcon = trim($userIcon, ':'); - $this->useAttachment = $useAttachment; - $this->useShortAttachment = $useShortAttachment; - $this->includeContextAndExtra = $includeContextAndExtra; - $this->excludeFields = $excludeFields; - $this->formatter = $formatter; - - if ($this->includeContextAndExtra) { - $this->normalizerFormatter = new NormalizerFormatter(); - } - } - - public function getSlackData(array $record) - { - $dataArray = array(); - $record = $this->excludeFields($record); - - if ($this->username) { - $dataArray['username'] = $this->username; - } - - if ($this->channel) { - $dataArray['channel'] = $this->channel; - } - - if ($this->formatter && !$this->useAttachment) { - $message = $this->formatter->format($record); - } else { - $message = $record['message']; - } - - if ($this->useAttachment) { - $attachment = array( - 'fallback' => $message, - 'text' => $message, - 'color' => $this->getAttachmentColor($record['level']), - 'fields' => array(), - 'mrkdwn_in' => array('fields'), - 'ts' => $record['datetime']->getTimestamp() - ); - - if ($this->useShortAttachment) { - $attachment['title'] = $record['level_name']; - } else { - $attachment['title'] = 'Message'; - $attachment['fields'][] = $this->generateAttachmentField('Level', $record['level_name']); - } - - - if ($this->includeContextAndExtra) { - foreach (array('extra', 'context') as $key) { - if (empty($record[$key])) { - continue; - } - - if ($this->useShortAttachment) { - $attachment['fields'][] = $this->generateAttachmentField( - $key, - $record[$key] - ); - } else { - // Add all extra fields as individual fields in attachment - $attachment['fields'] = array_merge( - $attachment['fields'], - $this->generateAttachmentFields($record[$key]) - ); - } - } - } - - $dataArray['attachments'] = array($attachment); - } else { - $dataArray['text'] = $message; - } - - if ($this->userIcon) { - if (filter_var($this->userIcon, FILTER_VALIDATE_URL)) { - $dataArray['icon_url'] = $this->userIcon; - } else { - $dataArray['icon_emoji'] = ":{$this->userIcon}:"; - } - } - - return $dataArray; - } - - /** - * Returned a Slack message attachment color associated with - * provided level. - * - * @param int $level - * @return string - */ - public function getAttachmentColor($level) - { - switch (true) { - case $level >= Logger::ERROR: - return self::COLOR_DANGER; - case $level >= Logger::WARNING: - return self::COLOR_WARNING; - case $level >= Logger::INFO: - return self::COLOR_GOOD; - default: - return self::COLOR_DEFAULT; - } - } - - /** - * Stringifies an array of key/value pairs to be used in attachment fields - * - * @param array $fields - * - * @return string - */ - public function stringify($fields) - { - $normalized = $this->normalizerFormatter->format($fields); - $prettyPrintFlag = defined('JSON_PRETTY_PRINT') ? JSON_PRETTY_PRINT : 128; - $flags = 0; - if (PHP_VERSION_ID >= 50400) { - $flags = JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE; - } - - $hasSecondDimension = count(array_filter($normalized, 'is_array')); - $hasNonNumericKeys = !count(array_filter(array_keys($normalized), 'is_numeric')); - - return $hasSecondDimension || $hasNonNumericKeys - ? Utils::jsonEncode($normalized, $prettyPrintFlag | $flags) - : Utils::jsonEncode($normalized, $flags); - } - - /** - * Sets the formatter - * - * @param FormatterInterface $formatter - */ - public function setFormatter(FormatterInterface $formatter) - { - $this->formatter = $formatter; - } - - /** - * Generates attachment field - * - * @param string $title - * @param string|array $value - * - * @return array - */ - private function generateAttachmentField($title, $value) - { - $value = is_array($value) - ? sprintf('```%s```', $this->stringify($value)) - : $value; - - return array( - 'title' => ucfirst($title), - 'value' => $value, - 'short' => false - ); - } - - /** - * Generates a collection of attachment fields from array - * - * @param array $data - * - * @return array - */ - private function generateAttachmentFields(array $data) - { - $fields = array(); - foreach ($this->normalizerFormatter->format($data) as $key => $value) { - $fields[] = $this->generateAttachmentField($key, $value); - } - - return $fields; - } - - /** - * Get a copy of record with fields excluded according to $this->excludeFields - * - * @param array $record - * - * @return array - */ - private function excludeFields(array $record) - { - foreach ($this->excludeFields as $field) { - $keys = explode('.', $field); - $node = &$record; - $lastKey = end($keys); - foreach ($keys as $key) { - if (!isset($node[$key])) { - break; - } - if ($lastKey === $key) { - unset($node[$key]); - break; - } - $node = &$node[$key]; - } - } - - return $record; - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/SlackHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/SlackHandler.php deleted file mode 100644 index 88c4c4d..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/SlackHandler.php +++ /dev/null @@ -1,221 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; -use Monolog\Logger; -use Monolog\Utils; -use Monolog\Handler\Slack\SlackRecord; - -/** - * Sends notifications through Slack API - * - * @author Greg Kedzierski - * @see https://api.slack.com/ - */ -class SlackHandler extends SocketHandler -{ - /** - * Slack API token - * @var string - */ - private $token; - - /** - * Instance of the SlackRecord util class preparing data for Slack API. - * @var SlackRecord - */ - private $slackRecord; - - /** - * @param string $token Slack API token - * @param string $channel Slack channel (encoded ID or name) - * @param string|null $username Name of a bot - * @param bool $useAttachment Whether the message should be added to Slack as attachment (plain text otherwise) - * @param string|null $iconEmoji The emoji name to use (or null) - * @param int $level The minimum logging level at which this handler will be triggered - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - * @param bool $useShortAttachment Whether the the context/extra messages added to Slack as attachments are in a short style - * @param bool $includeContextAndExtra Whether the attachment should include context and extra data - * @param array $excludeFields Dot separated list of fields to exclude from slack message. E.g. ['context.field1', 'extra.field2'] - * @throws MissingExtensionException If no OpenSSL PHP extension configured - */ - public function __construct($token, $channel, $username = null, $useAttachment = true, $iconEmoji = null, $level = Logger::CRITICAL, $bubble = true, $useShortAttachment = false, $includeContextAndExtra = false, array $excludeFields = array()) - { - if (!extension_loaded('openssl')) { - throw new MissingExtensionException('The OpenSSL PHP extension is required to use the SlackHandler'); - } - - parent::__construct('ssl://slack.com:443', $level, $bubble); - - $this->slackRecord = new SlackRecord( - $channel, - $username, - $useAttachment, - $iconEmoji, - $useShortAttachment, - $includeContextAndExtra, - $excludeFields, - $this->formatter - ); - - $this->token = $token; - } - - public function getSlackRecord() - { - return $this->slackRecord; - } - - public function getToken() - { - return $this->token; - } - - /** - * {@inheritdoc} - * - * @param array $record - * @return string - */ - protected function generateDataStream($record) - { - $content = $this->buildContent($record); - - return $this->buildHeader($content) . $content; - } - - /** - * Builds the body of API call - * - * @param array $record - * @return string - */ - private function buildContent($record) - { - $dataArray = $this->prepareContentData($record); - - return http_build_query($dataArray); - } - - /** - * Prepares content data - * - * @param array $record - * @return array - */ - protected function prepareContentData($record) - { - $dataArray = $this->slackRecord->getSlackData($record); - $dataArray['token'] = $this->token; - - if (!empty($dataArray['attachments'])) { - $dataArray['attachments'] = Utils::jsonEncode($dataArray['attachments']); - } - - return $dataArray; - } - - /** - * Builds the header of the API Call - * - * @param string $content - * @return string - */ - private function buildHeader($content) - { - $header = "POST /api/chat.postMessage HTTP/1.1\r\n"; - $header .= "Host: slack.com\r\n"; - $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; - $header .= "Content-Length: " . strlen($content) . "\r\n"; - $header .= "\r\n"; - - return $header; - } - - /** - * {@inheritdoc} - * - * @param array $record - */ - protected function write(array $record) - { - parent::write($record); - $this->finalizeWrite(); - } - - /** - * Finalizes the request by reading some bytes and then closing the socket - * - * If we do not read some but close the socket too early, slack sometimes - * drops the request entirely. - */ - protected function finalizeWrite() - { - $res = $this->getResource(); - if (is_resource($res)) { - @fread($res, 2048); - } - $this->closeSocket(); - } - - /** - * Returned a Slack message attachment color associated with - * provided level. - * - * @param int $level - * @return string - * @deprecated Use underlying SlackRecord instead - */ - protected function getAttachmentColor($level) - { - trigger_error( - 'SlackHandler::getAttachmentColor() is deprecated. Use underlying SlackRecord instead.', - E_USER_DEPRECATED - ); - - return $this->slackRecord->getAttachmentColor($level); - } - - /** - * Stringifies an array of key/value pairs to be used in attachment fields - * - * @param array $fields - * @return string - * @deprecated Use underlying SlackRecord instead - */ - protected function stringify($fields) - { - trigger_error( - 'SlackHandler::stringify() is deprecated. Use underlying SlackRecord instead.', - E_USER_DEPRECATED - ); - - return $this->slackRecord->stringify($fields); - } - - public function setFormatter(FormatterInterface $formatter) - { - parent::setFormatter($formatter); - $this->slackRecord->setFormatter($formatter); - - return $this; - } - - public function getFormatter() - { - $formatter = parent::getFormatter(); - $this->slackRecord->setFormatter($formatter); - - return $formatter; - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php deleted file mode 100644 index b87be99..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php +++ /dev/null @@ -1,121 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; -use Monolog\Logger; -use Monolog\Utils; -use Monolog\Handler\Slack\SlackRecord; - -/** - * Sends notifications through Slack Webhooks - * - * @author Haralan Dobrev - * @see https://api.slack.com/incoming-webhooks - */ -class SlackWebhookHandler extends AbstractProcessingHandler -{ - /** - * Slack Webhook token - * @var string - */ - private $webhookUrl; - - /** - * Instance of the SlackRecord util class preparing data for Slack API. - * @var SlackRecord - */ - private $slackRecord; - - /** - * @param string $webhookUrl Slack Webhook URL - * @param string|null $channel Slack channel (encoded ID or name) - * @param string|null $username Name of a bot - * @param bool $useAttachment Whether the message should be added to Slack as attachment (plain text otherwise) - * @param string|null $iconEmoji The emoji name to use (or null) - * @param bool $useShortAttachment Whether the the context/extra messages added to Slack as attachments are in a short style - * @param bool $includeContextAndExtra Whether the attachment should include context and extra data - * @param int $level The minimum logging level at which this handler will be triggered - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - * @param array $excludeFields Dot separated list of fields to exclude from slack message. E.g. ['context.field1', 'extra.field2'] - */ - public function __construct($webhookUrl, $channel = null, $username = null, $useAttachment = true, $iconEmoji = null, $useShortAttachment = false, $includeContextAndExtra = false, $level = Logger::CRITICAL, $bubble = true, array $excludeFields = array()) - { - parent::__construct($level, $bubble); - - $this->webhookUrl = $webhookUrl; - - $this->slackRecord = new SlackRecord( - $channel, - $username, - $useAttachment, - $iconEmoji, - $useShortAttachment, - $includeContextAndExtra, - $excludeFields, - $this->formatter - ); - } - - public function getSlackRecord() - { - return $this->slackRecord; - } - - public function getWebhookUrl() - { - return $this->webhookUrl; - } - - /** - * {@inheritdoc} - * - * @param array $record - */ - protected function write(array $record) - { - $postData = $this->slackRecord->getSlackData($record); - $postString = Utils::jsonEncode($postData); - - $ch = curl_init(); - $options = array( - CURLOPT_URL => $this->webhookUrl, - CURLOPT_POST => true, - CURLOPT_RETURNTRANSFER => true, - CURLOPT_HTTPHEADER => array('Content-type: application/json'), - CURLOPT_POSTFIELDS => $postString - ); - if (defined('CURLOPT_SAFE_UPLOAD')) { - $options[CURLOPT_SAFE_UPLOAD] = true; - } - - curl_setopt_array($ch, $options); - - Curl\Util::execute($ch); - } - - public function setFormatter(FormatterInterface $formatter) - { - parent::setFormatter($formatter); - $this->slackRecord->setFormatter($formatter); - - return $this; - } - - public function getFormatter() - { - $formatter = parent::getFormatter(); - $this->slackRecord->setFormatter($formatter); - - return $formatter; - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/SlackbotHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/SlackbotHandler.php deleted file mode 100644 index d3352ea..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/SlackbotHandler.php +++ /dev/null @@ -1,84 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; - -/** - * Sends notifications through Slack's Slackbot - * - * @author Haralan Dobrev - * @see https://slack.com/apps/A0F81R8ET-slackbot - * @deprecated According to Slack the API used on this handler it is deprecated. - * Therefore this handler will be removed on 2.x - * Slack suggests to use webhooks instead. Please contact slack for more information. - */ -class SlackbotHandler extends AbstractProcessingHandler -{ - /** - * The slug of the Slack team - * @var string - */ - private $slackTeam; - - /** - * Slackbot token - * @var string - */ - private $token; - - /** - * Slack channel name - * @var string - */ - private $channel; - - /** - * @param string $slackTeam Slack team slug - * @param string $token Slackbot token - * @param string $channel Slack channel (encoded ID or name) - * @param int $level The minimum logging level at which this handler will be triggered - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - */ - public function __construct($slackTeam, $token, $channel, $level = Logger::CRITICAL, $bubble = true) - { - @trigger_error('SlackbotHandler is deprecated and will be removed on 2.x', E_USER_DEPRECATED); - parent::__construct($level, $bubble); - - $this->slackTeam = $slackTeam; - $this->token = $token; - $this->channel = $channel; - } - - /** - * {@inheritdoc} - * - * @param array $record - */ - protected function write(array $record) - { - $slackbotUrl = sprintf( - 'https://%s.slack.com/services/hooks/slackbot?token=%s&channel=%s', - $this->slackTeam, - $this->token, - $this->channel - ); - - $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, $slackbotUrl); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $record['message']); - - Curl\Util::execute($ch); - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/SocketHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/SocketHandler.php deleted file mode 100644 index db50d97..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/SocketHandler.php +++ /dev/null @@ -1,385 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; - -/** - * Stores to any socket - uses fsockopen() or pfsockopen(). - * - * @author Pablo de Leon Belloc - * @see http://php.net/manual/en/function.fsockopen.php - */ -class SocketHandler extends AbstractProcessingHandler -{ - private $connectionString; - private $connectionTimeout; - private $resource; - private $timeout = 0; - private $writingTimeout = 10; - private $lastSentBytes = null; - private $chunkSize = null; - private $persistent = false; - private $errno; - private $errstr; - private $lastWritingAt; - - /** - * @param string $connectionString Socket connection string - * @param int $level The minimum logging level at which this handler will be triggered - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - */ - public function __construct($connectionString, $level = Logger::DEBUG, $bubble = true) - { - parent::__construct($level, $bubble); - $this->connectionString = $connectionString; - $this->connectionTimeout = (float) ini_get('default_socket_timeout'); - } - - /** - * Connect (if necessary) and write to the socket - * - * @param array $record - * - * @throws \UnexpectedValueException - * @throws \RuntimeException - */ - protected function write(array $record) - { - $this->connectIfNotConnected(); - $data = $this->generateDataStream($record); - $this->writeToSocket($data); - } - - /** - * We will not close a PersistentSocket instance so it can be reused in other requests. - */ - public function close() - { - if (!$this->isPersistent()) { - $this->closeSocket(); - } - } - - /** - * Close socket, if open - */ - public function closeSocket() - { - if (is_resource($this->resource)) { - fclose($this->resource); - $this->resource = null; - } - } - - /** - * Set socket connection to nbe persistent. It only has effect before the connection is initiated. - * - * @param bool $persistent - */ - public function setPersistent($persistent) - { - $this->persistent = (bool) $persistent; - } - - /** - * Set connection timeout. Only has effect before we connect. - * - * @param float $seconds - * - * @see http://php.net/manual/en/function.fsockopen.php - */ - public function setConnectionTimeout($seconds) - { - $this->validateTimeout($seconds); - $this->connectionTimeout = (float) $seconds; - } - - /** - * Set write timeout. Only has effect before we connect. - * - * @param float $seconds - * - * @see http://php.net/manual/en/function.stream-set-timeout.php - */ - public function setTimeout($seconds) - { - $this->validateTimeout($seconds); - $this->timeout = (float) $seconds; - } - - /** - * Set writing timeout. Only has effect during connection in the writing cycle. - * - * @param float $seconds 0 for no timeout - */ - public function setWritingTimeout($seconds) - { - $this->validateTimeout($seconds); - $this->writingTimeout = (float) $seconds; - } - - /** - * Set chunk size. Only has effect during connection in the writing cycle. - * - * @param float $bytes - */ - public function setChunkSize($bytes) - { - $this->chunkSize = $bytes; - } - - /** - * Get current connection string - * - * @return string - */ - public function getConnectionString() - { - return $this->connectionString; - } - - /** - * Get persistent setting - * - * @return bool - */ - public function isPersistent() - { - return $this->persistent; - } - - /** - * Get current connection timeout setting - * - * @return float - */ - public function getConnectionTimeout() - { - return $this->connectionTimeout; - } - - /** - * Get current in-transfer timeout - * - * @return float - */ - public function getTimeout() - { - return $this->timeout; - } - - /** - * Get current local writing timeout - * - * @return float - */ - public function getWritingTimeout() - { - return $this->writingTimeout; - } - - /** - * Get current chunk size - * - * @return float - */ - public function getChunkSize() - { - return $this->chunkSize; - } - - /** - * Check to see if the socket is currently available. - * - * UDP might appear to be connected but might fail when writing. See http://php.net/fsockopen for details. - * - * @return bool - */ - public function isConnected() - { - return is_resource($this->resource) - && !feof($this->resource); // on TCP - other party can close connection. - } - - /** - * Wrapper to allow mocking - */ - protected function pfsockopen() - { - return @pfsockopen($this->connectionString, -1, $this->errno, $this->errstr, $this->connectionTimeout); - } - - /** - * Wrapper to allow mocking - */ - protected function fsockopen() - { - return @fsockopen($this->connectionString, -1, $this->errno, $this->errstr, $this->connectionTimeout); - } - - /** - * Wrapper to allow mocking - * - * @see http://php.net/manual/en/function.stream-set-timeout.php - */ - protected function streamSetTimeout() - { - $seconds = floor($this->timeout); - $microseconds = round(($this->timeout - $seconds) * 1e6); - - return stream_set_timeout($this->resource, $seconds, $microseconds); - } - - /** - * Wrapper to allow mocking - * - * @see http://php.net/manual/en/function.stream-set-chunk-size.php - */ - protected function streamSetChunkSize() - { - return stream_set_chunk_size($this->resource, $this->chunkSize); - } - - /** - * Wrapper to allow mocking - */ - protected function fwrite($data) - { - return @fwrite($this->resource, $data); - } - - /** - * Wrapper to allow mocking - */ - protected function streamGetMetadata() - { - return stream_get_meta_data($this->resource); - } - - private function validateTimeout($value) - { - $ok = filter_var($value, FILTER_VALIDATE_FLOAT); - if ($ok === false || $value < 0) { - throw new \InvalidArgumentException("Timeout must be 0 or a positive float (got $value)"); - } - } - - private function connectIfNotConnected() - { - if ($this->isConnected()) { - return; - } - $this->connect(); - } - - protected function generateDataStream($record) - { - return (string) $record['formatted']; - } - - /** - * @return resource|null - */ - protected function getResource() - { - return $this->resource; - } - - private function connect() - { - $this->createSocketResource(); - $this->setSocketTimeout(); - $this->setStreamChunkSize(); - } - - private function createSocketResource() - { - if ($this->isPersistent()) { - $resource = $this->pfsockopen(); - } else { - $resource = $this->fsockopen(); - } - if (!$resource) { - throw new \UnexpectedValueException("Failed connecting to $this->connectionString ($this->errno: $this->errstr)"); - } - $this->resource = $resource; - } - - private function setSocketTimeout() - { - if (!$this->streamSetTimeout()) { - throw new \UnexpectedValueException("Failed setting timeout with stream_set_timeout()"); - } - } - - private function setStreamChunkSize() - { - if ($this->chunkSize && !$this->streamSetChunkSize()) { - throw new \UnexpectedValueException("Failed setting chunk size with stream_set_chunk_size()"); - } - } - - private function writeToSocket($data) - { - $length = strlen($data); - $sent = 0; - $this->lastSentBytes = $sent; - while ($this->isConnected() && $sent < $length) { - if (0 == $sent) { - $chunk = $this->fwrite($data); - } else { - $chunk = $this->fwrite(substr($data, $sent)); - } - if ($chunk === false) { - throw new \RuntimeException("Could not write to socket"); - } - $sent += $chunk; - $socketInfo = $this->streamGetMetadata(); - if ($socketInfo['timed_out']) { - throw new \RuntimeException("Write timed-out"); - } - - if ($this->writingIsTimedOut($sent)) { - throw new \RuntimeException("Write timed-out, no data sent for `{$this->writingTimeout}` seconds, probably we got disconnected (sent $sent of $length)"); - } - } - if (!$this->isConnected() && $sent < $length) { - throw new \RuntimeException("End-of-file reached, probably we got disconnected (sent $sent of $length)"); - } - } - - private function writingIsTimedOut($sent) - { - $writingTimeout = (int) floor($this->writingTimeout); - if (0 === $writingTimeout) { - return false; - } - - if ($sent !== $this->lastSentBytes) { - $this->lastWritingAt = time(); - $this->lastSentBytes = $sent; - - return false; - } else { - usleep(100); - } - - if ((time() - $this->lastWritingAt) >= $writingTimeout) { - $this->closeSocket(); - - return true; - } - - return false; - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php deleted file mode 100644 index ad6960c..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php +++ /dev/null @@ -1,179 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Utils; - -/** - * Stores to any stream resource - * - * Can be used to store into php://stderr, remote and local files, etc. - * - * @author Jordi Boggiano - */ -class StreamHandler extends AbstractProcessingHandler -{ - protected $stream; - protected $url; - private $errorMessage; - protected $filePermission; - protected $useLocking; - private $dirCreated; - - /** - * @param resource|string $stream - * @param int $level The minimum logging level at which this handler will be triggered - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - * @param int|null $filePermission Optional file permissions (default (0644) are only for owner read/write) - * @param bool $useLocking Try to lock log file before doing any writes - * - * @throws \Exception If a missing directory is not buildable - * @throws \InvalidArgumentException If stream is not a resource or string - */ - public function __construct($stream, $level = Logger::DEBUG, $bubble = true, $filePermission = null, $useLocking = false) - { - parent::__construct($level, $bubble); - if (is_resource($stream)) { - $this->stream = $stream; - } elseif (is_string($stream)) { - $this->url = Utils::canonicalizePath($stream); - } else { - throw new \InvalidArgumentException('A stream must either be a resource or a string.'); - } - - $this->filePermission = $filePermission; - $this->useLocking = $useLocking; - } - - /** - * {@inheritdoc} - */ - public function close() - { - if ($this->url && is_resource($this->stream)) { - fclose($this->stream); - } - $this->stream = null; - $this->dirCreated = null; - } - - /** - * Return the currently active stream if it is open - * - * @return resource|null - */ - public function getStream() - { - return $this->stream; - } - - /** - * Return the stream URL if it was configured with a URL and not an active resource - * - * @return string|null - */ - public function getUrl() - { - return $this->url; - } - - /** - * {@inheritdoc} - */ - protected function write(array $record) - { - if (!is_resource($this->stream)) { - if (null === $this->url || '' === $this->url) { - throw new \LogicException('Missing stream url, the stream can not be opened. This may be caused by a premature call to close().'); - } - $this->createDir(); - $this->errorMessage = null; - set_error_handler(array($this, 'customErrorHandler')); - $this->stream = fopen($this->url, 'a'); - if ($this->filePermission !== null) { - @chmod($this->url, $this->filePermission); - } - restore_error_handler(); - if (!is_resource($this->stream)) { - $this->stream = null; - - throw new \UnexpectedValueException(sprintf('The stream or file "%s" could not be opened in append mode: '.$this->errorMessage, $this->url)); - } - } - - if ($this->useLocking) { - // ignoring errors here, there's not much we can do about them - flock($this->stream, LOCK_EX); - } - - $this->streamWrite($this->stream, $record); - - if ($this->useLocking) { - flock($this->stream, LOCK_UN); - } - } - - /** - * Write to stream - * @param resource $stream - * @param array $record - */ - protected function streamWrite($stream, array $record) - { - fwrite($stream, (string) $record['formatted']); - } - - private function customErrorHandler($code, $msg) - { - $this->errorMessage = preg_replace('{^(fopen|mkdir)\(.*?\): }', '', $msg); - } - - /** - * @param string $stream - * - * @return null|string - */ - private function getDirFromStream($stream) - { - $pos = strpos($stream, '://'); - if ($pos === false) { - return dirname($stream); - } - - if ('file://' === substr($stream, 0, 7)) { - return dirname(substr($stream, 7)); - } - - return null; - } - - private function createDir() - { - // Do not try to create dir if it has already been tried. - if ($this->dirCreated) { - return; - } - - $dir = $this->getDirFromStream($this->url); - if (null !== $dir && !is_dir($dir)) { - $this->errorMessage = null; - set_error_handler(array($this, 'customErrorHandler')); - $status = mkdir($dir, 0777, true); - restore_error_handler(); - if (false === $status && !is_dir($dir)) { - throw new \UnexpectedValueException(sprintf('There is no existing directory at "%s" and its not buildable: '.$this->errorMessage, $dir)); - } - } - $this->dirCreated = true; - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php deleted file mode 100644 index ac7b16f..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php +++ /dev/null @@ -1,111 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\LineFormatter; -use Swift; - -/** - * SwiftMailerHandler uses Swift_Mailer to send the emails - * - * @author Gyula Sallai - */ -class SwiftMailerHandler extends MailHandler -{ - protected $mailer; - private $messageTemplate; - - /** - * @param \Swift_Mailer $mailer The mailer to use - * @param callable|\Swift_Message $message An example message for real messages, only the body will be replaced - * @param int $level The minimum logging level at which this handler will be triggered - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - */ - public function __construct(\Swift_Mailer $mailer, $message, $level = Logger::ERROR, $bubble = true) - { - parent::__construct($level, $bubble); - - $this->mailer = $mailer; - $this->messageTemplate = $message; - } - - /** - * {@inheritdoc} - */ - protected function send($content, array $records) - { - $this->mailer->send($this->buildMessage($content, $records)); - } - - /** - * Gets the formatter for the Swift_Message subject. - * - * @param string $format The format of the subject - * @return FormatterInterface - */ - protected function getSubjectFormatter($format) - { - return new LineFormatter($format); - } - - /** - * Creates instance of Swift_Message to be sent - * - * @param string $content formatted email body to be sent - * @param array $records Log records that formed the content - * @return \Swift_Message - */ - protected function buildMessage($content, array $records) - { - $message = null; - if ($this->messageTemplate instanceof \Swift_Message) { - $message = clone $this->messageTemplate; - $message->generateId(); - } elseif (is_callable($this->messageTemplate)) { - $message = call_user_func($this->messageTemplate, $content, $records); - } - - if (!$message instanceof \Swift_Message) { - throw new \InvalidArgumentException('Could not resolve message as instance of Swift_Message or a callable returning it'); - } - - if ($records) { - $subjectFormatter = $this->getSubjectFormatter($message->getSubject()); - $message->setSubject($subjectFormatter->format($this->getHighestRecord($records))); - } - - $message->setBody($content); - if (version_compare(Swift::VERSION, '6.0.0', '>=')) { - $message->setDate(new \DateTimeImmutable()); - } else { - $message->setDate(time()); - } - - return $message; - } - - /** - * BC getter, to be removed in 2.0 - */ - public function __get($name) - { - if ($name === 'message') { - trigger_error('SwiftMailerHandler->message is deprecated, use ->buildMessage() instead to retrieve the message', E_USER_DEPRECATED); - - return $this->buildMessage(null, array()); - } - - throw new \InvalidArgumentException('Invalid property '.$name); - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/SyslogHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/SyslogHandler.php deleted file mode 100644 index f770c80..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/SyslogHandler.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; - -/** - * Logs to syslog service. - * - * usage example: - * - * $log = new Logger('application'); - * $syslog = new SyslogHandler('myfacility', 'local6'); - * $formatter = new LineFormatter("%channel%.%level_name%: %message% %extra%"); - * $syslog->setFormatter($formatter); - * $log->pushHandler($syslog); - * - * @author Sven Paulus - */ -class SyslogHandler extends AbstractSyslogHandler -{ - protected $ident; - protected $logopts; - - /** - * @param string $ident - * @param mixed $facility - * @param int $level The minimum logging level at which this handler will be triggered - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - * @param int $logopts Option flags for the openlog() call, defaults to LOG_PID - */ - public function __construct($ident, $facility = LOG_USER, $level = Logger::DEBUG, $bubble = true, $logopts = LOG_PID) - { - parent::__construct($facility, $level, $bubble); - - $this->ident = $ident; - $this->logopts = $logopts; - } - - /** - * {@inheritdoc} - */ - public function close() - { - closelog(); - } - - /** - * {@inheritdoc} - */ - protected function write(array $record) - { - if (!openlog($this->ident, $this->logopts, $this->facility)) { - throw new \LogicException('Can\'t open syslog for ident "'.$this->ident.'" and facility "'.$this->facility.'"'); - } - syslog($this->logLevels[$record['level']], (string) $record['formatted']); - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php b/source/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php deleted file mode 100644 index 3bff085..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler\SyslogUdp; - -class UdpSocket -{ - const DATAGRAM_MAX_LENGTH = 65023; - - protected $ip; - protected $port; - protected $socket; - - public function __construct($ip, $port = 514) - { - $this->ip = $ip; - $this->port = $port; - $this->socket = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP); - } - - public function write($line, $header = "") - { - $this->send($this->assembleMessage($line, $header)); - } - - public function close() - { - if (is_resource($this->socket)) { - socket_close($this->socket); - $this->socket = null; - } - } - - protected function send($chunk) - { - if (!is_resource($this->socket)) { - throw new \LogicException('The UdpSocket to '.$this->ip.':'.$this->port.' has been closed and can not be written to anymore'); - } - socket_sendto($this->socket, $chunk, strlen($chunk), $flags = 0, $this->ip, $this->port); - } - - protected function assembleMessage($line, $header) - { - $chunkSize = self::DATAGRAM_MAX_LENGTH - strlen($header); - - return $header . substr($line, 0, $chunkSize); - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php deleted file mode 100644 index 4dfd5f5..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php +++ /dev/null @@ -1,124 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Handler\SyslogUdp\UdpSocket; - -/** - * A Handler for logging to a remote syslogd server. - * - * @author Jesper Skovgaard Nielsen - * @author Dominik Kukacka - */ -class SyslogUdpHandler extends AbstractSyslogHandler -{ - const RFC3164 = 0; - const RFC5424 = 1; - - private $dateFormats = array( - self::RFC3164 => 'M d H:i:s', - self::RFC5424 => \DateTime::RFC3339, - ); - - protected $socket; - protected $ident; - protected $rfc; - - /** - * @param string $host - * @param int $port - * @param mixed $facility - * @param int $level The minimum logging level at which this handler will be triggered - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - * @param string $ident Program name or tag for each log message. - * @param int $rfc RFC to format the message for. - */ - public function __construct($host, $port = 514, $facility = LOG_USER, $level = Logger::DEBUG, $bubble = true, $ident = 'php', $rfc = self::RFC5424) - { - parent::__construct($facility, $level, $bubble); - - $this->ident = $ident; - $this->rfc = $rfc; - - $this->socket = new UdpSocket($host, $port ?: 514); - } - - protected function write(array $record) - { - $lines = $this->splitMessageIntoLines($record['formatted']); - - $header = $this->makeCommonSyslogHeader($this->logLevels[$record['level']]); - - foreach ($lines as $line) { - $this->socket->write($line, $header); - } - } - - public function close() - { - $this->socket->close(); - } - - private function splitMessageIntoLines($message) - { - if (is_array($message)) { - $message = implode("\n", $message); - } - - return preg_split('/$\R?^/m', $message, -1, PREG_SPLIT_NO_EMPTY); - } - - /** - * Make common syslog header (see rfc5424 or rfc3164) - */ - protected function makeCommonSyslogHeader($severity) - { - $priority = $severity + $this->facility; - - if (!$pid = getmypid()) { - $pid = '-'; - } - - if (!$hostname = gethostname()) { - $hostname = '-'; - } - - $date = $this->getDateTime(); - - if ($this->rfc === self::RFC3164) { - return "<$priority>" . - $date . " " . - $hostname . " " . - $this->ident . "[" . $pid . "]: "; - } else { - return "<$priority>1 " . - $date . " " . - $hostname . " " . - $this->ident . " " . - $pid . " - - "; - } - } - - protected function getDateTime() - { - return date($this->dateFormats[$this->rfc]); - } - - /** - * Inject your own socket, mainly used for testing - */ - public function setSocket($socket) - { - $this->socket = $socket; - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/TestHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/TestHandler.php deleted file mode 100644 index 478db0a..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/TestHandler.php +++ /dev/null @@ -1,177 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -/** - * Used for testing purposes. - * - * It records all records and gives you access to them for verification. - * - * @author Jordi Boggiano - * - * @method bool hasEmergency($record) - * @method bool hasAlert($record) - * @method bool hasCritical($record) - * @method bool hasError($record) - * @method bool hasWarning($record) - * @method bool hasNotice($record) - * @method bool hasInfo($record) - * @method bool hasDebug($record) - * - * @method bool hasEmergencyRecords() - * @method bool hasAlertRecords() - * @method bool hasCriticalRecords() - * @method bool hasErrorRecords() - * @method bool hasWarningRecords() - * @method bool hasNoticeRecords() - * @method bool hasInfoRecords() - * @method bool hasDebugRecords() - * - * @method bool hasEmergencyThatContains($message) - * @method bool hasAlertThatContains($message) - * @method bool hasCriticalThatContains($message) - * @method bool hasErrorThatContains($message) - * @method bool hasWarningThatContains($message) - * @method bool hasNoticeThatContains($message) - * @method bool hasInfoThatContains($message) - * @method bool hasDebugThatContains($message) - * - * @method bool hasEmergencyThatMatches($message) - * @method bool hasAlertThatMatches($message) - * @method bool hasCriticalThatMatches($message) - * @method bool hasErrorThatMatches($message) - * @method bool hasWarningThatMatches($message) - * @method bool hasNoticeThatMatches($message) - * @method bool hasInfoThatMatches($message) - * @method bool hasDebugThatMatches($message) - * - * @method bool hasEmergencyThatPasses($message) - * @method bool hasAlertThatPasses($message) - * @method bool hasCriticalThatPasses($message) - * @method bool hasErrorThatPasses($message) - * @method bool hasWarningThatPasses($message) - * @method bool hasNoticeThatPasses($message) - * @method bool hasInfoThatPasses($message) - * @method bool hasDebugThatPasses($message) - */ -class TestHandler extends AbstractProcessingHandler -{ - protected $records = array(); - protected $recordsByLevel = array(); - private $skipReset = false; - - public function getRecords() - { - return $this->records; - } - - public function clear() - { - $this->records = array(); - $this->recordsByLevel = array(); - } - - public function reset() - { - if (!$this->skipReset) { - $this->clear(); - } - } - - public function setSkipReset($skipReset) - { - $this->skipReset = $skipReset; - } - - public function hasRecords($level) - { - return isset($this->recordsByLevel[$level]); - } - - /** - * @param string|array $record Either a message string or an array containing message and optionally context keys that will be checked against all records - * @param int $level Logger::LEVEL constant value - */ - public function hasRecord($record, $level) - { - if (is_string($record)) { - $record = array('message' => $record); - } - - return $this->hasRecordThatPasses(function ($rec) use ($record) { - if ($rec['message'] !== $record['message']) { - return false; - } - if (isset($record['context']) && $rec['context'] !== $record['context']) { - return false; - } - return true; - }, $level); - } - - public function hasRecordThatContains($message, $level) - { - return $this->hasRecordThatPasses(function ($rec) use ($message) { - return strpos($rec['message'], $message) !== false; - }, $level); - } - - public function hasRecordThatMatches($regex, $level) - { - return $this->hasRecordThatPasses(function ($rec) use ($regex) { - return preg_match($regex, $rec['message']) > 0; - }, $level); - } - - public function hasRecordThatPasses($predicate, $level) - { - if (!is_callable($predicate)) { - throw new \InvalidArgumentException("Expected a callable for hasRecordThatSucceeds"); - } - - if (!isset($this->recordsByLevel[$level])) { - return false; - } - - foreach ($this->recordsByLevel[$level] as $i => $rec) { - if (call_user_func($predicate, $rec, $i)) { - return true; - } - } - - return false; - } - - /** - * {@inheritdoc} - */ - protected function write(array $record) - { - $this->recordsByLevel[$record['level']][] = $record; - $this->records[] = $record; - } - - public function __call($method, $args) - { - if (preg_match('/(.*)(Debug|Info|Notice|Warning|Error|Critical|Alert|Emergency)(.*)/', $method, $matches) > 0) { - $genericMethod = $matches[1] . ('Records' !== $matches[3] ? 'Record' : '') . $matches[3]; - $level = constant('Monolog\Logger::' . strtoupper($matches[2])); - if (method_exists($this, $genericMethod)) { - $args[] = $level; - - return call_user_func_array(array($this, $genericMethod), $args); - } - } - - throw new \BadMethodCallException('Call to undefined method ' . get_class($this) . '::' . $method . '()'); - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php deleted file mode 100644 index 7d7622a..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php +++ /dev/null @@ -1,72 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -/** - * Forwards records to multiple handlers suppressing failures of each handler - * and continuing through to give every handler a chance to succeed. - * - * @author Craig D'Amelio - */ -class WhatFailureGroupHandler extends GroupHandler -{ - /** - * {@inheritdoc} - */ - public function handle(array $record) - { - if ($this->processors) { - foreach ($this->processors as $processor) { - $record = call_user_func($processor, $record); - } - } - - foreach ($this->handlers as $handler) { - try { - $handler->handle($record); - } catch (\Exception $e) { - // What failure? - } catch (\Throwable $e) { - // What failure? - } - } - - return false === $this->bubble; - } - - /** - * {@inheritdoc} - */ - public function handleBatch(array $records) - { - if ($this->processors) { - $processed = array(); - foreach ($records as $record) { - foreach ($this->processors as $processor) { - $record = call_user_func($processor, $record); - } - $processed[] = $record; - } - $records = $processed; - } - - foreach ($this->handlers as $handler) { - try { - $handler->handleBatch($records); - } catch (\Exception $e) { - // What failure? - } catch (\Throwable $e) { - // What failure? - } - } - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php b/source/vendor/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php deleted file mode 100644 index a20aeae..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php +++ /dev/null @@ -1,101 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\NormalizerFormatter; -use Monolog\Logger; - -/** - * Handler sending logs to Zend Monitor - * - * @author Christian Bergau - * @author Jason Davis - */ -class ZendMonitorHandler extends AbstractProcessingHandler -{ - /** - * Monolog level / ZendMonitor Custom Event priority map - * - * @var array - */ - protected $levelMap = array(); - - /** - * Construct - * - * @param int $level - * @param bool $bubble - * @throws MissingExtensionException - */ - public function __construct($level = Logger::DEBUG, $bubble = true) - { - if (!function_exists('zend_monitor_custom_event')) { - throw new MissingExtensionException( - 'You must have Zend Server installed with Zend Monitor enabled in order to use this handler' - ); - } - //zend monitor constants are not defined if zend monitor is not enabled. - $this->levelMap = array( - Logger::DEBUG => \ZEND_MONITOR_EVENT_SEVERITY_INFO, - Logger::INFO => \ZEND_MONITOR_EVENT_SEVERITY_INFO, - Logger::NOTICE => \ZEND_MONITOR_EVENT_SEVERITY_INFO, - Logger::WARNING => \ZEND_MONITOR_EVENT_SEVERITY_WARNING, - Logger::ERROR => \ZEND_MONITOR_EVENT_SEVERITY_ERROR, - Logger::CRITICAL => \ZEND_MONITOR_EVENT_SEVERITY_ERROR, - Logger::ALERT => \ZEND_MONITOR_EVENT_SEVERITY_ERROR, - Logger::EMERGENCY => \ZEND_MONITOR_EVENT_SEVERITY_ERROR, - ); - parent::__construct($level, $bubble); - } - - /** - * {@inheritdoc} - */ - protected function write(array $record) - { - $this->writeZendMonitorCustomEvent( - Logger::getLevelName($record['level']), - $record['message'], - $record['formatted'], - $this->levelMap[$record['level']] - ); - } - - /** - * Write to Zend Monitor Events - * @param string $type Text displayed in "Class Name (custom)" field - * @param string $message Text displayed in "Error String" - * @param mixed $formatted Displayed in Custom Variables tab - * @param int $severity Set the event severity level (-1,0,1) - */ - protected function writeZendMonitorCustomEvent($type, $message, $formatted, $severity) - { - zend_monitor_custom_event($type, $message, $formatted, $severity); - } - - /** - * {@inheritdoc} - */ - public function getDefaultFormatter() - { - return new NormalizerFormatter(); - } - - /** - * Get the level map - * - * @return array - */ - public function getLevelMap() - { - return $this->levelMap; - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Logger.php b/source/vendor/monolog/monolog/src/Monolog/Logger.php deleted file mode 100644 index 7d26b29..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Logger.php +++ /dev/null @@ -1,796 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog; - -use Monolog\Handler\HandlerInterface; -use Monolog\Handler\StreamHandler; -use Psr\Log\LoggerInterface; -use Psr\Log\InvalidArgumentException; -use Exception; - -/** - * Monolog log channel - * - * It contains a stack of Handlers and a stack of Processors, - * and uses them to store records that are added to it. - * - * @author Jordi Boggiano - */ -class Logger implements LoggerInterface, ResettableInterface -{ - /** - * Detailed debug information - */ - const DEBUG = 100; - - /** - * Interesting events - * - * Examples: User logs in, SQL logs. - */ - const INFO = 200; - - /** - * Uncommon events - */ - const NOTICE = 250; - - /** - * Exceptional occurrences that are not errors - * - * Examples: Use of deprecated APIs, poor use of an API, - * undesirable things that are not necessarily wrong. - */ - const WARNING = 300; - - /** - * Runtime errors - */ - const ERROR = 400; - - /** - * Critical conditions - * - * Example: Application component unavailable, unexpected exception. - */ - const CRITICAL = 500; - - /** - * Action must be taken immediately - * - * Example: Entire website down, database unavailable, etc. - * This should trigger the SMS alerts and wake you up. - */ - const ALERT = 550; - - /** - * Urgent alert. - */ - const EMERGENCY = 600; - - /** - * Monolog API version - * - * This is only bumped when API breaks are done and should - * follow the major version of the library - * - * @var int - */ - const API = 1; - - /** - * Logging levels from syslog protocol defined in RFC 5424 - * - * @var array $levels Logging levels - */ - protected static $levels = array( - self::DEBUG => 'DEBUG', - self::INFO => 'INFO', - self::NOTICE => 'NOTICE', - self::WARNING => 'WARNING', - self::ERROR => 'ERROR', - self::CRITICAL => 'CRITICAL', - self::ALERT => 'ALERT', - self::EMERGENCY => 'EMERGENCY', - ); - - /** - * @var \DateTimeZone - */ - protected static $timezone; - - /** - * @var string - */ - protected $name; - - /** - * The handler stack - * - * @var HandlerInterface[] - */ - protected $handlers; - - /** - * Processors that will process all log records - * - * To process records of a single handler instead, add the processor on that specific handler - * - * @var callable[] - */ - protected $processors; - - /** - * @var bool - */ - protected $microsecondTimestamps = true; - - /** - * @var callable - */ - protected $exceptionHandler; - - /** - * @param string $name The logging channel - * @param HandlerInterface[] $handlers Optional stack of handlers, the first one in the array is called first, etc. - * @param callable[] $processors Optional array of processors - */ - public function __construct($name, array $handlers = array(), array $processors = array()) - { - $this->name = $name; - $this->setHandlers($handlers); - $this->processors = $processors; - } - - /** - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Return a new cloned instance with the name changed - * - * @return static - */ - public function withName($name) - { - $new = clone $this; - $new->name = $name; - - return $new; - } - - /** - * Pushes a handler on to the stack. - * - * @param HandlerInterface $handler - * @return $this - */ - public function pushHandler(HandlerInterface $handler) - { - array_unshift($this->handlers, $handler); - - return $this; - } - - /** - * Pops a handler from the stack - * - * @return HandlerInterface - */ - public function popHandler() - { - if (!$this->handlers) { - throw new \LogicException('You tried to pop from an empty handler stack.'); - } - - return array_shift($this->handlers); - } - - /** - * Set handlers, replacing all existing ones. - * - * If a map is passed, keys will be ignored. - * - * @param HandlerInterface[] $handlers - * @return $this - */ - public function setHandlers(array $handlers) - { - $this->handlers = array(); - foreach (array_reverse($handlers) as $handler) { - $this->pushHandler($handler); - } - - return $this; - } - - /** - * @return HandlerInterface[] - */ - public function getHandlers() - { - return $this->handlers; - } - - /** - * Adds a processor on to the stack. - * - * @param callable $callback - * @return $this - */ - public function pushProcessor($callback) - { - if (!is_callable($callback)) { - throw new \InvalidArgumentException('Processors must be valid callables (callback or object with an __invoke method), '.var_export($callback, true).' given'); - } - array_unshift($this->processors, $callback); - - return $this; - } - - /** - * Removes the processor on top of the stack and returns it. - * - * @return callable - */ - public function popProcessor() - { - if (!$this->processors) { - throw new \LogicException('You tried to pop from an empty processor stack.'); - } - - return array_shift($this->processors); - } - - /** - * @return callable[] - */ - public function getProcessors() - { - return $this->processors; - } - - /** - * Control the use of microsecond resolution timestamps in the 'datetime' - * member of new records. - * - * Generating microsecond resolution timestamps by calling - * microtime(true), formatting the result via sprintf() and then parsing - * the resulting string via \DateTime::createFromFormat() can incur - * a measurable runtime overhead vs simple usage of DateTime to capture - * a second resolution timestamp in systems which generate a large number - * of log events. - * - * @param bool $micro True to use microtime() to create timestamps - */ - public function useMicrosecondTimestamps($micro) - { - $this->microsecondTimestamps = (bool) $micro; - } - - /** - * Adds a log record. - * - * @param int $level The logging level - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed - */ - public function addRecord($level, $message, array $context = array()) - { - if (!$this->handlers) { - $this->pushHandler(new StreamHandler('php://stderr', static::DEBUG)); - } - - $levelName = static::getLevelName($level); - - // check if any handler will handle this message so we can return early and save cycles - $handlerKey = null; - reset($this->handlers); - while ($handler = current($this->handlers)) { - if ($handler->isHandling(array('level' => $level))) { - $handlerKey = key($this->handlers); - break; - } - - next($this->handlers); - } - - if (null === $handlerKey) { - return false; - } - - if (!static::$timezone) { - static::$timezone = new \DateTimeZone(date_default_timezone_get() ?: 'UTC'); - } - - // php7.1+ always has microseconds enabled, so we do not need this hack - if ($this->microsecondTimestamps && PHP_VERSION_ID < 70100) { - $ts = \DateTime::createFromFormat('U.u', sprintf('%.6F', microtime(true)), static::$timezone); - } else { - $ts = new \DateTime('now', static::$timezone); - } - $ts->setTimezone(static::$timezone); - - $record = array( - 'message' => (string) $message, - 'context' => $context, - 'level' => $level, - 'level_name' => $levelName, - 'channel' => $this->name, - 'datetime' => $ts, - 'extra' => array(), - ); - - try { - foreach ($this->processors as $processor) { - $record = call_user_func($processor, $record); - } - - while ($handler = current($this->handlers)) { - if (true === $handler->handle($record)) { - break; - } - - next($this->handlers); - } - } catch (Exception $e) { - $this->handleException($e, $record); - } - - return true; - } - - /** - * Ends a log cycle and frees all resources used by handlers. - * - * Closing a Handler means flushing all buffers and freeing any open resources/handles. - * Handlers that have been closed should be able to accept log records again and re-open - * themselves on demand, but this may not always be possible depending on implementation. - * - * This is useful at the end of a request and will be called automatically on every handler - * when they get destructed. - */ - public function close() - { - foreach ($this->handlers as $handler) { - if (method_exists($handler, 'close')) { - $handler->close(); - } - } - } - - /** - * Ends a log cycle and resets all handlers and processors to their initial state. - * - * Resetting a Handler or a Processor means flushing/cleaning all buffers, resetting internal - * state, and getting it back to a state in which it can receive log records again. - * - * This is useful in case you want to avoid logs leaking between two requests or jobs when you - * have a long running process like a worker or an application server serving multiple requests - * in one process. - */ - public function reset() - { - foreach ($this->handlers as $handler) { - if ($handler instanceof ResettableInterface) { - $handler->reset(); - } - } - - foreach ($this->processors as $processor) { - if ($processor instanceof ResettableInterface) { - $processor->reset(); - } - } - } - - /** - * Adds a log record at the DEBUG level. - * - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed - */ - public function addDebug($message, array $context = array()) - { - return $this->addRecord(static::DEBUG, $message, $context); - } - - /** - * Adds a log record at the INFO level. - * - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed - */ - public function addInfo($message, array $context = array()) - { - return $this->addRecord(static::INFO, $message, $context); - } - - /** - * Adds a log record at the NOTICE level. - * - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed - */ - public function addNotice($message, array $context = array()) - { - return $this->addRecord(static::NOTICE, $message, $context); - } - - /** - * Adds a log record at the WARNING level. - * - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed - */ - public function addWarning($message, array $context = array()) - { - return $this->addRecord(static::WARNING, $message, $context); - } - - /** - * Adds a log record at the ERROR level. - * - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed - */ - public function addError($message, array $context = array()) - { - return $this->addRecord(static::ERROR, $message, $context); - } - - /** - * Adds a log record at the CRITICAL level. - * - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed - */ - public function addCritical($message, array $context = array()) - { - return $this->addRecord(static::CRITICAL, $message, $context); - } - - /** - * Adds a log record at the ALERT level. - * - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed - */ - public function addAlert($message, array $context = array()) - { - return $this->addRecord(static::ALERT, $message, $context); - } - - /** - * Adds a log record at the EMERGENCY level. - * - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed - */ - public function addEmergency($message, array $context = array()) - { - return $this->addRecord(static::EMERGENCY, $message, $context); - } - - /** - * Gets all supported logging levels. - * - * @return array Assoc array with human-readable level names => level codes. - */ - public static function getLevels() - { - return array_flip(static::$levels); - } - - /** - * Gets the name of the logging level. - * - * @param int $level - * @return string - */ - public static function getLevelName($level) - { - if (!isset(static::$levels[$level])) { - throw new InvalidArgumentException('Level "'.$level.'" is not defined, use one of: '.implode(', ', array_keys(static::$levels))); - } - - return static::$levels[$level]; - } - - /** - * Converts PSR-3 levels to Monolog ones if necessary - * - * @param string|int $level Level number (monolog) or name (PSR-3) - * @return int - */ - public static function toMonologLevel($level) - { - if (is_string($level)) { - // Contains chars of all log levels and avoids using strtoupper() which may have - // strange results depending on locale (for example, "i" will become "İ") - $upper = strtr($level, 'abcdefgilmnortuwy', 'ABCDEFGILMNORTUWY'); - if (defined(__CLASS__.'::'.$upper)) { - return constant(__CLASS__ . '::' . $upper); - } - } - - return $level; - } - - /** - * Checks whether the Logger has a handler that listens on the given level - * - * @param int $level - * @return bool - */ - public function isHandling($level) - { - $record = array( - 'level' => $level, - ); - - foreach ($this->handlers as $handler) { - if ($handler->isHandling($record)) { - return true; - } - } - - return false; - } - - /** - * Set a custom exception handler - * - * @param callable $callback - * @return $this - */ - public function setExceptionHandler($callback) - { - if (!is_callable($callback)) { - throw new \InvalidArgumentException('Exception handler must be valid callable (callback or object with an __invoke method), '.var_export($callback, true).' given'); - } - $this->exceptionHandler = $callback; - - return $this; - } - - /** - * @return callable - */ - public function getExceptionHandler() - { - return $this->exceptionHandler; - } - - /** - * Delegates exception management to the custom exception handler, - * or throws the exception if no custom handler is set. - */ - protected function handleException(Exception $e, array $record) - { - if (!$this->exceptionHandler) { - throw $e; - } - - call_user_func($this->exceptionHandler, $e, $record); - } - - /** - * Adds a log record at an arbitrary level. - * - * This method allows for compatibility with common interfaces. - * - * @param mixed $level The log level - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed - */ - public function log($level, $message, array $context = array()) - { - $level = static::toMonologLevel($level); - - return $this->addRecord($level, $message, $context); - } - - /** - * Adds a log record at the DEBUG level. - * - * This method allows for compatibility with common interfaces. - * - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed - */ - public function debug($message, array $context = array()) - { - return $this->addRecord(static::DEBUG, $message, $context); - } - - /** - * Adds a log record at the INFO level. - * - * This method allows for compatibility with common interfaces. - * - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed - */ - public function info($message, array $context = array()) - { - return $this->addRecord(static::INFO, $message, $context); - } - - /** - * Adds a log record at the NOTICE level. - * - * This method allows for compatibility with common interfaces. - * - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed - */ - public function notice($message, array $context = array()) - { - return $this->addRecord(static::NOTICE, $message, $context); - } - - /** - * Adds a log record at the WARNING level. - * - * This method allows for compatibility with common interfaces. - * - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed - */ - public function warn($message, array $context = array()) - { - return $this->addRecord(static::WARNING, $message, $context); - } - - /** - * Adds a log record at the WARNING level. - * - * This method allows for compatibility with common interfaces. - * - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed - */ - public function warning($message, array $context = array()) - { - return $this->addRecord(static::WARNING, $message, $context); - } - - /** - * Adds a log record at the ERROR level. - * - * This method allows for compatibility with common interfaces. - * - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed - */ - public function err($message, array $context = array()) - { - return $this->addRecord(static::ERROR, $message, $context); - } - - /** - * Adds a log record at the ERROR level. - * - * This method allows for compatibility with common interfaces. - * - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed - */ - public function error($message, array $context = array()) - { - return $this->addRecord(static::ERROR, $message, $context); - } - - /** - * Adds a log record at the CRITICAL level. - * - * This method allows for compatibility with common interfaces. - * - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed - */ - public function crit($message, array $context = array()) - { - return $this->addRecord(static::CRITICAL, $message, $context); - } - - /** - * Adds a log record at the CRITICAL level. - * - * This method allows for compatibility with common interfaces. - * - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed - */ - public function critical($message, array $context = array()) - { - return $this->addRecord(static::CRITICAL, $message, $context); - } - - /** - * Adds a log record at the ALERT level. - * - * This method allows for compatibility with common interfaces. - * - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed - */ - public function alert($message, array $context = array()) - { - return $this->addRecord(static::ALERT, $message, $context); - } - - /** - * Adds a log record at the EMERGENCY level. - * - * This method allows for compatibility with common interfaces. - * - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed - */ - public function emerg($message, array $context = array()) - { - return $this->addRecord(static::EMERGENCY, $message, $context); - } - - /** - * Adds a log record at the EMERGENCY level. - * - * This method allows for compatibility with common interfaces. - * - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed - */ - public function emergency($message, array $context = array()) - { - return $this->addRecord(static::EMERGENCY, $message, $context); - } - - /** - * Set the timezone to be used for the timestamp of log records. - * - * This is stored globally for all Logger instances - * - * @param \DateTimeZone $tz Timezone object - */ - public static function setTimezone(\DateTimeZone $tz) - { - self::$timezone = $tz; - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php b/source/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php deleted file mode 100644 index cdf5ec7..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\Logger; - -/** - * Injects Git branch and Git commit SHA in all records - * - * @author Nick Otter - * @author Jordi Boggiano - */ -class GitProcessor implements ProcessorInterface -{ - private $level; - private static $cache; - - public function __construct($level = Logger::DEBUG) - { - $this->level = Logger::toMonologLevel($level); - } - - /** - * @param array $record - * @return array - */ - public function __invoke(array $record) - { - // return if the level is not high enough - if ($record['level'] < $this->level) { - return $record; - } - - $record['extra']['git'] = self::getGitInfo(); - - return $record; - } - - private static function getGitInfo() - { - if (self::$cache) { - return self::$cache; - } - - $branches = `git branch -v --no-abbrev`; - if ($branches && preg_match('{^\* (.+?)\s+([a-f0-9]{40})(?:\s|$)}m', $branches, $matches)) { - return self::$cache = array( - 'branch' => $matches[1], - 'commit' => $matches[2], - ); - } - - return self::$cache = array(); - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php b/source/vendor/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php deleted file mode 100644 index 6ae192a..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php +++ /dev/null @@ -1,112 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\Logger; - -/** - * Injects line/file:class/function where the log message came from - * - * Warning: This only works if the handler processes the logs directly. - * If you put the processor on a handler that is behind a FingersCrossedHandler - * for example, the processor will only be called once the trigger level is reached, - * and all the log records will have the same file/line/.. data from the call that - * triggered the FingersCrossedHandler. - * - * @author Jordi Boggiano - */ -class IntrospectionProcessor implements ProcessorInterface -{ - private $level; - - private $skipClassesPartials; - - private $skipStackFramesCount; - - private $skipFunctions = array( - 'call_user_func', - 'call_user_func_array', - ); - - public function __construct($level = Logger::DEBUG, array $skipClassesPartials = array(), $skipStackFramesCount = 0) - { - $this->level = Logger::toMonologLevel($level); - $this->skipClassesPartials = array_merge(array('Monolog\\'), $skipClassesPartials); - $this->skipStackFramesCount = $skipStackFramesCount; - } - - /** - * @param array $record - * @return array - */ - public function __invoke(array $record) - { - // return if the level is not high enough - if ($record['level'] < $this->level) { - return $record; - } - - /* - * http://php.net/manual/en/function.debug-backtrace.php - * As of 5.3.6, DEBUG_BACKTRACE_IGNORE_ARGS option was added. - * Any version less than 5.3.6 must use the DEBUG_BACKTRACE_IGNORE_ARGS constant value '2'. - */ - $trace = debug_backtrace((PHP_VERSION_ID < 50306) ? 2 : DEBUG_BACKTRACE_IGNORE_ARGS); - - // skip first since it's always the current method - array_shift($trace); - // the call_user_func call is also skipped - array_shift($trace); - - $i = 0; - - while ($this->isTraceClassOrSkippedFunction($trace, $i)) { - if (isset($trace[$i]['class'])) { - foreach ($this->skipClassesPartials as $part) { - if (strpos($trace[$i]['class'], $part) !== false) { - $i++; - continue 2; - } - } - } elseif (in_array($trace[$i]['function'], $this->skipFunctions)) { - $i++; - continue; - } - - break; - } - - $i += $this->skipStackFramesCount; - - // we should have the call source now - $record['extra'] = array_merge( - $record['extra'], - array( - 'file' => isset($trace[$i - 1]['file']) ? $trace[$i - 1]['file'] : null, - 'line' => isset($trace[$i - 1]['line']) ? $trace[$i - 1]['line'] : null, - 'class' => isset($trace[$i]['class']) ? $trace[$i]['class'] : null, - 'function' => isset($trace[$i]['function']) ? $trace[$i]['function'] : null, - ) - ); - - return $record; - } - - private function isTraceClassOrSkippedFunction(array $trace, $index) - { - if (!isset($trace[$index])) { - return false; - } - - return isset($trace[$index]['class']) || in_array($trace[$index]['function'], $this->skipFunctions); - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Processor/MemoryPeakUsageProcessor.php b/source/vendor/monolog/monolog/src/Monolog/Processor/MemoryPeakUsageProcessor.php deleted file mode 100644 index 0543e92..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Processor/MemoryPeakUsageProcessor.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -/** - * Injects memory_get_peak_usage in all records - * - * @see Monolog\Processor\MemoryProcessor::__construct() for options - * @author Rob Jensen - */ -class MemoryPeakUsageProcessor extends MemoryProcessor -{ - /** - * @param array $record - * @return array - */ - public function __invoke(array $record) - { - $bytes = memory_get_peak_usage($this->realUsage); - $formatted = $this->formatBytes($bytes); - - $record['extra']['memory_peak_usage'] = $formatted; - - return $record; - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php b/source/vendor/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php deleted file mode 100644 index 2a379a3..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php +++ /dev/null @@ -1,63 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -/** - * Some methods that are common for all memory processors - * - * @author Rob Jensen - */ -abstract class MemoryProcessor implements ProcessorInterface -{ - /** - * @var bool If true, get the real size of memory allocated from system. Else, only the memory used by emalloc() is reported. - */ - protected $realUsage; - - /** - * @var bool If true, then format memory size to human readable string (MB, KB, B depending on size) - */ - protected $useFormatting; - - /** - * @param bool $realUsage Set this to true to get the real size of memory allocated from system. - * @param bool $useFormatting If true, then format memory size to human readable string (MB, KB, B depending on size) - */ - public function __construct($realUsage = true, $useFormatting = true) - { - $this->realUsage = (bool) $realUsage; - $this->useFormatting = (bool) $useFormatting; - } - - /** - * Formats bytes into a human readable string if $this->useFormatting is true, otherwise return $bytes as is - * - * @param int $bytes - * @return string|int Formatted string if $this->useFormatting is true, otherwise return $bytes as is - */ - protected function formatBytes($bytes) - { - $bytes = (int) $bytes; - - if (!$this->useFormatting) { - return $bytes; - } - - if ($bytes > 1024 * 1024) { - return round($bytes / 1024 / 1024, 2).' MB'; - } elseif ($bytes > 1024) { - return round($bytes / 1024, 2).' KB'; - } - - return $bytes . ' B'; - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Processor/MemoryUsageProcessor.php b/source/vendor/monolog/monolog/src/Monolog/Processor/MemoryUsageProcessor.php deleted file mode 100644 index 2783d65..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Processor/MemoryUsageProcessor.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -/** - * Injects memory_get_usage in all records - * - * @see Monolog\Processor\MemoryProcessor::__construct() for options - * @author Rob Jensen - */ -class MemoryUsageProcessor extends MemoryProcessor -{ - /** - * @param array $record - * @return array - */ - public function __invoke(array $record) - { - $bytes = memory_get_usage($this->realUsage); - $formatted = $this->formatBytes($bytes); - - $record['extra']['memory_usage'] = $formatted; - - return $record; - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Processor/MercurialProcessor.php b/source/vendor/monolog/monolog/src/Monolog/Processor/MercurialProcessor.php deleted file mode 100644 index 2f5b326..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Processor/MercurialProcessor.php +++ /dev/null @@ -1,63 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\Logger; - -/** - * Injects Hg branch and Hg revision number in all records - * - * @author Jonathan A. Schweder - */ -class MercurialProcessor implements ProcessorInterface -{ - private $level; - private static $cache; - - public function __construct($level = Logger::DEBUG) - { - $this->level = Logger::toMonologLevel($level); - } - - /** - * @param array $record - * @return array - */ - public function __invoke(array $record) - { - // return if the level is not high enough - if ($record['level'] < $this->level) { - return $record; - } - - $record['extra']['hg'] = self::getMercurialInfo(); - - return $record; - } - - private static function getMercurialInfo() - { - if (self::$cache) { - return self::$cache; - } - - $result = explode(' ', trim(`hg id -nb`)); - if (count($result) >= 3) { - return self::$cache = array( - 'branch' => $result[1], - 'revision' => $result[2], - ); - } - - return self::$cache = array(); - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php b/source/vendor/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php deleted file mode 100644 index 66b80fb..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -/** - * Adds value of getmypid into records - * - * @author Andreas Hörnicke - */ -class ProcessIdProcessor implements ProcessorInterface -{ - /** - * @param array $record - * @return array - */ - public function __invoke(array $record) - { - $record['extra']['process_id'] = getmypid(); - - return $record; - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Processor/ProcessorInterface.php b/source/vendor/monolog/monolog/src/Monolog/Processor/ProcessorInterface.php deleted file mode 100644 index 7e64d4d..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Processor/ProcessorInterface.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -/** - * An optional interface to allow labelling Monolog processors. - * - * @author Nicolas Grekas - */ -interface ProcessorInterface -{ - /** - * @return array The processed records - */ - public function __invoke(array $records); -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php b/source/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php deleted file mode 100644 index a318af7..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php +++ /dev/null @@ -1,81 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\Utils; - -/** - * Processes a record's message according to PSR-3 rules - * - * It replaces {foo} with the value from $context['foo'] - * - * @author Jordi Boggiano - */ -class PsrLogMessageProcessor implements ProcessorInterface -{ - const SIMPLE_DATE = "Y-m-d\TH:i:s.uP"; - - /** @var string|null */ - private $dateFormat; - - /** @var bool */ - private $removeUsedContextFields; - - /** - * @param string|null $dateFormat The format of the timestamp: one supported by DateTime::format - * @param bool $removeUsedContextFields If set to true the fields interpolated into message gets unset - */ - public function __construct($dateFormat = null, $removeUsedContextFields = false) - { - $this->dateFormat = $dateFormat; - $this->removeUsedContextFields = $removeUsedContextFields; - } - - /** - * @param array $record - * @return array - */ - public function __invoke(array $record) - { - if (false === strpos($record['message'], '{')) { - return $record; - } - - $replacements = array(); - foreach ($record['context'] as $key => $val) { - $placeholder = '{' . $key . '}'; - if (strpos($record['message'], $placeholder) === false) { - continue; - } - - if (is_null($val) || is_scalar($val) || (is_object($val) && method_exists($val, "__toString"))) { - $replacements[$placeholder] = $val; - } elseif ($val instanceof \DateTime) { - $replacements[$placeholder] = $val->format($this->dateFormat ?: static::SIMPLE_DATE); - } elseif (is_object($val)) { - $replacements[$placeholder] = '[object '.Utils::getClass($val).']'; - } elseif (is_array($val)) { - $replacements[$placeholder] = 'array'.Utils::jsonEncode($val, null, true); - } else { - $replacements[$placeholder] = '['.gettype($val).']'; - } - - if ($this->removeUsedContextFields) { - unset($record['context'][$key]); - } - } - - $record['message'] = strtr($record['message'], $replacements); - - return $record; - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Processor/TagProcessor.php b/source/vendor/monolog/monolog/src/Monolog/Processor/TagProcessor.php deleted file mode 100644 index 615a4d9..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Processor/TagProcessor.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -/** - * Adds a tags array into record - * - * @author Martijn Riemers - */ -class TagProcessor implements ProcessorInterface -{ - private $tags; - - public function __construct(array $tags = array()) - { - $this->setTags($tags); - } - - public function addTags(array $tags = array()) - { - $this->tags = array_merge($this->tags, $tags); - } - - public function setTags(array $tags = array()) - { - $this->tags = $tags; - } - - public function __invoke(array $record) - { - $record['extra']['tags'] = $this->tags; - - return $record; - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php b/source/vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php deleted file mode 100644 index d1f708c..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php +++ /dev/null @@ -1,59 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\ResettableInterface; - -/** - * Adds a unique identifier into records - * - * @author Simon Mönch - */ -class UidProcessor implements ProcessorInterface, ResettableInterface -{ - private $uid; - - public function __construct($length = 7) - { - if (!is_int($length) || $length > 32 || $length < 1) { - throw new \InvalidArgumentException('The uid length must be an integer between 1 and 32'); - } - - - $this->uid = $this->generateUid($length); - } - - public function __invoke(array $record) - { - $record['extra']['uid'] = $this->uid; - - return $record; - } - - /** - * @return string - */ - public function getUid() - { - return $this->uid; - } - - public function reset() - { - $this->uid = $this->generateUid(strlen($this->uid)); - } - - private function generateUid($length) - { - return substr(hash('md5', uniqid('', true)), 0, $length); - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php b/source/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php deleted file mode 100644 index 2e8dfae..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php +++ /dev/null @@ -1,113 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -/** - * Injects url/method and remote IP of the current web request in all records - * - * @author Jordi Boggiano - */ -class WebProcessor implements ProcessorInterface -{ - /** - * @var array|\ArrayAccess - */ - protected $serverData; - - /** - * Default fields - * - * Array is structured as [key in record.extra => key in $serverData] - * - * @var array - */ - protected $extraFields = array( - 'url' => 'REQUEST_URI', - 'ip' => 'REMOTE_ADDR', - 'http_method' => 'REQUEST_METHOD', - 'server' => 'SERVER_NAME', - 'referrer' => 'HTTP_REFERER', - ); - - /** - * @param array|\ArrayAccess $serverData Array or object w/ ArrayAccess that provides access to the $_SERVER data - * @param array|null $extraFields Field names and the related key inside $serverData to be added. If not provided it defaults to: url, ip, http_method, server, referrer - */ - public function __construct($serverData = null, array $extraFields = null) - { - if (null === $serverData) { - $this->serverData = &$_SERVER; - } elseif (is_array($serverData) || $serverData instanceof \ArrayAccess) { - $this->serverData = $serverData; - } else { - throw new \UnexpectedValueException('$serverData must be an array or object implementing ArrayAccess.'); - } - - if (isset($this->serverData['UNIQUE_ID'])) { - $this->extraFields['unique_id'] = 'UNIQUE_ID'; - } - - if (null !== $extraFields) { - if (isset($extraFields[0])) { - foreach (array_keys($this->extraFields) as $fieldName) { - if (!in_array($fieldName, $extraFields)) { - unset($this->extraFields[$fieldName]); - } - } - } else { - $this->extraFields = $extraFields; - } - } - } - - /** - * @param array $record - * @return array - */ - public function __invoke(array $record) - { - // skip processing if for some reason request data - // is not present (CLI or wonky SAPIs) - if (!isset($this->serverData['REQUEST_URI'])) { - return $record; - } - - $record['extra'] = $this->appendExtraFields($record['extra']); - - return $record; - } - - /** - * @param string $extraName - * @param string $serverName - * @return $this - */ - public function addExtraField($extraName, $serverName) - { - $this->extraFields[$extraName] = $serverName; - - return $this; - } - - /** - * @param array $extra - * @return array - */ - private function appendExtraFields(array $extra) - { - foreach ($this->extraFields as $extraName => $serverName) { - $extra[$extraName] = isset($this->serverData[$serverName]) ? $this->serverData[$serverName] : null; - } - - return $extra; - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Registry.php b/source/vendor/monolog/monolog/src/Monolog/Registry.php deleted file mode 100644 index 159b751..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Registry.php +++ /dev/null @@ -1,134 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog; - -use InvalidArgumentException; - -/** - * Monolog log registry - * - * Allows to get `Logger` instances in the global scope - * via static method calls on this class. - * - * - * $application = new Monolog\Logger('application'); - * $api = new Monolog\Logger('api'); - * - * Monolog\Registry::addLogger($application); - * Monolog\Registry::addLogger($api); - * - * function testLogger() - * { - * Monolog\Registry::api()->addError('Sent to $api Logger instance'); - * Monolog\Registry::application()->addError('Sent to $application Logger instance'); - * } - * - * - * @author Tomas Tatarko - */ -class Registry -{ - /** - * List of all loggers in the registry (by named indexes) - * - * @var Logger[] - */ - private static $loggers = array(); - - /** - * Adds new logging channel to the registry - * - * @param Logger $logger Instance of the logging channel - * @param string|null $name Name of the logging channel ($logger->getName() by default) - * @param bool $overwrite Overwrite instance in the registry if the given name already exists? - * @throws \InvalidArgumentException If $overwrite set to false and named Logger instance already exists - */ - public static function addLogger(Logger $logger, $name = null, $overwrite = false) - { - $name = $name ?: $logger->getName(); - - if (isset(self::$loggers[$name]) && !$overwrite) { - throw new InvalidArgumentException('Logger with the given name already exists'); - } - - self::$loggers[$name] = $logger; - } - - /** - * Checks if such logging channel exists by name or instance - * - * @param string|Logger $logger Name or logger instance - */ - public static function hasLogger($logger) - { - if ($logger instanceof Logger) { - $index = array_search($logger, self::$loggers, true); - - return false !== $index; - } else { - return isset(self::$loggers[$logger]); - } - } - - /** - * Removes instance from registry by name or instance - * - * @param string|Logger $logger Name or logger instance - */ - public static function removeLogger($logger) - { - if ($logger instanceof Logger) { - if (false !== ($idx = array_search($logger, self::$loggers, true))) { - unset(self::$loggers[$idx]); - } - } else { - unset(self::$loggers[$logger]); - } - } - - /** - * Clears the registry - */ - public static function clear() - { - self::$loggers = array(); - } - - /** - * Gets Logger instance from the registry - * - * @param string $name Name of the requested Logger instance - * @throws \InvalidArgumentException If named Logger instance is not in the registry - * @return Logger Requested instance of Logger - */ - public static function getInstance($name) - { - if (!isset(self::$loggers[$name])) { - throw new InvalidArgumentException(sprintf('Requested "%s" logger instance is not in the registry', $name)); - } - - return self::$loggers[$name]; - } - - /** - * Gets Logger instance from the registry via static method call - * - * @param string $name Name of the requested Logger instance - * @param array $arguments Arguments passed to static method call - * @throws \InvalidArgumentException If named Logger instance is not in the registry - * @return Logger Requested instance of Logger - */ - public static function __callStatic($name, $arguments) - { - return self::getInstance($name); - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/ResettableInterface.php b/source/vendor/monolog/monolog/src/Monolog/ResettableInterface.php deleted file mode 100644 index 635bc77..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/ResettableInterface.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog; - -/** - * Handler or Processor implementing this interface will be reset when Logger::reset() is called. - * - * Resetting ends a log cycle gets them back to their initial state. - * - * Resetting a Handler or a Processor means flushing/cleaning all buffers, resetting internal - * state, and getting it back to a state in which it can receive log records again. - * - * This is useful in case you want to avoid logs leaking between two requests or jobs when you - * have a long running process like a worker or an application server serving multiple requests - * in one process. - * - * @author Grégoire Pineau - */ -interface ResettableInterface -{ - public function reset(); -} diff --git a/source/vendor/monolog/monolog/src/Monolog/SignalHandler.php b/source/vendor/monolog/monolog/src/Monolog/SignalHandler.php deleted file mode 100644 index d87018f..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/SignalHandler.php +++ /dev/null @@ -1,115 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog; - -use Psr\Log\LoggerInterface; -use Psr\Log\LogLevel; -use ReflectionExtension; - -/** - * Monolog POSIX signal handler - * - * @author Robert Gust-Bardon - */ -class SignalHandler -{ - private $logger; - - private $previousSignalHandler = array(); - private $signalLevelMap = array(); - private $signalRestartSyscalls = array(); - - public function __construct(LoggerInterface $logger) - { - $this->logger = $logger; - } - - public function registerSignalHandler($signo, $level = LogLevel::CRITICAL, $callPrevious = true, $restartSyscalls = true, $async = true) - { - if (!extension_loaded('pcntl') || !function_exists('pcntl_signal')) { - return $this; - } - - if ($callPrevious) { - if (function_exists('pcntl_signal_get_handler')) { - $handler = pcntl_signal_get_handler($signo); - if ($handler === false) { - return $this; - } - $this->previousSignalHandler[$signo] = $handler; - } else { - $this->previousSignalHandler[$signo] = true; - } - } else { - unset($this->previousSignalHandler[$signo]); - } - $this->signalLevelMap[$signo] = $level; - $this->signalRestartSyscalls[$signo] = $restartSyscalls; - - if (function_exists('pcntl_async_signals') && $async !== null) { - pcntl_async_signals($async); - } - - pcntl_signal($signo, array($this, 'handleSignal'), $restartSyscalls); - - return $this; - } - - public function handleSignal($signo, array $siginfo = null) - { - static $signals = array(); - - if (!$signals && extension_loaded('pcntl')) { - $pcntl = new ReflectionExtension('pcntl'); - $constants = $pcntl->getConstants(); - if (!$constants) { - // HHVM 3.24.2 returns an empty array. - $constants = get_defined_constants(true); - $constants = $constants['Core']; - } - foreach ($constants as $name => $value) { - if (substr($name, 0, 3) === 'SIG' && $name[3] !== '_' && is_int($value)) { - $signals[$value] = $name; - } - } - unset($constants); - } - - $level = isset($this->signalLevelMap[$signo]) ? $this->signalLevelMap[$signo] : LogLevel::CRITICAL; - $signal = isset($signals[$signo]) ? $signals[$signo] : $signo; - $context = isset($siginfo) ? $siginfo : array(); - $this->logger->log($level, sprintf('Program received signal %s', $signal), $context); - - if (!isset($this->previousSignalHandler[$signo])) { - return; - } - - if ($this->previousSignalHandler[$signo] === true || $this->previousSignalHandler[$signo] === SIG_DFL) { - if (extension_loaded('pcntl') && function_exists('pcntl_signal') && function_exists('pcntl_sigprocmask') && function_exists('pcntl_signal_dispatch') - && extension_loaded('posix') && function_exists('posix_getpid') && function_exists('posix_kill')) { - $restartSyscalls = isset($this->signalRestartSyscalls[$signo]) ? $this->signalRestartSyscalls[$signo] : true; - pcntl_signal($signo, SIG_DFL, $restartSyscalls); - pcntl_sigprocmask(SIG_UNBLOCK, array($signo), $oldset); - posix_kill(posix_getpid(), $signo); - pcntl_signal_dispatch(); - pcntl_sigprocmask(SIG_SETMASK, $oldset); - pcntl_signal($signo, array($this, 'handleSignal'), $restartSyscalls); - } - } elseif (is_callable($this->previousSignalHandler[$signo])) { - if (PHP_VERSION_ID >= 70100) { - $this->previousSignalHandler[$signo]($signo, $siginfo); - } else { - $this->previousSignalHandler[$signo]($signo); - } - } - } -} diff --git a/source/vendor/monolog/monolog/src/Monolog/Utils.php b/source/vendor/monolog/monolog/src/Monolog/Utils.php deleted file mode 100644 index 7f1ba12..0000000 --- a/source/vendor/monolog/monolog/src/Monolog/Utils.php +++ /dev/null @@ -1,189 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog; - -class Utils -{ - /** - * @internal - */ - public static function getClass($object) - { - $class = \get_class($object); - - return 'c' === $class[0] && 0 === strpos($class, "class@anonymous\0") ? get_parent_class($class).'@anonymous' : $class; - } - - /** - * Makes sure if a relative path is passed in it is turned into an absolute path - * - * @param string $streamUrl stream URL or path without protocol - * - * @return string - */ - public static function canonicalizePath($streamUrl) - { - $prefix = ''; - if ('file://' === substr($streamUrl, 0, 7)) { - $streamUrl = substr($streamUrl, 7); - $prefix = 'file://'; - } - - // other type of stream, not supported - if (false !== strpos($streamUrl, '://')) { - return $streamUrl; - } - - // already absolute - if (substr($streamUrl, 0, 1) === '/' || substr($streamUrl, 1, 1) === ':' || substr($streamUrl, 0, 2) === '\\\\') { - return $prefix.$streamUrl; - } - - $streamUrl = getcwd() . '/' . $streamUrl; - - return $prefix.$streamUrl; - } - - /** - * Return the JSON representation of a value - * - * @param mixed $data - * @param int $encodeFlags flags to pass to json encode, defaults to JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE - * @param bool $ignoreErrors whether to ignore encoding errors or to throw on error, when ignored and the encoding fails, "null" is returned which is valid json for null - * @throws \RuntimeException if encoding fails and errors are not ignored - * @return string - */ - public static function jsonEncode($data, $encodeFlags = null, $ignoreErrors = false) - { - if (null === $encodeFlags && version_compare(PHP_VERSION, '5.4.0', '>=')) { - $encodeFlags = JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE; - } - - if ($ignoreErrors) { - $json = @json_encode($data, $encodeFlags); - if (false === $json) { - return 'null'; - } - - return $json; - } - - $json = json_encode($data, $encodeFlags); - if (false === $json) { - $json = self::handleJsonError(json_last_error(), $data); - } - - return $json; - } - - /** - * Handle a json_encode failure. - * - * If the failure is due to invalid string encoding, try to clean the - * input and encode again. If the second encoding attempt fails, the - * inital error is not encoding related or the input can't be cleaned then - * raise a descriptive exception. - * - * @param int $code return code of json_last_error function - * @param mixed $data data that was meant to be encoded - * @param int $encodeFlags flags to pass to json encode, defaults to JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE - * @throws \RuntimeException if failure can't be corrected - * @return string JSON encoded data after error correction - */ - public static function handleJsonError($code, $data, $encodeFlags = null) - { - if ($code !== JSON_ERROR_UTF8) { - self::throwEncodeError($code, $data); - } - - if (is_string($data)) { - self::detectAndCleanUtf8($data); - } elseif (is_array($data)) { - array_walk_recursive($data, array('Monolog\Utils', 'detectAndCleanUtf8')); - } else { - self::throwEncodeError($code, $data); - } - - if (null === $encodeFlags && version_compare(PHP_VERSION, '5.4.0', '>=')) { - $encodeFlags = JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE; - } - - $json = json_encode($data, $encodeFlags); - - if ($json === false) { - self::throwEncodeError(json_last_error(), $data); - } - - return $json; - } - - /** - * Throws an exception according to a given code with a customized message - * - * @param int $code return code of json_last_error function - * @param mixed $data data that was meant to be encoded - * @throws \RuntimeException - */ - private static function throwEncodeError($code, $data) - { - switch ($code) { - case JSON_ERROR_DEPTH: - $msg = 'Maximum stack depth exceeded'; - break; - case JSON_ERROR_STATE_MISMATCH: - $msg = 'Underflow or the modes mismatch'; - break; - case JSON_ERROR_CTRL_CHAR: - $msg = 'Unexpected control character found'; - break; - case JSON_ERROR_UTF8: - $msg = 'Malformed UTF-8 characters, possibly incorrectly encoded'; - break; - default: - $msg = 'Unknown error'; - } - - throw new \RuntimeException('JSON encoding failed: '.$msg.'. Encoding: '.var_export($data, true)); - } - - /** - * Detect invalid UTF-8 string characters and convert to valid UTF-8. - * - * Valid UTF-8 input will be left unmodified, but strings containing - * invalid UTF-8 codepoints will be reencoded as UTF-8 with an assumed - * original encoding of ISO-8859-15. This conversion may result in - * incorrect output if the actual encoding was not ISO-8859-15, but it - * will be clean UTF-8 output and will not rely on expensive and fragile - * detection algorithms. - * - * Function converts the input in place in the passed variable so that it - * can be used as a callback for array_walk_recursive. - * - * @param mixed $data Input to check and convert if needed, passed by ref - * @private - */ - public static function detectAndCleanUtf8(&$data) - { - if (is_string($data) && !preg_match('//u', $data)) { - $data = preg_replace_callback( - '/[\x80-\xFF]+/', - function ($m) { return utf8_encode($m[0]); }, - $data - ); - $data = str_replace( - array('¤', '¦', '¨', '´', '¸', '¼', '½', '¾'), - array('€', 'Š', 'š', 'Ž', 'ž', 'Œ', 'œ', 'Ÿ'), - $data - ); - } - } -} diff --git a/source/vendor/nyholm/psr7-server/LICENSE b/source/vendor/nyholm/psr7-server/LICENSE deleted file mode 100644 index d91e753..0000000 --- a/source/vendor/nyholm/psr7-server/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2018 Tobias Nyholm - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/source/vendor/nyholm/psr7-server/README.md b/source/vendor/nyholm/psr7-server/README.md deleted file mode 100644 index 306b660..0000000 --- a/source/vendor/nyholm/psr7-server/README.md +++ /dev/null @@ -1,38 +0,0 @@ -# Helper class to create PSR-7 server request - -[![Latest Version](https://img.shields.io/github/release/Nyholm/psr7-server.svg?style=flat-square)](https://github.com/Nyholm/psr7-server/releases) -[![Build Status](https://img.shields.io/travis/Nyholm/psr7-server/master.svg?style=flat-square)](https://travis-ci.org/Nyholm/psr7-server) -[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/Nyholm/psr7-server.svg?style=flat-square)](https://scrutinizer-ci.com/g/Nyholm/psr7-server) -[![Quality Score](https://img.shields.io/scrutinizer/g/Nyholm/psr7-server.svg?style=flat-square)](https://scrutinizer-ci.com/g/Nyholm/psr7-server) -[![Total Downloads](https://poser.pugx.org/nyholm/psr7-server/downloads)](https://packagist.org/packages/nyholm/psr7-server) -[![Monthly Downloads](https://poser.pugx.org/nyholm/psr7-server/d/monthly.png)](https://packagist.org/packages/nyholm/psr7-server) -[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE) - -A helper class that can create ANY PSR-7 server request. - -## Installation - -```bash -composer require nyholm/psr7-server -``` - -## Usage - -```php -// Instanciate ANY PSR-17 factory implementations. Here is nyholm/psr7 as an example -$psr17Factory = new \Nyholm\Psr7\Factory\Psr17Factory(); - -$creator = new \Nyholm\Psr7Server\ServerRequestCreator( - $psr17Factory, // ServerRequestFactory - $psr17Factory, // UriFactory - $psr17Factory, // UploadedFileFactory - $psr17Factory // StreamFactory -); - -$serverRequest = $creator->fromGlobals(); -``` - -## Other packages - -* [nyholm/psr7](https://github.com/Nyholm/psr7) - A super fast PSR-7 implementation. -* [laminas/laminas-httphandlerrunner](https://github.com/laminas/laminas-httphandlerrunner) - To send/emit PSR-7 responses diff --git a/source/vendor/nyholm/psr7-server/src/ServerRequestCreator.php b/source/vendor/nyholm/psr7-server/src/ServerRequestCreator.php deleted file mode 100644 index a10685d..0000000 --- a/source/vendor/nyholm/psr7-server/src/ServerRequestCreator.php +++ /dev/null @@ -1,303 +0,0 @@ - - * @author Martijn van der Ven - */ -final class ServerRequestCreator implements ServerRequestCreatorInterface -{ - private $serverRequestFactory; - - private $uriFactory; - - private $uploadedFileFactory; - - private $streamFactory; - - public function __construct( - ServerRequestFactoryInterface $serverRequestFactory, - UriFactoryInterface $uriFactory, - UploadedFileFactoryInterface $uploadedFileFactory, - StreamFactoryInterface $streamFactory - ) { - $this->serverRequestFactory = $serverRequestFactory; - $this->uriFactory = $uriFactory; - $this->uploadedFileFactory = $uploadedFileFactory; - $this->streamFactory = $streamFactory; - } - - /** - * {@inheritdoc} - */ - public function fromGlobals(): ServerRequestInterface - { - $server = $_SERVER; - if (false === isset($server['REQUEST_METHOD'])) { - $server['REQUEST_METHOD'] = 'GET'; - } - - $headers = \function_exists('getallheaders') ? getallheaders() : static::getHeadersFromServer($_SERVER); - - $post = null; - if ('POST' === $this->getMethodFromEnv($server)) { - foreach ($headers as $headerName => $headerValue) { - if (true === \is_int($headerName) || 'content-type' !== \strtolower($headerName)) { - continue; - } - if (\in_array( - \strtolower(\trim(\explode(';', $headerValue, 2)[0])), - ['application/x-www-form-urlencoded', 'multipart/form-data'] - )) { - $post = $_POST; - - break; - } - } - } - - return $this->fromArrays($server, $headers, $_COOKIE, $_GET, $post, $_FILES, \fopen('php://input', 'r') ?: null); - } - - /** - * {@inheritdoc} - */ - public function fromArrays(array $server, array $headers = [], array $cookie = [], array $get = [], ?array $post = null, array $files = [], $body = null): ServerRequestInterface - { - $method = $this->getMethodFromEnv($server); - $uri = $this->getUriFromEnvWithHTTP($server); - $protocol = isset($server['SERVER_PROTOCOL']) ? \str_replace('HTTP/', '', $server['SERVER_PROTOCOL']) : '1.1'; - - $serverRequest = $this->serverRequestFactory->createServerRequest($method, $uri, $server); - foreach ($headers as $name => $value) { - // Because PHP automatically casts array keys set with numeric strings to integers, we have to make sure - // that numeric headers will not be sent along as integers, as withAddedHeader can only accept strings. - if (\is_int($name)) { - $name = (string) $name; - } - $serverRequest = $serverRequest->withAddedHeader($name, $value); - } - - $serverRequest = $serverRequest - ->withProtocolVersion($protocol) - ->withCookieParams($cookie) - ->withQueryParams($get) - ->withParsedBody($post) - ->withUploadedFiles($this->normalizeFiles($files)); - - if (null === $body) { - return $serverRequest; - } - - if (\is_resource($body)) { - $body = $this->streamFactory->createStreamFromResource($body); - } elseif (\is_string($body)) { - $body = $this->streamFactory->createStream($body); - } elseif (!$body instanceof StreamInterface) { - throw new \InvalidArgumentException('The $body parameter to ServerRequestCreator::fromArrays must be string, resource or StreamInterface'); - } - - return $serverRequest->withBody($body); - } - - /** - * Implementation from Laminas\Diactoros\marshalHeadersFromSapi(). - */ - public static function getHeadersFromServer(array $server): array - { - $headers = []; - foreach ($server as $key => $value) { - // Apache prefixes environment variables with REDIRECT_ - // if they are added by rewrite rules - if (0 === \strpos($key, 'REDIRECT_')) { - $key = \substr($key, 9); - - // We will not overwrite existing variables with the - // prefixed versions, though - if (\array_key_exists($key, $server)) { - continue; - } - } - - if ($value && 0 === \strpos($key, 'HTTP_')) { - $name = \strtr(\strtolower(\substr($key, 5)), '_', '-'); - $headers[$name] = $value; - - continue; - } - - if ($value && 0 === \strpos($key, 'CONTENT_')) { - $name = 'content-'.\strtolower(\substr($key, 8)); - $headers[$name] = $value; - - continue; - } - } - - return $headers; - } - - private function getMethodFromEnv(array $environment): string - { - if (false === isset($environment['REQUEST_METHOD'])) { - throw new \InvalidArgumentException('Cannot determine HTTP method'); - } - - return $environment['REQUEST_METHOD']; - } - - private function getUriFromEnvWithHTTP(array $environment): UriInterface - { - $uri = $this->createUriFromArray($environment); - if (empty($uri->getScheme())) { - $uri = $uri->withScheme('http'); - } - - return $uri; - } - - /** - * Return an UploadedFile instance array. - * - * @param array $files A array which respect $_FILES structure - * - * @return UploadedFileInterface[] - * - * @throws \InvalidArgumentException for unrecognized values - */ - private function normalizeFiles(array $files): array - { - $normalized = []; - - foreach ($files as $key => $value) { - if ($value instanceof UploadedFileInterface) { - $normalized[$key] = $value; - } elseif (\is_array($value) && isset($value['tmp_name'])) { - $normalized[$key] = $this->createUploadedFileFromSpec($value); - } elseif (\is_array($value)) { - $normalized[$key] = $this->normalizeFiles($value); - } else { - throw new \InvalidArgumentException('Invalid value in files specification'); - } - } - - return $normalized; - } - - /** - * Create and return an UploadedFile instance from a $_FILES specification. - * - * If the specification represents an array of values, this method will - * delegate to normalizeNestedFileSpec() and return that return value. - * - * @param array $value $_FILES struct - * - * @return array|UploadedFileInterface - */ - private function createUploadedFileFromSpec(array $value) - { - if (\is_array($value['tmp_name'])) { - return $this->normalizeNestedFileSpec($value); - } - - if (UPLOAD_ERR_OK !== $value['error']) { - $stream = $this->streamFactory->createStream(); - } else { - try { - $stream = $this->streamFactory->createStreamFromFile($value['tmp_name']); - } catch (\RuntimeException $e) { - $stream = $this->streamFactory->createStream(); - } - } - - return $this->uploadedFileFactory->createUploadedFile( - $stream, - (int) $value['size'], - (int) $value['error'], - $value['name'], - $value['type'] - ); - } - - /** - * Normalize an array of file specifications. - * - * Loops through all nested files and returns a normalized array of - * UploadedFileInterface instances. - * - * @return UploadedFileInterface[] - */ - private function normalizeNestedFileSpec(array $files = []): array - { - $normalizedFiles = []; - - foreach (\array_keys($files['tmp_name']) as $key) { - $spec = [ - 'tmp_name' => $files['tmp_name'][$key], - 'size' => $files['size'][$key], - 'error' => $files['error'][$key], - 'name' => $files['name'][$key], - 'type' => $files['type'][$key], - ]; - $normalizedFiles[$key] = $this->createUploadedFileFromSpec($spec); - } - - return $normalizedFiles; - } - - /** - * Create a new uri from server variable. - * - * @param array $server typically $_SERVER or similar structure - */ - private function createUriFromArray(array $server): UriInterface - { - $uri = $this->uriFactory->createUri(''); - - if (isset($server['HTTP_X_FORWARDED_PROTO'])) { - $uri = $uri->withScheme($server['HTTP_X_FORWARDED_PROTO']); - } else { - if (isset($server['REQUEST_SCHEME'])) { - $uri = $uri->withScheme($server['REQUEST_SCHEME']); - } elseif (isset($server['HTTPS'])) { - $uri = $uri->withScheme('on' === $server['HTTPS'] ? 'https' : 'http'); - } - - if (isset($server['SERVER_PORT'])) { - $uri = $uri->withPort($server['SERVER_PORT']); - } - } - - if (isset($server['HTTP_HOST'])) { - if (1 === \preg_match('/^(.+)\:(\d+)$/', $server['HTTP_HOST'], $matches)) { - $uri = $uri->withHost($matches[1])->withPort($matches[2]); - } else { - $uri = $uri->withHost($server['HTTP_HOST']); - } - } elseif (isset($server['SERVER_NAME'])) { - $uri = $uri->withHost($server['SERVER_NAME']); - } - - if (isset($server['REQUEST_URI'])) { - $uri = $uri->withPath(\current(\explode('?', $server['REQUEST_URI']))); - } - - if (isset($server['QUERY_STRING'])) { - $uri = $uri->withQuery($server['QUERY_STRING']); - } - - return $uri; - } -} diff --git a/source/vendor/nyholm/psr7-server/src/ServerRequestCreatorInterface.php b/source/vendor/nyholm/psr7-server/src/ServerRequestCreatorInterface.php deleted file mode 100644 index e9f189a..0000000 --- a/source/vendor/nyholm/psr7-server/src/ServerRequestCreatorInterface.php +++ /dev/null @@ -1,56 +0,0 @@ - - * @author Martijn van der Ven - */ -interface ServerRequestCreatorInterface -{ - /** - * Create a new server request from the current environment variables. - * Defaults to a GET request to minimise the risk of an \InvalidArgumentException. - * Includes the current request headers as supplied by the server through `getallheaders()`. - * If `getallheaders()` is unavailable on the current server it will fallback to its own `getHeadersFromServer()` method. - * Defaults to php://input for the request body. - * - * @throws \InvalidArgumentException if no valid method or URI can be determined - */ - public function fromGlobals(): ServerRequestInterface; - - /** - * Create a new server request from a set of arrays. - * - * @param array $server typically $_SERVER or similar structure - * @param array $headers typically the output of getallheaders() or similar structure - * @param array $cookie typically $_COOKIE or similar structure - * @param array $get typically $_GET or similar structure - * @param array|null $post typically $_POST or similar structure, represents parsed request body - * @param array $files typically $_FILES or similar structure - * @param StreamInterface|resource|string|null $body Typically stdIn - * - * @throws \InvalidArgumentException if no valid method or URI can be determined - */ - public function fromArrays( - array $server, - array $headers = [], - array $cookie = [], - array $get = [], - ?array $post = null, - array $files = [], - $body = null - ): ServerRequestInterface; - - /** - * Get parsed headers from ($_SERVER) array. - * - * @param array $server typically $_SERVER or similar structure - */ - public static function getHeadersFromServer(array $server): array; -} diff --git a/source/vendor/nyholm/psr7/LICENSE b/source/vendor/nyholm/psr7/LICENSE deleted file mode 100644 index d6c5231..0000000 --- a/source/vendor/nyholm/psr7/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2016 Tobias Nyholm - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/source/vendor/nyholm/psr7/README.md b/source/vendor/nyholm/psr7/README.md deleted file mode 100644 index 9f92933..0000000 --- a/source/vendor/nyholm/psr7/README.md +++ /dev/null @@ -1,110 +0,0 @@ -# PSR-7 implementation - -[![Latest Version](https://img.shields.io/github/release/Nyholm/psr7.svg?style=flat-square)](https://github.com/Nyholm/psr7/releases) -[![Build Status](https://img.shields.io/travis/Nyholm/psr7/master.svg?style=flat-square)](https://travis-ci.org/Nyholm/psr7) -[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/Nyholm/psr7.svg?style=flat-square)](https://scrutinizer-ci.com/g/Nyholm/psr7) -[![Quality Score](https://img.shields.io/scrutinizer/g/Nyholm/psr7.svg?style=flat-square)](https://scrutinizer-ci.com/g/Nyholm/psr7) -[![Total Downloads](https://poser.pugx.org/nyholm/psr7/downloads)](https://packagist.org/packages/nyholm/psr7) -[![Monthly Downloads](https://poser.pugx.org/nyholm/psr7/d/monthly.png)](https://packagist.org/packages/nyholm/psr7) -[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE) - - -A super lightweight PSR-7 implementation. Very strict and very fast. - -| Description | Guzzle | Laminas | Slim | Nyholm | -| ---- | ------ | ---- | ---- | ------ | -| Lines of code | 3.300 | 3.100 | 1.900 | 1.000 | -| PSR-7* | 66% | 100% | 75% | 100% | -| PSR-17 | No | Yes | Yes | Yes | -| HTTPlug | No | No | No | Yes | -| Performance (runs per second)** | 14.553 | 14.703 | 13.416 | 17.734 | - -\* Percent of completed tests in https://github.com/php-http/psr7-integration-tests - -\** Benchmark with 50.000 runs. See https://github.com/devanych/psr-http-benchmark (higher is better) - -## Installation - -```bash -composer require nyholm/psr7 -``` - -If you are using Symfony Flex then you get all message factories registered as services. - -## Usage - -The PSR-7 objects do not contain any other public methods than those defined in -the [PSR-7 specification](https://www.php-fig.org/psr/psr-7/). - -### Create objects - -Use the PSR-17 factory to create requests, streams, URIs etc. - -```php -$psr17Factory = new \Nyholm\Psr7\Factory\Psr17Factory(); -$request = $psr17Factory->createRequest('GET', 'http://tnyholm.se'); -$stream = $psr17Factory->createStream('foobar'); -``` - -### Sending a request - -With [HTTPlug](http://httplug.io/) or any other PSR-18 (HTTP client) you may send -requests like: - -```bash -composer require kriswallsmith/buzz -``` - -```php -$psr17Factory = new \Nyholm\Psr7\Factory\Psr17Factory(); -$psr18Client = new \Buzz\Client\Curl($psr17Factory); - -$request = $psr17Factory->createRequest('GET', 'http://tnyholm.se'); -$response = $psr18Client->sendRequest($request); -``` - -### Create server requests - -The [`nyholm/psr7-server`](https://github.com/Nyholm/psr7-server) package can be used -to create server requests from PHP superglobals. - -```bash -composer require nyholm/psr7-server -``` - -```php -$psr17Factory = new \Nyholm\Psr7\Factory\Psr17Factory(); - -$creator = new \Nyholm\Psr7Server\ServerRequestCreator( - $psr17Factory, // ServerRequestFactory - $psr17Factory, // UriFactory - $psr17Factory, // UploadedFileFactory - $psr17Factory // StreamFactory -); - -$serverRequest = $creator->fromGlobals(); -``` - -### Emitting a response - -```bash -composer require laminas/laminas-httphandlerrunner -``` - -```php -$psr17Factory = new \Nyholm\Psr7\Factory\Psr17Factory(); - -$responseBody = $psr17Factory->createStream('Hello world'); -$response = $psr17Factory->createResponse(200)->withBody($responseBody); -(new \Laminas\HttpHandlerRunner\Emitter\SapiEmitter())->emit($response); -``` - -## Our goal - -This package is currently maintained by [Tobias Nyholm](http://nyholm.se) and -[Martijn van der Ven](https://vanderven.se/martijn/). They have decided that the -goal of this library should be to provide a super strict implementation of -[PSR-7](https://www.php-fig.org/psr/psr-7/) that is blazing fast. - -The package will never include any extra features nor helper methods. All our classes -and functions exist because they are required to fulfill the PSR-7 specification. diff --git a/source/vendor/nyholm/psr7/doc/final.md b/source/vendor/nyholm/psr7/doc/final.md deleted file mode 100644 index b5b1942..0000000 --- a/source/vendor/nyholm/psr7/doc/final.md +++ /dev/null @@ -1,20 +0,0 @@ -# Final classes - -The `final` keyword was removed in version 1.4.0. It was replaced by `@final` annotation. -This was done due popular demand, not because it is a good technical reason to -extend the classes. - -This document will show the correct way to work with PSR-7 classes. The "correct way" -refers to best practices and good software design. I strongly believe that one should -be aware of how a problem *should* be solved, however, it is not needed to always -implement that solution. - -## Extending classes - -You should never extend the classes, you should rather use composition or implement -the interface yourself. Please refer to the [decorator pattern](https://refactoring.guru/design-patterns/decorator). - -## Mocking classes - -The PSR-7 classes are all value objects and they can be used without mocking. If -one really needs to create a special scenario, one can mock the interface instead. diff --git a/source/vendor/nyholm/psr7/src/Factory/HttplugFactory.php b/source/vendor/nyholm/psr7/src/Factory/HttplugFactory.php deleted file mode 100644 index cc64780..0000000 --- a/source/vendor/nyholm/psr7/src/Factory/HttplugFactory.php +++ /dev/null @@ -1,42 +0,0 @@ - - * @author Martijn van der Ven - * - * @final This class should never be extended. See https://github.com/Nyholm/psr7/blob/master/doc/final.md - */ -class HttplugFactory implements MessageFactory, StreamFactory, UriFactory -{ - public function createRequest($method, $uri, array $headers = [], $body = null, $protocolVersion = '1.1') - { - return new Request($method, $uri, $headers, $body, $protocolVersion); - } - - public function createResponse($statusCode = 200, $reasonPhrase = null, array $headers = [], $body = null, $version = '1.1') - { - return new Response((int) $statusCode, $headers, $body, $version, $reasonPhrase); - } - - public function createStream($body = null) - { - return Stream::create($body ?? ''); - } - - public function createUri($uri = ''): UriInterface - { - if ($uri instanceof UriInterface) { - return $uri; - } - - return new Uri($uri); - } -} diff --git a/source/vendor/nyholm/psr7/src/Factory/Psr17Factory.php b/source/vendor/nyholm/psr7/src/Factory/Psr17Factory.php deleted file mode 100644 index f304baa..0000000 --- a/source/vendor/nyholm/psr7/src/Factory/Psr17Factory.php +++ /dev/null @@ -1,80 +0,0 @@ - - * @author Martijn van der Ven - * - * @final This class should never be extended. See https://github.com/Nyholm/psr7/blob/master/doc/final.md - */ -class Psr17Factory implements RequestFactoryInterface, ResponseFactoryInterface, ServerRequestFactoryInterface, StreamFactoryInterface, UploadedFileFactoryInterface, UriFactoryInterface -{ - public function createRequest(string $method, $uri): RequestInterface - { - return new Request($method, $uri); - } - - public function createResponse(int $code = 200, string $reasonPhrase = ''): ResponseInterface - { - if (2 > \func_num_args()) { - // This will make the Response class to use a custom reasonPhrase - $reasonPhrase = null; - } - - return new Response($code, [], null, '1.1', $reasonPhrase); - } - - public function createStream(string $content = ''): StreamInterface - { - return Stream::create($content); - } - - public function createStreamFromFile(string $filename, string $mode = 'r'): StreamInterface - { - try { - $resource = @\fopen($filename, $mode); - } catch (\Throwable $e) { - throw new \RuntimeException(\sprintf('The file "%s" cannot be opened.', $filename)); - } - - if (false === $resource) { - if ('' === $mode || false === \in_array($mode[0], ['r', 'w', 'a', 'x', 'c'], true)) { - throw new \InvalidArgumentException(\sprintf('The mode "%s" is invalid.', $mode)); - } - - throw new \RuntimeException(\sprintf('The file "%s" cannot be opened.', $filename)); - } - - return Stream::create($resource); - } - - public function createStreamFromResource($resource): StreamInterface - { - return Stream::create($resource); - } - - public function createUploadedFile(StreamInterface $stream, int $size = null, int $error = \UPLOAD_ERR_OK, string $clientFilename = null, string $clientMediaType = null): UploadedFileInterface - { - if (null === $size) { - $size = $stream->getSize(); - } - - return new UploadedFile($stream, $size, $error, $clientFilename, $clientMediaType); - } - - public function createUri(string $uri = ''): UriInterface - { - return new Uri($uri); - } - - public function createServerRequest(string $method, $uri, array $serverParams = []): ServerRequestInterface - { - return new ServerRequest($method, $uri, [], null, '1.1', $serverParams); - } -} diff --git a/source/vendor/nyholm/psr7/src/MessageTrait.php b/source/vendor/nyholm/psr7/src/MessageTrait.php deleted file mode 100644 index 595258b..0000000 --- a/source/vendor/nyholm/psr7/src/MessageTrait.php +++ /dev/null @@ -1,207 +0,0 @@ - - * @author Martijn van der Ven - * - * @internal should not be used outside of Nyholm/Psr7 as it does not fall under our BC promise - */ -trait MessageTrait -{ - /** @var array Map of all registered headers, as original name => array of values */ - private $headers = []; - - /** @var array Map of lowercase header name => original name at registration */ - private $headerNames = []; - - /** @var string */ - private $protocol = '1.1'; - - /** @var StreamInterface|null */ - private $stream; - - public function getProtocolVersion(): string - { - return $this->protocol; - } - - public function withProtocolVersion($version): self - { - if ($this->protocol === $version) { - return $this; - } - - $new = clone $this; - $new->protocol = $version; - - return $new; - } - - public function getHeaders(): array - { - return $this->headers; - } - - public function hasHeader($header): bool - { - return isset($this->headerNames[\strtr($header, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')]); - } - - public function getHeader($header): array - { - $header = \strtr($header, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'); - if (!isset($this->headerNames[$header])) { - return []; - } - - $header = $this->headerNames[$header]; - - return $this->headers[$header]; - } - - public function getHeaderLine($header): string - { - return \implode(', ', $this->getHeader($header)); - } - - public function withHeader($header, $value): self - { - $value = $this->validateAndTrimHeader($header, $value); - $normalized = \strtr($header, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'); - - $new = clone $this; - if (isset($new->headerNames[$normalized])) { - unset($new->headers[$new->headerNames[$normalized]]); - } - $new->headerNames[$normalized] = $header; - $new->headers[$header] = $value; - - return $new; - } - - public function withAddedHeader($header, $value): self - { - if (!\is_string($header) || '' === $header) { - throw new \InvalidArgumentException('Header name must be an RFC 7230 compatible string.'); - } - - $new = clone $this; - $new->setHeaders([$header => $value]); - - return $new; - } - - public function withoutHeader($header): self - { - $normalized = \strtr($header, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'); - if (!isset($this->headerNames[$normalized])) { - return $this; - } - - $header = $this->headerNames[$normalized]; - $new = clone $this; - unset($new->headers[$header], $new->headerNames[$normalized]); - - return $new; - } - - public function getBody(): StreamInterface - { - if (null === $this->stream) { - $this->stream = Stream::create(''); - } - - return $this->stream; - } - - public function withBody(StreamInterface $body): self - { - if ($body === $this->stream) { - return $this; - } - - $new = clone $this; - $new->stream = $body; - - return $new; - } - - private function setHeaders(array $headers): void - { - foreach ($headers as $header => $value) { - if (\is_int($header)) { - // If a header name was set to a numeric string, PHP will cast the key to an int. - // We must cast it back to a string in order to comply with validation. - $header = (string) $header; - } - $value = $this->validateAndTrimHeader($header, $value); - $normalized = \strtr($header, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'); - if (isset($this->headerNames[$normalized])) { - $header = $this->headerNames[$normalized]; - $this->headers[$header] = \array_merge($this->headers[$header], $value); - } else { - $this->headerNames[$normalized] = $header; - $this->headers[$header] = $value; - } - } - } - - /** - * Make sure the header complies with RFC 7230. - * - * Header names must be a non-empty string consisting of token characters. - * - * Header values must be strings consisting of visible characters with all optional - * leading and trailing whitespace stripped. This method will always strip such - * optional whitespace. Note that the method does not allow folding whitespace within - * the values as this was deprecated for almost all instances by the RFC. - * - * header-field = field-name ":" OWS field-value OWS - * field-name = 1*( "!" / "#" / "$" / "%" / "&" / "'" / "*" / "+" / "-" / "." / "^" - * / "_" / "`" / "|" / "~" / %x30-39 / ( %x41-5A / %x61-7A ) ) - * OWS = *( SP / HTAB ) - * field-value = *( ( %x21-7E / %x80-FF ) [ 1*( SP / HTAB ) ( %x21-7E / %x80-FF ) ] ) - * - * @see https://tools.ietf.org/html/rfc7230#section-3.2.4 - */ - private function validateAndTrimHeader($header, $values): array - { - if (!\is_string($header) || 1 !== \preg_match("@^[!#$%&'*+.^_`|~0-9A-Za-z-]+$@", $header)) { - throw new \InvalidArgumentException('Header name must be an RFC 7230 compatible string.'); - } - - if (!\is_array($values)) { - // This is simple, just one value. - if ((!\is_numeric($values) && !\is_string($values)) || 1 !== \preg_match("@^[ \t\x21-\x7E\x80-\xFF]*$@", (string) $values)) { - throw new \InvalidArgumentException('Header values must be RFC 7230 compatible strings.'); - } - - return [\trim((string) $values, " \t")]; - } - - if (empty($values)) { - throw new \InvalidArgumentException('Header values must be a string or an array of strings, empty array given.'); - } - - // Assert Non empty array - $returnValues = []; - foreach ($values as $v) { - if ((!\is_numeric($v) && !\is_string($v)) || 1 !== \preg_match("@^[ \t\x21-\x7E\x80-\xFF]*$@", (string) $v)) { - throw new \InvalidArgumentException('Header values must be RFC 7230 compatible strings.'); - } - - $returnValues[] = \trim((string) $v, " \t"); - } - - return $returnValues; - } -} diff --git a/source/vendor/nyholm/psr7/src/Request.php b/source/vendor/nyholm/psr7/src/Request.php deleted file mode 100644 index d50744e..0000000 --- a/source/vendor/nyholm/psr7/src/Request.php +++ /dev/null @@ -1,47 +0,0 @@ - - * @author Martijn van der Ven - * - * @final This class should never be extended. See https://github.com/Nyholm/psr7/blob/master/doc/final.md - */ -class Request implements RequestInterface -{ - use MessageTrait; - use RequestTrait; - - /** - * @param string $method HTTP method - * @param string|UriInterface $uri URI - * @param array $headers Request headers - * @param string|resource|StreamInterface|null $body Request body - * @param string $version Protocol version - */ - public function __construct(string $method, $uri, array $headers = [], $body = null, string $version = '1.1') - { - if (!($uri instanceof UriInterface)) { - $uri = new Uri($uri); - } - - $this->method = $method; - $this->uri = $uri; - $this->setHeaders($headers); - $this->protocol = $version; - - if (!$this->hasHeader('Host')) { - $this->updateHostFromUri(); - } - - // If we got no body, defer initialization of the stream until Request::getBody() - if ('' !== $body && null !== $body) { - $this->stream = Stream::create($body); - } - } -} diff --git a/source/vendor/nyholm/psr7/src/RequestTrait.php b/source/vendor/nyholm/psr7/src/RequestTrait.php deleted file mode 100644 index f39993a..0000000 --- a/source/vendor/nyholm/psr7/src/RequestTrait.php +++ /dev/null @@ -1,113 +0,0 @@ - - * @author Martijn van der Ven - * - * @internal should not be used outside of Nyholm/Psr7 as it does not fall under our BC promise - */ -trait RequestTrait -{ - /** @var string */ - private $method; - - /** @var string|null */ - private $requestTarget; - - /** @var UriInterface|null */ - private $uri; - - public function getRequestTarget(): string - { - if (null !== $this->requestTarget) { - return $this->requestTarget; - } - - if ('' === $target = $this->uri->getPath()) { - $target = '/'; - } - if ('' !== $this->uri->getQuery()) { - $target .= '?' . $this->uri->getQuery(); - } - - return $target; - } - - public function withRequestTarget($requestTarget): self - { - if (\preg_match('#\s#', $requestTarget)) { - throw new \InvalidArgumentException('Invalid request target provided; cannot contain whitespace'); - } - - $new = clone $this; - $new->requestTarget = $requestTarget; - - return $new; - } - - public function getMethod(): string - { - return $this->method; - } - - public function withMethod($method): self - { - if (!\is_string($method)) { - throw new \InvalidArgumentException('Method must be a string'); - } - - $new = clone $this; - $new->method = $method; - - return $new; - } - - public function getUri(): UriInterface - { - return $this->uri; - } - - public function withUri(UriInterface $uri, $preserveHost = false): self - { - if ($uri === $this->uri) { - return $this; - } - - $new = clone $this; - $new->uri = $uri; - - if (!$preserveHost || !$this->hasHeader('Host')) { - $new->updateHostFromUri(); - } - - return $new; - } - - private function updateHostFromUri(): void - { - if ('' === $host = $this->uri->getHost()) { - return; - } - - if (null !== ($port = $this->uri->getPort())) { - $host .= ':' . $port; - } - - if (isset($this->headerNames['host'])) { - $header = $this->headerNames['host']; - } else { - $this->headerNames['host'] = $header = 'Host'; - } - - // Ensure Host is the first header. - // See: http://tools.ietf.org/html/rfc7230#section-5.4 - $this->headers = [$header => [$host]] + $this->headers; - } -} diff --git a/source/vendor/nyholm/psr7/src/Response.php b/source/vendor/nyholm/psr7/src/Response.php deleted file mode 100644 index 9a26d2c..0000000 --- a/source/vendor/nyholm/psr7/src/Response.php +++ /dev/null @@ -1,90 +0,0 @@ - - * @author Martijn van der Ven - * - * @final This class should never be extended. See https://github.com/Nyholm/psr7/blob/master/doc/final.md - */ -class Response implements ResponseInterface -{ - use MessageTrait; - - /** @var array Map of standard HTTP status code/reason phrases */ - private const PHRASES = [ - 100 => 'Continue', 101 => 'Switching Protocols', 102 => 'Processing', - 200 => 'OK', 201 => 'Created', 202 => 'Accepted', 203 => 'Non-Authoritative Information', 204 => 'No Content', 205 => 'Reset Content', 206 => 'Partial Content', 207 => 'Multi-status', 208 => 'Already Reported', - 300 => 'Multiple Choices', 301 => 'Moved Permanently', 302 => 'Found', 303 => 'See Other', 304 => 'Not Modified', 305 => 'Use Proxy', 306 => 'Switch Proxy', 307 => 'Temporary Redirect', - 400 => 'Bad Request', 401 => 'Unauthorized', 402 => 'Payment Required', 403 => 'Forbidden', 404 => 'Not Found', 405 => 'Method Not Allowed', 406 => 'Not Acceptable', 407 => 'Proxy Authentication Required', 408 => 'Request Time-out', 409 => 'Conflict', 410 => 'Gone', 411 => 'Length Required', 412 => 'Precondition Failed', 413 => 'Request Entity Too Large', 414 => 'Request-URI Too Large', 415 => 'Unsupported Media Type', 416 => 'Requested range not satisfiable', 417 => 'Expectation Failed', 418 => 'I\'m a teapot', 422 => 'Unprocessable Entity', 423 => 'Locked', 424 => 'Failed Dependency', 425 => 'Unordered Collection', 426 => 'Upgrade Required', 428 => 'Precondition Required', 429 => 'Too Many Requests', 431 => 'Request Header Fields Too Large', 451 => 'Unavailable For Legal Reasons', - 500 => 'Internal Server Error', 501 => 'Not Implemented', 502 => 'Bad Gateway', 503 => 'Service Unavailable', 504 => 'Gateway Time-out', 505 => 'HTTP Version not supported', 506 => 'Variant Also Negotiates', 507 => 'Insufficient Storage', 508 => 'Loop Detected', 511 => 'Network Authentication Required', - ]; - - /** @var string */ - private $reasonPhrase = ''; - - /** @var int */ - private $statusCode; - - /** - * @param int $status Status code - * @param array $headers Response headers - * @param string|resource|StreamInterface|null $body Response body - * @param string $version Protocol version - * @param string|null $reason Reason phrase (when empty a default will be used based on the status code) - */ - public function __construct(int $status = 200, array $headers = [], $body = null, string $version = '1.1', string $reason = null) - { - // If we got no body, defer initialization of the stream until Response::getBody() - if ('' !== $body && null !== $body) { - $this->stream = Stream::create($body); - } - - $this->statusCode = $status; - $this->setHeaders($headers); - if (null === $reason && isset(self::PHRASES[$this->statusCode])) { - $this->reasonPhrase = self::PHRASES[$status]; - } else { - $this->reasonPhrase = $reason ?? ''; - } - - $this->protocol = $version; - } - - public function getStatusCode(): int - { - return $this->statusCode; - } - - public function getReasonPhrase(): string - { - return $this->reasonPhrase; - } - - public function withStatus($code, $reasonPhrase = ''): self - { - if (!\is_int($code) && !\is_string($code)) { - throw new \InvalidArgumentException('Status code has to be an integer'); - } - - $code = (int) $code; - if ($code < 100 || $code > 599) { - throw new \InvalidArgumentException(\sprintf('Status code has to be an integer between 100 and 599. A status code of %d was given', $code)); - } - - $new = clone $this; - $new->statusCode = $code; - if ((null === $reasonPhrase || '' === $reasonPhrase) && isset(self::PHRASES[$new->statusCode])) { - $reasonPhrase = self::PHRASES[$new->statusCode]; - } - $new->reasonPhrase = $reasonPhrase; - - return $new; - } -} diff --git a/source/vendor/nyholm/psr7/src/ServerRequest.php b/source/vendor/nyholm/psr7/src/ServerRequest.php deleted file mode 100644 index 1ad8792..0000000 --- a/source/vendor/nyholm/psr7/src/ServerRequest.php +++ /dev/null @@ -1,164 +0,0 @@ - - * @author Martijn van der Ven - * - * @final This class should never be extended. See https://github.com/Nyholm/psr7/blob/master/doc/final.md - */ -class ServerRequest implements ServerRequestInterface -{ - use MessageTrait; - use RequestTrait; - - /** @var array */ - private $attributes = []; - - /** @var array */ - private $cookieParams = []; - - /** @var array|object|null */ - private $parsedBody; - - /** @var array */ - private $queryParams = []; - - /** @var array */ - private $serverParams; - - /** @var UploadedFileInterface[] */ - private $uploadedFiles = []; - - /** - * @param string $method HTTP method - * @param string|UriInterface $uri URI - * @param array $headers Request headers - * @param string|resource|StreamInterface|null $body Request body - * @param string $version Protocol version - * @param array $serverParams Typically the $_SERVER superglobal - */ - public function __construct(string $method, $uri, array $headers = [], $body = null, string $version = '1.1', array $serverParams = []) - { - $this->serverParams = $serverParams; - - if (!($uri instanceof UriInterface)) { - $uri = new Uri($uri); - } - - $this->method = $method; - $this->uri = $uri; - $this->setHeaders($headers); - $this->protocol = $version; - - if (!$this->hasHeader('Host')) { - $this->updateHostFromUri(); - } - - // If we got no body, defer initialization of the stream until ServerRequest::getBody() - if ('' !== $body && null !== $body) { - $this->stream = Stream::create($body); - } - } - - public function getServerParams(): array - { - return $this->serverParams; - } - - public function getUploadedFiles(): array - { - return $this->uploadedFiles; - } - - public function withUploadedFiles(array $uploadedFiles) - { - $new = clone $this; - $new->uploadedFiles = $uploadedFiles; - - return $new; - } - - public function getCookieParams(): array - { - return $this->cookieParams; - } - - public function withCookieParams(array $cookies) - { - $new = clone $this; - $new->cookieParams = $cookies; - - return $new; - } - - public function getQueryParams(): array - { - return $this->queryParams; - } - - public function withQueryParams(array $query) - { - $new = clone $this; - $new->queryParams = $query; - - return $new; - } - - public function getParsedBody() - { - return $this->parsedBody; - } - - public function withParsedBody($data) - { - if (!\is_array($data) && !\is_object($data) && null !== $data) { - throw new \InvalidArgumentException('First parameter to withParsedBody MUST be object, array or null'); - } - - $new = clone $this; - $new->parsedBody = $data; - - return $new; - } - - public function getAttributes(): array - { - return $this->attributes; - } - - public function getAttribute($attribute, $default = null) - { - if (false === \array_key_exists($attribute, $this->attributes)) { - return $default; - } - - return $this->attributes[$attribute]; - } - - public function withAttribute($attribute, $value): self - { - $new = clone $this; - $new->attributes[$attribute] = $value; - - return $new; - } - - public function withoutAttribute($attribute): self - { - if (false === \array_key_exists($attribute, $this->attributes)) { - return $this; - } - - $new = clone $this; - unset($new->attributes[$attribute]); - - return $new; - } -} diff --git a/source/vendor/nyholm/psr7/src/Stream.php b/source/vendor/nyholm/psr7/src/Stream.php deleted file mode 100644 index 1a7f8c1..0000000 --- a/source/vendor/nyholm/psr7/src/Stream.php +++ /dev/null @@ -1,287 +0,0 @@ - - * @author Martijn van der Ven - * - * @final This class should never be extended. See https://github.com/Nyholm/psr7/blob/master/doc/final.md - */ -class Stream implements StreamInterface -{ - /** @var resource|null A resource reference */ - private $stream; - - /** @var bool */ - private $seekable; - - /** @var bool */ - private $readable; - - /** @var bool */ - private $writable; - - /** @var array|mixed|void|bool|null */ - private $uri; - - /** @var int|null */ - private $size; - - /** @var array Hash of readable and writable stream types */ - private const READ_WRITE_HASH = [ - 'read' => [ - 'r' => true, 'w+' => true, 'r+' => true, 'x+' => true, 'c+' => true, - 'rb' => true, 'w+b' => true, 'r+b' => true, 'x+b' => true, - 'c+b' => true, 'rt' => true, 'w+t' => true, 'r+t' => true, - 'x+t' => true, 'c+t' => true, 'a+' => true, - ], - 'write' => [ - 'w' => true, 'w+' => true, 'rw' => true, 'r+' => true, 'x+' => true, - 'c+' => true, 'wb' => true, 'w+b' => true, 'r+b' => true, - 'x+b' => true, 'c+b' => true, 'w+t' => true, 'r+t' => true, - 'x+t' => true, 'c+t' => true, 'a' => true, 'a+' => true, - ], - ]; - - private function __construct() - { - } - - /** - * Creates a new PSR-7 stream. - * - * @param string|resource|StreamInterface $body - * - * @throws \InvalidArgumentException - */ - public static function create($body = ''): StreamInterface - { - if ($body instanceof StreamInterface) { - return $body; - } - - if (\is_string($body)) { - $resource = \fopen('php://temp', 'rw+'); - \fwrite($resource, $body); - $body = $resource; - } - - if (\is_resource($body)) { - $new = new self(); - $new->stream = $body; - $meta = \stream_get_meta_data($new->stream); - $new->seekable = $meta['seekable'] && 0 === \fseek($new->stream, 0, \SEEK_CUR); - $new->readable = isset(self::READ_WRITE_HASH['read'][$meta['mode']]); - $new->writable = isset(self::READ_WRITE_HASH['write'][$meta['mode']]); - - return $new; - } - - throw new \InvalidArgumentException('First argument to Stream::create() must be a string, resource or StreamInterface.'); - } - - /** - * Closes the stream when the destructed. - */ - public function __destruct() - { - $this->close(); - } - - /** - * @return string - */ - public function __toString() - { - try { - if ($this->isSeekable()) { - $this->seek(0); - } - - return $this->getContents(); - } catch (\Throwable $e) { - if (\PHP_VERSION_ID >= 70400) { - throw $e; - } - - if (\is_array($errorHandler = \set_error_handler('var_dump'))) { - $errorHandler = $errorHandler[0] ?? null; - } - \restore_error_handler(); - - if ($e instanceof \Error || $errorHandler instanceof SymfonyErrorHandler || $errorHandler instanceof SymfonyLegacyErrorHandler) { - return \trigger_error((string) $e, \E_USER_ERROR); - } - - return ''; - } - } - - public function close(): void - { - if (isset($this->stream)) { - if (\is_resource($this->stream)) { - \fclose($this->stream); - } - $this->detach(); - } - } - - public function detach() - { - if (!isset($this->stream)) { - return null; - } - - $result = $this->stream; - unset($this->stream); - $this->size = $this->uri = null; - $this->readable = $this->writable = $this->seekable = false; - - return $result; - } - - private function getUri() - { - if (false !== $this->uri) { - $this->uri = $this->getMetadata('uri') ?? false; - } - - return $this->uri; - } - - public function getSize(): ?int - { - if (null !== $this->size) { - return $this->size; - } - - if (!isset($this->stream)) { - return null; - } - - // Clear the stat cache if the stream has a URI - if ($uri = $this->getUri()) { - \clearstatcache(true, $uri); - } - - $stats = \fstat($this->stream); - if (isset($stats['size'])) { - $this->size = $stats['size']; - - return $this->size; - } - - return null; - } - - public function tell(): int - { - if (false === $result = \ftell($this->stream)) { - throw new \RuntimeException('Unable to determine stream position'); - } - - return $result; - } - - public function eof(): bool - { - return !$this->stream || \feof($this->stream); - } - - public function isSeekable(): bool - { - return $this->seekable; - } - - public function seek($offset, $whence = \SEEK_SET): void - { - if (!$this->seekable) { - throw new \RuntimeException('Stream is not seekable'); - } - - if (-1 === \fseek($this->stream, $offset, $whence)) { - throw new \RuntimeException('Unable to seek to stream position "' . $offset . '" with whence ' . \var_export($whence, true)); - } - } - - public function rewind(): void - { - $this->seek(0); - } - - public function isWritable(): bool - { - return $this->writable; - } - - public function write($string): int - { - if (!$this->writable) { - throw new \RuntimeException('Cannot write to a non-writable stream'); - } - - // We can't know the size after writing anything - $this->size = null; - - if (false === $result = \fwrite($this->stream, $string)) { - throw new \RuntimeException('Unable to write to stream'); - } - - return $result; - } - - public function isReadable(): bool - { - return $this->readable; - } - - public function read($length): string - { - if (!$this->readable) { - throw new \RuntimeException('Cannot read from non-readable stream'); - } - - if (false === $result = \fread($this->stream, $length)) { - throw new \RuntimeException('Unable to read from stream'); - } - - return $result; - } - - public function getContents(): string - { - if (!isset($this->stream)) { - throw new \RuntimeException('Unable to read stream contents'); - } - - if (false === $contents = \stream_get_contents($this->stream)) { - throw new \RuntimeException('Unable to read stream contents'); - } - - return $contents; - } - - public function getMetadata($key = null) - { - if (!isset($this->stream)) { - return $key ? null : []; - } - - $meta = \stream_get_meta_data($this->stream); - - if (null === $key) { - return $meta; - } - - return $meta[$key] ?? null; - } -} diff --git a/source/vendor/nyholm/psr7/src/UploadedFile.php b/source/vendor/nyholm/psr7/src/UploadedFile.php deleted file mode 100644 index 198cd33..0000000 --- a/source/vendor/nyholm/psr7/src/UploadedFile.php +++ /dev/null @@ -1,180 +0,0 @@ - - * @author Martijn van der Ven - * - * @final This class should never be extended. See https://github.com/Nyholm/psr7/blob/master/doc/final.md - */ -class UploadedFile implements UploadedFileInterface -{ - /** @var array */ - private const ERRORS = [ - \UPLOAD_ERR_OK => 1, - \UPLOAD_ERR_INI_SIZE => 1, - \UPLOAD_ERR_FORM_SIZE => 1, - \UPLOAD_ERR_PARTIAL => 1, - \UPLOAD_ERR_NO_FILE => 1, - \UPLOAD_ERR_NO_TMP_DIR => 1, - \UPLOAD_ERR_CANT_WRITE => 1, - \UPLOAD_ERR_EXTENSION => 1, - ]; - - /** @var string */ - private $clientFilename; - - /** @var string */ - private $clientMediaType; - - /** @var int */ - private $error; - - /** @var string|null */ - private $file; - - /** @var bool */ - private $moved = false; - - /** @var int */ - private $size; - - /** @var StreamInterface|null */ - private $stream; - - /** - * @param StreamInterface|string|resource $streamOrFile - * @param int $size - * @param int $errorStatus - * @param string|null $clientFilename - * @param string|null $clientMediaType - */ - public function __construct($streamOrFile, $size, $errorStatus, $clientFilename = null, $clientMediaType = null) - { - if (false === \is_int($errorStatus) || !isset(self::ERRORS[$errorStatus])) { - throw new \InvalidArgumentException('Upload file error status must be an integer value and one of the "UPLOAD_ERR_*" constants.'); - } - - if (false === \is_int($size)) { - throw new \InvalidArgumentException('Upload file size must be an integer'); - } - - if (null !== $clientFilename && !\is_string($clientFilename)) { - throw new \InvalidArgumentException('Upload file client filename must be a string or null'); - } - - if (null !== $clientMediaType && !\is_string($clientMediaType)) { - throw new \InvalidArgumentException('Upload file client media type must be a string or null'); - } - - $this->error = $errorStatus; - $this->size = $size; - $this->clientFilename = $clientFilename; - $this->clientMediaType = $clientMediaType; - - if (\UPLOAD_ERR_OK === $this->error) { - // Depending on the value set file or stream variable. - if (\is_string($streamOrFile)) { - $this->file = $streamOrFile; - } elseif (\is_resource($streamOrFile)) { - $this->stream = Stream::create($streamOrFile); - } elseif ($streamOrFile instanceof StreamInterface) { - $this->stream = $streamOrFile; - } else { - throw new \InvalidArgumentException('Invalid stream or file provided for UploadedFile'); - } - } - } - - /** - * @throws \RuntimeException if is moved or not ok - */ - private function validateActive(): void - { - if (\UPLOAD_ERR_OK !== $this->error) { - throw new \RuntimeException('Cannot retrieve stream due to upload error'); - } - - if ($this->moved) { - throw new \RuntimeException('Cannot retrieve stream after it has already been moved'); - } - } - - public function getStream(): StreamInterface - { - $this->validateActive(); - - if ($this->stream instanceof StreamInterface) { - return $this->stream; - } - - try { - return Stream::create(\fopen($this->file, 'r')); - } catch (\Throwable $e) { - throw new \RuntimeException(\sprintf('The file "%s" cannot be opened.', $this->file)); - } - } - - public function moveTo($targetPath): void - { - $this->validateActive(); - - if (!\is_string($targetPath) || '' === $targetPath) { - throw new \InvalidArgumentException('Invalid path provided for move operation; must be a non-empty string'); - } - - if (null !== $this->file) { - $this->moved = 'cli' === \PHP_SAPI ? \rename($this->file, $targetPath) : \move_uploaded_file($this->file, $targetPath); - } else { - $stream = $this->getStream(); - if ($stream->isSeekable()) { - $stream->rewind(); - } - - try { - // Copy the contents of a stream into another stream until end-of-file. - $dest = Stream::create(\fopen($targetPath, 'w')); - } catch (\Throwable $e) { - throw new \RuntimeException(\sprintf('The file "%s" cannot be opened.', $targetPath)); - } - - while (!$stream->eof()) { - if (!$dest->write($stream->read(1048576))) { - break; - } - } - - $this->moved = true; - } - - if (false === $this->moved) { - throw new \RuntimeException(\sprintf('Uploaded file could not be moved to "%s"', $targetPath)); - } - } - - public function getSize(): int - { - return $this->size; - } - - public function getError(): int - { - return $this->error; - } - - public function getClientFilename(): ?string - { - return $this->clientFilename; - } - - public function getClientMediaType(): ?string - { - return $this->clientMediaType; - } -} diff --git a/source/vendor/nyholm/psr7/src/Uri.php b/source/vendor/nyholm/psr7/src/Uri.php deleted file mode 100644 index 13fbf72..0000000 --- a/source/vendor/nyholm/psr7/src/Uri.php +++ /dev/null @@ -1,312 +0,0 @@ - - * @author Martijn van der Ven - * - * @final This class should never be extended. See https://github.com/Nyholm/psr7/blob/master/doc/final.md - */ -class Uri implements UriInterface -{ - private const SCHEMES = ['http' => 80, 'https' => 443]; - - private const CHAR_UNRESERVED = 'a-zA-Z0-9_\-\.~'; - - private const CHAR_SUB_DELIMS = '!\$&\'\(\)\*\+,;='; - - /** @var string Uri scheme. */ - private $scheme = ''; - - /** @var string Uri user info. */ - private $userInfo = ''; - - /** @var string Uri host. */ - private $host = ''; - - /** @var int|null Uri port. */ - private $port; - - /** @var string Uri path. */ - private $path = ''; - - /** @var string Uri query string. */ - private $query = ''; - - /** @var string Uri fragment. */ - private $fragment = ''; - - public function __construct(string $uri = '') - { - if ('' !== $uri) { - if (false === $parts = \parse_url($uri)) { - throw new \InvalidArgumentException(\sprintf('Unable to parse URI: "%s"', $uri)); - } - - // Apply parse_url parts to a URI. - $this->scheme = isset($parts['scheme']) ? \strtr($parts['scheme'], 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz') : ''; - $this->userInfo = $parts['user'] ?? ''; - $this->host = isset($parts['host']) ? \strtr($parts['host'], 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz') : ''; - $this->port = isset($parts['port']) ? $this->filterPort($parts['port']) : null; - $this->path = isset($parts['path']) ? $this->filterPath($parts['path']) : ''; - $this->query = isset($parts['query']) ? $this->filterQueryAndFragment($parts['query']) : ''; - $this->fragment = isset($parts['fragment']) ? $this->filterQueryAndFragment($parts['fragment']) : ''; - if (isset($parts['pass'])) { - $this->userInfo .= ':' . $parts['pass']; - } - } - } - - public function __toString(): string - { - return self::createUriString($this->scheme, $this->getAuthority(), $this->path, $this->query, $this->fragment); - } - - public function getScheme(): string - { - return $this->scheme; - } - - public function getAuthority(): string - { - if ('' === $this->host) { - return ''; - } - - $authority = $this->host; - if ('' !== $this->userInfo) { - $authority = $this->userInfo . '@' . $authority; - } - - if (null !== $this->port) { - $authority .= ':' . $this->port; - } - - return $authority; - } - - public function getUserInfo(): string - { - return $this->userInfo; - } - - public function getHost(): string - { - return $this->host; - } - - public function getPort(): ?int - { - return $this->port; - } - - public function getPath(): string - { - return $this->path; - } - - public function getQuery(): string - { - return $this->query; - } - - public function getFragment(): string - { - return $this->fragment; - } - - public function withScheme($scheme): self - { - if (!\is_string($scheme)) { - throw new \InvalidArgumentException('Scheme must be a string'); - } - - if ($this->scheme === $scheme = \strtr($scheme, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')) { - return $this; - } - - $new = clone $this; - $new->scheme = $scheme; - $new->port = $new->filterPort($new->port); - - return $new; - } - - public function withUserInfo($user, $password = null): self - { - $info = $user; - if (null !== $password && '' !== $password) { - $info .= ':' . $password; - } - - if ($this->userInfo === $info) { - return $this; - } - - $new = clone $this; - $new->userInfo = $info; - - return $new; - } - - public function withHost($host): self - { - if (!\is_string($host)) { - throw new \InvalidArgumentException('Host must be a string'); - } - - if ($this->host === $host = \strtr($host, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')) { - return $this; - } - - $new = clone $this; - $new->host = $host; - - return $new; - } - - public function withPort($port): self - { - if ($this->port === $port = $this->filterPort($port)) { - return $this; - } - - $new = clone $this; - $new->port = $port; - - return $new; - } - - public function withPath($path): self - { - if ($this->path === $path = $this->filterPath($path)) { - return $this; - } - - $new = clone $this; - $new->path = $path; - - return $new; - } - - public function withQuery($query): self - { - if ($this->query === $query = $this->filterQueryAndFragment($query)) { - return $this; - } - - $new = clone $this; - $new->query = $query; - - return $new; - } - - public function withFragment($fragment): self - { - if ($this->fragment === $fragment = $this->filterQueryAndFragment($fragment)) { - return $this; - } - - $new = clone $this; - $new->fragment = $fragment; - - return $new; - } - - /** - * Create a URI string from its various parts. - */ - private static function createUriString(string $scheme, string $authority, string $path, string $query, string $fragment): string - { - $uri = ''; - if ('' !== $scheme) { - $uri .= $scheme . ':'; - } - - if ('' !== $authority) { - $uri .= '//' . $authority; - } - - if ('' !== $path) { - if ('/' !== $path[0]) { - if ('' !== $authority) { - // If the path is rootless and an authority is present, the path MUST be prefixed by "/" - $path = '/' . $path; - } - } elseif (isset($path[1]) && '/' === $path[1]) { - if ('' === $authority) { - // If the path is starting with more than one "/" and no authority is present, the - // starting slashes MUST be reduced to one. - $path = '/' . \ltrim($path, '/'); - } - } - - $uri .= $path; - } - - if ('' !== $query) { - $uri .= '?' . $query; - } - - if ('' !== $fragment) { - $uri .= '#' . $fragment; - } - - return $uri; - } - - /** - * Is a given port non-standard for the current scheme? - */ - private static function isNonStandardPort(string $scheme, int $port): bool - { - return !isset(self::SCHEMES[$scheme]) || $port !== self::SCHEMES[$scheme]; - } - - private function filterPort($port): ?int - { - if (null === $port) { - return null; - } - - $port = (int) $port; - if (0 > $port || 0xffff < $port) { - throw new \InvalidArgumentException(\sprintf('Invalid port: %d. Must be between 0 and 65535', $port)); - } - - return self::isNonStandardPort($this->scheme, $port) ? $port : null; - } - - private function filterPath($path): string - { - if (!\is_string($path)) { - throw new \InvalidArgumentException('Path must be a string'); - } - - return \preg_replace_callback('/(?:[^' . self::CHAR_UNRESERVED . self::CHAR_SUB_DELIMS . '%:@\/]++|%(?![A-Fa-f0-9]{2}))/', [__CLASS__, 'rawurlencodeMatchZero'], $path); - } - - private function filterQueryAndFragment($str): string - { - if (!\is_string($str)) { - throw new \InvalidArgumentException('Query and fragment must be a string'); - } - - return \preg_replace_callback('/(?:[^' . self::CHAR_UNRESERVED . self::CHAR_SUB_DELIMS . '%:@\/\?]++|%(?![A-Fa-f0-9]{2}))/', [__CLASS__, 'rawurlencodeMatchZero'], $str); - } - - private static function rawurlencodeMatchZero(array $match): string - { - return \rawurlencode($match[0]); - } -} diff --git a/source/vendor/phive/twig-extensions-deferred/LICENSE b/source/vendor/phive/twig-extensions-deferred/LICENSE deleted file mode 100644 index a5c469b..0000000 --- a/source/vendor/phive/twig-extensions-deferred/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2017 Eugene Leonovich - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/source/vendor/phive/twig-extensions-deferred/README.md b/source/vendor/phive/twig-extensions-deferred/README.md deleted file mode 100644 index 737aa4c..0000000 --- a/source/vendor/phive/twig-extensions-deferred/README.md +++ /dev/null @@ -1,128 +0,0 @@ -Deferred Twig Extension -======================= -[![Build Status](https://travis-ci.org/rybakit/twig-extensions-deferred.svg?branch=master)](https://travis-ci.org/rybakit/twig-extensions-deferred) - -An extension for Twig that allows to defer block rendering. - -## Installation - -The recommended way to install the extension is through [Composer](http://getcomposer.org): - -```sh -$ composer require phive/twig-extensions-deferred:^1.0 -``` - - -## Initialization - -```php -$twig = new Twig_Environment($loader); -$twig->addExtension(new Phive\Twig\Extensions\Deferred\DeferredExtension()); -``` - -## Simple Example - -```jinja -{# outputs bar #} -{% block foo deferred %} - {{ bar }} -{% endblock %} - -{% set bar = 'bar' %} -``` - - -## Advanced Example - -Just for example purposes, first create a [global twig variable](http://twig.sensiolabs.org/doc/advanced.html#globals): - -```php -$twig = new Twig_Environment($loader); -$twig->addGlobal('data', new ArrayObject()); -``` - -Then build the following set of templates: - -```jinja -{# layout.html.twig #} - - - - ... - - - {% block content '' %} - - {{ data.append('/js/layout-header.js') }} - - {% block javascripts deferred %} - {% for item in data %} - - {% endfor %} - {% endblock %} - - {{ data.append('/js/layout-footer.js') }} - - - - -{# page.html.twig #} -{% extends "layout.html.twig" %} - -{% block content %} - {{ data.append('/js/page-header.js') }} - - {% if foo is not defined %} - {{ include("subpage1.html.twig") }} - {% else %} - {{ include("subpage2.html.twig") }} - {% endif %} - - {{ data.append('/js/page-footer.js') }} -{% endblock %} - - -{# subpage1.html.twig #} -{{ data.append('/js/subpage1.js') }} - - -{# subpage2.html.twig #} -{{ data.append('/js/subpage2.js') }} -``` - -The resulting html will be the following: - -```html - - - - ... - - - - - - - - - -``` - - -## Block overriding - -```jinja -{# index.twig #} -{% extends "base.twig" %} -{% block foo %}foo is not deferred anymore{% endblock %} -{% block bar deferred %}bar is deferred now{% endblock %} - -{# base.twig #} -{% block foo deferred %}foo is deferred{% endblock %} -{% block bar %}bar is not deferred{% endblock %} -``` - - -## License - -Deferred Twig Extension is released under the MIT License. See the bundled [LICENSE](LICENSE) file for details. diff --git a/source/vendor/phive/twig-extensions-deferred/src/DeferredBlockNode.php b/source/vendor/phive/twig-extensions-deferred/src/DeferredBlockNode.php deleted file mode 100755 index 63f82df..0000000 --- a/source/vendor/phive/twig-extensions-deferred/src/DeferredBlockNode.php +++ /dev/null @@ -1,29 +0,0 @@ -getAttribute('name'); - - $compiler - ->write("public function block_$name(\$context, array \$blocks = array())\n", "{\n") - ->indent() - ->write("\$this->env->getExtension('Phive\\Twig\\Extensions\\Deferred\\DeferredExtension')->defer(\$this, '$name');\n") - ->outdent() - ->write("}\n\n") - ; - - $compiler - ->addDebugInfo($this) - ->write("public function block_{$name}_deferred(\$context, array \$blocks = array())\n", "{\n") - ->indent() - ->subcompile($this->getNode('body')) - ->write("\$this->env->getExtension('Phive\\Twig\\Extensions\\Deferred\\DeferredExtension')->resolve(\$this, \$context, \$blocks);\n") - ->outdent() - ->write("}\n\n") - ; - } -} diff --git a/source/vendor/phive/twig-extensions-deferred/src/DeferredExtension.php b/source/vendor/phive/twig-extensions-deferred/src/DeferredExtension.php deleted file mode 100644 index fd48d2e..0000000 --- a/source/vendor/phive/twig-extensions-deferred/src/DeferredExtension.php +++ /dev/null @@ -1,63 +0,0 @@ -getTemplateName(); - $this->blocks[$templateName][] = $blockName; - ob_start(); - } - - public function resolve(\Twig_Template $template, array $context, array $blocks) - { - $templateName = $template->getTemplateName(); - if (empty($this->blocks[$templateName])) { - return; - } - - while ($blockName = array_pop($this->blocks[$templateName])) { - $buffer = ob_get_clean(); - - $blocks[$blockName] = array($template, 'block_'.$blockName.'_deferred'); - $template->displayBlock($blockName, $context, $blocks); - - echo $buffer; - } - - if ($parent = $template->getParent($context)) { - $this->resolve($parent, $context, $blocks); - } - } -} diff --git a/source/vendor/phive/twig-extensions-deferred/src/DeferredNode.php b/source/vendor/phive/twig-extensions-deferred/src/DeferredNode.php deleted file mode 100755 index 12942c7..0000000 --- a/source/vendor/phive/twig-extensions-deferred/src/DeferredNode.php +++ /dev/null @@ -1,13 +0,0 @@ -write("\$this->env->getExtension('Phive\\Twig\\Extensions\\Deferred\\DeferredExtension')->resolve(\$this, \$context, \$blocks);\n") - ; - } -} diff --git a/source/vendor/phive/twig-extensions-deferred/src/DeferredNodeVisitor.php b/source/vendor/phive/twig-extensions-deferred/src/DeferredNodeVisitor.php deleted file mode 100644 index 686ae45..0000000 --- a/source/vendor/phive/twig-extensions-deferred/src/DeferredNodeVisitor.php +++ /dev/null @@ -1,41 +0,0 @@ -hasDeferred && $node instanceof DeferredBlockNode) { - $this->hasDeferred = true; - } - - return $node; - } - - /** - * {@inheritdoc} - */ - public function leaveNode(\Twig_NodeInterface $node, \Twig_Environment $env) - { - if ($this->hasDeferred && $node instanceof \Twig_Node_Module) { - $node->setNode('display_end', new \Twig_Node(array(new DeferredNode(), $node->getNode('display_end')))); - $this->hasDeferred = false; - } - - return $node; - } - - /** - * {@inheritdoc} - */ - public function getPriority() - { - return 0; - } -} diff --git a/source/vendor/phive/twig-extensions-deferred/src/DeferredTokenParser.php b/source/vendor/phive/twig-extensions-deferred/src/DeferredTokenParser.php deleted file mode 100644 index 8d5dc1c..0000000 --- a/source/vendor/phive/twig-extensions-deferred/src/DeferredTokenParser.php +++ /dev/null @@ -1,57 +0,0 @@ -blockTokenParser = new \Twig_TokenParser_Block(); - $this->blockTokenParser->setParser($parser); - } - - public function parse(\Twig_Token $token) - { - $stream = $this->parser->getStream(); - $nameToken = $stream->next(); - $deferredToken = $stream->nextIf(\Twig_Token::NAME_TYPE, 'deferred'); - $stream->injectTokens(array($nameToken)); - - $node = $this->blockTokenParser->parse($token); - - if ($deferredToken) { - $this->replaceBlockNode($nameToken->getValue()); - } - - return $node; - } - - public function getTag() - { - return 'block'; - } - - private function replaceBlockNode($name) - { - $block = $this->parser->getBlock($name)->getNode(0); - $this->parser->setBlock($name, $this->createDeferredBlockNode($block)); - } - - private function createDeferredBlockNode(\Twig_Node_Block $block) - { - $name = $block->getAttribute('name'); - $deferredBlock = new DeferredBlockNode($name, new \Twig_Node(array()), $block->getTemplateLine()); - - foreach ($block as $nodeName => $node) { - $deferredBlock->setNode($nodeName, $node); - } - - $deferredBlock->setTemplateName($block->getTemplateName()); - - return $deferredBlock; - } -} diff --git a/source/vendor/php-http/message-factory/LICENSE b/source/vendor/php-http/message-factory/LICENSE deleted file mode 100644 index 8e2c4a0..0000000 --- a/source/vendor/php-http/message-factory/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2015 PHP HTTP Team - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/source/vendor/php-http/message-factory/README.md b/source/vendor/php-http/message-factory/README.md deleted file mode 100644 index 4654495..0000000 --- a/source/vendor/php-http/message-factory/README.md +++ /dev/null @@ -1,36 +0,0 @@ -# PSR-7 Message Factory - -[![Latest Version](https://img.shields.io/github/release/php-http/message-factory.svg?style=flat-square)](https://github.com/php-http/message-factory/releases) -[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE) -[![Total Downloads](https://img.shields.io/packagist/dt/php-http/message-factory.svg?style=flat-square)](https://packagist.org/packages/php-http/message-factory) - -**Factory interfaces for PSR-7 HTTP Message.** - - -## Install - -Via Composer - -``` bash -$ composer require php-http/message-factory -``` - - -## Documentation - -Please see the [official documentation](http://php-http.readthedocs.org/en/latest/message-factory/). - - -## Contributing - -Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details. - - -## Security - -If you discover any security related issues, please contact us at [security@php-http.org](mailto:security@php-http.org). - - -## License - -The MIT License (MIT). Please see [License File](LICENSE) for more information. diff --git a/source/vendor/php-http/message-factory/src/MessageFactory.php b/source/vendor/php-http/message-factory/src/MessageFactory.php deleted file mode 100644 index 965aaa8..0000000 --- a/source/vendor/php-http/message-factory/src/MessageFactory.php +++ /dev/null @@ -1,12 +0,0 @@ - - */ -interface MessageFactory extends RequestFactory, ResponseFactory -{ -} diff --git a/source/vendor/php-http/message-factory/src/RequestFactory.php b/source/vendor/php-http/message-factory/src/RequestFactory.php deleted file mode 100644 index 624e82f..0000000 --- a/source/vendor/php-http/message-factory/src/RequestFactory.php +++ /dev/null @@ -1,34 +0,0 @@ - - */ -interface RequestFactory -{ - /** - * Creates a new PSR-7 request. - * - * @param string $method - * @param string|UriInterface $uri - * @param array $headers - * @param resource|string|StreamInterface|null $body - * @param string $protocolVersion - * - * @return RequestInterface - */ - public function createRequest( - $method, - $uri, - array $headers = [], - $body = null, - $protocolVersion = '1.1' - ); -} diff --git a/source/vendor/php-http/message-factory/src/ResponseFactory.php b/source/vendor/php-http/message-factory/src/ResponseFactory.php deleted file mode 100644 index 2411ed3..0000000 --- a/source/vendor/php-http/message-factory/src/ResponseFactory.php +++ /dev/null @@ -1,35 +0,0 @@ - - */ -interface ResponseFactory -{ - /** - * Creates a new PSR-7 response. - * - * @param int $statusCode - * @param string|null $reasonPhrase - * @param array $headers - * @param resource|string|StreamInterface|null $body - * @param string $protocolVersion - * - * @return ResponseInterface - */ - public function createResponse( - $statusCode = 200, - $reasonPhrase = null, - array $headers = [], - $body = null, - $protocolVersion = '1.1' - ); -} diff --git a/source/vendor/php-http/message-factory/src/StreamFactory.php b/source/vendor/php-http/message-factory/src/StreamFactory.php deleted file mode 100644 index 327a902..0000000 --- a/source/vendor/php-http/message-factory/src/StreamFactory.php +++ /dev/null @@ -1,25 +0,0 @@ - - */ -interface StreamFactory -{ - /** - * Creates a new PSR-7 stream. - * - * @param string|resource|StreamInterface|null $body - * - * @return StreamInterface - * - * @throws \InvalidArgumentException If the stream body is invalid. - * @throws \RuntimeException If creating the stream from $body fails. - */ - public function createStream($body = null); -} diff --git a/source/vendor/php-http/message-factory/src/UriFactory.php b/source/vendor/php-http/message-factory/src/UriFactory.php deleted file mode 100644 index f05e625..0000000 --- a/source/vendor/php-http/message-factory/src/UriFactory.php +++ /dev/null @@ -1,24 +0,0 @@ - - */ -interface UriFactory -{ - /** - * Creates an PSR-7 URI. - * - * @param string|UriInterface $uri - * - * @return UriInterface - * - * @throws \InvalidArgumentException If the $uri argument can not be converted into a valid URI. - */ - public function createUri($uri); -} diff --git a/source/vendor/pimple/pimple/LICENSE b/source/vendor/pimple/pimple/LICENSE deleted file mode 100644 index 3e2a9e1..0000000 --- a/source/vendor/pimple/pimple/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2009-2020 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/source/vendor/pimple/pimple/README.rst b/source/vendor/pimple/pimple/README.rst deleted file mode 100644 index 0169cf8..0000000 --- a/source/vendor/pimple/pimple/README.rst +++ /dev/null @@ -1,332 +0,0 @@ -Pimple -====== - -.. caution:: - - Pimple is now closed for changes. No new features will be added and no - cosmetic changes will be accepted either. The only accepted changes are - compatiblity with newer PHP versions and security issue fixes. - -.. caution:: - - This is the documentation for Pimple 3.x. If you are using Pimple 1.x, read - the `Pimple 1.x documentation`_. Reading the Pimple 1.x code is also a good - way to learn more about how to create a simple Dependency Injection - Container (recent versions of Pimple are more focused on performance). - -Pimple is a small Dependency Injection Container for PHP. - -Installation ------------- - -Before using Pimple in your project, add it to your ``composer.json`` file: - -.. code-block:: bash - - $ ./composer.phar require pimple/pimple "^3.0" - -Usage ------ - -Creating a container is a matter of creating a ``Container`` instance: - -.. code-block:: php - - use Pimple\Container; - - $container = new Container(); - -As many other dependency injection containers, Pimple manages two different -kind of data: **services** and **parameters**. - -Defining Services -~~~~~~~~~~~~~~~~~ - -A service is an object that does something as part of a larger system. Examples -of services: a database connection, a templating engine, or a mailer. Almost -any **global** object can be a service. - -Services are defined by **anonymous functions** that return an instance of an -object: - -.. code-block:: php - - // define some services - $container['session_storage'] = function ($c) { - return new SessionStorage('SESSION_ID'); - }; - - $container['session'] = function ($c) { - return new Session($c['session_storage']); - }; - -Notice that the anonymous function has access to the current container -instance, allowing references to other services or parameters. - -As objects are only created when you get them, the order of the definitions -does not matter. - -Using the defined services is also very easy: - -.. code-block:: php - - // get the session object - $session = $container['session']; - - // the above call is roughly equivalent to the following code: - // $storage = new SessionStorage('SESSION_ID'); - // $session = new Session($storage); - -Defining Factory Services -~~~~~~~~~~~~~~~~~~~~~~~~~ - -By default, each time you get a service, Pimple returns the **same instance** -of it. If you want a different instance to be returned for all calls, wrap your -anonymous function with the ``factory()`` method - -.. code-block:: php - - $container['session'] = $container->factory(function ($c) { - return new Session($c['session_storage']); - }); - -Now, each call to ``$container['session']`` returns a new instance of the -session. - -Defining Parameters -~~~~~~~~~~~~~~~~~~~ - -Defining a parameter allows to ease the configuration of your container from -the outside and to store global values: - -.. code-block:: php - - // define some parameters - $container['cookie_name'] = 'SESSION_ID'; - $container['session_storage_class'] = 'SessionStorage'; - -If you change the ``session_storage`` service definition like below: - -.. code-block:: php - - $container['session_storage'] = function ($c) { - return new $c['session_storage_class']($c['cookie_name']); - }; - -You can now easily change the cookie name by overriding the -``cookie_name`` parameter instead of redefining the service -definition. - -Protecting Parameters -~~~~~~~~~~~~~~~~~~~~~ - -Because Pimple sees anonymous functions as service definitions, you need to -wrap anonymous functions with the ``protect()`` method to store them as -parameters: - -.. code-block:: php - - $container['random_func'] = $container->protect(function () { - return rand(); - }); - -Modifying Services after Definition -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -In some cases you may want to modify a service definition after it has been -defined. You can use the ``extend()`` method to define additional code to be -run on your service just after it is created: - -.. code-block:: php - - $container['session_storage'] = function ($c) { - return new $c['session_storage_class']($c['cookie_name']); - }; - - $container->extend('session_storage', function ($storage, $c) { - $storage->...(); - - return $storage; - }); - -The first argument is the name of the service to extend, the second a function -that gets access to the object instance and the container. - -Extending a Container -~~~~~~~~~~~~~~~~~~~~~ - -If you use the same libraries over and over, you might want to reuse some -services from one project to the next one; package your services into a -**provider** by implementing ``Pimple\ServiceProviderInterface``: - -.. code-block:: php - - use Pimple\Container; - - class FooProvider implements Pimple\ServiceProviderInterface - { - public function register(Container $pimple) - { - // register some services and parameters - // on $pimple - } - } - -Then, register the provider on a Container: - -.. code-block:: php - - $pimple->register(new FooProvider()); - -Fetching the Service Creation Function -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -When you access an object, Pimple automatically calls the anonymous function -that you defined, which creates the service object for you. If you want to get -raw access to this function, you can use the ``raw()`` method: - -.. code-block:: php - - $container['session'] = function ($c) { - return new Session($c['session_storage']); - }; - - $sessionFunction = $container->raw('session'); - -PSR-11 compatibility --------------------- - -For historical reasons, the ``Container`` class does not implement the PSR-11 -``ContainerInterface``. However, Pimple provides a helper class that will let -you decouple your code from the Pimple container class. - -The PSR-11 container class -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The ``Pimple\Psr11\Container`` class lets you access the content of an -underlying Pimple container using ``Psr\Container\ContainerInterface`` -methods: - -.. code-block:: php - - use Pimple\Container; - use Pimple\Psr11\Container as PsrContainer; - - $container = new Container(); - $container['service'] = function ($c) { - return new Service(); - }; - $psr11 = new PsrContainer($container); - - $controller = function (PsrContainer $container) { - $service = $container->get('service'); - }; - $controller($psr11); - -Using the PSR-11 ServiceLocator -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Sometimes, a service needs access to several other services without being sure -that all of them will actually be used. In those cases, you may want the -instantiation of the services to be lazy. - -The traditional solution is to inject the entire service container to get only -the services really needed. However, this is not recommended because it gives -services a too broad access to the rest of the application and it hides their -actual dependencies. - -The ``ServiceLocator`` is intended to solve this problem by giving access to a -set of predefined services while instantiating them only when actually needed. - -It also allows you to make your services available under a different name than -the one used to register them. For instance, you may want to use an object -that expects an instance of ``EventDispatcherInterface`` to be available under -the name ``event_dispatcher`` while your event dispatcher has been -registered under the name ``dispatcher``: - -.. code-block:: php - - use Monolog\Logger; - use Pimple\Psr11\ServiceLocator; - use Psr\Container\ContainerInterface; - use Symfony\Component\EventDispatcher\EventDispatcher; - - class MyService - { - /** - * "logger" must be an instance of Psr\Log\LoggerInterface - * "event_dispatcher" must be an instance of Symfony\Component\EventDispatcher\EventDispatcherInterface - */ - private $services; - - public function __construct(ContainerInterface $services) - { - $this->services = $services; - } - } - - $container['logger'] = function ($c) { - return new Monolog\Logger(); - }; - $container['dispatcher'] = function () { - return new EventDispatcher(); - }; - - $container['service'] = function ($c) { - $locator = new ServiceLocator($c, array('logger', 'event_dispatcher' => 'dispatcher')); - - return new MyService($locator); - }; - -Referencing a Collection of Services Lazily -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Passing a collection of services instances in an array may prove inefficient -if the class that consumes the collection only needs to iterate over it at a -later stage, when one of its method is called. It can also lead to problems -if there is a circular dependency between one of the services stored in the -collection and the class that consumes it. - -The ``ServiceIterator`` class helps you solve these issues. It receives a -list of service names during instantiation and will retrieve the services -when iterated over: - -.. code-block:: php - - use Pimple\Container; - use Pimple\ServiceIterator; - - class AuthorizationService - { - private $voters; - - public function __construct($voters) - { - $this->voters = $voters; - } - - public function canAccess($resource) - { - foreach ($this->voters as $voter) { - if (true === $voter->canAccess($resource) { - return true; - } - } - - return false; - } - } - - $container = new Container(); - - $container['voter1'] = function ($c) { - return new SomeVoter(); - } - $container['voter2'] = function ($c) { - return new SomeOtherVoter($c['auth']); - } - $container['auth'] = function ($c) { - return new AuthorizationService(new ServiceIterator($c, array('voter1', 'voter2')); - } - -.. _Pimple 1.x documentation: https://github.com/silexphp/Pimple/tree/1.1 diff --git a/source/vendor/pimple/pimple/src/Pimple/Container.php b/source/vendor/pimple/pimple/src/Pimple/Container.php deleted file mode 100644 index 715de10..0000000 --- a/source/vendor/pimple/pimple/src/Pimple/Container.php +++ /dev/null @@ -1,298 +0,0 @@ -factories = new \SplObjectStorage(); - $this->protected = new \SplObjectStorage(); - - foreach ($values as $key => $value) { - $this->offsetSet($key, $value); - } - } - - /** - * Sets a parameter or an object. - * - * Objects must be defined as Closures. - * - * Allowing any PHP callable leads to difficult to debug problems - * as function names (strings) are callable (creating a function with - * the same name as an existing parameter would break your container). - * - * @param string $id The unique identifier for the parameter or object - * @param mixed $value The value of the parameter or a closure to define an object - * - * @throws FrozenServiceException Prevent override of a frozen service - */ - public function offsetSet($id, $value) - { - if (isset($this->frozen[$id])) { - throw new FrozenServiceException($id); - } - - $this->values[$id] = $value; - $this->keys[$id] = true; - } - - /** - * Gets a parameter or an object. - * - * @param string $id The unique identifier for the parameter or object - * - * @return mixed The value of the parameter or an object - * - * @throws UnknownIdentifierException If the identifier is not defined - */ - public function offsetGet($id) - { - if (!isset($this->keys[$id])) { - throw new UnknownIdentifierException($id); - } - - if ( - isset($this->raw[$id]) - || !\is_object($this->values[$id]) - || isset($this->protected[$this->values[$id]]) - || !\method_exists($this->values[$id], '__invoke') - ) { - return $this->values[$id]; - } - - if (isset($this->factories[$this->values[$id]])) { - return $this->values[$id]($this); - } - - $raw = $this->values[$id]; - $val = $this->values[$id] = $raw($this); - $this->raw[$id] = $raw; - - $this->frozen[$id] = true; - - return $val; - } - - /** - * Checks if a parameter or an object is set. - * - * @param string $id The unique identifier for the parameter or object - * - * @return bool - */ - public function offsetExists($id) - { - return isset($this->keys[$id]); - } - - /** - * Unsets a parameter or an object. - * - * @param string $id The unique identifier for the parameter or object - */ - public function offsetUnset($id) - { - if (isset($this->keys[$id])) { - if (\is_object($this->values[$id])) { - unset($this->factories[$this->values[$id]], $this->protected[$this->values[$id]]); - } - - unset($this->values[$id], $this->frozen[$id], $this->raw[$id], $this->keys[$id]); - } - } - - /** - * Marks a callable as being a factory service. - * - * @param callable $callable A service definition to be used as a factory - * - * @return callable The passed callable - * - * @throws ExpectedInvokableException Service definition has to be a closure or an invokable object - */ - public function factory($callable) - { - if (!\is_object($callable) || !\method_exists($callable, '__invoke')) { - throw new ExpectedInvokableException('Service definition is not a Closure or invokable object.'); - } - - $this->factories->attach($callable); - - return $callable; - } - - /** - * Protects a callable from being interpreted as a service. - * - * This is useful when you want to store a callable as a parameter. - * - * @param callable $callable A callable to protect from being evaluated - * - * @return callable The passed callable - * - * @throws ExpectedInvokableException Service definition has to be a closure or an invokable object - */ - public function protect($callable) - { - if (!\is_object($callable) || !\method_exists($callable, '__invoke')) { - throw new ExpectedInvokableException('Callable is not a Closure or invokable object.'); - } - - $this->protected->attach($callable); - - return $callable; - } - - /** - * Gets a parameter or the closure defining an object. - * - * @param string $id The unique identifier for the parameter or object - * - * @return mixed The value of the parameter or the closure defining an object - * - * @throws UnknownIdentifierException If the identifier is not defined - */ - public function raw($id) - { - if (!isset($this->keys[$id])) { - throw new UnknownIdentifierException($id); - } - - if (isset($this->raw[$id])) { - return $this->raw[$id]; - } - - return $this->values[$id]; - } - - /** - * Extends an object definition. - * - * Useful when you want to extend an existing object definition, - * without necessarily loading that object. - * - * @param string $id The unique identifier for the object - * @param callable $callable A service definition to extend the original - * - * @return callable The wrapped callable - * - * @throws UnknownIdentifierException If the identifier is not defined - * @throws FrozenServiceException If the service is frozen - * @throws InvalidServiceIdentifierException If the identifier belongs to a parameter - * @throws ExpectedInvokableException If the extension callable is not a closure or an invokable object - */ - public function extend($id, $callable) - { - if (!isset($this->keys[$id])) { - throw new UnknownIdentifierException($id); - } - - if (isset($this->frozen[$id])) { - throw new FrozenServiceException($id); - } - - if (!\is_object($this->values[$id]) || !\method_exists($this->values[$id], '__invoke')) { - throw new InvalidServiceIdentifierException($id); - } - - if (isset($this->protected[$this->values[$id]])) { - @\trigger_error(\sprintf('How Pimple behaves when extending protected closures will be fixed in Pimple 4. Are you sure "%s" should be protected?', $id), E_USER_DEPRECATED); - } - - if (!\is_object($callable) || !\method_exists($callable, '__invoke')) { - throw new ExpectedInvokableException('Extension service definition is not a Closure or invokable object.'); - } - - $factory = $this->values[$id]; - - $extended = function ($c) use ($callable, $factory) { - return $callable($factory($c), $c); - }; - - if (isset($this->factories[$factory])) { - $this->factories->detach($factory); - $this->factories->attach($extended); - } - - return $this[$id] = $extended; - } - - /** - * Returns all defined value names. - * - * @return array An array of value names - */ - public function keys() - { - return \array_keys($this->values); - } - - /** - * Registers a service provider. - * - * @param ServiceProviderInterface $provider A ServiceProviderInterface instance - * @param array $values An array of values that customizes the provider - * - * @return static - */ - public function register(ServiceProviderInterface $provider, array $values = []) - { - $provider->register($this); - - foreach ($values as $key => $value) { - $this[$key] = $value; - } - - return $this; - } -} diff --git a/source/vendor/pimple/pimple/src/Pimple/Exception/ExpectedInvokableException.php b/source/vendor/pimple/pimple/src/Pimple/Exception/ExpectedInvokableException.php deleted file mode 100644 index 7228421..0000000 --- a/source/vendor/pimple/pimple/src/Pimple/Exception/ExpectedInvokableException.php +++ /dev/null @@ -1,38 +0,0 @@ - - */ -class ExpectedInvokableException extends \InvalidArgumentException implements ContainerExceptionInterface -{ -} diff --git a/source/vendor/pimple/pimple/src/Pimple/Exception/FrozenServiceException.php b/source/vendor/pimple/pimple/src/Pimple/Exception/FrozenServiceException.php deleted file mode 100644 index e4d2f6d..0000000 --- a/source/vendor/pimple/pimple/src/Pimple/Exception/FrozenServiceException.php +++ /dev/null @@ -1,45 +0,0 @@ - - */ -class FrozenServiceException extends \RuntimeException implements ContainerExceptionInterface -{ - /** - * @param string $id Identifier of the frozen service - */ - public function __construct($id) - { - parent::__construct(\sprintf('Cannot override frozen service "%s".', $id)); - } -} diff --git a/source/vendor/pimple/pimple/src/Pimple/Exception/InvalidServiceIdentifierException.php b/source/vendor/pimple/pimple/src/Pimple/Exception/InvalidServiceIdentifierException.php deleted file mode 100644 index 91e82f9..0000000 --- a/source/vendor/pimple/pimple/src/Pimple/Exception/InvalidServiceIdentifierException.php +++ /dev/null @@ -1,45 +0,0 @@ - - */ -class InvalidServiceIdentifierException extends \InvalidArgumentException implements NotFoundExceptionInterface -{ - /** - * @param string $id The invalid identifier - */ - public function __construct($id) - { - parent::__construct(\sprintf('Identifier "%s" does not contain an object definition.', $id)); - } -} diff --git a/source/vendor/pimple/pimple/src/Pimple/Exception/UnknownIdentifierException.php b/source/vendor/pimple/pimple/src/Pimple/Exception/UnknownIdentifierException.php deleted file mode 100644 index fb6b626..0000000 --- a/source/vendor/pimple/pimple/src/Pimple/Exception/UnknownIdentifierException.php +++ /dev/null @@ -1,45 +0,0 @@ - - */ -class UnknownIdentifierException extends \InvalidArgumentException implements NotFoundExceptionInterface -{ - /** - * @param string $id The unknown identifier - */ - public function __construct($id) - { - parent::__construct(\sprintf('Identifier "%s" is not defined.', $id)); - } -} diff --git a/source/vendor/pimple/pimple/src/Pimple/Psr11/Container.php b/source/vendor/pimple/pimple/src/Pimple/Psr11/Container.php deleted file mode 100644 index cadbfff..0000000 --- a/source/vendor/pimple/pimple/src/Pimple/Psr11/Container.php +++ /dev/null @@ -1,55 +0,0 @@ - - */ -final class Container implements ContainerInterface -{ - private $pimple; - - public function __construct(PimpleContainer $pimple) - { - $this->pimple = $pimple; - } - - public function get($id) - { - return $this->pimple[$id]; - } - - public function has($id) - { - return isset($this->pimple[$id]); - } -} diff --git a/source/vendor/pimple/pimple/src/Pimple/Psr11/ServiceLocator.php b/source/vendor/pimple/pimple/src/Pimple/Psr11/ServiceLocator.php deleted file mode 100644 index f10727c..0000000 --- a/source/vendor/pimple/pimple/src/Pimple/Psr11/ServiceLocator.php +++ /dev/null @@ -1,75 +0,0 @@ - - */ -class ServiceLocator implements ContainerInterface -{ - private $container; - private $aliases = []; - - /** - * @param PimpleContainer $container The Container instance used to locate services - * @param array $ids Array of service ids that can be located. String keys can be used to define aliases - */ - public function __construct(PimpleContainer $container, array $ids) - { - $this->container = $container; - - foreach ($ids as $key => $id) { - $this->aliases[\is_int($key) ? $id : $key] = $id; - } - } - - /** - * {@inheritdoc} - */ - public function get($id) - { - if (!isset($this->aliases[$id])) { - throw new UnknownIdentifierException($id); - } - - return $this->container[$this->aliases[$id]]; - } - - /** - * {@inheritdoc} - */ - public function has($id) - { - return isset($this->aliases[$id]) && isset($this->container[$this->aliases[$id]]); - } -} diff --git a/source/vendor/pimple/pimple/src/Pimple/ServiceIterator.php b/source/vendor/pimple/pimple/src/Pimple/ServiceIterator.php deleted file mode 100644 index 5cde518..0000000 --- a/source/vendor/pimple/pimple/src/Pimple/ServiceIterator.php +++ /dev/null @@ -1,69 +0,0 @@ - - */ -final class ServiceIterator implements \Iterator -{ - private $container; - private $ids; - - public function __construct(Container $container, array $ids) - { - $this->container = $container; - $this->ids = $ids; - } - - public function rewind() - { - \reset($this->ids); - } - - public function current() - { - return $this->container[\current($this->ids)]; - } - - public function key() - { - return \current($this->ids); - } - - public function next() - { - \next($this->ids); - } - - public function valid() - { - return null !== \key($this->ids); - } -} diff --git a/source/vendor/pimple/pimple/src/Pimple/ServiceProviderInterface.php b/source/vendor/pimple/pimple/src/Pimple/ServiceProviderInterface.php deleted file mode 100644 index c004594..0000000 --- a/source/vendor/pimple/pimple/src/Pimple/ServiceProviderInterface.php +++ /dev/null @@ -1,46 +0,0 @@ -getHeaders() as $name => $values) { - * echo $name . ": " . implode(", ", $values); - * } - * - * // Emit headers iteratively: - * foreach ($message->getHeaders() as $name => $values) { - * foreach ($values as $value) { - * header(sprintf('%s: %s', $name, $value), false); - * } - * } - * - * While header names are not case-sensitive, getHeaders() will preserve the - * exact case in which headers were originally specified. - * - * @return string[][] Returns an associative array of the message's headers. Each - * key MUST be a header name, and each value MUST be an array of strings - * for that header. - */ - public function getHeaders(); - - /** - * Checks if a header exists by the given case-insensitive name. - * - * @param string $name Case-insensitive header field name. - * @return bool Returns true if any header names match the given header - * name using a case-insensitive string comparison. Returns false if - * no matching header name is found in the message. - */ - public function hasHeader($name); - - /** - * Retrieves a message header value by the given case-insensitive name. - * - * This method returns an array of all the header values of the given - * case-insensitive header name. - * - * If the header does not appear in the message, this method MUST return an - * empty array. - * - * @param string $name Case-insensitive header field name. - * @return string[] An array of string values as provided for the given - * header. If the header does not appear in the message, this method MUST - * return an empty array. - */ - public function getHeader($name); - - /** - * Retrieves a comma-separated string of the values for a single header. - * - * This method returns all of the header values of the given - * case-insensitive header name as a string concatenated together using - * a comma. - * - * NOTE: Not all header values may be appropriately represented using - * comma concatenation. For such headers, use getHeader() instead - * and supply your own delimiter when concatenating. - * - * If the header does not appear in the message, this method MUST return - * an empty string. - * - * @param string $name Case-insensitive header field name. - * @return string A string of values as provided for the given header - * concatenated together using a comma. If the header does not appear in - * the message, this method MUST return an empty string. - */ - public function getHeaderLine($name); - - /** - * Return an instance with the provided value replacing the specified header. - * - * While header names are case-insensitive, the casing of the header will - * be preserved by this function, and returned from getHeaders(). - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that has the - * new and/or updated header and value. - * - * @param string $name Case-insensitive header field name. - * @param string|string[] $value Header value(s). - * @return static - * @throws \InvalidArgumentException for invalid header names or values. - */ - public function withHeader($name, $value); - - /** - * Return an instance with the specified header appended with the given value. - * - * Existing values for the specified header will be maintained. The new - * value(s) will be appended to the existing list. If the header did not - * exist previously, it will be added. - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that has the - * new header and/or value. - * - * @param string $name Case-insensitive header field name to add. - * @param string|string[] $value Header value(s). - * @return static - * @throws \InvalidArgumentException for invalid header names or values. - */ - public function withAddedHeader($name, $value); - - /** - * Return an instance without the specified header. - * - * Header resolution MUST be done without case-sensitivity. - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that removes - * the named header. - * - * @param string $name Case-insensitive header field name to remove. - * @return static - */ - public function withoutHeader($name); - - /** - * Gets the body of the message. - * - * @return StreamInterface Returns the body as a stream. - */ - public function getBody(); - - /** - * Return an instance with the specified message body. - * - * The body MUST be a StreamInterface object. - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return a new instance that has the - * new body stream. - * - * @param StreamInterface $body Body. - * @return static - * @throws \InvalidArgumentException When the body is not valid. - */ - public function withBody(StreamInterface $body); -} diff --git a/source/vendor/psr/http-message/src/RequestInterface.php b/source/vendor/psr/http-message/src/RequestInterface.php deleted file mode 100644 index a96d4fd..0000000 --- a/source/vendor/psr/http-message/src/RequestInterface.php +++ /dev/null @@ -1,129 +0,0 @@ -getQuery()` - * or from the `QUERY_STRING` server param. - * - * @return array - */ - public function getQueryParams(); - - /** - * Return an instance with the specified query string arguments. - * - * These values SHOULD remain immutable over the course of the incoming - * request. They MAY be injected during instantiation, such as from PHP's - * $_GET superglobal, or MAY be derived from some other value such as the - * URI. In cases where the arguments are parsed from the URI, the data - * MUST be compatible with what PHP's parse_str() would return for - * purposes of how duplicate query parameters are handled, and how nested - * sets are handled. - * - * Setting query string arguments MUST NOT change the URI stored by the - * request, nor the values in the server params. - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that has the - * updated query string arguments. - * - * @param array $query Array of query string arguments, typically from - * $_GET. - * @return static - */ - public function withQueryParams(array $query); - - /** - * Retrieve normalized file upload data. - * - * This method returns upload metadata in a normalized tree, with each leaf - * an instance of Psr\Http\Message\UploadedFileInterface. - * - * These values MAY be prepared from $_FILES or the message body during - * instantiation, or MAY be injected via withUploadedFiles(). - * - * @return array An array tree of UploadedFileInterface instances; an empty - * array MUST be returned if no data is present. - */ - public function getUploadedFiles(); - - /** - * Create a new instance with the specified uploaded files. - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that has the - * updated body parameters. - * - * @param array $uploadedFiles An array tree of UploadedFileInterface instances. - * @return static - * @throws \InvalidArgumentException if an invalid structure is provided. - */ - public function withUploadedFiles(array $uploadedFiles); - - /** - * Retrieve any parameters provided in the request body. - * - * If the request Content-Type is either application/x-www-form-urlencoded - * or multipart/form-data, and the request method is POST, this method MUST - * return the contents of $_POST. - * - * Otherwise, this method may return any results of deserializing - * the request body content; as parsing returns structured content, the - * potential types MUST be arrays or objects only. A null value indicates - * the absence of body content. - * - * @return null|array|object The deserialized body parameters, if any. - * These will typically be an array or object. - */ - public function getParsedBody(); - - /** - * Return an instance with the specified body parameters. - * - * These MAY be injected during instantiation. - * - * If the request Content-Type is either application/x-www-form-urlencoded - * or multipart/form-data, and the request method is POST, use this method - * ONLY to inject the contents of $_POST. - * - * The data IS NOT REQUIRED to come from $_POST, but MUST be the results of - * deserializing the request body content. Deserialization/parsing returns - * structured data, and, as such, this method ONLY accepts arrays or objects, - * or a null value if nothing was available to parse. - * - * As an example, if content negotiation determines that the request data - * is a JSON payload, this method could be used to create a request - * instance with the deserialized parameters. - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that has the - * updated body parameters. - * - * @param null|array|object $data The deserialized body data. This will - * typically be in an array or object. - * @return static - * @throws \InvalidArgumentException if an unsupported argument type is - * provided. - */ - public function withParsedBody($data); - - /** - * Retrieve attributes derived from the request. - * - * The request "attributes" may be used to allow injection of any - * parameters derived from the request: e.g., the results of path - * match operations; the results of decrypting cookies; the results of - * deserializing non-form-encoded message bodies; etc. Attributes - * will be application and request specific, and CAN be mutable. - * - * @return array Attributes derived from the request. - */ - public function getAttributes(); - - /** - * Retrieve a single derived request attribute. - * - * Retrieves a single derived request attribute as described in - * getAttributes(). If the attribute has not been previously set, returns - * the default value as provided. - * - * This method obviates the need for a hasAttribute() method, as it allows - * specifying a default value to return if the attribute is not found. - * - * @see getAttributes() - * @param string $name The attribute name. - * @param mixed $default Default value to return if the attribute does not exist. - * @return mixed - */ - public function getAttribute($name, $default = null); - - /** - * Return an instance with the specified derived request attribute. - * - * This method allows setting a single derived request attribute as - * described in getAttributes(). - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that has the - * updated attribute. - * - * @see getAttributes() - * @param string $name The attribute name. - * @param mixed $value The value of the attribute. - * @return static - */ - public function withAttribute($name, $value); - - /** - * Return an instance that removes the specified derived request attribute. - * - * This method allows removing a single derived request attribute as - * described in getAttributes(). - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that removes - * the attribute. - * - * @see getAttributes() - * @param string $name The attribute name. - * @return static - */ - public function withoutAttribute($name); -} diff --git a/source/vendor/psr/http-message/src/StreamInterface.php b/source/vendor/psr/http-message/src/StreamInterface.php deleted file mode 100644 index f68f391..0000000 --- a/source/vendor/psr/http-message/src/StreamInterface.php +++ /dev/null @@ -1,158 +0,0 @@ - - * [user-info@]host[:port] - *
        - * - * If the port component is not set or is the standard port for the current - * scheme, it SHOULD NOT be included. - * - * @see https://tools.ietf.org/html/rfc3986#section-3.2 - * @return string The URI authority, in "[user-info@]host[:port]" format. - */ - public function getAuthority(); - - /** - * Retrieve the user information component of the URI. - * - * If no user information is present, this method MUST return an empty - * string. - * - * If a user is present in the URI, this will return that value; - * additionally, if the password is also present, it will be appended to the - * user value, with a colon (":") separating the values. - * - * The trailing "@" character is not part of the user information and MUST - * NOT be added. - * - * @return string The URI user information, in "username[:password]" format. - */ - public function getUserInfo(); - - /** - * Retrieve the host component of the URI. - * - * If no host is present, this method MUST return an empty string. - * - * The value returned MUST be normalized to lowercase, per RFC 3986 - * Section 3.2.2. - * - * @see http://tools.ietf.org/html/rfc3986#section-3.2.2 - * @return string The URI host. - */ - public function getHost(); - - /** - * Retrieve the port component of the URI. - * - * If a port is present, and it is non-standard for the current scheme, - * this method MUST return it as an integer. If the port is the standard port - * used with the current scheme, this method SHOULD return null. - * - * If no port is present, and no scheme is present, this method MUST return - * a null value. - * - * If no port is present, but a scheme is present, this method MAY return - * the standard port for that scheme, but SHOULD return null. - * - * @return null|int The URI port. - */ - public function getPort(); - - /** - * Retrieve the path component of the URI. - * - * The path can either be empty or absolute (starting with a slash) or - * rootless (not starting with a slash). Implementations MUST support all - * three syntaxes. - * - * Normally, the empty path "" and absolute path "/" are considered equal as - * defined in RFC 7230 Section 2.7.3. But this method MUST NOT automatically - * do this normalization because in contexts with a trimmed base path, e.g. - * the front controller, this difference becomes significant. It's the task - * of the user to handle both "" and "/". - * - * The value returned MUST be percent-encoded, but MUST NOT double-encode - * any characters. To determine what characters to encode, please refer to - * RFC 3986, Sections 2 and 3.3. - * - * As an example, if the value should include a slash ("/") not intended as - * delimiter between path segments, that value MUST be passed in encoded - * form (e.g., "%2F") to the instance. - * - * @see https://tools.ietf.org/html/rfc3986#section-2 - * @see https://tools.ietf.org/html/rfc3986#section-3.3 - * @return string The URI path. - */ - public function getPath(); - - /** - * Retrieve the query string of the URI. - * - * If no query string is present, this method MUST return an empty string. - * - * The leading "?" character is not part of the query and MUST NOT be - * added. - * - * The value returned MUST be percent-encoded, but MUST NOT double-encode - * any characters. To determine what characters to encode, please refer to - * RFC 3986, Sections 2 and 3.4. - * - * As an example, if a value in a key/value pair of the query string should - * include an ampersand ("&") not intended as a delimiter between values, - * that value MUST be passed in encoded form (e.g., "%26") to the instance. - * - * @see https://tools.ietf.org/html/rfc3986#section-2 - * @see https://tools.ietf.org/html/rfc3986#section-3.4 - * @return string The URI query string. - */ - public function getQuery(); - - /** - * Retrieve the fragment component of the URI. - * - * If no fragment is present, this method MUST return an empty string. - * - * The leading "#" character is not part of the fragment and MUST NOT be - * added. - * - * The value returned MUST be percent-encoded, but MUST NOT double-encode - * any characters. To determine what characters to encode, please refer to - * RFC 3986, Sections 2 and 3.5. - * - * @see https://tools.ietf.org/html/rfc3986#section-2 - * @see https://tools.ietf.org/html/rfc3986#section-3.5 - * @return string The URI fragment. - */ - public function getFragment(); - - /** - * Return an instance with the specified scheme. - * - * This method MUST retain the state of the current instance, and return - * an instance that contains the specified scheme. - * - * Implementations MUST support the schemes "http" and "https" case - * insensitively, and MAY accommodate other schemes if required. - * - * An empty scheme is equivalent to removing the scheme. - * - * @param string $scheme The scheme to use with the new instance. - * @return static A new instance with the specified scheme. - * @throws \InvalidArgumentException for invalid or unsupported schemes. - */ - public function withScheme($scheme); - - /** - * Return an instance with the specified user information. - * - * This method MUST retain the state of the current instance, and return - * an instance that contains the specified user information. - * - * Password is optional, but the user information MUST include the - * user; an empty string for the user is equivalent to removing user - * information. - * - * @param string $user The user name to use for authority. - * @param null|string $password The password associated with $user. - * @return static A new instance with the specified user information. - */ - public function withUserInfo($user, $password = null); - - /** - * Return an instance with the specified host. - * - * This method MUST retain the state of the current instance, and return - * an instance that contains the specified host. - * - * An empty host value is equivalent to removing the host. - * - * @param string $host The hostname to use with the new instance. - * @return static A new instance with the specified host. - * @throws \InvalidArgumentException for invalid hostnames. - */ - public function withHost($host); - - /** - * Return an instance with the specified port. - * - * This method MUST retain the state of the current instance, and return - * an instance that contains the specified port. - * - * Implementations MUST raise an exception for ports outside the - * established TCP and UDP port ranges. - * - * A null value provided for the port is equivalent to removing the port - * information. - * - * @param null|int $port The port to use with the new instance; a null value - * removes the port information. - * @return static A new instance with the specified port. - * @throws \InvalidArgumentException for invalid ports. - */ - public function withPort($port); - - /** - * Return an instance with the specified path. - * - * This method MUST retain the state of the current instance, and return - * an instance that contains the specified path. - * - * The path can either be empty or absolute (starting with a slash) or - * rootless (not starting with a slash). Implementations MUST support all - * three syntaxes. - * - * If the path is intended to be domain-relative rather than path relative then - * it must begin with a slash ("/"). Paths not starting with a slash ("/") - * are assumed to be relative to some base path known to the application or - * consumer. - * - * Users can provide both encoded and decoded path characters. - * Implementations ensure the correct encoding as outlined in getPath(). - * - * @param string $path The path to use with the new instance. - * @return static A new instance with the specified path. - * @throws \InvalidArgumentException for invalid paths. - */ - public function withPath($path); - - /** - * Return an instance with the specified query string. - * - * This method MUST retain the state of the current instance, and return - * an instance that contains the specified query string. - * - * Users can provide both encoded and decoded query characters. - * Implementations ensure the correct encoding as outlined in getQuery(). - * - * An empty query string value is equivalent to removing the query string. - * - * @param string $query The query string to use with the new instance. - * @return static A new instance with the specified query string. - * @throws \InvalidArgumentException for invalid query strings. - */ - public function withQuery($query); - - /** - * Return an instance with the specified URI fragment. - * - * This method MUST retain the state of the current instance, and return - * an instance that contains the specified URI fragment. - * - * Users can provide both encoded and decoded fragment characters. - * Implementations ensure the correct encoding as outlined in getFragment(). - * - * An empty fragment value is equivalent to removing the fragment. - * - * @param string $fragment The fragment to use with the new instance. - * @return static A new instance with the specified fragment. - */ - public function withFragment($fragment); - - /** - * Return the string representation as a URI reference. - * - * Depending on which components of the URI are present, the resulting - * string is either a full URI or relative reference according to RFC 3986, - * Section 4.1. The method concatenates the various components of the URI, - * using the appropriate delimiters: - * - * - If a scheme is present, it MUST be suffixed by ":". - * - If an authority is present, it MUST be prefixed by "//". - * - The path can be concatenated without delimiters. But there are two - * cases where the path has to be adjusted to make the URI reference - * valid as PHP does not allow to throw an exception in __toString(): - * - If the path is rootless and an authority is present, the path MUST - * be prefixed by "/". - * - If the path is starting with more than one "/" and no authority is - * present, the starting slashes MUST be reduced to one. - * - If a query is present, it MUST be prefixed by "?". - * - If a fragment is present, it MUST be prefixed by "#". - * - * @see http://tools.ietf.org/html/rfc3986#section-4.1 - * @return string - */ - public function __toString(); -} diff --git a/source/vendor/psr/http-server-handler/LICENSE b/source/vendor/psr/http-server-handler/LICENSE deleted file mode 100644 index b71ec5d..0000000 --- a/source/vendor/psr/http-server-handler/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 PHP Framework Interoperability Group - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/source/vendor/psr/http-server-handler/README.md b/source/vendor/psr/http-server-handler/README.md deleted file mode 100644 index 1b7b486..0000000 --- a/source/vendor/psr/http-server-handler/README.md +++ /dev/null @@ -1,6 +0,0 @@ -HTTP Server Handler -=================== - -Provides the `RequestHandlerInterface` of [PSR-15][psr-15]. - -[psr-15]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-15-request-handlers.md diff --git a/source/vendor/psr/http-server-handler/src/RequestHandlerInterface.php b/source/vendor/psr/http-server-handler/src/RequestHandlerInterface.php deleted file mode 100644 index 83911e2..0000000 --- a/source/vendor/psr/http-server-handler/src/RequestHandlerInterface.php +++ /dev/null @@ -1,22 +0,0 @@ -log(LogLevel::EMERGENCY, $message, $context); - } - - /** - * Action must be taken immediately. - * - * Example: Entire website down, database unavailable, etc. This should - * trigger the SMS alerts and wake you up. - * - * @param string $message - * @param mixed[] $context - * - * @return void - */ - public function alert($message, array $context = array()) - { - $this->log(LogLevel::ALERT, $message, $context); - } - - /** - * Critical conditions. - * - * Example: Application component unavailable, unexpected exception. - * - * @param string $message - * @param mixed[] $context - * - * @return void - */ - public function critical($message, array $context = array()) - { - $this->log(LogLevel::CRITICAL, $message, $context); - } - - /** - * Runtime errors that do not require immediate action but should typically - * be logged and monitored. - * - * @param string $message - * @param mixed[] $context - * - * @return void - */ - public function error($message, array $context = array()) - { - $this->log(LogLevel::ERROR, $message, $context); - } - - /** - * Exceptional occurrences that are not errors. - * - * Example: Use of deprecated APIs, poor use of an API, undesirable things - * that are not necessarily wrong. - * - * @param string $message - * @param mixed[] $context - * - * @return void - */ - public function warning($message, array $context = array()) - { - $this->log(LogLevel::WARNING, $message, $context); - } - - /** - * Normal but significant events. - * - * @param string $message - * @param mixed[] $context - * - * @return void - */ - public function notice($message, array $context = array()) - { - $this->log(LogLevel::NOTICE, $message, $context); - } - - /** - * Interesting events. - * - * Example: User logs in, SQL logs. - * - * @param string $message - * @param mixed[] $context - * - * @return void - */ - public function info($message, array $context = array()) - { - $this->log(LogLevel::INFO, $message, $context); - } - - /** - * Detailed debug information. - * - * @param string $message - * @param mixed[] $context - * - * @return void - */ - public function debug($message, array $context = array()) - { - $this->log(LogLevel::DEBUG, $message, $context); - } -} diff --git a/source/vendor/psr/log/Psr/Log/InvalidArgumentException.php b/source/vendor/psr/log/Psr/Log/InvalidArgumentException.php deleted file mode 100644 index 67f852d..0000000 --- a/source/vendor/psr/log/Psr/Log/InvalidArgumentException.php +++ /dev/null @@ -1,7 +0,0 @@ -logger = $logger; - } -} diff --git a/source/vendor/psr/log/Psr/Log/LoggerInterface.php b/source/vendor/psr/log/Psr/Log/LoggerInterface.php deleted file mode 100644 index 2206cfd..0000000 --- a/source/vendor/psr/log/Psr/Log/LoggerInterface.php +++ /dev/null @@ -1,125 +0,0 @@ -log(LogLevel::EMERGENCY, $message, $context); - } - - /** - * Action must be taken immediately. - * - * Example: Entire website down, database unavailable, etc. This should - * trigger the SMS alerts and wake you up. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function alert($message, array $context = array()) - { - $this->log(LogLevel::ALERT, $message, $context); - } - - /** - * Critical conditions. - * - * Example: Application component unavailable, unexpected exception. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function critical($message, array $context = array()) - { - $this->log(LogLevel::CRITICAL, $message, $context); - } - - /** - * Runtime errors that do not require immediate action but should typically - * be logged and monitored. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function error($message, array $context = array()) - { - $this->log(LogLevel::ERROR, $message, $context); - } - - /** - * Exceptional occurrences that are not errors. - * - * Example: Use of deprecated APIs, poor use of an API, undesirable things - * that are not necessarily wrong. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function warning($message, array $context = array()) - { - $this->log(LogLevel::WARNING, $message, $context); - } - - /** - * Normal but significant events. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function notice($message, array $context = array()) - { - $this->log(LogLevel::NOTICE, $message, $context); - } - - /** - * Interesting events. - * - * Example: User logs in, SQL logs. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function info($message, array $context = array()) - { - $this->log(LogLevel::INFO, $message, $context); - } - - /** - * Detailed debug information. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function debug($message, array $context = array()) - { - $this->log(LogLevel::DEBUG, $message, $context); - } - - /** - * Logs with an arbitrary level. - * - * @param mixed $level - * @param string $message - * @param array $context - * - * @return void - * - * @throws \Psr\Log\InvalidArgumentException - */ - abstract public function log($level, $message, array $context = array()); -} diff --git a/source/vendor/psr/log/Psr/Log/NullLogger.php b/source/vendor/psr/log/Psr/Log/NullLogger.php deleted file mode 100644 index c8f7293..0000000 --- a/source/vendor/psr/log/Psr/Log/NullLogger.php +++ /dev/null @@ -1,30 +0,0 @@ -logger) { }` - * blocks. - */ -class NullLogger extends AbstractLogger -{ - /** - * Logs with an arbitrary level. - * - * @param mixed $level - * @param string $message - * @param array $context - * - * @return void - * - * @throws \Psr\Log\InvalidArgumentException - */ - public function log($level, $message, array $context = array()) - { - // noop - } -} diff --git a/source/vendor/psr/log/Psr/Log/Test/DummyTest.php b/source/vendor/psr/log/Psr/Log/Test/DummyTest.php deleted file mode 100644 index 9638c11..0000000 --- a/source/vendor/psr/log/Psr/Log/Test/DummyTest.php +++ /dev/null @@ -1,18 +0,0 @@ - ". - * - * Example ->error('Foo') would yield "error Foo". - * - * @return string[] - */ - abstract public function getLogs(); - - public function testImplements() - { - $this->assertInstanceOf('Psr\Log\LoggerInterface', $this->getLogger()); - } - - /** - * @dataProvider provideLevelsAndMessages - */ - public function testLogsAtAllLevels($level, $message) - { - $logger = $this->getLogger(); - $logger->{$level}($message, array('user' => 'Bob')); - $logger->log($level, $message, array('user' => 'Bob')); - - $expected = array( - $level.' message of level '.$level.' with context: Bob', - $level.' message of level '.$level.' with context: Bob', - ); - $this->assertEquals($expected, $this->getLogs()); - } - - public function provideLevelsAndMessages() - { - return array( - LogLevel::EMERGENCY => array(LogLevel::EMERGENCY, 'message of level emergency with context: {user}'), - LogLevel::ALERT => array(LogLevel::ALERT, 'message of level alert with context: {user}'), - LogLevel::CRITICAL => array(LogLevel::CRITICAL, 'message of level critical with context: {user}'), - LogLevel::ERROR => array(LogLevel::ERROR, 'message of level error with context: {user}'), - LogLevel::WARNING => array(LogLevel::WARNING, 'message of level warning with context: {user}'), - LogLevel::NOTICE => array(LogLevel::NOTICE, 'message of level notice with context: {user}'), - LogLevel::INFO => array(LogLevel::INFO, 'message of level info with context: {user}'), - LogLevel::DEBUG => array(LogLevel::DEBUG, 'message of level debug with context: {user}'), - ); - } - - /** - * @expectedException \Psr\Log\InvalidArgumentException - */ - public function testThrowsOnInvalidLevel() - { - $logger = $this->getLogger(); - $logger->log('invalid level', 'Foo'); - } - - public function testContextReplacement() - { - $logger = $this->getLogger(); - $logger->info('{Message {nothing} {user} {foo.bar} a}', array('user' => 'Bob', 'foo.bar' => 'Bar')); - - $expected = array('info {Message {nothing} Bob Bar a}'); - $this->assertEquals($expected, $this->getLogs()); - } - - public function testObjectCastToString() - { - if (method_exists($this, 'createPartialMock')) { - $dummy = $this->createPartialMock('Psr\Log\Test\DummyTest', array('__toString')); - } else { - $dummy = $this->getMock('Psr\Log\Test\DummyTest', array('__toString')); - } - $dummy->expects($this->once()) - ->method('__toString') - ->will($this->returnValue('DUMMY')); - - $this->getLogger()->warning($dummy); - - $expected = array('warning DUMMY'); - $this->assertEquals($expected, $this->getLogs()); - } - - public function testContextCanContainAnything() - { - $closed = fopen('php://memory', 'r'); - fclose($closed); - - $context = array( - 'bool' => true, - 'null' => null, - 'string' => 'Foo', - 'int' => 0, - 'float' => 0.5, - 'nested' => array('with object' => new DummyTest), - 'object' => new \DateTime, - 'resource' => fopen('php://memory', 'r'), - 'closed' => $closed, - ); - - $this->getLogger()->warning('Crazy context data', $context); - - $expected = array('warning Crazy context data'); - $this->assertEquals($expected, $this->getLogs()); - } - - public function testContextExceptionKeyCanBeExceptionOrOtherValues() - { - $logger = $this->getLogger(); - $logger->warning('Random message', array('exception' => 'oops')); - $logger->critical('Uncaught Exception!', array('exception' => new \LogicException('Fail'))); - - $expected = array( - 'warning Random message', - 'critical Uncaught Exception!' - ); - $this->assertEquals($expected, $this->getLogs()); - } -} diff --git a/source/vendor/psr/log/Psr/Log/Test/TestLogger.php b/source/vendor/psr/log/Psr/Log/Test/TestLogger.php deleted file mode 100644 index 1be3230..0000000 --- a/source/vendor/psr/log/Psr/Log/Test/TestLogger.php +++ /dev/null @@ -1,147 +0,0 @@ - $level, - 'message' => $message, - 'context' => $context, - ]; - - $this->recordsByLevel[$record['level']][] = $record; - $this->records[] = $record; - } - - public function hasRecords($level) - { - return isset($this->recordsByLevel[$level]); - } - - public function hasRecord($record, $level) - { - if (is_string($record)) { - $record = ['message' => $record]; - } - return $this->hasRecordThatPasses(function ($rec) use ($record) { - if ($rec['message'] !== $record['message']) { - return false; - } - if (isset($record['context']) && $rec['context'] !== $record['context']) { - return false; - } - return true; - }, $level); - } - - public function hasRecordThatContains($message, $level) - { - return $this->hasRecordThatPasses(function ($rec) use ($message) { - return strpos($rec['message'], $message) !== false; - }, $level); - } - - public function hasRecordThatMatches($regex, $level) - { - return $this->hasRecordThatPasses(function ($rec) use ($regex) { - return preg_match($regex, $rec['message']) > 0; - }, $level); - } - - public function hasRecordThatPasses(callable $predicate, $level) - { - if (!isset($this->recordsByLevel[$level])) { - return false; - } - foreach ($this->recordsByLevel[$level] as $i => $rec) { - if (call_user_func($predicate, $rec, $i)) { - return true; - } - } - return false; - } - - public function __call($method, $args) - { - if (preg_match('/(.*)(Debug|Info|Notice|Warning|Error|Critical|Alert|Emergency)(.*)/', $method, $matches) > 0) { - $genericMethod = $matches[1] . ('Records' !== $matches[3] ? 'Record' : '') . $matches[3]; - $level = strtolower($matches[2]); - if (method_exists($this, $genericMethod)) { - $args[] = $level; - return call_user_func_array([$this, $genericMethod], $args); - } - } - throw new \BadMethodCallException('Call to undefined method ' . get_class($this) . '::' . $method . '()'); - } - - public function reset() - { - $this->records = []; - $this->recordsByLevel = []; - } -} diff --git a/source/vendor/psr/log/README.md b/source/vendor/psr/log/README.md deleted file mode 100644 index a9f20c4..0000000 --- a/source/vendor/psr/log/README.md +++ /dev/null @@ -1,58 +0,0 @@ -PSR Log -======= - -This repository holds all interfaces/classes/traits related to -[PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md). - -Note that this is not a logger of its own. It is merely an interface that -describes a logger. See the specification for more details. - -Installation ------------- - -```bash -composer require psr/log -``` - -Usage ------ - -If you need a logger, you can use the interface like this: - -```php -logger = $logger; - } - - public function doSomething() - { - if ($this->logger) { - $this->logger->info('Doing work'); - } - - try { - $this->doSomethingElse(); - } catch (Exception $exception) { - $this->logger->error('Oh no!', array('exception' => $exception)); - } - - // do something useful - } -} -``` - -You can then pick one of the implementations of the interface to get a logger. - -If you want to implement the interface, you can require this package and -implement `Psr\Log\LoggerInterface` in your code. Please read the -[specification text](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md) -for details. diff --git a/source/vendor/psr/simple-cache/LICENSE.md b/source/vendor/psr/simple-cache/LICENSE.md deleted file mode 100644 index e49a7c8..0000000 --- a/source/vendor/psr/simple-cache/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -# The MIT License (MIT) - -Copyright (c) 2016 PHP Framework Interoperability Group - -> Permission is hereby granted, free of charge, to any person obtaining a copy -> of this software and associated documentation files (the "Software"), to deal -> in the Software without restriction, including without limitation the rights -> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -> copies of the Software, and to permit persons to whom the Software is -> furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in -> all copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -> THE SOFTWARE. diff --git a/source/vendor/psr/simple-cache/README.md b/source/vendor/psr/simple-cache/README.md deleted file mode 100644 index 43641d1..0000000 --- a/source/vendor/psr/simple-cache/README.md +++ /dev/null @@ -1,8 +0,0 @@ -PHP FIG Simple Cache PSR -======================== - -This repository holds all interfaces related to PSR-16. - -Note that this is not a cache implementation of its own. It is merely an interface that describes a cache implementation. See [the specification](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-16-simple-cache.md) for more details. - -You can find implementations of the specification by looking for packages providing the [psr/simple-cache-implementation](https://packagist.org/providers/psr/simple-cache-implementation) virtual package. diff --git a/source/vendor/psr/simple-cache/src/CacheException.php b/source/vendor/psr/simple-cache/src/CacheException.php deleted file mode 100644 index eba5381..0000000 --- a/source/vendor/psr/simple-cache/src/CacheException.php +++ /dev/null @@ -1,10 +0,0 @@ - value pairs. Cache keys that do not exist or are stale will have $default as value. - * - * @throws \Psr\SimpleCache\InvalidArgumentException - * MUST be thrown if $keys is neither an array nor a Traversable, - * or if any of the $keys are not a legal value. - */ - public function getMultiple($keys, $default = null); - - /** - * Persists a set of key => value pairs in the cache, with an optional TTL. - * - * @param iterable $values A list of key => value pairs for a multiple-set operation. - * @param null|int|\DateInterval $ttl Optional. The TTL value of this item. If no value is sent and - * the driver supports TTL then the library may set a default value - * for it or let the driver take care of that. - * - * @return bool True on success and false on failure. - * - * @throws \Psr\SimpleCache\InvalidArgumentException - * MUST be thrown if $values is neither an array nor a Traversable, - * or if any of the $values are not a legal value. - */ - public function setMultiple($values, $ttl = null); - - /** - * Deletes multiple cache items in a single operation. - * - * @param iterable $keys A list of string-based keys to be deleted. - * - * @return bool True if the items were successfully removed. False if there was an error. - * - * @throws \Psr\SimpleCache\InvalidArgumentException - * MUST be thrown if $keys is neither an array nor a Traversable, - * or if any of the $keys are not a legal value. - */ - public function deleteMultiple($keys); - - /** - * Determines whether an item is present in the cache. - * - * NOTE: It is recommended that has() is only to be used for cache warming type purposes - * and not to be used within your live applications operations for get/set, as this method - * is subject to a race condition where your has() will return true and immediately after, - * another script can remove it making the state of your app out of date. - * - * @param string $key The cache item key. - * - * @return bool - * - * @throws \Psr\SimpleCache\InvalidArgumentException - * MUST be thrown if the $key string is not a legal value. - */ - public function has($key); -} diff --git a/source/vendor/psr/simple-cache/src/InvalidArgumentException.php b/source/vendor/psr/simple-cache/src/InvalidArgumentException.php deleted file mode 100644 index 6a9524a..0000000 --- a/source/vendor/psr/simple-cache/src/InvalidArgumentException.php +++ /dev/null @@ -1,13 +0,0 @@ -= 5.3. - -[![Build Status](https://travis-ci.org/ralouphie/getallheaders.svg?branch=master)](https://travis-ci.org/ralouphie/getallheaders) -[![Coverage Status](https://coveralls.io/repos/ralouphie/getallheaders/badge.png?branch=master)](https://coveralls.io/r/ralouphie/getallheaders?branch=master) -[![Latest Stable Version](https://poser.pugx.org/ralouphie/getallheaders/v/stable.png)](https://packagist.org/packages/ralouphie/getallheaders) -[![Latest Unstable Version](https://poser.pugx.org/ralouphie/getallheaders/v/unstable.png)](https://packagist.org/packages/ralouphie/getallheaders) -[![License](https://poser.pugx.org/ralouphie/getallheaders/license.png)](https://packagist.org/packages/ralouphie/getallheaders) - - -This is a simple polyfill for [`getallheaders()`](http://www.php.net/manual/en/function.getallheaders.php). - -## Install - -For PHP version **`>= 5.6`**: - -``` -composer require ralouphie/getallheaders -``` - -For PHP version **`< 5.6`**: - -``` -composer require ralouphie/getallheaders "^2" -``` diff --git a/source/vendor/ralouphie/getallheaders/src/getallheaders.php b/source/vendor/ralouphie/getallheaders/src/getallheaders.php deleted file mode 100644 index c7285a5..0000000 --- a/source/vendor/ralouphie/getallheaders/src/getallheaders.php +++ /dev/null @@ -1,46 +0,0 @@ - 'Content-Type', - 'CONTENT_LENGTH' => 'Content-Length', - 'CONTENT_MD5' => 'Content-Md5', - ); - - foreach ($_SERVER as $key => $value) { - if (substr($key, 0, 5) === 'HTTP_') { - $key = substr($key, 5); - if (!isset($copy_server[$key]) || !isset($_SERVER[$key])) { - $key = str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', $key)))); - $headers[$key] = $value; - } - } elseif (isset($copy_server[$key])) { - $headers[$copy_server[$key]] = $value; - } - } - - if (!isset($headers['Authorization'])) { - if (isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])) { - $headers['Authorization'] = $_SERVER['REDIRECT_HTTP_AUTHORIZATION']; - } elseif (isset($_SERVER['PHP_AUTH_USER'])) { - $basic_pass = isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : ''; - $headers['Authorization'] = 'Basic ' . base64_encode($_SERVER['PHP_AUTH_USER'] . ':' . $basic_pass); - } elseif (isset($_SERVER['PHP_AUTH_DIGEST'])) { - $headers['Authorization'] = $_SERVER['PHP_AUTH_DIGEST']; - } - } - - return $headers; - } - -} diff --git a/source/vendor/rockettheme/toolbox/ArrayTraits/src/ArrayAccess.php b/source/vendor/rockettheme/toolbox/ArrayTraits/src/ArrayAccess.php deleted file mode 100644 index 442ae92..0000000 --- a/source/vendor/rockettheme/toolbox/ArrayTraits/src/ArrayAccess.php +++ /dev/null @@ -1,67 +0,0 @@ -items[$offset]); - } - - /** - * Returns the value at specified offset. - * - * @param string $offset The offset to retrieve. - * @return mixed Can return all value types. - */ - public function offsetGet($offset) - { - return isset($this->items[$offset]) ? $this->items[$offset] : null; - } - - /** - * Assigns a value to the specified offset. - * - * @param string|null $offset The offset to assign the value to. - * @param mixed $value The value to set. - * @return void - */ - public function offsetSet($offset, $value) - { - if (null === $offset) { - $this->items[] = $value; - } else { - $this->items[$offset] = $value; - } - } - - /** - * Unsets an offset. - * - * @param string $offset The offset to unset. - * @return void - */ - public function offsetUnset($offset) - { - // Hack to make Iterator trait work together with unset. - if (isset($this->iteratorUnset) && (string)$offset === (string)key($this->items)) { - $this->iteratorUnset = true; - } - - unset($this->items[$offset]); - } -} diff --git a/source/vendor/rockettheme/toolbox/ArrayTraits/src/ArrayAccessWithGetters.php b/source/vendor/rockettheme/toolbox/ArrayTraits/src/ArrayAccessWithGetters.php deleted file mode 100644 index 4bf12d2..0000000 --- a/source/vendor/rockettheme/toolbox/ArrayTraits/src/ArrayAccessWithGetters.php +++ /dev/null @@ -1,60 +0,0 @@ -offsetSet($offset, $value); - } - - /** - * Magic getter method - * - * @param string $offset Asset name value - * @return mixed Asset value - */ - public function __get($offset) - { - return $this->offsetGet($offset); - } - - /** - * Magic method to determine if the attribute is set - * - * @param string $offset Asset name value - * @return bool True if the value is set - */ - public function __isset($offset) - { - return $this->offsetExists($offset); - } - - /** - * Magic method to unset the attribute - * - * @param string $offset The name value to unset - * @return void - */ - public function __unset($offset) - { - $this->offsetUnset($offset); - } -} diff --git a/source/vendor/rockettheme/toolbox/ArrayTraits/src/Constructor.php b/source/vendor/rockettheme/toolbox/ArrayTraits/src/Constructor.php deleted file mode 100644 index 18e0cee..0000000 --- a/source/vendor/rockettheme/toolbox/ArrayTraits/src/Constructor.php +++ /dev/null @@ -1,23 +0,0 @@ -items = $items; - } -} diff --git a/source/vendor/rockettheme/toolbox/ArrayTraits/src/Countable.php b/source/vendor/rockettheme/toolbox/ArrayTraits/src/Countable.php deleted file mode 100644 index 5bb912c..0000000 --- a/source/vendor/rockettheme/toolbox/ArrayTraits/src/Countable.php +++ /dev/null @@ -1,23 +0,0 @@ -items); - } -} diff --git a/source/vendor/rockettheme/toolbox/ArrayTraits/src/Export.php b/source/vendor/rockettheme/toolbox/ArrayTraits/src/Export.php deleted file mode 100644 index 45dbed5..0000000 --- a/source/vendor/rockettheme/toolbox/ArrayTraits/src/Export.php +++ /dev/null @@ -1,54 +0,0 @@ -items; - } - - /** - * Convert object into YAML string. - * - * @param int $inline The level where you switch to inline YAML. - * @param int $indent The amount of spaces to use for indentation of nested nodes. - * @return string A YAML string representing the object. - * @throws DumpException - */ - public function toYaml($inline = 3, $indent = 2) - { - return Yaml::dump($this->toArray(), $inline, $indent, Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE); - } - - /** - * Convert object into JSON string. - * - * @return string - */ - public function toJson() - { - $string = json_encode($this->toArray()); - if (!\is_string($string)) { - throw new \RuntimeException('Failed to encode array', 500); - } - - return $string; - } -} diff --git a/source/vendor/rockettheme/toolbox/ArrayTraits/src/ExportInterface.php b/source/vendor/rockettheme/toolbox/ArrayTraits/src/ExportInterface.php deleted file mode 100644 index 2e0048d..0000000 --- a/source/vendor/rockettheme/toolbox/ArrayTraits/src/ExportInterface.php +++ /dev/null @@ -1,36 +0,0 @@ -items); - } - - /** - * Returns the key of the current element. - * - * @return string|null Returns key on success, or NULL on failure. - */ - public function key() - { - return (string)key($this->items); - } - - /** - * Moves the current position to the next element. - * - * @return void - */ - public function next() - { - if ($this->iteratorUnset) { - // If current item was unset, position is already in the next element (do nothing). - $this->iteratorUnset = false; - } else { - next($this->items); - } - } - - /** - * Rewinds back to the first element of the Iterator. - * - * @return void - */ - public function rewind() - { - $this->iteratorUnset = false; - reset($this->items); - } - - /** - * This method is called after Iterator::rewind() and Iterator::next() to check if the current position is valid. - * - * @return bool Returns TRUE on success or FALSE on failure. - */ - public function valid() - { - return key($this->items) !== null; - } -} diff --git a/source/vendor/rockettheme/toolbox/ArrayTraits/src/NestedArrayAccess.php b/source/vendor/rockettheme/toolbox/ArrayTraits/src/NestedArrayAccess.php deleted file mode 100644 index cb52834..0000000 --- a/source/vendor/rockettheme/toolbox/ArrayTraits/src/NestedArrayAccess.php +++ /dev/null @@ -1,196 +0,0 @@ -get('this.is.my.nested.variable'); - * - * @param string $name Dot separated path to the requested value. - * @param mixed $default Default value (or null). - * @param string $separator Separator, defaults to '.' - * @return mixed Value. - */ - public function get($name, $default = null, $separator = null) - { - $path = explode($separator ?: $this->nestedSeparator, $name) ?: []; - $current = $this->items; - - foreach ($path as $field) { - if (\is_object($current) && isset($current->{$field})) { - $current = $current->{$field}; - } elseif (\is_array($current) && isset($current[$field])) { - $current = $current[$field]; - } else { - return $default; - } - } - - return $current; - } - - /** - * Set value by using dot notation for nested arrays/objects. - * - * @example $data->set('this.is.my.nested.variable', $value); - * - * @param string $name Dot separated path to the requested value. - * @param mixed $value New value. - * @param string $separator Separator, defaults to '.' - * @return $this - */ - public function set($name, $value, $separator = null) - { - $path = explode($separator ?: $this->nestedSeparator, $name) ?: []; - $current = &$this->items; - - foreach ($path as $field) { - if (\is_object($current)) { - // Handle objects. - if (!isset($current->{$field})) { - $current->{$field} = []; - } - $current = &$current->{$field}; - } else { - // Handle arrays and scalars. - if (!\is_array($current)) { - $current = [$field => []]; - } elseif (!isset($current[$field])) { - $current[$field] = []; - } - $current = &$current[$field]; - } - } - - $current = $value; - - return $this; - } - - /** - * Unset value by using dot notation for nested arrays/objects. - * - * @example $data->undef('this.is.my.nested.variable'); - * - * @param string $name Dot separated path to the requested value. - * @param string $separator Separator, defaults to '.' - * @return $this - */ - public function undef($name, $separator = null) - { - $path = explode($separator ?: $this->nestedSeparator, $name); - - // Handle empty string. - if ($path === false) { - $this->items = []; - - return $this; - } - - $var = array_pop($path); - $current = &$this->items; - - foreach ($path as $field) { - if (\is_object($current)) { - // Handle objects. - if (!isset($current->{$field})) { - return $this; - } - $current = &$current->{$field}; - } else { - // Handle arrays and scalars. - if (!\is_array($current) || !isset($current[$field])) { - return $this; - } - $current = &$current[$field]; - } - } - - unset($current[$var]); - - return $this; - } - - /** - * Set default value by using dot notation for nested arrays/objects. - * - * @example $data->def('this.is.my.nested.variable', 'default'); - * - * @param string $name Dot separated path to the requested value. - * @param mixed $default Default value (or null). - * @param string $separator Separator, defaults to '.' - * @return $this - */ - public function def($name, $default = null, $separator = null) - { - $this->set($name, $this->get($name, $default, $separator), $separator); - - return $this; - } - - /** - * Whether or not an offset exists. - * - * @param string $offset An offset to check for. - * @return bool Returns TRUE on success or FALSE on failure. - */ - public function offsetExists($offset) - { - return $this->get($offset) !== null; - } - - /** - * Returns the value at specified offset. - * - * @param string $offset The offset to retrieve. - * @return mixed Can return all value types. - */ - public function offsetGet($offset) - { - return $this->get($offset); - } - - /** - * Assigns a value to the specified offset. - * - * @param string|null $offset The offset to assign the value to. - * @param mixed $value The value to set. - * @return void - */ - public function offsetSet($offset, $value) - { - if (null === $offset) { - $this->items[] = $value; - } else { - $this->set($offset, $value); - } - } - - /** - * Unsets variable at specified offset. - * - * @param string|null $offset - * @return void - */ - public function offsetUnset($offset) - { - if (null === $offset) { - $this->items[] = []; - } else { - $this->undef($offset); - } - } -} diff --git a/source/vendor/rockettheme/toolbox/ArrayTraits/src/NestedArrayAccessWithGetters.php b/source/vendor/rockettheme/toolbox/ArrayTraits/src/NestedArrayAccessWithGetters.php deleted file mode 100644 index 6b6adf4..0000000 --- a/source/vendor/rockettheme/toolbox/ArrayTraits/src/NestedArrayAccessWithGetters.php +++ /dev/null @@ -1,60 +0,0 @@ -offsetSet($offset, $value); - } - - /** - * Magic getter method - * - * @param string $offset Asset name value - * @return mixed Asset value - */ - public function __get($offset) - { - return $this->offsetGet($offset); - } - - /** - * Magic method to determine if the attribute is set - * - * @param string $offset Asset name value - * @return bool True if the value is set - */ - public function __isset($offset) - { - return $this->offsetExists($offset); - } - - /** - * Magic method to unset the attribute - * - * @param string $offset The name value to unset - * @return void - */ - public function __unset($offset) - { - $this->offsetUnset($offset); - } -} diff --git a/source/vendor/rockettheme/toolbox/ArrayTraits/src/Serializable.php b/source/vendor/rockettheme/toolbox/ArrayTraits/src/Serializable.php deleted file mode 100644 index 7c44a5a..0000000 --- a/source/vendor/rockettheme/toolbox/ArrayTraits/src/Serializable.php +++ /dev/null @@ -1,34 +0,0 @@ -items); - } - - /** - * Called during unserialization of the object. - * - * @param string $serialized The string representation of the object. - * @return void - */ - public function unserialize($serialized) - { - $this->items = unserialize($serialized); - } -} diff --git a/source/vendor/rockettheme/toolbox/Blueprints/src/BlueprintForm.php b/source/vendor/rockettheme/toolbox/Blueprints/src/BlueprintForm.php deleted file mode 100644 index bfbef64..0000000 --- a/source/vendor/rockettheme/toolbox/Blueprints/src/BlueprintForm.php +++ /dev/null @@ -1,635 +0,0 @@ -nestedSeparator = '/'; - $this->filename = $filename; - $this->items = $items; - } - - /** - * Set filename for the blueprint. Can also be array of files for parent lookup. - * - * @param string|string[] $filename - * @return $this - */ - public function setFilename($filename) - { - $this->filename = $filename; - - return $this; - } - - /** - * Get the filename of the blueprint. - * - * @return string|string[]|null - */ - public function getFilename() - { - return $this->filename; - } - - /** - * Set context for import@ and extend@. - * - * @param string $context - * @return $this - */ - public function setContext($context) - { - $this->context = $context; - - return $this; - } - - /** - * Set custom overrides for import@ and extend@. - * - * @param array $overrides - * @return $this - */ - public function setOverrides($overrides) - { - $this->overrides = $overrides; - - return $this; - } - - /** - * Load blueprint. - * - * @param string|array|null $extends - * @return $this - */ - public function load($extends = null) - { - try { - // Only load and extend blueprint if it has not yet been loaded. - if (!$this->items) { - // Get list of files. - $files = $this->filename ? $this->getFiles($this->filename) : []; - if ($files) { - // Load and extend blueprints. - $data = $this->doLoad($files, $extends); - - $this->items = (array)array_shift($data); - - foreach ($data as $content) { - $this->extend($content, true); - } - } - } - - // Import blueprints. - $this->deepInit($this->items); - } catch (\Exception $e) { - $filename = $this->filename; - if (is_array($filename)) { - $filename = implode(' | ', $filename); - } - - throw new RuntimeException(sprintf('Cannot load blueprint %s: %s', $filename, $e->getMessage()), 500, $e); - } - - return $this; - } - - /** - * Initialize blueprints with its dynamic fields. - * - * @return $this - */ - public function init() - { - foreach ($this->dynamic as $key => $data) { - // Locate field. - $path = explode('/', $key); - $current = &$this->items; - - foreach ($path as $field) { - if (\is_object($current)) { - // Handle objects. - if (!isset($current->{$field})) { - $current->{$field} = []; - } - - $current = &$current->{$field}; - } else { - // Handle arrays and scalars. - if (!\is_array($current)) { - $current = [$field => []]; - } elseif (!isset($current[$field])) { - $current[$field] = []; - } - - $current = &$current[$field]; - } - } - - // Set dynamic property. - foreach ($data as $property => $call) { - $action = 'dynamic' . ucfirst($call['action']); - - if (method_exists($this, $action)) { - $this->{$action}($current, $property, $call); - } - } - } - - return $this; - } - - - /** - * Get form. - * - * @return array - */ - public function form() - { - return (array)$this->get('form'); - } - - /** - * Get form fields. - * - * @return array - */ - public function fields() - { - $fields = $this->get('form/fields'); - - if ($fields === null) { - $field = $this->get('form/field'); - $fields = $field !== null ? ['' => (array) $field] : $fields; - } - - return (array)$fields; - } - - /** - * Extend blueprint with another blueprint. - * - * @param BlueprintForm|array $extends - * @param bool $append - * @return $this - */ - public function extend($extends, $append = false) - { - if ($extends instanceof self) { - $extends = $extends->toArray(); - } - - if ($append) { - $a = $this->items; - $b = $extends; - } else { - $a = $extends; - $b = $this->items; - } - - $this->items = $this->deepMerge($a, $b); - - return $this; - } - - /** - * @param string $name - * @param mixed $value - * @param string $separator - * @param bool $append - * @return $this - */ - public function embed($name, $value, $separator = '/', $append = false) - { - $oldValue = $this->get($name, null, $separator); - - if (\is_array($oldValue) && \is_array($value)) { - if ($append) { - $a = $oldValue; - $b = $value; - } else { - $a = $value; - $b = $oldValue; - } - - $value = $this->deepMerge($a, $b); - } - - $this->set($name, $value, $separator); - - return $this; - } - - /** - * Get blueprints by using slash notation for nested arrays/objects. - * - * @example $value = $this->resolve('this/is/my/nested/variable'); - * returns ['this/is/my', 'nested/variable'] - * - * @param array $path - * @param string $separator - * @return array - */ - public function resolve(array $path, $separator = '/') - { - $fields = false; - $parts = []; - $current = $this['form/fields']; - $result = [null, null, null]; - - while (($field = current($path)) !== null) { - if (!$fields && isset($current['fields'])) { - if (!empty($current['array'])) { - $result = [$current, $parts, $path ? implode($separator, $path) : null]; - // Skip item offset. - $parts[] = array_shift($path); - } - - $current = $current['fields']; - $fields = true; - - } elseif (isset($current[$field])) { - $parts[] = array_shift($path); - $current = $current[$field]; - $fields = false; - - } elseif (isset($current[$index = '.' . $field])) { - $parts[] = array_shift($path); - $current = $current[$index]; - $fields = false; - - } else { - break; - } - } - - return $result; - } - - /** - * Deep merge two arrays together. - * - * @param array $a - * @param array $b - * @return array - */ - protected function deepMerge(array $a, array $b) - { - $bref_stack = [&$a]; - $head_stack = [$b]; - - do { - end($bref_stack); - $bref = &$bref_stack[key($bref_stack)]; - /** @var array $head */ - $head = array_pop($head_stack); - unset($bref_stack[key($bref_stack)]); - - foreach ($head as $key => $value) { - if (\is_string($key) && strpos($key, '@') !== false) { - // Remove @ from the start and the end. Key syntax `import@2` is supported to allow multiple operations of the same type. - $list = explode('-', (string)preg_replace('/^(@*)?([^@]+)(@\d*)?$/', '\2', $key), 2); - $action = array_shift($list); - $property = array_shift($list); - - switch ($action) { - case 'unset': - case 'replace': - if (!$property) { - $bref = ['unset@' => true]; - } elseif ($property === 'name' && isset($head['name'])) { - // replace-name@ was used to override the name of a field previously imported - // in the main array, copy field reference under the new name ($header['name']) - $a[$head['name']] = &$bref; - // unset the previous index - unset($a[$bref['name']]); - // internal name property is also replaced - $bref['name'] = $head['name']; - } - else { - unset($bref[$property]); - } - continue 2; - } - } - - if (isset($bref[$key]) && \is_array($bref[$key]) && \is_array($head[$key])) { - $bref_stack[] = &$bref[$key]; - $head_stack[] = $head[$key]; - } else { - $bref = array_merge($bref, [$key => $head[$key]]); - } - } - } while (\count($head_stack)); - - return $a; - } - - /** - * @param array $items - * @param array $path - * @return string|null - */ - protected function deepInit(array &$items, $path = []) - { - $ordering = ''; - $order = []; - $field = end($path) === 'fields'; - - foreach ($items as $key => &$item) { - // Set name for nested field. - if ($field && isset($item['type'])) { - $item['name'] = $key; - } - - // Handle special instructions in the form. - if (strpos($key, '@') !== false) { - // Remove @ from the start and the end. Key syntax `import@2` is supported to allow multiple operations of the same type. - $list = explode('-', (string)preg_replace('/^(@*)?([^@]+)(@\d*)?$/', '\2', $key), 2); - $action = array_shift($list); - $property = array_shift($list); - - switch ($action) { - case 'unset': - unset($items[$key]); - if (empty($items)) { - return null; - } - break; - case 'import': - unset($items[$key]); - $this->doImport($item, $path); - break; - case 'ordering': - $ordering = $item; - unset($items[$key]); - break; - default: - $this->dynamic[implode('/', $path)][$property] = ['action' => $action, 'params' => $item]; - } - - } elseif (\is_array($item)) { - // Recursively initialize form. - $newPath = array_merge($path, [$key]); - - $location = $this->deepInit($item, $newPath); - if ($location) { - $order[$key] = $location; - } elseif ($location === null) { - unset($items[$key]); - } - } - } - unset($item); - - if ($order) { - // Reorder fields if needed. - $items = $this->doReorder($items, $order); - } - - return $ordering; - } - - /** - * @param array|string $value - * @return array|null - */ - protected function loadImport($value) - { - if (\is_string($value)) { - $type = $value; - $context = null; - } else { - $type = isset($value['type']) ? $value['type'] : null; - $context = isset($value['context']) ? $value['context'] : null; - } - $field = 'form'; - - if ($type && strpos($type, ':') !== false) { - list ($type, $field) = explode(':', $type, 2); - } - - if (!$type && !$field) { - return null; - } - - if ($type) { - $files = $this->getFiles($type, $context); - - if (!$files) { - return null; - } - - /** @var BlueprintForm $blueprint */ - $blueprint = new static($files); - $blueprint->setContext($this->context)->setOverrides($this->overrides)->load(); - } else { - $blueprint = $this; - } - - $import = $blueprint->get($field); - - return \is_array($import) ? $import : null; - } - - /** - * @param array|string $value - * @param array $path - * @return void - */ - protected function doImport($value, array &$path) - { - $imported = $this->loadImport($value); - - if ($imported) { - $this->deepInit($imported, $path); - $name = implode('/', $path); - $this->embed($name, $imported, '/', false); - } - } - - /** - * Internal function that handles loading extended blueprints. - * - * @param string[] $files - * @param string|array|null $extends - * @return array - */ - protected function doLoad(array $files, $extends = null) - { - $filename = array_shift($files); - if (!\is_string($filename)) { - throw new \InvalidArgumentException(__METHOD__ . '(): Parameter #1 does not contain array of filenames'); - } - $content = $this->loadFile($filename); - - $key = ''; - if (isset($content['extends@'])) { - $key = 'extends@'; - } elseif (isset($content['@extends'])) { - $key = '@extends'; - } elseif (isset($content['@extends@'])) { - $key = '@extends@'; - } - - $override = (bool)$extends; - $extends = (array)($key && !$extends ? $content[$key] : $extends); - - unset($content['extends@'], $content['@extends'], $content['@extends@']); - - $data = $extends ? $this->doExtend($filename, $files, $extends, $override) : []; - $data[] = $content; - - return $data; - } - - /** - * Internal function to recursively load extended blueprints. - * - * @param string $filename - * @param array $parents - * @param array $extends - * @param bool $override - * @return array - */ - protected function doExtend($filename, array $parents, array $extends, $override = false) - { - if (\is_string(key($extends))) { - $extends = [$extends]; - } - - $data = [[]]; - foreach ($extends as $value) { - // Accept array of type and context or a string. - if (\is_string($value)) { - $type = $value; - } else { - $type = isset($value['type']) ? $value['type'] : null; - } - - if (!$type) { - continue; - } - - if ($type === '@parent' || $type === 'parent@') { - if (!$parents) { - throw new RuntimeException("Parent blueprint missing for '{$filename}'"); - } - - $files = $parents; - } else { - $files = $this->getFiles($type, isset($value['context']) ? $value['context'] : null); - - if ($override && !$files) { - throw new RuntimeException("Blueprint '{$type}' missing for '{$filename}'"); - } - - // Detect extend loops. - if ($files && array_intersect($files, $parents)) { - // Let's check if user really meant extends@: parent@. - $index = \array_search($filename, $files, true); - if ($index !== false) { - $index = (int)$index; - - // We want to grab only the parents of the file which is currently being loaded. - $files = \array_slice($files, $index + 1); - } - if ($files !== $parents) { - throw new RuntimeException("Loop detected while extending blueprint file '{$filename}'"); - } - if (empty($parents)) { - throw new RuntimeException("Parent blueprint missing for '{$filename}'"); - } - } - } - - if ($files) { - $data[] = $this->doLoad($files); - } - } - - return array_merge(...$data); - } - - /** - * Internal function to reorder items. - * - * @param array $items - * @param array $keys - * @return array - */ - protected function doReorder(array $items, array $keys) - { - $reordered = array_keys($items); - - foreach ($keys as $item => $ordering) { - if ((string)(int)$ordering === (string)$ordering) { - $location = array_search($item, $reordered, true) ?: 0; - $rel = array_splice($reordered, $location, 1); - array_splice($reordered, $ordering, 0, $rel); - - } elseif (isset($items[$ordering])) { - $location = array_search($item, $reordered, true) ?: 0; - $rel = array_splice($reordered, $location, 1); - $location = array_search($ordering, $reordered, true) ?: 0; - array_splice($reordered, $location + 1, 0, $rel); - } - } - - return array_merge(array_flip($reordered), $items); - } -} diff --git a/source/vendor/rockettheme/toolbox/Blueprints/src/BlueprintSchema.php b/source/vendor/rockettheme/toolbox/Blueprints/src/BlueprintSchema.php deleted file mode 100644 index 27869cb..0000000 --- a/source/vendor/rockettheme/toolbox/Blueprints/src/BlueprintSchema.php +++ /dev/null @@ -1,767 +0,0 @@ - true]; - /** @var array */ - protected $ignoreFormKeys = ['fields' => 1]; - /** @var array */ - protected $types = []; - - /** - * Constructor. - * - * @param array $serialized Serialized content if available. - */ - public function __construct($serialized = null) - { - if (\is_array($serialized) && !empty($serialized)) { - $this->items = (array)$serialized['items']; - $this->rules = (array)$serialized['rules']; - $this->nested = (array)$serialized['nested']; - $this->dynamic = (array)$serialized['dynamic']; - $this->filter = (array)$serialized['filter']; - } - } - - /** - * @param array $types - * @return $this - */ - public function setTypes(array $types) - { - $this->types = $types; - - return $this; - } - - /** - * Restore Blueprints object. - * - * @param array $serialized - * @return static - */ - public static function restore(array $serialized) - { - return new static($serialized); - } - - /** - * Initialize blueprints with its dynamic fields. - * - * @return $this - */ - public function init() - { - foreach ($this->dynamic as $key => $data) { - $field = &$this->items[$key]; - - foreach ($data as $property => $call) { - $action = 'dynamic' . ucfirst($call['action']); - - if (method_exists($this, $action)) { - $this->{$action}($field, $property, $call); - } - } - } - - return $this; - } - - /** - * Set filter for inherited properties. - * - * @param array $filter List of field names to be inherited. - * @return void - */ - public function setFilter(array $filter) - { - $this->filter = array_flip($filter); - } - - /** - * Get value by using dot notation for nested arrays/objects. - * - * @example $value = $data->get('this.is.my.nested.variable'); - * - * @param string $name Dot separated path to the requested value. - * @param mixed $default Default value (or null). - * @param string $separator Separator, defaults to '.' - * @return mixed Value. - */ - public function get($name, $default = null, $separator = '.') - { - $name = $separator !== '.' ? (string)str_replace($separator, '.', $name) : $name; - - return isset($this->items[$name]) ? $this->items[$name] : $default; - } - - /** - * Set value by using dot notation for nested arrays/objects. - * - * @example $value = $data->set('this.is.my.nested.variable', $newField); - * - * @param string $name Dot separated path to the requested value. - * @param mixed $value New value. - * @param string $separator Separator, defaults to '.' - * @return void - */ - public function set($name, $value, $separator = '.') - { - $name = $separator !== '.' ? (string)str_replace($separator, '.', $name) : $name; - - $this->items[$name] = $value; - $this->addProperty($name); - } - - /** - * Define value by using dot notation for nested arrays/objects. - * - * @example $value = $data->set('this.is.my.nested.variable', true); - * - * @param string $name Dot separated path to the requested value. - * @param mixed $value New value. - * @param string $separator Separator, defaults to '.' - * @return void - */ - public function def($name, $value, $separator = '.') - { - $this->set($name, $this->get($name, $value, $separator), $separator); - } - - /** - * @return array - * @deprecated 1.4 Use `->getState()` instead - */ - public function toArray() - { - return $this->getState(); - } - - /** - * Convert object into an array. - * - * @return array - */ - public function getState() - { - return [ - 'items' => $this->items, - 'rules' => $this->rules, - 'nested' => $this->nested, - 'dynamic' => $this->dynamic, - 'filter' => $this->filter - ]; - } - - /** - * Get nested structure containing default values defined in the blueprints. - * - * Fields without default value are ignored in the list. - * - * @return array - */ - public function getDefaults() - { - return $this->buildDefaults($this->nested); - } - - /** - * Embed an array to the blueprint. - * - * @param string $name - * @param array $value - * @param string $separator - * @param bool $merge Merge fields instead replacing them. - * @return $this - */ - public function embed($name, array $value, $separator = '.', $merge = false) - { - if (isset($value['rules'])) { - $this->rules = array_merge($this->rules, $value['rules']); - } - - $name = $separator !== '.' ? (string)str_replace($separator, '.', $name) : $name; - - if (isset($value['form'])) { - $form = array_diff_key($value['form'], ['fields' => 1, 'field' => 1]); - } else { - $form = []; - } - - $items = isset($this->items[$name]) ? $this->items[$name] : ['type' => '_root', 'form_field' => false]; - - $this->items[$name] = $items; - $this->addProperty($name); - - $prefix = $name ? $name . '.' : ''; - $params = array_intersect_key($form, $this->filter); - $location = [$name]; - - if (isset($value['form']['field'])) { - $this->parseFormField($name, $value['form']['field'], $params, $prefix, '', $merge, $location); - } elseif (isset($value['form']['fields'])) { - $this->parseFormFields($value['form']['fields'], $params, $prefix, '', $merge, $location); - } - - $this->items[$name] += ['form' => $form]; - - return $this; - } - - /** - * Merge two arrays by using blueprints. - * - * @param array $data1 - * @param array $data2 - * @param string|null $name Optional - * @param string $separator Optional - * @return array - */ - public function mergeData(array $data1, array $data2, $name = null, $separator = '.') - { - $nested = $this->getNested($name, $separator); - - if (!\is_array($nested)) { - $nested = []; - } - - return $this->mergeArrays($data1, $data2, $nested); - } - - /** - * Get the property with given path. - * - * @param string|null $path - * @param string $separator - * @return mixed - */ - public function getProperty($path = null, $separator = '.') - { - $name = $this->getPropertyName($path, $separator); - $property = $this->get($name); - $nested = $this->getNested($name); - - return $this->getPropertyRecursion($property, $nested); - } - - /** - * Returns name of the property with given path. - * - * @param string|null $path - * @param string $separator - * @return string - */ - public function getPropertyName($path = null, $separator = '.') - { - if (null === $path) { - return ''; - } - - $parts = explode($separator, $path) ?: []; - $nested = $this->nested; - - $result = []; - while (($part = array_shift($parts)) !== null) { - if (!isset($nested[$part])) { - if (isset($nested['*'])) { - $part = '*'; - } else { - return implode($separator, array_merge($result, [$part], $parts)); - } - } - $result[] = $part; - $nested = $nested[$part]; - } - - return implode('.', $result); - } - - /** - * Return data fields that do not exist in blueprints. - * - * @param array $data - * @param string $prefix - * @return array - */ - public function extra(array $data, $prefix = '') - { - $rules = $this->nested; - - // Drill down to prefix level - if (!empty($prefix)) { - $parts = explode('.', trim($prefix, '.')); - foreach ($parts as $part) { - $rules = isset($rules[$part]) ? $rules[$part] : []; - } - } - - // Check if the form cannot have extra fields. - if (isset($rules[''])) { - $rule = $this->items['']; - if (isset($rule['type']) && $rule['type'] !== '_root') { - return []; - } - } - - return $this->extraArray($data, $rules, $prefix); - } - - /** - * Get the property with given path. - * - * @param array|mixed $property - * @param array|mixed $nested - * @return mixed - */ - protected function getPropertyRecursion($property, $nested) - { - if (empty($nested) || !\is_array($nested) || !isset($property['type'])) { - return $property; - } - - if ($property['type'] === '_root') { - foreach ($nested as $key => $value) { - if ($key === '') { - continue; - } - - $name = \is_array($value) ? $key : $value; - $property['fields'][$key] = $this->getPropertyRecursion($this->get($name), $value); - } - } elseif ($property['type'] === '_parent' || !empty($property['array'])) { - foreach ($nested as $key => $value) { - $name = \is_array($value) ? "{$property['name']}.{$key}" : $value; - $property['fields'][$key] = $this->getPropertyRecursion($this->get($name), $value); - } - } - - return $property; - } - - /** - * Get property from the definition. - * - * @param string|null $path Comma separated path to the property. - * @param string $separator - * @return array|string|null - * @internal - */ - protected function getNested($path = null, $separator = '.') - { - if (!$path) { - return $this->nested; - } - - $parts = explode($separator, $path) ?: []; - $item = array_pop($parts); - - $nested = $this->nested; - foreach ($parts as $part) { - if (!isset($nested[$part])) { - $part = '*'; - if (!isset($nested[$part])) { - return []; - } - } - $nested = $nested[$part]; - } - - if (isset($nested[$item])) { - return $nested[$item]; - } - - return isset($nested['*']) ? $nested['*'] : null; - } - - /** - * @param array $nested - * @return array - */ - protected function buildDefaults(array $nested) - { - $defaults = []; - - foreach ($nested as $key => $value) { - if ($key === '*') { - // TODO: Add support for adding defaults to collections. - continue; - } - - if (\is_array($value)) { - // Recursively fetch the items. - $list = $this->buildDefaults($value); - - // Only return defaults if there are any. - if (!empty($list)) { - $defaults[$key] = $list; - } - } else { - // We hit a field; get default from it if it exists. - $item = $this->get($value); - - // Only return default value if it exists. - if (isset($item['default'])) { - $defaults[$key] = $item['default']; - } - } - } - - return $defaults; - } - - /** - * @param array $data1 - * @param array $data2 - * @param array $rules - * @return array - * @internal - */ - protected function mergeArrays(array $data1, array $data2, array $rules) - { - foreach ($data2 as $key => $field) { - $val = isset($rules[$key]) ? $rules[$key] : null; - $rule = \is_string($val) ? $this->items[$val] : null; - - if ((array_key_exists($key, $data1) && \is_array($data1[$key]) && \is_array($field) && \is_array($val) && !isset($val['*'])) - || (!empty($rule['type']) && strpos($rule['type'], '_') === 0)) { - // Array has been defined in blueprints and is not a collection of items. - $data1[$key] = $this->mergeArrays($data1[$key], $field, $val); - } else { - // Otherwise just take value from the data2. - $data1[$key] = $field; - } - } - - return $data1; - } - - /** - * Gets all field definitions from the blueprints. - * - * @param array $fields Fields to parse. - * @param array $params Property parameters. - * @param string $prefix Property prefix. - * @param string $parent Parent property. - * @param bool $merge Merge fields instead replacing them. - * @param array $formPath - * @return void - */ - protected function parseFormFields(array $fields, array $params, $prefix = '', $parent = '', $merge = false, array $formPath = []) - { - if (isset($fields['type']) && !\is_array($fields['type'])) { - return; - } - - // Go though all the fields in current level. - foreach ($fields as $key => $field) { - if (is_array($field)) { - $this->parseFormField($key, $field, $params, $prefix, $parent, $merge, $formPath); - } - } - } - - /** - * @param string $key - * @param array $field - * @param array $params - * @param string $prefix - * @param string $parent - * @param bool $merge - * @param array $formPath - * @return void - */ - protected function parseFormField($key, array $field, array $params, $prefix = '', $parent = '', $merge = false, array $formPath = []) - { - // Skip illegal field (needs to be an array). - if (!\is_array($field)) { - return; - } - - $key = $this->getFieldKey($key, $prefix, $parent); - - $newPath = array_merge($formPath, [$key]); - - $properties = array_diff_key($field, $this->ignoreFormKeys) + $params; - $properties['name'] = $key; - - // Add all default properties for the field type (field needs to override them). - $type = isset($properties['type']) ? $properties['type'] : ''; - if (isset($this->types[$type])) { - $properties = $this->mergeTypeDefaults($properties, $this->types[$type]); - } - - // Merge properties with existing ones. - if ($merge && isset($this->items[$key])) { - $properties += $this->items[$key]; - } - - $isInputField = !isset($properties['input@']) || $properties['input@']; - - $propertyExists = isset($this->items[$key]); - if (!$isInputField) { - // Remove property if it exists. - if ($propertyExists) { - $this->removeProperty($key); - } - } elseif (!$propertyExists) { - // Add missing property. - $this->addProperty($key); - } - - if (isset($field['fields'])) { - // Recursively get all the nested fields. - $isArray = !empty($properties['array']); - $newParams = array_intersect_key($properties, $this->filter); - $this->parseFormFields($field['fields'], $newParams, $prefix, $key . ($isArray ? '.*': ''), $merge, $newPath); - } else { - if (!isset($this->items[$key])) { - // Add parent rules. - $path = explode('.', $key); - array_pop($path); - $parent = ''; - - foreach ($path as $part) { - $parent .= ($parent ? '.' : '') . $part; - if (!isset($this->items[$parent])) { - $this->items[$parent] = ['type' => '_parent', 'name' => $parent, 'form_field' => false]; - } - } - } - - if ($isInputField) { - $this->parseProperties($key, $properties); - } - } - - if ($isInputField) { - $this->items[$key] = $properties; - } - } - - /** - * @param array $properties - * @param array $defaults - * @return array - */ - protected function mergeTypeDefaults(array $properties, array $defaults) - { - foreach ($properties as $key => $value) { - if (is_int($key)) { - // Handle items in a list, but avoid duplicates. - if (!in_array($value, $defaults, true)) { - $defaults[] = $value; - } - } elseif (is_array($value) && isset($defaults[$key]) && is_array($defaults[$key])) { - // Recursively merge array value. - $defaults[$key] = $this->mergeTypeDefaults($value, $defaults[$key]); - } else { - // Replace value. - $defaults[$key] = $value; - } - } - - return $defaults; - } - - /** - * @param string $key - * @param string $prefix - * @param string $parent - * @return string - */ - protected function getFieldKey($key, $prefix, $parent) - { - // Set name from the array key. - if (is_string($key) && strpos($key[0], '.') === 0) { - return ($parent ?: rtrim($prefix, '.')) . $key; - } - - return $prefix . $key; - } - - /** - * @param string $key - * @param array $properties - * @return void - */ - protected function parseProperties($key, array &$properties) - { - $key = ltrim($key, '.'); - - if (!empty($properties['data'])) { - $this->dynamic[$key] = $properties['data']; - } - - foreach ($properties as $name => $value) { - if (is_string($name) && strpos($name[0], '@') !== false) { - $list = explode('-', trim($name, '@'), 2); - $action = array_shift($list); - $property = array_shift($list); - - $this->dynamic[$key][$property] = ['action' => $action, 'params' => $value]; - } - } - - // Initialize predefined validation rule. - if (isset($properties['validate']['rule'])) { - $properties['validate'] += $this->getRule($properties['validate']['rule']); - } - } - - /** - * Add property to the definition. - * - * @param string $path Comma separated path to the property. - * @return void - * @internal - */ - protected function addProperty($path) - { - $parts = explode('.', $path); - $item = array_pop($parts); - - $nested = &$this->nested; - foreach ($parts as $part) { - if (!isset($nested[$part]) || !\is_array($nested[$part])) { - $nested[$part] = []; - } - - $nested = &$nested[$part]; - } - - if (!isset($nested[$item])) { - $nested[$item] = $path; - } - } - - /** - * Remove property to the definition. - * - * @param string $path Comma separated path to the property. - * @return void - * @internal - */ - protected function removeProperty($path) - { - $parts = explode('.', $path); - $item = array_pop($parts); - - $nested = &$this->nested; - foreach ($parts as $part) { - if (!isset($nested[$part]) || !\is_array($nested[$part])) { - return; - } - - $nested = &$nested[$part]; - } - - if (isset($nested[$item])) { - unset($nested[$item]); - } - } - - /** - * @param string $rule - * @return array - * @internal - */ - protected function getRule($rule) - { - if (isset($this->rules[$rule]) && \is_array($this->rules[$rule])) { - return $this->rules[$rule]; - } - return []; - } - - /** - * @param array $data - * @param array $rules - * @param string $prefix - * @return array - * @internal - */ - protected function extraArray(array $data, array $rules, $prefix) - { - $array = []; - - foreach ($data as $key => $field) { - if (isset($rules[$key])) { - $val = $rules[$key]; - } else { - $val = isset($rules['*']) ? $rules['*'] : null; - } - $rule = \is_string($val) ? $this->items[$val] : null; - - if ($rule || isset($val['*'])) { - // Item has been defined in blueprints. - } elseif (\is_array($field) && \is_array($val)) { - // Array has been defined in blueprints. - $array += $this->extraArray($field, $val, $prefix . $key . '.'); - } else { - // Undefined/extra item. - $array[$prefix.$key] = $field; - } - } - return $array; - } - - /** - * @param array $field - * @param string $property - * @param array $call - * @return void - */ - protected function dynamicData(array &$field, $property, array $call) - { - $params = $call['params']; - - if (\is_array($params)) { - $function = array_shift($params); - } else { - $function = $params; - $params = []; - } - - $list = explode('::', $function, 2); - $f = array_pop($list); - $o = array_pop($list); - - if (!$o) { - if ($f && \function_exists($f)) { - $data = $f(...$params); - } - } elseif ($f && \method_exists($o, $f)) { - $data = $o::{$f}(...$params); - } - - // If function returns a value, - if (isset($data)) { - if (\is_array($data) && isset($field[$property]) && \is_array($field[$property])) { - // Combine field and @data-field together. - $field[$property] += $data; - } else { - // Or create/replace field with @data-field. - $field[$property] = $data; - } - } - } -} diff --git a/source/vendor/rockettheme/toolbox/Blueprints/src/Blueprints.php b/source/vendor/rockettheme/toolbox/Blueprints/src/Blueprints.php deleted file mode 100644 index 9f92501..0000000 --- a/source/vendor/rockettheme/toolbox/Blueprints/src/Blueprints.php +++ /dev/null @@ -1,13 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace RocketTheme\Toolbox\Compat\Yaml\Exception; - -/** - * Exception interface for all exceptions thrown by the component. - * - * @author Fabien Potencier - */ -interface ExceptionInterface -{ -} diff --git a/source/vendor/rockettheme/toolbox/Compat/src/Yaml/Exception/ParseException.php b/source/vendor/rockettheme/toolbox/Compat/src/Yaml/Exception/ParseException.php deleted file mode 100755 index 12ef73e..0000000 --- a/source/vendor/rockettheme/toolbox/Compat/src/Yaml/Exception/ParseException.php +++ /dev/null @@ -1,144 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace RocketTheme\Toolbox\Compat\Yaml\Exception; - -/** - * Exception class thrown when an error occurs during parsing. - * - * @author Fabien Potencier - */ -class ParseException extends RuntimeException -{ - private $parsedFile; - private $parsedLine; - private $snippet; - private $rawMessage; - - /** - * @param string $message The error message - * @param int $parsedLine The line where the error occurred - * @param string|null $snippet The snippet of code near the problem - * @param string|null $parsedFile The file name where the error occurred - * @param \Exception|null $previous The previous exception - */ - public function __construct($message, $parsedLine = -1, $snippet = null, $parsedFile = null, \Exception $previous = null) - { - $this->parsedFile = $parsedFile; - $this->parsedLine = $parsedLine; - $this->snippet = $snippet; - $this->rawMessage = $message; - - $this->updateRepr(); - - parent::__construct($this->message, 0, $previous); - } - - /** - * Gets the snippet of code near the error. - * - * @return string The snippet of code - */ - public function getSnippet() - { - return $this->snippet; - } - - /** - * Sets the snippet of code near the error. - * - * @param string $snippet The code snippet - */ - public function setSnippet($snippet) - { - $this->snippet = $snippet; - - $this->updateRepr(); - } - - /** - * Gets the filename where the error occurred. - * - * This method returns null if a string is parsed. - * - * @return string The filename - */ - public function getParsedFile() - { - return $this->parsedFile; - } - - /** - * Sets the filename where the error occurred. - * - * @param string $parsedFile The filename - */ - public function setParsedFile($parsedFile) - { - $this->parsedFile = $parsedFile; - - $this->updateRepr(); - } - - /** - * Gets the line where the error occurred. - * - * @return int The file line - */ - public function getParsedLine() - { - return $this->parsedLine; - } - - /** - * Sets the line where the error occurred. - * - * @param int $parsedLine The file line - */ - public function setParsedLine($parsedLine) - { - $this->parsedLine = $parsedLine; - - $this->updateRepr(); - } - - private function updateRepr() - { - $this->message = $this->rawMessage; - - $dot = false; - if ('.' === substr($this->message, -1)) { - $this->message = substr($this->message, 0, -1); - $dot = true; - } - - if (null !== $this->parsedFile) { - if (\PHP_VERSION_ID >= 50400) { - $jsonOptions = JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE; - } else { - $jsonOptions = 0; - } - $this->message .= sprintf(' in %s', json_encode($this->parsedFile, $jsonOptions)); - } - - if ($this->parsedLine >= 0) { - $this->message .= sprintf(' at line %d', $this->parsedLine); - } - - if ($this->snippet) { - $this->message .= sprintf(' (near "%s")', $this->snippet); - } - - if ($dot) { - $this->message .= '.'; - } - } -} diff --git a/source/vendor/rockettheme/toolbox/Compat/src/Yaml/Exception/RuntimeException.php b/source/vendor/rockettheme/toolbox/Compat/src/Yaml/Exception/RuntimeException.php deleted file mode 100755 index c65e727..0000000 --- a/source/vendor/rockettheme/toolbox/Compat/src/Yaml/Exception/RuntimeException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace RocketTheme\Toolbox\Compat\Yaml\Exception; - -/** - * Exception class thrown when an error occurs during parsing. - * - * @author Romain Neutron - */ -class RuntimeException extends \RuntimeException implements ExceptionInterface -{ -} diff --git a/source/vendor/rockettheme/toolbox/Compat/src/Yaml/Inline.php b/source/vendor/rockettheme/toolbox/Compat/src/Yaml/Inline.php deleted file mode 100755 index e8273bc..0000000 --- a/source/vendor/rockettheme/toolbox/Compat/src/Yaml/Inline.php +++ /dev/null @@ -1,501 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace RocketTheme\Toolbox\Compat\Yaml; - -use RocketTheme\Toolbox\Compat\Yaml\Exception\ParseException; - -/** - * Inline implements a YAML parser/dumper for the YAML inline syntax. - * - * @author Fabien Potencier - */ -class Inline -{ - const REGEX_QUOTED_STRING = '(?:"([^"\\\\]*+(?:\\\\.[^"\\\\]*+)*+)"|\'([^\']*+(?:\'\'[^\']*+)*+)\')'; - - private static $exceptionOnInvalidType = false; - private static $objectSupport = false; - private static $objectForMap = false; - - /** - * Converts a YAML string to a PHP value. - * - * @param string $value A YAML string - * @param bool $exceptionOnInvalidType True if an exception must be thrown on invalid types (a PHP resource or object), false otherwise - * @param bool $objectSupport True if object support is enabled, false otherwise - * @param bool $objectForMap True if maps should return a stdClass instead of array() - * @param array $references Mapping of variable names to values - * - * @return mixed A PHP value - * - * @throws ParseException - */ - public static function parse($value, $exceptionOnInvalidType = false, $objectSupport = false, $objectForMap = false, $references = array()) - { - self::$exceptionOnInvalidType = $exceptionOnInvalidType; - self::$objectSupport = $objectSupport; - self::$objectForMap = $objectForMap; - - $value = trim($value); - - if ('' === $value) { - return ''; - } - - if (2 /* MB_OVERLOAD_STRING */ & (int) ini_get('mbstring.func_overload')) { - $mbEncoding = mb_internal_encoding(); - mb_internal_encoding('ASCII'); - } - - $i = 0; - switch ($value[0]) { - case '[': - $result = self::parseSequence($value, $i, $references); - ++$i; - break; - case '{': - $result = self::parseMapping($value, $i, $references); - ++$i; - break; - default: - $result = self::parseScalar($value, null, array('"', "'"), $i, true, $references); - } - - // some comments are allowed at the end - if (preg_replace('/\s+#.*$/A', '', substr($value, $i))) { - throw new ParseException(sprintf('Unexpected characters near "%s".', substr($value, $i))); - } - - if (isset($mbEncoding)) { - mb_internal_encoding($mbEncoding); - } - - return $result; - } - - /** - * Check if given array is hash or just normal indexed array. - * - * @internal - * - * @param array $value The PHP array to check - * - * @return bool true if value is hash array, false otherwise - */ - public static function isHash(array $value) - { - $expectedKey = 0; - - foreach ($value as $key => $val) { - if ($key !== $expectedKey++) { - return true; - } - } - - return false; - } - - /** - * Parses a YAML scalar. - * - * @param string $scalar - * @param string[] $delimiters - * @param string[] $stringDelimiters - * @param int &$i - * @param bool $evaluate - * @param array $references - * - * @return string - * - * @throws ParseException When malformed inline YAML string is parsed - * - * @internal - */ - public static function parseScalar($scalar, $delimiters = null, $stringDelimiters = array('"', "'"), &$i = 0, $evaluate = true, $references = array()) - { - if (in_array($scalar[$i], $stringDelimiters)) { - // quoted scalar - $output = self::parseQuotedScalar($scalar, $i); - - if (null !== $delimiters) { - $tmp = ltrim(substr($scalar, $i), ' '); - if (!in_array($tmp[0], $delimiters)) { - throw new ParseException(sprintf('Unexpected characters (%s).', substr($scalar, $i))); - } - } - } else { - // "normal" string - if (!$delimiters) { - $output = substr($scalar, $i); - $i += strlen($output); - - // remove comments - if (Parser::preg_match('/[ \t]+#/', $output, $match, PREG_OFFSET_CAPTURE)) { - $output = substr($output, 0, $match[0][1]); - } - } elseif (Parser::preg_match('/^(.+?)('.implode('|', $delimiters).')/', substr($scalar, $i), $match)) { - $output = $match[1]; - $i += strlen($output); - } else { - throw new ParseException(sprintf('Malformed inline YAML string: %s.', $scalar)); - } - - // a non-quoted string cannot start with @ or ` (reserved) nor with a scalar indicator (| or >) - if ($output && ('@' === $output[0] || '`' === $output[0] || '|' === $output[0] || '>' === $output[0])) { - @trigger_error(sprintf('Not quoting the scalar "%s" starting with "%s" is deprecated since Symfony 2.8 and will throw a ParseException in 3.0.', $output, $output[0]), E_USER_DEPRECATED); - - // to be thrown in 3.0 - // throw new ParseException(sprintf('The reserved indicator "%s" cannot start a plain scalar; you need to quote the scalar.', $output[0])); - } - - if ($evaluate) { - $output = self::evaluateScalar($output, $references); - } - } - - return $output; - } - - /** - * Parses a YAML quoted scalar. - * - * @param string $scalar - * @param int &$i - * - * @return string - * - * @throws ParseException When malformed inline YAML string is parsed - */ - private static function parseQuotedScalar($scalar, &$i) - { - if (!Parser::preg_match('/'.self::REGEX_QUOTED_STRING.'/Au', substr($scalar, $i), $match)) { - throw new ParseException(sprintf('Malformed inline YAML string: %s.', substr($scalar, $i))); - } - - $output = substr($match[0], 1, strlen($match[0]) - 2); - - $unescaper = new Unescaper(); - if ('"' == $scalar[$i]) { - $output = $unescaper->unescapeDoubleQuotedString($output); - } else { - $output = $unescaper->unescapeSingleQuotedString($output); - } - - $i += strlen($match[0]); - - return $output; - } - - /** - * Parses a YAML sequence. - * - * @param string $sequence - * @param int &$i - * @param array $references - * - * @return array - * - * @throws ParseException When malformed inline YAML string is parsed - */ - private static function parseSequence($sequence, &$i = 0, $references = array()) - { - $output = array(); - $len = strlen($sequence); - ++$i; - - // [foo, bar, ...] - while ($i < $len) { - switch ($sequence[$i]) { - case '[': - // nested sequence - $output[] = self::parseSequence($sequence, $i, $references); - break; - case '{': - // nested mapping - $output[] = self::parseMapping($sequence, $i, $references); - break; - case ']': - return $output; - case ',': - case ' ': - break; - default: - $isQuoted = in_array($sequence[$i], array('"', "'")); - $value = self::parseScalar($sequence, array(',', ']'), array('"', "'"), $i, true, $references); - - // the value can be an array if a reference has been resolved to an array var - if (!is_array($value) && !$isQuoted && false !== strpos($value, ': ')) { - // embedded mapping? - try { - $pos = 0; - $value = self::parseMapping('{'.$value.'}', $pos, $references); - } catch (\InvalidArgumentException $e) { - // no, it's not - } - } - - $output[] = $value; - - --$i; - } - - ++$i; - } - - throw new ParseException(sprintf('Malformed inline YAML string: %s.', $sequence)); - } - - /** - * Parses a YAML mapping. - * - * @param string $mapping - * @param int &$i - * @param array $references - * - * @return array|\stdClass - * - * @throws ParseException When malformed inline YAML string is parsed - */ - private static function parseMapping($mapping, &$i = 0, $references = array()) - { - $output = array(); - $len = strlen($mapping); - ++$i; - $allowOverwrite = false; - - // {foo: bar, bar:foo, ...} - while ($i < $len) { - switch ($mapping[$i]) { - case ' ': - case ',': - ++$i; - continue 2; - case '}': - if (self::$objectForMap) { - return (object) $output; - } - - return $output; - } - - // key - $key = self::parseScalar($mapping, array(':', ' '), array('"', "'"), $i, false); - - if ('<<' === $key) { - $allowOverwrite = true; - } - - // value - $done = false; - - while ($i < $len) { - switch ($mapping[$i]) { - case '[': - // nested sequence - $value = self::parseSequence($mapping, $i, $references); - // Spec: Keys MUST be unique; first one wins. - // Parser cannot abort this mapping earlier, since lines - // are processed sequentially. - // But overwriting is allowed when a merge node is used in current block. - if ('<<' === $key) { - foreach ($value as $parsedValue) { - $output += $parsedValue; - } - } elseif ($allowOverwrite || !isset($output[$key])) { - $output[$key] = $value; - } - $done = true; - break; - case '{': - // nested mapping - $value = self::parseMapping($mapping, $i, $references); - // Spec: Keys MUST be unique; first one wins. - // Parser cannot abort this mapping earlier, since lines - // are processed sequentially. - // But overwriting is allowed when a merge node is used in current block. - if ('<<' === $key) { - $output += $value; - } elseif ($allowOverwrite || !isset($output[$key])) { - $output[$key] = $value; - } - $done = true; - break; - case ':': - case ' ': - break; - default: - $value = self::parseScalar($mapping, array(',', '}'), array('"', "'"), $i, true, $references); - // Spec: Keys MUST be unique; first one wins. - // Parser cannot abort this mapping earlier, since lines - // are processed sequentially. - // But overwriting is allowed when a merge node is used in current block. - if ('<<' === $key) { - $output += $value; - } elseif ($allowOverwrite || !isset($output[$key])) { - $output[$key] = $value; - } - $done = true; - --$i; - } - - ++$i; - - if ($done) { - continue 2; - } - } - } - - throw new ParseException(sprintf('Malformed inline YAML string: %s.', $mapping)); - } - - /** - * Evaluates scalars and replaces magic values. - * - * @param string $scalar - * @param array $references - * - * @return mixed The evaluated YAML string - * - * @throws ParseException when object parsing support was disabled and the parser detected a PHP object or when a reference could not be resolved - */ - private static function evaluateScalar($scalar, $references = array()) - { - $scalar = trim($scalar); - $scalarLower = strtolower($scalar); - - if (0 === strpos($scalar, '*')) { - if (false !== $pos = strpos($scalar, '#')) { - $value = substr($scalar, 1, $pos - 2); - } else { - $value = substr($scalar, 1); - } - - // an unquoted * - if (false === $value || '' === $value) { - throw new ParseException('A reference must contain at least one character.'); - } - - if (!array_key_exists($value, $references)) { - throw new ParseException(sprintf('Reference "%s" does not exist.', $value)); - } - - return $references[$value]; - } - - switch (true) { - case 'null' === $scalarLower: - case '' === $scalar: - case '~' === $scalar: - return; - case 'true' === $scalarLower: - return true; - case 'false' === $scalarLower: - return false; - // Optimise for returning strings. - case '+' === $scalar[0] || '-' === $scalar[0] || '.' === $scalar[0] || '!' === $scalar[0] || is_numeric($scalar[0]): - switch (true) { - case 0 === strpos($scalar, '!str'): - return (string) substr($scalar, 5); - case 0 === strpos($scalar, '! '): - return (int) self::parseScalar(substr($scalar, 2)); - case 0 === strpos($scalar, '!php/object:'): - if (self::$objectSupport) { - return unserialize(substr($scalar, 12)); - } - - if (self::$exceptionOnInvalidType) { - throw new ParseException('Object support when parsing a YAML file has been disabled.'); - } - - return; - case 0 === strpos($scalar, '!!php/object:'): - if (self::$objectSupport) { - return unserialize(substr($scalar, 13)); - } - - if (self::$exceptionOnInvalidType) { - throw new ParseException('Object support when parsing a YAML file has been disabled.'); - } - - return; - case 0 === strpos($scalar, '!!float '): - return (float) substr($scalar, 8); - case ctype_digit($scalar): - $raw = $scalar; - $cast = (int) $scalar; - - return '0' == $scalar[0] ? octdec($scalar) : (((string) $raw == (string) $cast) ? $cast : $raw); - case '-' === $scalar[0] && ctype_digit(substr($scalar, 1)): - $raw = $scalar; - $cast = (int) $scalar; - - return '0' == $scalar[1] ? octdec($scalar) : (((string) $raw === (string) $cast) ? $cast : $raw); - case is_numeric($scalar): - case Parser::preg_match(self::getHexRegex(), $scalar): - return '0x' === $scalar[0].$scalar[1] ? hexdec($scalar) : (float) $scalar; - case '.inf' === $scalarLower: - case '.nan' === $scalarLower: - return -log(0); - case '-.inf' === $scalarLower: - return log(0); - case Parser::preg_match('/^(-|\+)?[0-9,]+(\.[0-9]+)?$/', $scalar): - return (float) str_replace(',', '', $scalar); - case Parser::preg_match(self::getTimestampRegex(), $scalar): - $timeZone = date_default_timezone_get(); - date_default_timezone_set('UTC'); - $time = strtotime($scalar); - date_default_timezone_set($timeZone); - - return $time; - } - // no break - default: - return (string) $scalar; - } - } - - /** - * Gets a regex that matches a YAML date. - * - * @return string The regular expression - * - * @see http://www.yaml.org/spec/1.2/spec.html#id2761573 - */ - private static function getTimestampRegex() - { - return <<[0-9][0-9][0-9][0-9]) - -(?P[0-9][0-9]?) - -(?P[0-9][0-9]?) - (?:(?:[Tt]|[ \t]+) - (?P[0-9][0-9]?) - :(?P[0-9][0-9]) - :(?P[0-9][0-9]) - (?:\.(?P[0-9]*))? - (?:[ \t]*(?PZ|(?P[-+])(?P[0-9][0-9]?) - (?::(?P[0-9][0-9]))?))?)? - $~x -EOF; - } - - /** - * Gets a regex that matches a YAML number in hexadecimal notation. - * - * @return string - */ - private static function getHexRegex() - { - return '~^0x[0-9a-f]++$~i'; - } -} diff --git a/source/vendor/rockettheme/toolbox/Compat/src/Yaml/Parser.php b/source/vendor/rockettheme/toolbox/Compat/src/Yaml/Parser.php deleted file mode 100755 index 4968d86..0000000 --- a/source/vendor/rockettheme/toolbox/Compat/src/Yaml/Parser.php +++ /dev/null @@ -1,852 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace RocketTheme\Toolbox\Compat\Yaml; - -use RocketTheme\Toolbox\Compat\Yaml\Exception\ParseException; - -/** - * Parser parses YAML strings to convert them to PHP arrays. - * - * @author Fabien Potencier - */ -class Parser -{ - const BLOCK_SCALAR_HEADER_PATTERN = '(?P\||>)(?P\+|\-|\d+|\+\d+|\-\d+|\d+\+|\d+\-)?(?P +#.*)?'; - // BC - wrongly named - const FOLDED_SCALAR_PATTERN = self::BLOCK_SCALAR_HEADER_PATTERN; - - private $offset = 0; - private $totalNumberOfLines; - private $lines = array(); - private $currentLineNb = -1; - private $currentLine = ''; - private $refs = array(); - private $skippedLineNumbers = array(); - private $locallySkippedLineNumbers = array(); - - /** - * @param int $offset The offset of YAML document (used for line numbers in error messages) - * @param int|null $totalNumberOfLines The overall number of lines being parsed - * @param int[] $skippedLineNumbers Number of comment lines that have been skipped by the parser - */ - public function __construct($offset = 0, $totalNumberOfLines = null, array $skippedLineNumbers = array()) - { - $this->offset = $offset; - $this->totalNumberOfLines = $totalNumberOfLines; - $this->skippedLineNumbers = $skippedLineNumbers; - } - - /** - * Parses a YAML string to a PHP value. - * - * @param string $value A YAML string - * @param bool $exceptionOnInvalidType True if an exception must be thrown on invalid types (a PHP resource or object), false otherwise - * @param bool $objectSupport True if object support is enabled, false otherwise - * @param bool $objectForMap True if maps should return a stdClass instead of array() - * - * @return mixed A PHP value - * - * @throws ParseException If the YAML is not valid - */ - public function parse($value, $exceptionOnInvalidType = false, $objectSupport = false, $objectForMap = false) - { - if (false === preg_match('//u', $value)) { - throw new ParseException('The YAML value does not appear to be valid UTF-8.'); - } - - $this->refs = array(); - - $mbEncoding = null; - $e = null; - $data = null; - - if (2 /* MB_OVERLOAD_STRING */ & (int) ini_get('mbstring.func_overload')) { - $mbEncoding = mb_internal_encoding(); - mb_internal_encoding('UTF-8'); - } - - try { - $data = $this->doParse($value, $exceptionOnInvalidType, $objectSupport, $objectForMap); - } catch (\Exception $e) { - } catch (\Throwable $e) { - } - - if (null !== $mbEncoding) { - mb_internal_encoding($mbEncoding); - } - - $this->lines = array(); - $this->currentLine = ''; - $this->refs = array(); - $this->skippedLineNumbers = array(); - $this->locallySkippedLineNumbers = array(); - - if (null !== $e) { - throw $e; - } - - return $data; - } - - private function doParse($value, $exceptionOnInvalidType = false, $objectSupport = false, $objectForMap = false) - { - $this->currentLineNb = -1; - $this->currentLine = ''; - $value = $this->cleanup($value); - $this->lines = explode("\n", $value); - $this->locallySkippedLineNumbers = array(); - - if (null === $this->totalNumberOfLines) { - $this->totalNumberOfLines = count($this->lines); - } - - $data = array(); - $context = null; - $allowOverwrite = false; - - while ($this->moveToNextLine()) { - if ($this->isCurrentLineEmpty()) { - continue; - } - - // tab? - if ("\t" === $this->currentLine[0]) { - throw new ParseException('A YAML file cannot contain tabs as indentation.', $this->getRealCurrentLineNb() + 1, $this->currentLine); - } - - $isRef = $mergeNode = false; - if (self::preg_match('#^\-((?P\s+)(?P.+))?$#u', rtrim($this->currentLine), $values)) { - if ($context && 'mapping' == $context) { - throw new ParseException('You cannot define a sequence item when in a mapping', $this->getRealCurrentLineNb() + 1, $this->currentLine); - } - $context = 'sequence'; - - if (isset($values['value']) && self::preg_match('#^&(?P[^ ]+) *(?P.*)#u', $values['value'], $matches)) { - $isRef = $matches['ref']; - $values['value'] = $matches['value']; - } - - // array - if (!isset($values['value']) || '' == trim($values['value'], ' ') || 0 === strpos(ltrim($values['value'], ' '), '#')) { - $data[] = $this->parseBlock($this->getRealCurrentLineNb() + 1, $this->getNextEmbedBlock(null, true), $exceptionOnInvalidType, $objectSupport, $objectForMap); - } else { - if (isset($values['leadspaces']) - && self::preg_match('#^(?P'.Inline::REGEX_QUOTED_STRING.'|[^ \'"\{\[].*?) *\:(\s+(?P.+))?$#u', rtrim($values['value']), $matches) - ) { - // this is a compact notation element, add to next block and parse - $block = $values['value']; - if ($this->isNextLineIndented()) { - $block .= "\n".$this->getNextEmbedBlock($this->getCurrentLineIndentation() + strlen($values['leadspaces']) + 1); - } - - $data[] = $this->parseBlock($this->getRealCurrentLineNb(), $block, $exceptionOnInvalidType, $objectSupport, $objectForMap); - } else { - $data[] = $this->parseValue($values['value'], $exceptionOnInvalidType, $objectSupport, $objectForMap, $context); - } - } - if ($isRef) { - $this->refs[$isRef] = end($data); - } - } elseif ( - self::preg_match('#^(?P'.Inline::REGEX_QUOTED_STRING.'|[^ \'"\[\{].*?) *\:(\s+(?P.+))?$#u', rtrim($this->currentLine), $values) - && (false === strpos($values['key'], ' #') || in_array($values['key'][0], array('"', "'"))) - ) { - if ($context && 'sequence' == $context) { - throw new ParseException('You cannot define a mapping item when in a sequence', $this->currentLineNb + 1, $this->currentLine); - } - $context = 'mapping'; - - // force correct settings - Inline::parse(null, $exceptionOnInvalidType, $objectSupport, $objectForMap, $this->refs); - try { - $key = Inline::parseScalar($values['key']); - } catch (ParseException $e) { - $e->setParsedLine($this->getRealCurrentLineNb() + 1); - $e->setSnippet($this->currentLine); - - throw $e; - } - - // Convert float keys to strings, to avoid being converted to integers by PHP - if (is_float($key)) { - $key = (string) $key; - } - - if ('<<' === $key && (!isset($values['value']) || !self::preg_match('#^&(?P[^ ]+)#u', $values['value'], $refMatches))) { - $mergeNode = true; - $allowOverwrite = true; - if (isset($values['value']) && 0 === strpos($values['value'], '*')) { - $refName = substr($values['value'], 1); - if (!array_key_exists($refName, $this->refs)) { - throw new ParseException(sprintf('Reference "%s" does not exist.', $refName), $this->getRealCurrentLineNb() + 1, $this->currentLine); - } - - $refValue = $this->refs[$refName]; - - if (!is_array($refValue)) { - throw new ParseException('YAML merge keys used with a scalar value instead of an array.', $this->getRealCurrentLineNb() + 1, $this->currentLine); - } - - $data += $refValue; // array union - } else { - if (isset($values['value']) && '' !== $values['value']) { - $value = $values['value']; - } else { - $value = $this->getNextEmbedBlock(); - } - $parsed = $this->parseBlock($this->getRealCurrentLineNb() + 1, $value, $exceptionOnInvalidType, $objectSupport, $objectForMap); - - if (!is_array($parsed)) { - throw new ParseException('YAML merge keys used with a scalar value instead of an array.', $this->getRealCurrentLineNb() + 1, $this->currentLine); - } - - if (isset($parsed[0])) { - // If the value associated with the merge key is a sequence, then this sequence is expected to contain mapping nodes - // and each of these nodes is merged in turn according to its order in the sequence. Keys in mapping nodes earlier - // in the sequence override keys specified in later mapping nodes. - foreach ($parsed as $parsedItem) { - if (!is_array($parsedItem)) { - throw new ParseException('Merge items must be arrays.', $this->getRealCurrentLineNb() + 1, $parsedItem); - } - - $data += $parsedItem; // array union - } - } else { - // If the value associated with the key is a single mapping node, each of its key/value pairs is inserted into the - // current mapping, unless the key already exists in it. - $data += $parsed; // array union - } - } - } elseif ('<<' !== $key && isset($values['value']) && self::preg_match('#^&(?P[^ ]+) *(?P.*)#u', $values['value'], $matches)) { - $isRef = $matches['ref']; - $values['value'] = $matches['value']; - } - - if ($mergeNode) { - // Merge keys - } elseif (!isset($values['value']) || '' == trim($values['value'], ' ') || 0 === strpos(ltrim($values['value'], ' '), '#') || '<<' === $key) { - // hash - // if next line is less indented or equal, then it means that the current value is null - if (!$this->isNextLineIndented() && !$this->isNextLineUnIndentedCollection()) { - // Spec: Keys MUST be unique; first one wins. - // But overwriting is allowed when a merge node is used in current block. - if ($allowOverwrite || !isset($data[$key])) { - $data[$key] = null; - } - } else { - $value = $this->parseBlock($this->getRealCurrentLineNb() + 1, $this->getNextEmbedBlock(), $exceptionOnInvalidType, $objectSupport, $objectForMap); - - if ('<<' === $key) { - $this->refs[$refMatches['ref']] = $value; - $data += $value; - } elseif ($allowOverwrite || !isset($data[$key])) { - // Spec: Keys MUST be unique; first one wins. - // But overwriting is allowed when a merge node is used in current block. - $data[$key] = $value; - } - } - } else { - $value = $this->parseValue($values['value'], $exceptionOnInvalidType, $objectSupport, $objectForMap, $context); - // Spec: Keys MUST be unique; first one wins. - // But overwriting is allowed when a merge node is used in current block. - if ($allowOverwrite || !isset($data[$key])) { - $data[$key] = $value; - } - } - if ($isRef) { - $this->refs[$isRef] = $data[$key]; - } - } else { - // multiple documents are not supported - if ('---' === $this->currentLine) { - throw new ParseException('Multiple documents are not supported.', $this->currentLineNb + 1, $this->currentLine); - } - - // 1-liner optionally followed by newline(s) - if (is_string($value) && $this->lines[0] === trim($value)) { - try { - $value = Inline::parse($this->lines[0], $exceptionOnInvalidType, $objectSupport, $objectForMap, $this->refs); - } catch (ParseException $e) { - $e->setParsedLine($this->getRealCurrentLineNb() + 1); - $e->setSnippet($this->currentLine); - - throw $e; - } - - return $value; - } - - throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine); - } - } - - if ($objectForMap && !is_object($data) && 'mapping' === $context) { - $object = new \stdClass(); - - foreach ($data as $key => $value) { - $object->$key = $value; - } - - $data = $object; - } - - return empty($data) ? null : $data; - } - - private function parseBlock($offset, $yaml, $exceptionOnInvalidType, $objectSupport, $objectForMap) - { - $skippedLineNumbers = $this->skippedLineNumbers; - - foreach ($this->locallySkippedLineNumbers as $lineNumber) { - if ($lineNumber < $offset) { - continue; - } - - $skippedLineNumbers[] = $lineNumber; - } - - $parser = new self($offset, $this->totalNumberOfLines, $skippedLineNumbers); - $parser->refs = &$this->refs; - - return $parser->doParse($yaml, $exceptionOnInvalidType, $objectSupport, $objectForMap); - } - - /** - * Returns the current line number (takes the offset into account). - * - * @return int The current line number - */ - private function getRealCurrentLineNb() - { - $realCurrentLineNumber = $this->currentLineNb + $this->offset; - - foreach ($this->skippedLineNumbers as $skippedLineNumber) { - if ($skippedLineNumber > $realCurrentLineNumber) { - break; - } - - ++$realCurrentLineNumber; - } - - return $realCurrentLineNumber; - } - - /** - * Returns the current line indentation. - * - * @return int The current line indentation - */ - private function getCurrentLineIndentation() - { - return strlen($this->currentLine) - strlen(ltrim($this->currentLine, ' ')); - } - - /** - * Returns the next embed block of YAML. - * - * @param int $indentation The indent level at which the block is to be read, or null for default - * @param bool $inSequence True if the enclosing data structure is a sequence - * - * @return string A YAML string - * - * @throws ParseException When indentation problem are detected - */ - private function getNextEmbedBlock($indentation = null, $inSequence = false) - { - $oldLineIndentation = $this->getCurrentLineIndentation(); - $blockScalarIndentations = array(); - - if ($this->isBlockScalarHeader()) { - $blockScalarIndentations[] = $this->getCurrentLineIndentation(); - } - - if (!$this->moveToNextLine()) { - return; - } - - if (null === $indentation) { - $newIndent = $this->getCurrentLineIndentation(); - - $unindentedEmbedBlock = $this->isStringUnIndentedCollectionItem(); - - if (!$this->isCurrentLineEmpty() && 0 === $newIndent && !$unindentedEmbedBlock) { - throw new ParseException('Indentation problem.', $this->getRealCurrentLineNb() + 1, $this->currentLine); - } - } else { - $newIndent = $indentation; - } - - $data = array(); - if ($this->getCurrentLineIndentation() >= $newIndent) { - $data[] = substr($this->currentLine, $newIndent); - } else { - $this->moveToPreviousLine(); - - return; - } - - if ($inSequence && $oldLineIndentation === $newIndent && isset($data[0][0]) && '-' === $data[0][0]) { - // the previous line contained a dash but no item content, this line is a sequence item with the same indentation - // and therefore no nested list or mapping - $this->moveToPreviousLine(); - - return; - } - - $isItUnindentedCollection = $this->isStringUnIndentedCollectionItem(); - - if (empty($blockScalarIndentations) && $this->isBlockScalarHeader()) { - $blockScalarIndentations[] = $this->getCurrentLineIndentation(); - } - - $previousLineIndentation = $this->getCurrentLineIndentation(); - - while ($this->moveToNextLine()) { - $indent = $this->getCurrentLineIndentation(); - - // terminate all block scalars that are more indented than the current line - if (!empty($blockScalarIndentations) && $indent < $previousLineIndentation && '' !== trim($this->currentLine)) { - foreach ($blockScalarIndentations as $key => $blockScalarIndentation) { - if ($blockScalarIndentation >= $this->getCurrentLineIndentation()) { - unset($blockScalarIndentations[$key]); - } - } - } - - if (empty($blockScalarIndentations) && !$this->isCurrentLineComment() && $this->isBlockScalarHeader()) { - $blockScalarIndentations[] = $this->getCurrentLineIndentation(); - } - - $previousLineIndentation = $indent; - - if ($isItUnindentedCollection && !$this->isCurrentLineEmpty() && !$this->isStringUnIndentedCollectionItem() && $newIndent === $indent) { - $this->moveToPreviousLine(); - break; - } - - if ($this->isCurrentLineBlank()) { - $data[] = substr($this->currentLine, $newIndent); - continue; - } - - // we ignore "comment" lines only when we are not inside a scalar block - if (empty($blockScalarIndentations) && $this->isCurrentLineComment()) { - // remember ignored comment lines (they are used later in nested - // parser calls to determine real line numbers) - // - // CAUTION: beware to not populate the global property here as it - // will otherwise influence the getRealCurrentLineNb() call here - // for consecutive comment lines and subsequent embedded blocks - $this->locallySkippedLineNumbers[] = $this->getRealCurrentLineNb(); - - continue; - } - - if ($indent >= $newIndent) { - $data[] = substr($this->currentLine, $newIndent); - } elseif (0 == $indent) { - $this->moveToPreviousLine(); - - break; - } else { - throw new ParseException('Indentation problem.', $this->getRealCurrentLineNb() + 1, $this->currentLine); - } - } - - return implode("\n", $data); - } - - /** - * Moves the parser to the next line. - * - * @return bool - */ - private function moveToNextLine() - { - if ($this->currentLineNb >= count($this->lines) - 1) { - return false; - } - - $this->currentLine = $this->lines[++$this->currentLineNb]; - - return true; - } - - /** - * Moves the parser to the previous line. - * - * @return bool - */ - private function moveToPreviousLine() - { - if ($this->currentLineNb < 1) { - return false; - } - - $this->currentLine = $this->lines[--$this->currentLineNb]; - - return true; - } - - /** - * Parses a YAML value. - * - * @param string $value A YAML value - * @param bool $exceptionOnInvalidType True if an exception must be thrown on invalid types false otherwise - * @param bool $objectSupport True if object support is enabled, false otherwise - * @param bool $objectForMap True if maps should return a stdClass instead of array() - * @param string $context The parser context (either sequence or mapping) - * - * @return mixed A PHP value - * - * @throws ParseException When reference does not exist - */ - private function parseValue($value, $exceptionOnInvalidType, $objectSupport, $objectForMap, $context) - { - if (0 === strpos($value, '*')) { - if (false !== $pos = strpos($value, '#')) { - $value = substr($value, 1, $pos - 2); - } else { - $value = substr($value, 1); - } - - if (!array_key_exists($value, $this->refs)) { - throw new ParseException(sprintf('Reference "%s" does not exist.', $value), $this->currentLineNb + 1, $this->currentLine); - } - - return $this->refs[$value]; - } - - if (self::preg_match('/^'.self::BLOCK_SCALAR_HEADER_PATTERN.'$/', $value, $matches)) { - $modifiers = isset($matches['modifiers']) ? $matches['modifiers'] : ''; - - return $this->parseBlockScalar($matches['separator'], preg_replace('#\d+#', '', $modifiers), abs((int) $modifiers)); - } - - try { - $parsedValue = Inline::parse($value, $exceptionOnInvalidType, $objectSupport, $objectForMap, $this->refs); - - if ('mapping' === $context && '"' !== $value[0] && "'" !== $value[0] && '[' !== $value[0] && '{' !== $value[0] && '!' !== $value[0] && false !== strpos($parsedValue, ': ')) { - @trigger_error(sprintf('Using a colon in the unquoted mapping value "%s" in line %d is deprecated since Symfony 2.8 and will throw a ParseException in 3.0.', $value, $this->getRealCurrentLineNb() + 1), E_USER_DEPRECATED); - - // to be thrown in 3.0 - // throw new ParseException('A colon cannot be used in an unquoted mapping value.'); - } - - return $parsedValue; - } catch (ParseException $e) { - $e->setParsedLine($this->getRealCurrentLineNb() + 1); - $e->setSnippet($this->currentLine); - - throw $e; - } - } - - /** - * Parses a block scalar. - * - * @param string $style The style indicator that was used to begin this block scalar (| or >) - * @param string $chomping The chomping indicator that was used to begin this block scalar (+ or -) - * @param int $indentation The indentation indicator that was used to begin this block scalar - * - * @return string The text value - */ - private function parseBlockScalar($style, $chomping = '', $indentation = 0) - { - $notEOF = $this->moveToNextLine(); - if (!$notEOF) { - return ''; - } - - $isCurrentLineBlank = $this->isCurrentLineBlank(); - $blockLines = array(); - - // leading blank lines are consumed before determining indentation - while ($notEOF && $isCurrentLineBlank) { - // newline only if not EOF - if ($notEOF = $this->moveToNextLine()) { - $blockLines[] = ''; - $isCurrentLineBlank = $this->isCurrentLineBlank(); - } - } - - // determine indentation if not specified - if (0 === $indentation) { - if (self::preg_match('/^ +/', $this->currentLine, $matches)) { - $indentation = strlen($matches[0]); - } - } - - if ($indentation > 0) { - $pattern = sprintf('/^ {%d}(.*)$/', $indentation); - - while ( - $notEOF && ( - $isCurrentLineBlank || - self::preg_match($pattern, $this->currentLine, $matches) - ) - ) { - if ($isCurrentLineBlank && strlen($this->currentLine) > $indentation) { - $blockLines[] = substr($this->currentLine, $indentation); - } elseif ($isCurrentLineBlank) { - $blockLines[] = ''; - } else { - $blockLines[] = $matches[1]; - } - - // newline only if not EOF - if ($notEOF = $this->moveToNextLine()) { - $isCurrentLineBlank = $this->isCurrentLineBlank(); - } - } - } elseif ($notEOF) { - $blockLines[] = ''; - } - - if ($notEOF) { - $blockLines[] = ''; - $this->moveToPreviousLine(); - } elseif (!$notEOF && !$this->isCurrentLineLastLineInDocument()) { - $blockLines[] = ''; - } - - // folded style - if ('>' === $style) { - $text = ''; - $previousLineIndented = false; - $previousLineBlank = false; - - for ($i = 0, $blockLinesCount = count($blockLines); $i < $blockLinesCount; ++$i) { - if ('' === $blockLines[$i]) { - $text .= "\n"; - $previousLineIndented = false; - $previousLineBlank = true; - } elseif (' ' === $blockLines[$i][0]) { - $text .= "\n".$blockLines[$i]; - $previousLineIndented = true; - $previousLineBlank = false; - } elseif ($previousLineIndented) { - $text .= "\n".$blockLines[$i]; - $previousLineIndented = false; - $previousLineBlank = false; - } elseif ($previousLineBlank || 0 === $i) { - $text .= $blockLines[$i]; - $previousLineIndented = false; - $previousLineBlank = false; - } else { - $text .= ' '.$blockLines[$i]; - $previousLineIndented = false; - $previousLineBlank = false; - } - } - } else { - $text = implode("\n", $blockLines); - } - - // deal with trailing newlines - if ('' === $chomping) { - $text = preg_replace('/\n+$/', "\n", $text); - } elseif ('-' === $chomping) { - $text = preg_replace('/\n+$/', '', $text); - } - - return $text; - } - - /** - * Returns true if the next line is indented. - * - * @return bool Returns true if the next line is indented, false otherwise - */ - private function isNextLineIndented() - { - $currentIndentation = $this->getCurrentLineIndentation(); - $EOF = !$this->moveToNextLine(); - - while (!$EOF && $this->isCurrentLineEmpty()) { - $EOF = !$this->moveToNextLine(); - } - - if ($EOF) { - return false; - } - - $ret = $this->getCurrentLineIndentation() > $currentIndentation; - - $this->moveToPreviousLine(); - - return $ret; - } - - /** - * Returns true if the current line is blank or if it is a comment line. - * - * @return bool Returns true if the current line is empty or if it is a comment line, false otherwise - */ - private function isCurrentLineEmpty() - { - return $this->isCurrentLineBlank() || $this->isCurrentLineComment(); - } - - /** - * Returns true if the current line is blank. - * - * @return bool Returns true if the current line is blank, false otherwise - */ - private function isCurrentLineBlank() - { - return '' == trim($this->currentLine, ' '); - } - - /** - * Returns true if the current line is a comment line. - * - * @return bool Returns true if the current line is a comment line, false otherwise - */ - private function isCurrentLineComment() - { - //checking explicitly the first char of the trim is faster than loops or strpos - $ltrimmedLine = ltrim($this->currentLine, ' '); - - return '' !== $ltrimmedLine && '#' === $ltrimmedLine[0]; - } - - private function isCurrentLineLastLineInDocument() - { - return ($this->offset + $this->currentLineNb) >= ($this->totalNumberOfLines - 1); - } - - /** - * Cleanups a YAML string to be parsed. - * - * @param string $value The input YAML string - * - * @return string A cleaned up YAML string - */ - private function cleanup($value) - { - $value = str_replace(array("\r\n", "\r"), "\n", $value); - - // strip YAML header - $count = 0; - $value = preg_replace('#^\%YAML[: ][\d\.]+.*\n#u', '', $value, -1, $count); - $this->offset += $count; - - // remove leading comments - $trimmedValue = preg_replace('#^(\#.*?\n)+#s', '', $value, -1, $count); - if (1 == $count) { - // items have been removed, update the offset - $this->offset += substr_count($value, "\n") - substr_count($trimmedValue, "\n"); - $value = $trimmedValue; - } - - // remove start of the document marker (---) - $trimmedValue = preg_replace('#^\-\-\-.*?\n#s', '', $value, -1, $count); - if (1 == $count) { - // items have been removed, update the offset - $this->offset += substr_count($value, "\n") - substr_count($trimmedValue, "\n"); - $value = $trimmedValue; - - // remove end of the document marker (...) - $value = preg_replace('#\.\.\.\s*$#', '', $value); - } - - return $value; - } - - /** - * Returns true if the next line starts unindented collection. - * - * @return bool Returns true if the next line starts unindented collection, false otherwise - */ - private function isNextLineUnIndentedCollection() - { - $currentIndentation = $this->getCurrentLineIndentation(); - $notEOF = $this->moveToNextLine(); - - while ($notEOF && $this->isCurrentLineEmpty()) { - $notEOF = $this->moveToNextLine(); - } - - if (false === $notEOF) { - return false; - } - - $ret = $this->getCurrentLineIndentation() === $currentIndentation && $this->isStringUnIndentedCollectionItem(); - - $this->moveToPreviousLine(); - - return $ret; - } - - /** - * Returns true if the string is un-indented collection item. - * - * @return bool Returns true if the string is un-indented collection item, false otherwise - */ - private function isStringUnIndentedCollectionItem() - { - return '-' === rtrim($this->currentLine) || 0 === strpos($this->currentLine, '- '); - } - - /** - * Tests whether or not the current line is the header of a block scalar. - * - * @return bool - */ - private function isBlockScalarHeader() - { - return (bool) self::preg_match('~'.self::BLOCK_SCALAR_HEADER_PATTERN.'$~', $this->currentLine); - } - - /** - * A local wrapper for `preg_match` which will throw a ParseException if there - * is an internal error in the PCRE engine. - * - * This avoids us needing to check for "false" every time PCRE is used - * in the YAML engine - * - * @throws ParseException on a PCRE internal error - * - * @see preg_last_error() - * - * @internal - */ - public static function preg_match($pattern, $subject, &$matches = null, $flags = 0, $offset = 0) - { - if (false === $ret = preg_match($pattern, $subject, $matches, $flags, $offset)) { - switch (preg_last_error()) { - case PREG_INTERNAL_ERROR: - $error = 'Internal PCRE error.'; - break; - case PREG_BACKTRACK_LIMIT_ERROR: - $error = 'pcre.backtrack_limit reached.'; - break; - case PREG_RECURSION_LIMIT_ERROR: - $error = 'pcre.recursion_limit reached.'; - break; - case PREG_BAD_UTF8_ERROR: - $error = 'Malformed UTF-8 data.'; - break; - case PREG_BAD_UTF8_OFFSET_ERROR: - $error = 'Offset doesn\'t correspond to the begin of a valid UTF-8 code point.'; - break; - default: - $error = 'Error.'; - } - - throw new ParseException($error); - } - - return $ret; - } -} diff --git a/source/vendor/rockettheme/toolbox/Compat/src/Yaml/Unescaper.php b/source/vendor/rockettheme/toolbox/Compat/src/Yaml/Unescaper.php deleted file mode 100755 index 99526ea..0000000 --- a/source/vendor/rockettheme/toolbox/Compat/src/Yaml/Unescaper.php +++ /dev/null @@ -1,156 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace RocketTheme\Toolbox\Compat\Yaml; - -/** - * Unescaper encapsulates unescaping rules for single and double-quoted - * YAML strings. - * - * @author Matthew Lewinski - * - * @internal - */ -class Unescaper -{ - /** - * Parser and Inline assume UTF-8 encoding, so escaped Unicode characters - * must be converted to that encoding. - * - * @deprecated since version 2.5, to be removed in 3.0 - * - * @internal - */ - const ENCODING = 'UTF-8'; - - /** - * Regex fragment that matches an escaped character in a double quoted string. - */ - const REGEX_ESCAPED_CHARACTER = '\\\\(x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8}|.)'; - - /** - * Unescapes a single quoted string. - * - * @param string $value A single quoted string - * - * @return string The unescaped string - */ - public function unescapeSingleQuotedString($value) - { - return str_replace('\'\'', '\'', $value); - } - - /** - * Unescapes a double quoted string. - * - * @param string $value A double quoted string - * - * @return string The unescaped string - */ - public function unescapeDoubleQuotedString($value) - { - $self = $this; - $callback = function ($match) use ($self) { - return $self->unescapeCharacter($match[0]); - }; - - // evaluate the string - return preg_replace_callback('/'.self::REGEX_ESCAPED_CHARACTER.'/u', $callback, $value); - } - - /** - * Unescapes a character that was found in a double-quoted string. - * - * @param string $value An escaped character - * - * @return string The unescaped character - * - * @internal This method is public to be usable as callback. It should not - * be used in user code. Should be changed in 3.0. - */ - public function unescapeCharacter($value) - { - switch ($value[1]) { - case '0': - return "\x0"; - case 'a': - return "\x7"; - case 'b': - return "\x8"; - case 't': - return "\t"; - case "\t": - return "\t"; - case 'n': - return "\n"; - case 'v': - return "\xB"; - case 'f': - return "\xC"; - case 'r': - return "\r"; - case 'e': - return "\x1B"; - case ' ': - return ' '; - case '"': - return '"'; - case '/': - return '/'; - case '\\': - return '\\'; - case 'N': - // U+0085 NEXT LINE - return "\xC2\x85"; - case '_': - // U+00A0 NO-BREAK SPACE - return "\xC2\xA0"; - case 'L': - // U+2028 LINE SEPARATOR - return "\xE2\x80\xA8"; - case 'P': - // U+2029 PARAGRAPH SEPARATOR - return "\xE2\x80\xA9"; - case 'x': - return self::utf8chr(hexdec(substr($value, 2, 2))); - case 'u': - return self::utf8chr(hexdec(substr($value, 2, 4))); - case 'U': - return self::utf8chr(hexdec(substr($value, 2, 8))); - default: - @trigger_error('Not escaping a backslash in a double-quoted string is deprecated since Symfony 2.8 and will throw a ParseException in 3.0.', E_USER_DEPRECATED); - - return $value; - } - } - - /** - * Get the UTF-8 character for the given code point. - * - * @param int $c The unicode code point - * - * @return string The corresponding UTF-8 character - */ - private static function utf8chr($c) - { - if (0x80 > $c %= 0x200000) { - return chr($c); - } - if (0x800 > $c) { - return chr(0xC0 | $c >> 6).chr(0x80 | $c & 0x3F); - } - if (0x10000 > $c) { - return chr(0xE0 | $c >> 12).chr(0x80 | $c >> 6 & 0x3F).chr(0x80 | $c & 0x3F); - } - - return chr(0xF0 | $c >> 18).chr(0x80 | $c >> 12 & 0x3F).chr(0x80 | $c >> 6 & 0x3F).chr(0x80 | $c & 0x3F); - } -} diff --git a/source/vendor/rockettheme/toolbox/Compat/src/Yaml/Yaml.php b/source/vendor/rockettheme/toolbox/Compat/src/Yaml/Yaml.php deleted file mode 100755 index 3cfbddc..0000000 --- a/source/vendor/rockettheme/toolbox/Compat/src/Yaml/Yaml.php +++ /dev/null @@ -1,74 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace RocketTheme\Toolbox\Compat\Yaml; - -use RocketTheme\Toolbox\Compat\Yaml\Exception\ParseException; - -/** - * Yaml offers convenience methods to load and dump YAML. - * - * @author Fabien Potencier - */ -class Yaml -{ - /** - * Parses YAML into a PHP value. - * - * Usage: - * - * $array = Yaml::parse(file_get_contents('config.yml')); - * print_r($array); - * - * - * As this method accepts both plain strings and file names as an input, - * you must validate the input before calling this method. Passing a file - * as an input is a deprecated feature and will be removed in 3.0. - * - * Note: the ability to pass file names to the Yaml::parse method is deprecated since version 2.2 and will be removed in 3.0. Pass the YAML contents of the file instead. - * - * @param string $input Path to a YAML file or a string containing YAML - * @param bool $exceptionOnInvalidType True if an exception must be thrown on invalid types false otherwise - * @param bool $objectSupport True if object support is enabled, false otherwise - * @param bool $objectForMap True if maps should return a stdClass instead of array() - * - * @return mixed The YAML converted to a PHP value - * - * @throws ParseException If the YAML is not valid - */ - public static function parse($input, $exceptionOnInvalidType = false, $objectSupport = false, $objectForMap = false) - { - // if input is a file, process it - $file = ''; - if (false === strpos($input, "\n") && is_file($input)) { - @trigger_error('The ability to pass file names to the '.__METHOD__.' method is deprecated since version 2.2 and will be removed in 3.0. Pass the YAML contents of the file instead.', E_USER_DEPRECATED); - - if (false === is_readable($input)) { - throw new ParseException(sprintf('Unable to parse "%s" as the file is not readable.', $input)); - } - - $file = $input; - $input = file_get_contents($file); - } - - $yaml = new Parser(); - - try { - return $yaml->parse($input, $exceptionOnInvalidType, $objectSupport, $objectForMap); - } catch (ParseException $e) { - if ($file) { - $e->setParsedFile($file); - } - - throw $e; - } - } -} diff --git a/source/vendor/rockettheme/toolbox/DI/src/Container.php b/source/vendor/rockettheme/toolbox/DI/src/Container.php deleted file mode 100644 index a0baeb2..0000000 --- a/source/vendor/rockettheme/toolbox/DI/src/Container.php +++ /dev/null @@ -1,16 +0,0 @@ -filename === null checks). - //throw new \InvalidArgumentException('Filename should be non-empty string'); - return new static(); - } - - if (!isset(static::$instances[$filename])) { - static::$instances[$filename] = new static(); - static::$instances[$filename]->init($filename); - } - - return static::$instances[$filename]; - } - - /** - * Set/get settings. - * - * @param array $settings - * @return array - */ - public function settings(array $settings = null) - { - if ($settings !== null) { - $this->settings = $settings; - } - - return $this->settings; - } - - /** - * Get setting. - * - * @param string $setting - * @param mixed $default - * @return mixed - */ - public function setting($setting, $default = null) - { - return isset($this->settings[$setting]) ? $this->settings[$setting] : $default; - } - - /** - * Prevent constructor from being used. - */ - protected function __construct() - { - } - - /** - * Prevent cloning. - */ - protected function __clone() - { - //Me not like clones! Me smash clones! - } - - /** - * Set filename. - * - * @param string $filename - * @return void - */ - protected function init($filename) - { - $this->filename = $filename; - } - - /** - * Free the file instance. - * - * @return void - */ - public function free() - { - if ($this->locked) { - $this->unlock(); - } - $this->content = null; - $this->raw = null; - - if (null !== $this->filename) { - unset(static::$instances[$this->filename]); - } - } - - /** - * Get/set the file location. - * - * @param string $var - * @return string - */ - public function filename($var = null) - { - if ($var !== null) { - $this->filename = $var; - } - - return $this->filename; - } - - /** - * Return basename of the file. - * - * @return string - */ - public function basename() - { - return null !== $this->filename ? basename($this->filename, $this->extension) : ''; - } - - /** - * Check if file exits. - * - * @return bool - */ - public function exists() - { - return null !== $this->filename && is_file($this->filename); - } - - /** - * Return file modification time. - * - * @return int|false Timestamp or false if file doesn't exist. - */ - public function modified() - { - return null !== $this->filename && $this->exists() ? filemtime($this->filename) : false; - } - - /** - * Lock file for writing. You need to manually unlock(). - * - * @param bool $block For non-blocking lock, set the parameter to false. - * @return bool - * @throws \RuntimeException - */ - public function lock($block = true) - { - if (null === $this->filename) { - throw new \RuntimeException('Opening file for writing failed because of it has no filename'); - } - - if (!$this->handle) { - if (!$this->mkdir(\dirname($this->filename))) { - throw new \RuntimeException('Creating directory failed for ' . $this->filename); - } - - $handle = @fopen($this->filename, 'cb+'); - if (!$handle) { - $error = error_get_last() ?: ['message' => 'Unknown error']; - - throw new \RuntimeException("Opening file for writing failed on error {$error['message']}"); - } - $this->handle = $handle; - } - $lock = $block ? LOCK_EX : LOCK_EX | LOCK_NB; - - // Some filesystems do not support file locks, only fail if another process holds the lock. - $this->locked = flock($this->handle, $lock, $wouldblock) || !$wouldblock; - - return $this->locked; - } - - /** - * Returns true if file has been locked for writing. - * - * @return bool|null True = locked, false = failed, null = not locked. - */ - public function locked() - { - return $this->locked; - } - - /** - * Unlock file. - * - * @return bool - */ - public function unlock() - { - if (!$this->handle) { - return false; - } - - if ($this->locked) { - flock($this->handle, LOCK_UN); - $this->locked = null; - } - - fclose($this->handle); - $this->handle = null; - - return true; - } - - /** - * Check if file can be written. - * - * @return bool - */ - public function writable() - { - if (null === $this->filename) { - return false; - } - - return $this->exists() ? is_writable($this->filename) : $this->writableDir(\dirname($this->filename)); - } - - /** - * (Re)Load a file and return RAW file contents. - * - * @return string - */ - public function load() - { - $this->raw = null !== $this->filename && $this->exists() ? (string) file_get_contents($this->filename) : ''; - $this->content = null; - - return $this->raw; - } - - /** - * Get/set raw file contents. - * - * @param string $var - * @return string - */ - public function raw($var = null) - { - if ($var !== null) { - $this->raw = (string) $var; - $this->content = null; - } - - if (!\is_string($this->raw)) { - $this->raw = $this->load(); - } - - return $this->raw; - } - - /** - * Get/set parsed file contents. - * - * @param string|array|null $var - * @return string|array - * @throws \RuntimeException - */ - public function content($var = null) - { - if ($var !== null) { - $this->content = $this->check($var); - - // Update RAW, too. - $this->raw = $this->encode($this->content); - - } elseif ($this->content === null) { - // Decode RAW file. - try { - $this->content = $this->decode($this->raw()); - } catch (\Exception $e) { - throw new \RuntimeException(sprintf('Failed to read %s: %s', $this->filename, $e->getMessage()), 500, $e); - } - } - - return $this->content; - } - - /** - * Save file. - * - * @param mixed $data Optional data to be saved, usually array. - * @return void - * @throws \RuntimeException - */ - public function save($data = null) - { - if (null === $this->filename) { - throw new \RuntimeException('Failed to save file: no filename'); - } - - if ($data !== null) { - $this->content($data); - } - - $filename = $this->filename; - - if (is_link($filename)) { - $realname = realpath($filename); - if ($realname === false) { - throw new \RuntimeException('Failed to save file ' . $filename); - } - - $filename = $realname; - } - - $dir = \dirname($filename); - - if (!$dir || !$this->mkdir($dir)) { - throw new \RuntimeException('Creating directory failed for ' . $filename); - } - - try { - if ($this->handle) { - $tmp = true; - // As we are using non-truncating locking, make sure that the file is empty before writing. - if (@ftruncate($this->handle, 0) === false || @fwrite($this->handle, $this->raw()) === false) { - // Writing file failed, throw an error. - $tmp = false; - } - } else { - // Create file with a temporary name and rename it to make the save action atomic. - $tmp = $this->tempname($filename); - if (file_put_contents($tmp, $this->raw()) === false) { - $tmp = false; - } elseif (@rename($tmp, $filename) === false) { - @unlink($tmp); - $tmp = false; - } - } - } catch (\Exception $e) { - $tmp = false; - } - - if ($tmp === false) { - throw new \RuntimeException('Failed to save file ' . $filename); - } - - // Touch the directory as well, thus marking it modified. - @touch($dir); - } - - /** - * Rename file in the filesystem if it exists. - * - * @param string $filename - * @return bool - */ - public function rename($filename) - { - if (null !== $this->filename && $this->exists() && !@rename($this->filename, $filename)) { - return false; - } - - unset(static::$instances[$this->filename]); - static::$instances[$filename] = $this; - - $this->filename = $filename; - - return true; - } - - /** - * Delete file from filesystem. - * - * @return bool - */ - public function delete() - { - return null !== $this->filename && $this->exists() && unlink($this->filename); - } - - /** - * Check contents and make sure it is in correct format. - * - * Override in derived class. - * - * @param mixed $var - * @return mixed - */ - protected function check($var) - { - if (!\is_string($var)) { - throw new \RuntimeException('Provided data is not a string'); - } - - return $var; - } - - /** - * Encode contents into RAW string. - * - * Override in derived class. - * - * @param array|string $var - * @return string - */ - protected function encode($var) - { - return \is_string($var) ? $var : ''; - } - - /** - * Decode RAW string into contents. - * - * Override in derived class. - * - * @param string $var - * @return array|string - */ - protected function decode($var) - { - return $var; - } - - /** - * @param string $dir - * @return bool - */ - private function mkdir($dir) - { - // Silence error for open_basedir; should fail in mkdir instead. - if (@is_dir($dir)) { - return true; - } - - $success = @mkdir($dir, 0777, true); - - if (!$success) { - // Take yet another look, make sure that the folder doesn't exist. - clearstatcache(true, $dir); - if (!@is_dir($dir)) { - return false; - } - } - - return true; - } - - /** - * @param string $dir - * @return bool - * @internal - */ - protected function writableDir($dir) - { - if ($dir && !file_exists($dir)) { - return $this->writableDir(\dirname($dir)); - } - - return $dir && is_dir($dir) && is_writable($dir); - } - - /** - * @param string $filename - * @param int $length - * @return string - */ - protected function tempname($filename, $length = 5) - { - do { - $test = $filename . substr(str_shuffle('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'), 0, $length); - } while (file_exists($test)); - - return $test; - } -} diff --git a/source/vendor/rockettheme/toolbox/File/src/File.php b/source/vendor/rockettheme/toolbox/File/src/File.php deleted file mode 100644 index 8ccd015..0000000 --- a/source/vendor/rockettheme/toolbox/File/src/File.php +++ /dev/null @@ -1,28 +0,0 @@ - $value) { - $string .= $key . '="' . preg_replace( - ['/"/', '/\\\/', "/\t/", "/\n/", "/\r/"], - ['\"', '\\\\', '\t', '\n', '\r'], - $value - ) . "\"\n"; - } - return $string; - } - - /** - * Decode INI file into contents. - * - * @param string $var - * @return array - * @throws \RuntimeException - */ - protected function decode($var) - { - $decoded = null !== $this->filename && file_exists($this->filename) ? @parse_ini_file($this->filename) : []; - - if ($decoded === false) { - throw new \RuntimeException("Decoding file '{$this->filename}' failed'"); - } - - return $decoded; - } -} diff --git a/source/vendor/rockettheme/toolbox/File/src/JsonFile.php b/source/vendor/rockettheme/toolbox/File/src/JsonFile.php deleted file mode 100644 index 76c5b6b..0000000 --- a/source/vendor/rockettheme/toolbox/File/src/JsonFile.php +++ /dev/null @@ -1,70 +0,0 @@ -extension = '.log'; - } - - /** - * @param array|null $var - * @return array - */ - public function content($var = null) - { - /** @var array $content */ - $content = parent::content($var); - - return $content; - } - - /** - * Check contents and make sure it is in correct format. - * - * @param mixed $var - * @return array - */ - protected function check($var) - { - if (!(\is_array($var) || \is_object($var))) { - throw new \RuntimeException('Provided data is not an array'); - } - - return (array)$var; - } - - /** - * Encode contents into RAW string (unsupported). - * - * @param string $var - * @return string - * @throws \BadMethodCallException - */ - protected function encode($var) - { - throw new \BadMethodCallException('Saving log file is forbidden.'); - } - - /** - * Decode RAW string into contents. - * - * @param string $var - * @return array - */ - protected function decode($var) - { - $lines = preg_split('#(\r\n|\n|\r)#', $var) ?: []; - - $results = []; - foreach ($lines as $line) { - preg_match('#^\[(.*)\] (.*) @ (.*) @@ (.*)$#', $line, $matches); - if ($matches) { - $results[] = ['date' => $matches[1], 'message' => $matches[2], 'url' => $matches[3], 'file' => $matches[4]]; - } - } - - return $results; - } -} diff --git a/source/vendor/rockettheme/toolbox/File/src/MarkdownFile.php b/source/vendor/rockettheme/toolbox/File/src/MarkdownFile.php deleted file mode 100644 index 435cd57..0000000 --- a/source/vendor/rockettheme/toolbox/File/src/MarkdownFile.php +++ /dev/null @@ -1,187 +0,0 @@ -content(); - - if ($var !== null) { - $content['header'] = $var; - $this->content($content); - } - - return $content['header']; - } - - /** - * Get/set markdown content. - * - * @param string $var - * @return string - */ - public function markdown($var = null) - { - $content = $this->content(); - - if ($var !== null) { - $content['markdown'] = (string)$var; - $this->content($content); - } - - return $content['markdown']; - } - - /** - * Get/set frontmatter content. - * - * @param string $var - * @return string - */ - public function frontmatter($var = null) - { - $content = $this->content(); - - if ($var !== null) { - $content['frontmatter'] = (string)$var; - $this->content($content); - } - - return $content['frontmatter']; - } - - /** - * Check contents and make sure it is in correct format. - * - * @param mixed $var - * @return array - */ - protected function check($var) - { - if (!(\is_array($var) || \is_object($var))) { - throw new \RuntimeException('Provided data is not an array'); - } - - $var = (array) $var; - if (!isset($var['header']) || !\is_array($var['header'])) { - $var['header'] = []; - } - if (!isset($var['markdown']) || !\is_string($var['markdown'])) { - $var['markdown'] = ''; - } - - return $var; - } - - /** - * Encode contents into RAW string. - * - * @param array $var - * @return string - */ - protected function encode($var) - { - // Create Markdown file with YAML header. - $o = (!empty($var['header']) ? "---\n" . trim(YamlParser::dump($var['header'], 20)) . "\n---\n\n" : '') . $var['markdown']; - - // Normalize line endings to Unix style. - $o = (string)preg_replace("/(\r\n|\r)/", "\n", $o); - - return $o; - } - - /** - * Decode RAW string into contents. - * - * @param string $var - * @return array - */ - protected function decode($var) - { - $content = [ - 'header' => false, - 'frontmatter' => '' - ]; - - $frontmatter_regex = "/^---\n(.+?)\n---\n{0,}(.*)$/uis"; - - // Remove UTF-8 BOM if it exists. - $var = ltrim($var, "\xef\xbb\xbf"); - - // Normalize line endings to Unix style. - $var = (string)preg_replace("/(\r\n|\r)/", "\n", $var); - - // Parse header. - preg_match($frontmatter_regex, ltrim($var), $m); - if(!empty($m)) { - // Normalize frontmatter. - $content['frontmatter'] = $frontmatter = preg_replace("/\n\t/", "\n ", $m[1]); - - // Try native PECL YAML PHP extension first if available. - if (\function_exists('yaml_parse') && $this->setting('native')) { - // Safely decode YAML. - $saved = @ini_get('yaml.decode_php'); - @ini_set('yaml.decode_php', '0'); - $content['header'] = @yaml_parse("---\n" . $frontmatter . "\n..."); - if ($saved !== false) { - @ini_set('yaml.decode_php', $saved); - } - } - - if ($content['header'] === false) { - // YAML hasn't been parsed yet (error or extension isn't available). Fall back to Symfony parser. - try { - $content['header'] = (array) YamlParser::parse($frontmatter); - } catch (ParseException $e) { - if (!$this->setting('compat', true)) { - throw $e; - } - $content['header'] = (array) FallbackYamlParser::parse($frontmatter); - } - } - $content['markdown'] = $m[2]; - } else { - $content['header'] = []; - $content['markdown'] = $var; - } - - return $content; - } -} diff --git a/source/vendor/rockettheme/toolbox/File/src/MoFile.php b/source/vendor/rockettheme/toolbox/File/src/MoFile.php deleted file mode 100644 index 63134dc..0000000 --- a/source/vendor/rockettheme/toolbox/File/src/MoFile.php +++ /dev/null @@ -1,191 +0,0 @@ -endian = 'V'; - $this->str = $var; - $this->len = \strlen($var); - - $magic = $this->readInt() & 0xffffffff; - - if ($magic === 0x950412de) { - // Low endian. - $this->endian = 'V'; - } elseif ($magic === 0xde120495) { - // Big endian. - $this->endian = 'N'; - } else { - throw new \RuntimeException('Not a Gettext file (.mo).'); - } - - // Skip revision number. - $rev = $this->readInt(); - // Total count. - $total = $this->readInt(); - // Offset of original table. - $originals = $this->readInt(); - // Offset of translation table. - $translations = $this->readInt(); - - if ($originals === false || $translations === false) { - throw new \RuntimeException('Bad Gettext file.'); - } - - // Each table consists of string length and offset of the string. - $this->seek($originals); - $table_originals = $this->readIntArray($total * 2); - $this->seek($translations); - $table_translations = $this->readIntArray($total * 2); - - if ($table_originals === false || $table_translations === false) { - throw new \RuntimeException('Bad Gettext file.'); - } - - $items = []; - for ($i = 0; $i < $total; $i++) { - $this->seek($table_originals[$i * 2 + 2]); - - // TODO: Original string can have context concatenated on it. We do not yet support that. - $original = $this->read($table_originals[$i * 2 + 1]); - - if ($original) { - $this->seek($table_translations[$i * 2 + 2]); - - // TODO: Plural forms are stored by letting the plural of the original string follow the singular of the original string, separated through a NUL byte. - $translated = $this->read($table_translations[$i * 2 + 1]); - $items[$original] = $translated; - } - } - - return $items; - } - - /** - * @return int|false - */ - protected function readInt() - { - $read = $this->read(4); - if ($read === false) { - return false; - } - - $read = unpack($this->endian, $read); - if ($read === false) { - return false; - } - - return array_shift($read); - } - - /** - * @param int $count - * @return array|false - */ - protected function readIntArray($count) - { - $read = $this->read(4 * $count); - - return is_string($read) ? unpack($this->endian . (string)$count, $read) : false; - } - - /** - * @param int $bytes - * @return string|false - */ - private function read($bytes) - { - $data = substr($this->str, $this->pos, $bytes); - $this->seek($this->pos + $bytes); - - if (strlen($data) < $bytes) { - return false; - } - - return $data; - } - - /** - * @param int $pos - * @return int - */ - private function seek($pos) - { - $this->pos = $pos < $this->len ? $pos : $this->len; - - return $this->pos; - } -} diff --git a/source/vendor/rockettheme/toolbox/File/src/PhpFile.php b/source/vendor/rockettheme/toolbox/File/src/PhpFile.php deleted file mode 100644 index 355c2f0..0000000 --- a/source/vendor/rockettheme/toolbox/File/src/PhpFile.php +++ /dev/null @@ -1,111 +0,0 @@ -filename && \function_exists('opcache_invalidate')) { - @opcache_invalidate($this->filename, true); - } - } - - /** - * Check contents and make sure it is in correct format. - * - * @param mixed $var - * @return array - * @throws \RuntimeException - */ - protected function check($var) - { - if (!(\is_array($var) || \is_object($var))) { - throw new \RuntimeException('Provided data is not an array'); - } - - return (array)$var; - } - - /** - * Encode configuration object into RAW string (PHP class). - * - * @param array $var - * @return string - * @throws \RuntimeException - */ - protected function encode($var) - { - // Build the object variables string - return "encodeArray((array) $var)};\n"; - } - - /** - * Method to get an array as an exported string. - * - * @param array $a The array to get as a string. - * @param int $level Used internally to indent rows. - * @return string - */ - protected function encodeArray(array $a, $level = 0) - { - $r = []; - foreach ($a as $k => $v) { - if (\is_array($v) || \is_object($v)) { - $r[] = var_export($k, true) . ' => ' . $this->encodeArray((array) $v, $level + 1); - } else { - $r[] = var_export($k, true) . ' => ' . var_export($v, true); - } - } - - $space = str_repeat(' ', $level); - - return "[\n {$space}" . implode(",\n {$space}", $r) . "\n{$space}]"; - } - - /** - * Decode PHP file into contents. - * - * @param string $var - * @return array - */ - protected function decode($var) - { - return (array)include $this->filename; - } -} diff --git a/source/vendor/rockettheme/toolbox/File/src/YamlFile.php b/source/vendor/rockettheme/toolbox/File/src/YamlFile.php deleted file mode 100644 index 1525930..0000000 --- a/source/vendor/rockettheme/toolbox/File/src/YamlFile.php +++ /dev/null @@ -1,157 +0,0 @@ - true, - 'native' => true - ]; - - /** - * @param array|null $var - * @return array - */ - public function content($var = null) - { - /** @var array $content */ - $content = parent::content($var); - - return $content; - } - - /** - * Set/get settings. - * - * @param array|null $settings - * @return array - */ - public static function globalSettings(array $settings = null) - { - if ($settings !== null) { - static::$globalSettings = $settings; - } - - return static::$globalSettings; - } - - /** - * Constructor. - */ - protected function __construct() - { - parent::__construct(); - - $this->extension = '.yaml'; - } - - /** - * Set/get settings. - * - * @param array|null $settings - * @return array - */ - public function settings(array $settings = null) - { - if ($settings !== null) { - $this->settings = $settings; - } - - return $this->settings + static::$globalSettings; - } - - /** - * Get setting. - * - * @param string $setting - * @param mixed $default - * @return mixed - */ - public function setting($setting, $default = null) - { - $value = parent::setting($setting); - if (null === $value) { - $value = isset(static::$globalSettings[$setting]) ? static::$globalSettings[$setting] : $default; - } - - return $value; - } - - /** - * Check contents and make sure it is in correct format. - * - * @param mixed $var - * @return array - */ - protected function check($var) - { - if (!(\is_array($var) || \is_object($var))) { - throw new \RuntimeException('Provided data is not an array'); - } - - return (array)$var; - } - - /** - * Encode contents into RAW string. - * - * @param array $var - * @return string - * @throws DumpException - */ - protected function encode($var) - { - return YamlParser::dump($var, $this->setting('inline', 5), $this->setting('indent', 2), YamlParser::PARSE_EXCEPTION_ON_INVALID_TYPE); - } - - /** - * Decode RAW string into contents. - * - * @param string $var - * @return array - * @throws ParseException - */ - protected function decode($var) - { - // Try native PECL YAML PHP extension first if available. - if (\function_exists('yaml_parse') && $this->setting('native', true)) { - // Safely decode YAML. - $saved = @ini_get('yaml.decode_php'); - @ini_set('yaml.decode_php', '0'); - $data = @yaml_parse($var); - if ($saved !== false) { - @ini_set('yaml.decode_php', $saved); - } - - if ($data !== false) { - return (array)$data; - } - } - - try { - return (array)YamlParser::parse($var); - } catch (ParseException $e) { - if ($this->setting('compat', true)) { - return (array)FallbackYamlParser::parse($var); - } - - throw $e; - } - } -} diff --git a/source/vendor/rockettheme/toolbox/LICENSE b/source/vendor/rockettheme/toolbox/LICENSE deleted file mode 100644 index 94e5898..0000000 --- a/source/vendor/rockettheme/toolbox/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2018 - 2020 RocketTheme, LCC - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/source/vendor/rockettheme/toolbox/README.md b/source/vendor/rockettheme/toolbox/README.md deleted file mode 100644 index 324d8a4..0000000 --- a/source/vendor/rockettheme/toolbox/README.md +++ /dev/null @@ -1,58 +0,0 @@ -# ![](https://avatars1.githubusercontent.com/u/1310198?v=2&s=50) RocketTheme Toolbox - -[![PHPStan](https://img.shields.io/badge/PHPStan-enabled-brightgreen.svg?style=flat)](https://github.com/phpstan/phpstan) -[![Latest Version](http://img.shields.io/packagist/v/rockettheme/toolbox.svg?style=flat)](https://packagist.org/packages/rockettheme/toolbox) -[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](LICENSE) -[![Build Status](https://img.shields.io/travis/rockettheme/toolbox/master.svg?style=flat)](https://travis-ci.org/rockettheme/toolbox) -[![Coverage Status](https://img.shields.io/scrutinizer/coverage/g/rockettheme/toolbox.svg?style=flat)](https://scrutinizer-ci.com/g/rockettheme/toolbox/code-structure) -[![Quality Score](https://img.shields.io/scrutinizer/g/rockettheme/toolbox.svg?style=flat)](https://scrutinizer-ci.com/g/rockettheme/toolbox) -[![Total Downloads](https://img.shields.io/packagist/dt/rockettheme/toolbox.svg?style=flat)](https://packagist.org/packages/rockettheme/toolbox) - -RocketTheme\Toolbox package contains a set of reusable PHP interfaces, classes and traits. - -* ArrayTraits -* Blueprints -* DI -* Event -* File -* ResourceLocator -* Session -* StreamWrapper - -## Installation - -You can use [Composer](http://getcomposer.org/) to download and install this package as well as its dependencies. - -### Composer - -To add this package as a local, per-project dependency to your project, simply add a dependency on `rockettheme/toolbox` to your project's `composer.json` file. Here is a minimal example of a `composer.json` file that just defines a dependency on Diff: - - { - "require": { - "rockettheme/toolbox": "^1.5" - } - } - - -# Contributing - -We appreciate any contribution to ToolBox, whether it is related to bugs or simply a suggestion or improvement. -However, we ask that any contribution follow our simple guidelines in order to be properly received. - -All our projects follow the [GitFlow branching model][gitflow-model], from development to release. If you are not familiar with it, there are several guides and tutorials to make you understand what it is about. - -You will probably want to get started by installing [this very good collection of git extensions][gitflow-extensions]. - -What you mainly want to know is that: - -- All the main activity happens in the `develop` branch. Any pull request should be addressed only to that branch. We will not consider pull requests made to the `master`. -- It's very well appreciated, and highly suggested, to start a new feature whenever you want to make changes or add functionalities. It will make it much easier for us to just checkout your feature branch and test it, before merging it into `develop` - - -# Getting Started - -* Have fun!!! - - -[gitflow-model]: http://nvie.com/posts/a-successful-git-branching-model/ -[gitflow-extensions]: https://github.com/nvie/gitflow diff --git a/source/vendor/rockettheme/toolbox/ResourceLocator/src/RecursiveUniformResourceIterator.php b/source/vendor/rockettheme/toolbox/ResourceLocator/src/RecursiveUniformResourceIterator.php deleted file mode 100644 index 113abff..0000000 --- a/source/vendor/rockettheme/toolbox/ResourceLocator/src/RecursiveUniformResourceIterator.php +++ /dev/null @@ -1,65 +0,0 @@ -getSubPathName(); - - return (new static($this->getUrl(), $this->flags, $this->locator))->setSubPath($subPath); - } - - /** - * @param bool|null $allow_links - * @return bool - */ - public function hasChildren($allow_links = null) - { - $allow_links = (bool)($allow_links !== null ? $allow_links : $this->flags & \FilesystemIterator::FOLLOW_SYMLINKS); - - return $this->isDir() && !$this->isDot() && ($allow_links || !$this->isLink()); - } - - /** - * @return string|null - */ - public function getSubPath() - { - return $this->subPath; - } - - /** - * @return string - */ - public function getSubPathName() - { - return ($this->subPath ? $this->subPath . '/' : '') . $this->getFilename(); - } - - /** - * @param string $path - * @return $this - * @internal - */ - public function setSubPath($path) - { - $this->subPath = $path; - - return $this; - } -} diff --git a/source/vendor/rockettheme/toolbox/ResourceLocator/src/ResourceLocatorInterface.php b/source/vendor/rockettheme/toolbox/ResourceLocator/src/ResourceLocatorInterface.php deleted file mode 100644 index 13aa111..0000000 --- a/source/vendor/rockettheme/toolbox/ResourceLocator/src/ResourceLocatorInterface.php +++ /dev/null @@ -1,45 +0,0 @@ -getIterator() instead'); - } - if ($path === '') { - throw new \BadMethodCallException('Url cannot be empty'); - } - - $this->path = $path; - $this->flags = $flags; - $this->locator = $locator; - $this->rewind(); - } - - /** - * @return $this|\SplFileInfo|string - */ - public function current() - { - if ($this->getFlags() & static::CURRENT_AS_SELF) { - return $this; - } - - return $this->iterator->current(); - } - - /** - * @return string - */ - public function key() - { - return $this->iterator->key(); - } - - /** - * @return void - */ - public function next() - { - do { - $found = $this->findNext(); - } while (null !== $found && !empty($this->found[$found])); - - if (null !== $found) { - // Mark the file as found. - $this->found[$found] = true; - } - } - - /** - * @return bool - */ - public function valid() - { - return $this->iterator->valid(); - } - - /** - * @return void - */ - public function rewind() - { - $this->found = []; - $this->stack = $this->locator->findResources($this->path); - - if (!$this->nextIterator()) { - throw new \BadMethodCallException('Failed to open dir: ' . $this->path . ' does not exist.'); - } - - // Find the first valid entry. - while (!$this->valid()) { - if ($this->nextIterator() === false) { - return; - } - } - - // Mark the first file as found. - $this->found[$this->getFilename()] = true; - } - - /** - * @return string - */ - public function getUrl() - { - $path = $this->path . ($this->path[strlen($this->path) - 1] === '/' ? '' : '/'); - - return $path . $this->iterator->getFilename(); - } - - /** - * @param int $position - * @return void - */ - public function seek($position) - { - throw new \RuntimeException('Seek not implemented'); - } - - /** - * @return int - */ - public function getATime() - { - return $this->iterator->getATime(); - } - - /** - * @param string|null $suffix - * @return string - */ - public function getBasename($suffix = null) - { - return null !== $suffix ? $this->iterator->getBasename($suffix) : $this->iterator->getBasename(); - } - - /** - * @return int - */ - public function getCTime() - { - return $this->iterator->getCTime(); - } - - /** - * @return string - */ - public function getExtension() - { - return $this->iterator->getExtension(); - } - - /** - * @return string - */ - public function getFilename() - { - return $this->iterator->getFilename(); - } - - /** - * @return int - */ - public function getGroup() - { - return $this->iterator->getGroup(); - } - - /** - * @return int - */ - public function getInode() - { - return $this->iterator->getInode(); - } - - /** - * @return int - */ - public function getMTime() - { - return $this->iterator->getMTime(); - } - - /** - * @return int - */ - public function getOwner() - { - return $this->iterator->getOwner(); - } - - /** - * @return string - */ - public function getPath() - { - return $this->iterator->getPath(); - } - - /** - * @return string - */ - public function getPathname() - { - return $this->iterator->getPathname(); - } - - /** - * @return int - */ - public function getPerms() - { - return $this->iterator->getPerms(); - } - - /** - * @return int - */ - public function getSize() - { - return $this->iterator->getSize(); - } - - /** - * @return string - */ - public function getType() - { - return $this->iterator->getType(); - } - - /** - * @return bool - */ - public function isDir() - { - return $this->iterator->isDir(); - } - - /** - * @return bool - */ - public function isDot() - { - return $this->iterator->isDot(); - } - - /** - * @return bool - */ - public function isExecutable() - { - return $this->iterator->isExecutable(); - } - - /** - * @return bool - */ - public function isFile() - { - return $this->iterator->isFile(); - } - - /** - * @return bool - */ - public function isLink() - { - return $this->iterator->isLink(); - } - - /** - * @return bool - */ - public function isReadable() - { - return $this->iterator->isReadable(); - } - - /** - * @return bool - */ - public function isWritable() - { - return $this->iterator->isWritable(); - } - - /** - * @return string - */ - public function __toString() - { - return (string)$this->iterator; - } - - /** - * @return int - */ - public function getFlags() - { - return $this->flags !== null ? $this->flags : static::KEY_AS_PATHNAME | static::CURRENT_AS_SELF | static::SKIP_DOTS; - } - - /** - * @param int|null $flags - * @return void - */ - public function setFlags($flags = null) - { - $this->flags = $flags; - - $this->iterator->setFlags($this->getFlags()); - } - - /** - * @return string|null - */ - protected function findNext() - { - $this->iterator->next(); - - while (!$this->valid()) { - if ($this->nextIterator() === false) { - return null; - } - } - - return $this->getFilename(); - } - - /** - * @return bool - */ - protected function nextIterator() - { - // Move to the next iterator if it exists. - $path = array_shift($this->stack); - $hasNext = (null !== $path); - if ($hasNext) { - $this->iterator = new \FilesystemIterator($path, $this->getFlags()); - } - - return $hasNext; - } -} diff --git a/source/vendor/rockettheme/toolbox/ResourceLocator/src/UniformResourceLocator.php b/source/vendor/rockettheme/toolbox/ResourceLocator/src/UniformResourceLocator.php deleted file mode 100644 index c5c6feb..0000000 --- a/source/vendor/rockettheme/toolbox/ResourceLocator/src/UniformResourceLocator.php +++ /dev/null @@ -1,543 +0,0 @@ -base = rtrim(str_replace('\\', '/', $base ?: getcwd() ?: ''), '/'); - } - - /** - * Return iterator for the resource URI. - * - * @param string $uri - * @param int|null $flags See constants from FilesystemIterator class. - * @return UniformResourceIterator - */ - public function getIterator($uri, $flags = null) - { - return new UniformResourceIterator($uri, $flags, $this); - } - - /** - * Return recursive iterator for the resource URI. - * - * @param string $uri - * @param int|null $flags See constants from FilesystemIterator class. - * @return RecursiveUniformResourceIterator - */ - public function getRecursiveIterator($uri, $flags = null) - { - return new RecursiveUniformResourceIterator($uri, $flags, $this); - } - - /** - * Reset locator by removing all the schemes. - * - * @return $this - */ - public function reset() - { - $this->schemes = []; - $this->cache = []; - - return $this; - } - - /** - * Reset a locator scheme - * - * @param string $scheme The scheme to reset - * @return $this - */ - public function resetScheme($scheme) - { - $this->schemes[$scheme] = []; - $this->cache = []; - - return $this; - } - - /** - * Add new paths to the scheme. - * - * @param string $scheme - * @param string $prefix - * @param string|array $paths - * @param bool|string|string[] $override True to add path as override, string - * @param bool $force True to add paths even if them do not exist. - * @return void - * @throws \BadMethodCallException - */ - public function addPath($scheme, $prefix, $paths, $override = false, $force = false) - { - $list = []; - - /** @var array $paths */ - $paths = (array)$paths; - foreach ($paths as $path) { - if (\is_array($path)) { - // Support stream lookup in ['theme', 'path/to'] format. - if (\count($path) !== 2 || !\is_string($path[0]) || !\is_string($path[1])) { - throw new \BadMethodCallException('Invalid stream path given.'); - } - $list[] = $path; - } elseif (false !== strpos($path, '://')) { - // Support stream lookup in 'theme://path/to' format. - $stream = explode('://', $path, 2); - $stream[1] = trim($stream[1], '/'); - - $list[] = $stream; - } else { - // Normalize path. - $path = rtrim(str_replace('\\', '/', $path), '/'); - if ($force || @file_exists("{$this->base}/{$path}") || @file_exists($path)) { - // Support for absolute and relative paths. - $list[] = $path; - } - } - } - - if (isset($this->schemes[$scheme][$prefix])) { - $paths = $this->schemes[$scheme][$prefix]; - if (!$override || $override == 1) { - $list = $override ? array_merge($paths, $list) : array_merge($list, $paths); - } else { - if (is_string($override) && false !== strpos($override, '://')) { - // Support stream lookup in 'theme://path/to' format. - $override = explode('://', $override, 2); - $override[1] = trim($override[1], '/'); - } - $location = (int)array_search($override, $paths, true) ?: \count($paths); - array_splice($paths, $location, 0, $list); - $list = $paths; - } - } - - $this->schemes[$scheme][$prefix] = $list; - - // Sort in reverse order to get longer prefixes to be matched first. - krsort($this->schemes[$scheme]); - - $this->cache = []; - } - - /** - * Return base directory. - * - * @return string - */ - public function getBase() - { - return $this->base; - } - - - /** - * Return true if scheme has been defined. - * - * @param string $name - * @return bool - */ - public function schemeExists($name) - { - return isset($this->schemes[$name]); - } - - /** - * Return defined schemes. - * - * @return array - */ - public function getSchemes() - { - return array_keys($this->schemes); - } - - /** - * Return all scheme lookup paths. - * - * @param string $scheme - * @return array - */ - public function getPaths($scheme = null) - { - if (null !== $scheme) { - return isset($this->schemes[$scheme]) ? $this->schemes[$scheme] : []; - } - - return $this->schemes; - } - - /** - * @param string $uri - * @return string|false - * @throws \BadMethodCallException - */ - public function __invoke($uri) - { - if (!\is_string($uri)) { - throw new \BadMethodCallException('Invalid parameter $uri.'); - } - - /** @var string|false $cached */ - $cached = $this->findCached($uri, false, true, false); - - return $cached; - } - - /** - * Returns true if uri is resolvable by using locator. - * - * @param string $uri - * @return bool - */ - public function isStream($uri) - { - try { - list ($scheme,) = $this->normalize($uri, true, true); - } catch (\Exception $e) { - return false; - } - - return $this->schemeExists($scheme); - } - - /** - * Returns the canonicalized URI on success. The resulting path will have no '/./' or '/../' components. - * Trailing delimiter `/` is kept. - * - * By default (if $throwException parameter is not set to true) returns false on failure. - * - * @param string $uri - * @param bool $throwException - * @param bool $splitStream - * @return string|array|false - * @throws \BadMethodCallException - */ - public function normalize($uri, $throwException = false, $splitStream = false) - { - if (!\is_string($uri)) { - if ($throwException) { - throw new \BadMethodCallException('Invalid parameter $uri.'); - } - - return false; - } - - $uri = (string)preg_replace('|\\\|u', '/', $uri); - $segments = explode('://', $uri, 2); - $path = array_pop($segments); - $scheme = array_pop($segments) ?: 'file'; - - if ($path) { - $path = (string)preg_replace('|\\\|u', '/', $path); - $parts = explode('/', $path); - - $list = []; - foreach ($parts as $i => $part) { - if ($part === '..') { - $part = array_pop($list); - if ($part === null || $part === '' || (!$list && strpos($part, ':'))) { - if ($throwException) { - throw new \BadMethodCallException('Invalid parameter $uri.'); - } - - return false; - } - } elseif (($i && $part === '') || $part === '.') { - continue; - } else { - $list[] = $part; - } - } - - if (($l = end($parts)) === '' || $l === '.' || $l === '..') { - $list[] = ''; - } - - $path = implode('/', $list); - } - - if ($splitStream) { - return [$scheme, $path]; - } - - return $scheme !== 'file' ? "{$scheme}://{$path}" : $path; - } - - /** - * Get resource path. If resource does not exist, return path with highest priority. - * - * @param string $uri Input URI to be searched. - * @param bool $absolute Whether to return absolute path. - * @return string - * @throws \BadMethodCallException - */ - public function getResource($uri, $absolute = true) - { - $path = $this->findResource($uri, $absolute); - if ($path === false) { - $path = $this->findResource($uri, $absolute, true); - if ($path === false) { - $path = ''; - } - } - - return $path; - } - - /** - * Find highest priority instance from a resource. - * - * @param string $uri Input URI to be searched. - * @param bool $absolute Whether to return absolute path. - * @param bool $first Whether to return first path even if it doesn't exist. - * @return string|false - * @throws \BadMethodCallException - */ - public function findResource($uri, $absolute = true, $first = false) - { - if (!\is_string($uri)) { - throw new \BadMethodCallException('Invalid parameter $uri.'); - } - - /** @var string|false $cached */ - $cached = $this->findCached($uri, false, $absolute, $first); - - return $cached; - } - - /** - * Find all instances from a resource. - * - * @param string $uri Input URI to be searched. - * @param bool $absolute Whether to return absolute path. - * @param bool $all Whether to return all paths even if they don't exist. - * @return array - * @throws \BadMethodCallException - */ - public function findResources($uri, $absolute = true, $all = false) - { - if (!\is_string($uri)) { - throw new \BadMethodCallException('Invalid parameter $uri.'); - } - - /** @var array $cached */ - $cached = $this->findCached($uri, true, $absolute, $all); - - return $cached; - } - - /** - * Find all instances from a list of resources. - * - * @param array $uris Input URIs to be searched. - * @param bool $absolute Whether to return absolute path. - * @param bool $all Whether to return all paths even if they don't exist. - * @return array - * @throws \BadMethodCallException - */ - public function mergeResources(array $uris, $absolute = true, $all = false) - { - $uris = array_unique($uris); - - $lists = [[]]; - foreach ($uris as $uri) { - $lists[] = $this->findResources($uri, $absolute, $all); - } - - return array_merge(...$lists); - } - - /** - * Pre-fill cache by a stream. - * - * @param string $uri - * @return $this - */ - public function fillCache($uri) - { - $cacheKey = $uri . '@cache'; - - if (!isset($this->cache[$cacheKey])) { - $this->cache[$cacheKey] = true; - - $iterator = new \RecursiveIteratorIterator($this->getRecursiveIterator($uri), \RecursiveIteratorIterator::SELF_FIRST); - - /** @var UniformResourceIterator $item */ - foreach ($iterator as $item) { - $key = $item->getUrl() . '@010'; - $this->cache[$key] = $item->getPathname(); - } - } - - return $this; - } - - /** - * Reset locator cache. - * - * @param string $uri - * @return $this - */ - public function clearCache($uri = null) - { - if ($uri) { - $this->clearCached($uri, true, true, true); - $this->clearCached($uri, true, true, false); - $this->clearCached($uri, true, false, true); - $this->clearCached($uri, true, false, false); - $this->clearCached($uri, false, true, true); - $this->clearCached($uri, false, true, false); - $this->clearCached($uri, false, false, true); - $this->clearCached($uri, false, false, false); - } else { - $this->cache = []; - } - - return $this; - } - - /** - * @param string $uri - * @param bool $array - * @param bool $absolute - * @param bool $all - * @return array|string|false - * @throws \BadMethodCallException - */ - protected function findCached($uri, $array, $absolute, $all) - { - // Local caching: make sure that the function gets only called at once for each file. - $key = $uri .'@'. (int) $array . (int) $absolute . (int) $all; - - if (!isset($this->cache[$key])) { - try { - list ($scheme, $file) = $this->normalize($uri, true, true); - - if (!$file && $scheme === 'file') { - $file = $this->base; - } - - $this->cache[$key] = $this->find($scheme, $file, $array, $absolute, $all); - - } catch (\BadMethodCallException $e) { - $this->cache[$key] = $array ? [] : false; - } - } - - return $this->cache[$key]; - } - - /** - * @param string $uri - * @param bool $array - * @param bool $absolute - * @param bool $all - * @return void - */ - protected function clearCached($uri, $array, $absolute, $all) - { - // Local caching: make sure that the function gets only called at once for each file. - $key = $uri .'@'. (int) $array . (int) $absolute . (int) $all; - - unset($this->cache[$key]); - } - - /** - * @param string $scheme - * @param string $file - * @param bool $array - * @param bool $absolute - * @param bool $all - * @return array|string|false - * @throws \InvalidArgumentException - * @internal - */ - protected function find($scheme, $file, $array, $absolute, $all) - { - if (!isset($this->schemes[$scheme])) { - throw new \InvalidArgumentException("Invalid resource {$scheme}://"); - } - - $results = $array ? [] : false; - foreach ($this->schemes[$scheme] as $prefix => $paths) { - if ($prefix && strpos($file, $prefix) !== 0) { - continue; - } - - // Remove prefix from filename. - $filename = '/' . trim(substr($file, \strlen($prefix)), '\/'); - - foreach ($paths as $path) { - if (\is_array($path)) { - // Handle scheme lookup. - $relPath = trim($path[1] . $filename, '/'); - $found = $this->find($path[0], $relPath, $array, $absolute, $all); - if ($found) { - if (!\is_array($found)) { - return $found; - } - $results = array_merge($results, $found); - } - } else { - // TODO: We could provide some extra information about the path to remove preg_match(). - // Check absolute paths for both unix and windows - if (!$path || !preg_match('`^/|\w+:`', $path)) { - // Handle relative path lookup. - $relPath = trim($path . $filename, '/'); - $fullPath = $this->base . '/' . $relPath; - } else { - // Handle absolute path lookup. - $relPath = null; - $fullPath = rtrim($path . $filename, '/'); - } - - if ($all || file_exists($fullPath)) { - if ($absolute) { - $current = $fullPath; - } elseif (null === $relPath) { - throw new \RuntimeException("UniformResourceLocator: Absolute stream path with relative lookup not allowed ({$prefix})", 500); - } else { - $current = $relPath; - } - - if (!$array) { - return $current; - } - $results[] = $current; - } - } - } - } - - return $results; - } -} diff --git a/source/vendor/rockettheme/toolbox/Session/src/Message.php b/source/vendor/rockettheme/toolbox/Session/src/Message.php deleted file mode 100644 index 568e99c..0000000 --- a/source/vendor/rockettheme/toolbox/Session/src/Message.php +++ /dev/null @@ -1,93 +0,0 @@ - $message, 'scope' => $scope]; - - // don't add duplicates - if (!array_key_exists($key, $this->messages)) { - $this->messages[$key] = $item; - } - - return $this; - } - - /** - * Clear message queue. - * - * @param string|null $scope - * @return $this - */ - public function clear($scope = null) - { - if ($scope === null) { - $this->messages = []; - } else { - foreach ($this->messages as $key => $message) { - if ($message['scope'] === $scope) { - unset($this->messages[$key]); - } - } - } - return $this; - } - - /** - * Fetch all messages. - * - * @param string|null $scope - * @return array - */ - public function all($scope = null) - { - if ($scope === null) { - return array_values($this->messages); - } - - $messages = []; - foreach ($this->messages as $message) { - if ($message['scope'] === $scope) { - $messages[] = $message; - } - } - - return $messages; - } - - /** - * Fetch and clear message queue. - * - * @param string|null $scope - * @return array - */ - public function fetch($scope = null) - { - $messages = $this->all($scope); - $this->clear($scope); - - return $messages; - } - -} diff --git a/source/vendor/rockettheme/toolbox/Session/src/Session.php b/source/vendor/rockettheme/toolbox/Session/src/Session.php deleted file mode 100644 index 852d7af..0000000 --- a/source/vendor/rockettheme/toolbox/Session/src/Session.php +++ /dev/null @@ -1,268 +0,0 @@ -isSessionStarted()) { - session_unset(); - session_destroy(); - } - - // Disable transparent sid support - ini_set('session.use_trans_sid', '0'); - - // Only allow cookies - ini_set('session.use_cookies', '1'); - - session_name('msF9kJcW'); - session_set_cookie_params($lifetime, $path, $domain); - - /** @var callable(): void $callable */ - $callable = [$this, 'close']; - - register_shutdown_function($callable); - session_cache_limiter('nocache'); - - self::$instance = $this; - } - - /** - * Get current session instance. - * - * @return Session - * @throws \RuntimeException - */ - public function instance() - { - if (null === self::$instance) { - throw new \RuntimeException("Session hasn't been initialized.", 500); - } - - return self::$instance; - } - - /** - * Starts the session storage - * - * @return $this - * @throws \RuntimeException - */ - public function start() - { - // Protection against invalid session cookie names throwing exception: http://php.net/manual/en/function.session-id.php#116836 - if (isset($_COOKIE[session_name()]) && !preg_match('/^[-,a-zA-Z0-9]{1,128}$/', $_COOKIE[session_name()])) { - unset($_COOKIE[session_name()]); - } - - if (!session_start()) { - throw new \RuntimeException('Failed to start session.', 500); - } - - $this->started = true; - - return $this; - } - - /** - * Get session ID - * - * @return string|null Session ID - */ - public function getId() - { - return session_id() ?: null; - } - - /** - * Set session Id - * - * @param string $id Session ID - * @return $this - */ - public function setId($id) - { - session_id($id); - - return $this; - } - - - /** - * Get session name - * - * @return string|null - */ - public function getName() - { - return session_name() ?: null; - } - - /** - * Set session name - * - * @param string $name - * @return $this - */ - public function setName($name) - { - session_name($name); - - return $this; - } - - /** - * Invalidates the current session. - * - * @return $this - */ - public function invalidate() - { - $name = $this->getName(); - if (null !== $name) { - $params = session_get_cookie_params(); - setcookie($name, '', time() - 42000, - $params['path'], $params['domain'], - $params['secure'], $params['httponly'] - ); - } - - session_unset(); - session_destroy(); - - $this->started = false; - - return $this; - } - - /** - * Force the session to be saved and closed - * - * @return $this - */ - public function close() - { - if ($this->started) { - session_write_close(); - } - - $this->started = false; - - return $this; - } - - /** - * Checks if an attribute is defined. - * - * @param string $name The attribute name - * @return bool True if the attribute is defined, false otherwise - */ - public function __isset($name) - { - return isset($_SESSION[$name]); - } - - /** - * Returns an attribute. - * - * @param string $name The attribute name - * @return mixed - */ - public function __get($name) - { - return isset($_SESSION[$name]) ? $_SESSION[$name] : null; - } - - /** - * Sets an attribute. - * - * @param string $name - * @param mixed $value - * @return void - */ - public function __set($name, $value) - { - $_SESSION[$name] = $value; - } - - /** - * Removes an attribute. - * - * @param string $name - * @return void - */ - public function __unset($name) - { - unset($_SESSION[$name]); - } - - /** - * Returns attributes. - * - * @return array Attributes - */ - public function all() - { - return $_SESSION; - } - - - /** - * Retrieve an external iterator - * - * @return \ArrayIterator Return an ArrayIterator of $_SESSION - */ - public function getIterator() - { - return new \ArrayIterator($_SESSION); - } - - /** - * Checks if the session was started. - * - * @return bool - */ - public function started() - { - return $this->started; - } - - /** - * http://php.net/manual/en/function.session-status.php#113468 - * Check if session is started nicely. - * - * @return bool - */ - protected function isSessionStarted() - { - return php_sapi_name() !== 'cli' ? session_id() !== '' : false; - } -} diff --git a/source/vendor/rockettheme/toolbox/StreamWrapper/src/ReadOnlyStream.php b/source/vendor/rockettheme/toolbox/StreamWrapper/src/ReadOnlyStream.php deleted file mode 100644 index 48311ea..0000000 --- a/source/vendor/rockettheme/toolbox/StreamWrapper/src/ReadOnlyStream.php +++ /dev/null @@ -1,140 +0,0 @@ -getPath($uri); - - if (!$path) { - if ($options & STREAM_REPORT_ERRORS) { - trigger_error(sprintf('stream_open(): path for %s does not exist', $uri), E_USER_WARNING); - } - - return false; - } - - $this->uri = $uri; - - $handle = ($options & STREAM_REPORT_ERRORS) ? fopen($path, $mode) : @fopen($path, $mode); - if ($handle) { - $this->handle = $handle; - - return true; - } - - return false; - } - - /** - * @param int $operation - * @return bool - */ - public function stream_lock($operation) - { - // Disallow exclusive lock or non-blocking lock requests - if (!\in_array($operation, [LOCK_SH, LOCK_UN, LOCK_SH | LOCK_NB], true)) { - trigger_error( - sprintf('stream_lock() exclusive lock operations not allowed for %s', $this->uri), - E_USER_WARNING - ); - - return false; - } - - return flock($this->handle, $operation); - } - - /** - * @param string $uri - * @param int $option - * @param mixed $value - * @return bool - */ - public function stream_metadata($uri, $option, $value) - { - if ($option !== STREAM_META_TOUCH) { - throw new \BadMethodCallException(sprintf('stream_metadata() not allowed for %s', $uri)); - } - - return parent::stream_metadata($uri, $option, $value); - } - - /** - * @param string $data - * @return int|false - */ - public function stream_write($data) - { - throw new \BadMethodCallException(sprintf('stream_write() not allowed for %s', $this->uri)); - } - - /** - * @param string $uri - * @return bool - */ - public function unlink($uri) - { - throw new \BadMethodCallException(sprintf('unlink() not allowed for %s', $uri)); - } - - /** - * @param string $from_uri - * @param string $to_uri - * @return bool - */ - public function rename($from_uri, $to_uri) - { - throw new \BadMethodCallException(sprintf('rename() not allowed for %s', $from_uri)); - } - - /** - * @param string $uri - * @param int $mode - * @param int $options - * @return bool - */ - public function mkdir($uri, $mode, $options) - { - throw new \BadMethodCallException(sprintf('mkdir() not allowed for %s', $uri)); - } - - /** - * @param string $uri - * @param int $options - * @return bool - */ - public function rmdir($uri, $options) - { - throw new \BadMethodCallException(sprintf('rmdir() not allowed for %s', $uri)); - } -} diff --git a/source/vendor/rockettheme/toolbox/StreamWrapper/src/Stream.php b/source/vendor/rockettheme/toolbox/StreamWrapper/src/Stream.php deleted file mode 100644 index 1b8a49c..0000000 --- a/source/vendor/rockettheme/toolbox/StreamWrapper/src/Stream.php +++ /dev/null @@ -1,410 +0,0 @@ -getPath($uri, $mode); - - if (!$path) { - if ($options & STREAM_REPORT_ERRORS) { - trigger_error(sprintf('stream_open(): path for %s does not exist', $uri), E_USER_WARNING); - } - - return false; - } - - $this->uri = $uri; - - $handle = ($options & STREAM_REPORT_ERRORS) ? fopen($path, $mode) : @fopen($path, $mode); - if ($handle) { - $this->handle = $handle; - - if (static::$locator instanceof UniformResourceLocator && !\in_array($mode, ['r', 'rb', 'rt'], true)) { - static::$locator->clearCache($this->uri); - } - - return true; - } - - return false; - } - - /** - * @return bool - */ - public function stream_close() - { - return fclose($this->handle); - } - - /** - * @param int $operation - * @return bool - */ - public function stream_lock($operation) - { - if (\in_array($operation, [LOCK_SH, LOCK_EX, LOCK_UN, LOCK_NB], true)) { - return flock($this->handle, $operation); - } - - return false; - } - - /** - * @param string $uri - * @param int $option - * @param mixed $value - * @return bool - */ - public function stream_metadata($uri, $option, $value) - { - $path = $this->findPath($uri); - if ($path) { - switch ($option) { - case STREAM_META_TOUCH: - list($time, $atime) = $value; - return touch($path, $time, $atime); - - case STREAM_META_OWNER_NAME: - case STREAM_META_OWNER: - return chown($path, $value); - - case STREAM_META_GROUP_NAME: - case STREAM_META_GROUP: - return chgrp($path, $value); - - case STREAM_META_ACCESS: - return chmod($path, $value); - } - } - - return false; - } - - /** - * @param int $count - * @return string|false - */ - public function stream_read($count) - { - return fread($this->handle, $count); - } - - /** - * @param string $data - * @return int|false - */ - public function stream_write($data) - { - return fwrite($this->handle, $data); - } - - /** - * @return bool - */ - public function stream_eof() - { - return feof($this->handle); - } - - /** - * @param int $offset - * @param int $whence - * @return bool - */ - public function stream_seek($offset, $whence) - { - // fseek returns 0 on success and -1 on a failure. - return !fseek($this->handle, $offset, $whence); - } - - /** - * @return bool - */ - public function stream_flush() - { - return fflush($this->handle); - } - - /** - * @return int|false - */ - public function stream_tell() - { - return ftell($this->handle); - } - - /** - * @return array - */ - public function stream_stat() - { - return fstat($this->handle) ?: []; - } - - /** - * @param int $option - * @param int $arg1 - * @param int $arg2 - * @return bool|int - */ - public function stream_set_option($option, $arg1, $arg2) - { - switch ($option) { - case STREAM_OPTION_BLOCKING: - return stream_set_blocking($this->handle, (bool)$arg1); - case STREAM_OPTION_READ_TIMEOUT: - return stream_set_timeout($this->handle, $arg1, $arg2); - case STREAM_OPTION_WRITE_BUFFER: - return stream_set_write_buffer($this->handle, $arg2); - default: - return false; - } - } - - /** - * @param string $uri - * @return bool - */ - public function unlink($uri) - { - $path = $this->getPath($uri); - - if (!$path) { - return false; - } - - return unlink($path); - } - - /** - * @param string $fromUri - * @param string $toUri - * @return bool - */ - public function rename($fromUri, $toUri) - { - $fromPath = $this->getPath($fromUri); - $toPath = $this->getPath($toUri, 'w'); - - if (!$fromPath || !$toPath) { - return false; - } - - if (static::$locator instanceof UniformResourceLocator) { - static::$locator->clearCache($fromUri); - static::$locator->clearCache($toUri); - } - - return rename($fromPath, $toPath); - } - - /** - * @param string $uri - * @param int $mode - * @param int $options - * @return bool - */ - public function mkdir($uri, $mode, $options) - { - $recursive = (bool) ($options & STREAM_MKDIR_RECURSIVE); - $path = $this->getPath($uri, $recursive ? 'd' : 'w'); - - if (!$path) { - if ($options & STREAM_REPORT_ERRORS) { - trigger_error(sprintf('mkdir(): Could not create directory for %s', $uri), E_USER_WARNING); - } - - return false; - } - - if (static::$locator instanceof UniformResourceLocator) { - static::$locator->clearCache($uri); - } - - return ($options & STREAM_REPORT_ERRORS) ? mkdir($path, $mode, $recursive) : @mkdir($path, $mode, $recursive); - } - - /** - * @param string $uri - * @param int $options - * @return bool - */ - public function rmdir($uri, $options) - { - $path = $this->getPath($uri); - - if (!$path) { - if ($options & STREAM_REPORT_ERRORS) { - trigger_error(sprintf('rmdir(): Directory not found for %s', $uri), E_USER_WARNING); - } - - return false; - } - - if (static::$locator instanceof UniformResourceLocator) { - static::$locator->clearCache($uri); - } - - return ($options & STREAM_REPORT_ERRORS) ? rmdir($path) : @rmdir($path); - } - - /** - * @param string $uri - * @param int $flags - * @return array|false - */ - public function url_stat($uri, $flags) - { - $path = $this->getPath($uri); - - if (!$path) { - return false; - } - - // Suppress warnings if requested or if the file or directory does not - // exist. This is consistent with PHPs plain filesystem stream wrapper. - return ($flags & STREAM_URL_STAT_QUIET || !file_exists($path)) ? @stat($path) : stat($path); - } - - /** - * @param string $uri - * @param int $options - * @return bool - */ - public function dir_opendir($uri, $options) - { - $path = $this->getPath($uri); - - if ($path === false) { - return false; - } - - $this->uri = $uri; - - $handle = opendir($path); - if ($handle) { - $this->handle = $handle; - - return true; - } - - return false; - } - - /** - * @return string|false - */ - public function dir_readdir() - { - return readdir($this->handle); - } - - /** - * @return bool - */ - public function dir_rewinddir() - { - rewinddir($this->handle); - - return true; - } - - /** - * @return bool - */ - public function dir_closedir() - { - closedir($this->handle); - - return true; - } - - /** - * @param string $uri - * @param string|null $mode - * @return string|false - */ - protected function getPath($uri, $mode = null) - { - if ($mode === null) { - $mode = 'r'; - } - - $path = $this->findPath($uri); - - if ($path && file_exists($path)) { - return $path; - } - - if (strpos($mode[0], 'r') === 0) { - return false; - } - - // We are either opening a file or creating directory. - list($scheme, $target) = explode('://', $uri, 2); - - if ($target === '') { - return false; - } - $target = explode('/', $target); - $filename = []; - - do { - $filename[] = array_pop($target); - - $path = $this->findPath($scheme . '://' . implode('/', $target)); - } while ($target && !$path); - - if (!$path) { - return false; - } - - return $path . '/' . implode('/', array_reverse($filename)); - } - - /** - * @param string $uri - * @return string|false - */ - protected function findPath($uri) - { - return static::$locator && static::$locator->isStream($uri) ? static::$locator->findResource($uri) : false; - } -} diff --git a/source/vendor/rockettheme/toolbox/StreamWrapper/src/StreamBuilder.php b/source/vendor/rockettheme/toolbox/StreamWrapper/src/StreamBuilder.php deleted file mode 100644 index 3b56781..0000000 --- a/source/vendor/rockettheme/toolbox/StreamWrapper/src/StreamBuilder.php +++ /dev/null @@ -1,93 +0,0 @@ - $handler) { - $this->add($scheme, $handler); - } - } - - /** - * @param string $scheme - * @param string $handler - * @return $this - * @throws \InvalidArgumentException - */ - public function add($scheme, $handler) - { - if (isset($this->items[$scheme])) { - if ($handler === $this->items[$scheme]) { - return $this; - } - throw new \InvalidArgumentException("Stream '{$scheme}' has already been initialized."); - } - - if (!is_subclass_of($handler, StreamInterface::class)) { - throw new \InvalidArgumentException("Stream '{$scheme}' has unknown or invalid type."); - } - - if (!@stream_wrapper_register($scheme, $handler)) { - throw new \InvalidArgumentException("Stream '{$scheme}' could not be initialized."); - } - - $this->items[$scheme] = $handler; - - return $this; - } - - /** - * @param string $scheme - * @return $this - */ - public function remove($scheme) - { - if (isset($this->items[$scheme])) { - stream_wrapper_unregister($scheme); - unset($this->items[$scheme]); - } - - return $this; - } - - /** - * @return array - */ - public function getStreams() - { - return $this->items; - } - - /** - * @param string $scheme - * @return bool - */ - public function isStream($scheme) - { - return isset($this->items[$scheme]); - } - - /** - * @param string $scheme - * @return StreamInterface|null - */ - public function getStreamType($scheme) - { - return isset($this->items[$scheme]) ? $this->items[$scheme] : null; - } -} diff --git a/source/vendor/rockettheme/toolbox/StreamWrapper/src/StreamInterface.php b/source/vendor/rockettheme/toolbox/StreamWrapper/src/StreamInterface.php deleted file mode 100644 index bfaf790..0000000 --- a/source/vendor/rockettheme/toolbox/StreamWrapper/src/StreamInterface.php +++ /dev/null @@ -1,267 +0,0 @@ - Prompts the user for input and hides what they type. If this fails for any - > reason and `$allowFallback` is set to `true` the prompt will be done using - > the usual `fgets()` and characters will be visible. - -- `Seld\CliPrompt\CliPrompt::prompt();` - - > Regular user prompt for input with characters being shown on screen. - -In both cases, the trailing newline the user enters when submitting the answer -is trimmed. - -Requirements ------------- - -PHP 5.3 and above - -License -------- - -CLI-Prompt is licensed under the MIT License - see the LICENSE file for details - -Acknowledgments ---------------- - -- This project uses hiddeninput.exe to prompt for passwords on Windows, sources - and details can be found on the [github page of the project](https://github.com/Seldaek/hidden-input). diff --git a/source/vendor/seld/cli-prompt/res/example.php b/source/vendor/seld/cli-prompt/res/example.php deleted file mode 100644 index 5ce5b23..0000000 --- a/source/vendor/seld/cli-prompt/res/example.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Seld\CliPrompt; - -class CliPrompt -{ - /** - * Prompts the user for input and shows what they type - * - * @return string - */ - public static function prompt() - { - $stdin = fopen('php://stdin', 'r'); - if (false === $stdin) { - throw new \RuntimeException('Failed to open STDIN, could not prompt user for input.'); - } - $answer = self::trimAnswer(fgets($stdin, 4096)); - fclose($stdin); - - return $answer; - } - - /** - * Prompts the user for input and hides what they type - * - * @param bool $allowFallback If prompting fails for any reason and this is set to true the prompt - * will be done using the regular prompt() function, otherwise a - * \RuntimeException is thrown. - * @return string - * @throws \RuntimeException on failure to prompt, unless $allowFallback is true - */ - public static function hiddenPrompt($allowFallback = false) - { - // handle windows - if (defined('PHP_WINDOWS_VERSION_BUILD')) { - // fallback to hiddeninput executable - $exe = __DIR__.'\\..\\res\\hiddeninput.exe'; - - // handle code running from a phar - if ('phar:' === substr(__FILE__, 0, 5)) { - $tmpExe = sys_get_temp_dir().'/hiddeninput.exe'; - - // use stream_copy_to_stream instead of copy - // to work around https://bugs.php.net/bug.php?id=64634 - $source = fopen($exe, 'r'); - $target = fopen($tmpExe, 'w+'); - if (false === $source) { - throw new \RuntimeException('Failed to open '.$exe.' for reading.'); - } - if (false === $target) { - throw new \RuntimeException('Failed to open '.$tmpExe.' for writing.'); - } - stream_copy_to_stream($source, $target); - fclose($source); - fclose($target); - unset($source, $target); - - $exe = $tmpExe; - } - - $output = shell_exec($exe); - - // clean up - if (isset($tmpExe)) { - unlink($tmpExe); - } - - if ($output !== null) { - // output a newline to be on par with the regular prompt() - echo PHP_EOL; - - return self::trimAnswer($output); - } - } - - if (file_exists('/usr/bin/env')) { - // handle other OSs with bash/zsh/ksh/csh if available to hide the answer - $test = "/usr/bin/env %s -c 'echo OK' 2> /dev/null"; - foreach (array('bash', 'zsh', 'ksh', 'csh', 'sh') as $sh) { - $output = shell_exec(sprintf($test, $sh)); - if (is_string($output) && 'OK' === rtrim($output)) { - $shell = $sh; - break; - } - } - - if (isset($shell)) { - $readCmd = ($shell === 'csh') ? 'set mypassword = $<' : 'read -r mypassword'; - $command = sprintf("/usr/bin/env %s -c 'stty -echo; %s; stty echo; echo \$mypassword'", $shell, $readCmd); - $output = shell_exec($command); - - if ($output !== null) { - // output a newline to be on par with the regular prompt() - echo PHP_EOL; - - return self::trimAnswer($output); - } - } - } - - // not able to hide the answer - if (!$allowFallback) { - throw new \RuntimeException('Could not prompt for input in a secure fashion, aborting'); - } - - return self::prompt(); - } - - /** - * @param string|bool $str - * @return string - */ - private static function trimAnswer($str) - { - return preg_replace('{\r?\n$}D', '', (string) $str) ?: ''; - } -} diff --git a/source/vendor/symfony/console/Application.php b/source/vendor/symfony/console/Application.php deleted file mode 100644 index 15d537d..0000000 --- a/source/vendor/symfony/console/Application.php +++ /dev/null @@ -1,1278 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Command\HelpCommand; -use Symfony\Component\Console\Command\ListCommand; -use Symfony\Component\Console\CommandLoader\CommandLoaderInterface; -use Symfony\Component\Console\Event\ConsoleCommandEvent; -use Symfony\Component\Console\Event\ConsoleErrorEvent; -use Symfony\Component\Console\Event\ConsoleTerminateEvent; -use Symfony\Component\Console\Exception\CommandNotFoundException; -use Symfony\Component\Console\Exception\ExceptionInterface; -use Symfony\Component\Console\Exception\LogicException; -use Symfony\Component\Console\Exception\NamespaceNotFoundException; -use Symfony\Component\Console\Formatter\OutputFormatter; -use Symfony\Component\Console\Helper\DebugFormatterHelper; -use Symfony\Component\Console\Helper\FormatterHelper; -use Symfony\Component\Console\Helper\Helper; -use Symfony\Component\Console\Helper\HelperSet; -use Symfony\Component\Console\Helper\ProcessHelper; -use Symfony\Component\Console\Helper\QuestionHelper; -use Symfony\Component\Console\Input\ArgvInput; -use Symfony\Component\Console\Input\ArrayInput; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputAwareInterface; -use Symfony\Component\Console\Input\InputDefinition; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\ConsoleOutput; -use Symfony\Component\Console\Output\ConsoleOutputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\Debug\ErrorHandler as LegacyErrorHandler; -use Symfony\Component\Debug\Exception\FatalThrowableError; -use Symfony\Component\ErrorHandler\ErrorHandler; -use Symfony\Component\EventDispatcher\EventDispatcherInterface; -use Symfony\Component\EventDispatcher\LegacyEventDispatcherProxy; -use Symfony\Contracts\Service\ResetInterface; - -/** - * An Application is the container for a collection of commands. - * - * It is the main entry point of a Console application. - * - * This class is optimized for a standard CLI environment. - * - * Usage: - * - * $app = new Application('myapp', '1.0 (stable)'); - * $app->add(new SimpleCommand()); - * $app->run(); - * - * @author Fabien Potencier - */ -class Application implements ResetInterface -{ - private $commands = []; - private $wantHelps = false; - private $runningCommand; - private $name; - private $version; - private $commandLoader; - private $catchExceptions = true; - private $autoExit = true; - private $definition; - private $helperSet; - private $dispatcher; - private $terminal; - private $defaultCommand; - private $singleCommand = false; - private $initialized; - - /** - * @param string $name The name of the application - * @param string $version The version of the application - */ - public function __construct(string $name = 'UNKNOWN', string $version = 'UNKNOWN') - { - $this->name = $name; - $this->version = $version; - $this->terminal = new Terminal(); - $this->defaultCommand = 'list'; - } - - /** - * @final since Symfony 4.3, the type-hint will be updated to the interface from symfony/contracts in 5.0 - */ - public function setDispatcher(EventDispatcherInterface $dispatcher) - { - $this->dispatcher = LegacyEventDispatcherProxy::decorate($dispatcher); - } - - public function setCommandLoader(CommandLoaderInterface $commandLoader) - { - $this->commandLoader = $commandLoader; - } - - /** - * Runs the current application. - * - * @return int 0 if everything went fine, or an error code - * - * @throws \Exception When running fails. Bypass this when {@link setCatchExceptions()}. - */ - public function run(InputInterface $input = null, OutputInterface $output = null) - { - if (\function_exists('putenv')) { - @putenv('LINES='.$this->terminal->getHeight()); - @putenv('COLUMNS='.$this->terminal->getWidth()); - } - - if (null === $input) { - $input = new ArgvInput(); - } - - if (null === $output) { - $output = new ConsoleOutput(); - } - - $renderException = function (\Throwable $e) use ($output) { - if ($output instanceof ConsoleOutputInterface) { - $this->renderThrowable($e, $output->getErrorOutput()); - } else { - $this->renderThrowable($e, $output); - } - }; - if ($phpHandler = set_exception_handler($renderException)) { - restore_exception_handler(); - if (!\is_array($phpHandler) || (!$phpHandler[0] instanceof ErrorHandler && !$phpHandler[0] instanceof LegacyErrorHandler)) { - $errorHandler = true; - } elseif ($errorHandler = $phpHandler[0]->setExceptionHandler($renderException)) { - $phpHandler[0]->setExceptionHandler($errorHandler); - } - } - - $this->configureIO($input, $output); - - try { - $exitCode = $this->doRun($input, $output); - } catch (\Exception $e) { - if (!$this->catchExceptions) { - throw $e; - } - - $renderException($e); - - $exitCode = $e->getCode(); - if (is_numeric($exitCode)) { - $exitCode = (int) $exitCode; - if (0 === $exitCode) { - $exitCode = 1; - } - } else { - $exitCode = 1; - } - } finally { - // if the exception handler changed, keep it - // otherwise, unregister $renderException - if (!$phpHandler) { - if (set_exception_handler($renderException) === $renderException) { - restore_exception_handler(); - } - restore_exception_handler(); - } elseif (!$errorHandler) { - $finalHandler = $phpHandler[0]->setExceptionHandler(null); - if ($finalHandler !== $renderException) { - $phpHandler[0]->setExceptionHandler($finalHandler); - } - } - } - - if ($this->autoExit) { - if ($exitCode > 255) { - $exitCode = 255; - } - - exit($exitCode); - } - - return $exitCode; - } - - /** - * Runs the current application. - * - * @return int 0 if everything went fine, or an error code - */ - public function doRun(InputInterface $input, OutputInterface $output) - { - if (true === $input->hasParameterOption(['--version', '-V'], true)) { - $output->writeln($this->getLongVersion()); - - return 0; - } - - try { - // Makes ArgvInput::getFirstArgument() able to distinguish an option from an argument. - $input->bind($this->getDefinition()); - } catch (ExceptionInterface $e) { - // Errors must be ignored, full binding/validation happens later when the command is known. - } - - $name = $this->getCommandName($input); - if (true === $input->hasParameterOption(['--help', '-h'], true)) { - if (!$name) { - $name = 'help'; - $input = new ArrayInput(['command_name' => $this->defaultCommand]); - } else { - $this->wantHelps = true; - } - } - - if (!$name) { - $name = $this->defaultCommand; - $definition = $this->getDefinition(); - $definition->setArguments(array_merge( - $definition->getArguments(), - [ - 'command' => new InputArgument('command', InputArgument::OPTIONAL, $definition->getArgument('command')->getDescription(), $name), - ] - )); - } - - try { - $this->runningCommand = null; - // the command name MUST be the first element of the input - $command = $this->find($name); - } catch (\Throwable $e) { - if (!($e instanceof CommandNotFoundException && !$e instanceof NamespaceNotFoundException) || 1 !== \count($alternatives = $e->getAlternatives()) || !$input->isInteractive()) { - if (null !== $this->dispatcher) { - $event = new ConsoleErrorEvent($input, $output, $e); - $this->dispatcher->dispatch($event, ConsoleEvents::ERROR); - - if (0 === $event->getExitCode()) { - return 0; - } - - $e = $event->getError(); - } - - throw $e; - } - - $alternative = $alternatives[0]; - - $style = new SymfonyStyle($input, $output); - $style->block(sprintf("\nCommand \"%s\" is not defined.\n", $name), null, 'error'); - if (!$style->confirm(sprintf('Do you want to run "%s" instead? ', $alternative), false)) { - if (null !== $this->dispatcher) { - $event = new ConsoleErrorEvent($input, $output, $e); - $this->dispatcher->dispatch($event, ConsoleEvents::ERROR); - - return $event->getExitCode(); - } - - return 1; - } - - $command = $this->find($alternative); - } - - $this->runningCommand = $command; - $exitCode = $this->doRunCommand($command, $input, $output); - $this->runningCommand = null; - - return $exitCode; - } - - /** - * {@inheritdoc} - */ - public function reset() - { - } - - public function setHelperSet(HelperSet $helperSet) - { - $this->helperSet = $helperSet; - } - - /** - * Get the helper set associated with the command. - * - * @return HelperSet The HelperSet instance associated with this command - */ - public function getHelperSet() - { - if (!$this->helperSet) { - $this->helperSet = $this->getDefaultHelperSet(); - } - - return $this->helperSet; - } - - public function setDefinition(InputDefinition $definition) - { - $this->definition = $definition; - } - - /** - * Gets the InputDefinition related to this Application. - * - * @return InputDefinition The InputDefinition instance - */ - public function getDefinition() - { - if (!$this->definition) { - $this->definition = $this->getDefaultInputDefinition(); - } - - if ($this->singleCommand) { - $inputDefinition = $this->definition; - $inputDefinition->setArguments(); - - return $inputDefinition; - } - - return $this->definition; - } - - /** - * Gets the help message. - * - * @return string A help message - */ - public function getHelp() - { - return $this->getLongVersion(); - } - - /** - * Gets whether to catch exceptions or not during commands execution. - * - * @return bool Whether to catch exceptions or not during commands execution - */ - public function areExceptionsCaught() - { - return $this->catchExceptions; - } - - /** - * Sets whether to catch exceptions or not during commands execution. - * - * @param bool $boolean Whether to catch exceptions or not during commands execution - */ - public function setCatchExceptions($boolean) - { - $this->catchExceptions = (bool) $boolean; - } - - /** - * Gets whether to automatically exit after a command execution or not. - * - * @return bool Whether to automatically exit after a command execution or not - */ - public function isAutoExitEnabled() - { - return $this->autoExit; - } - - /** - * Sets whether to automatically exit after a command execution or not. - * - * @param bool $boolean Whether to automatically exit after a command execution or not - */ - public function setAutoExit($boolean) - { - $this->autoExit = (bool) $boolean; - } - - /** - * Gets the name of the application. - * - * @return string The application name - */ - public function getName() - { - return $this->name; - } - - /** - * Sets the application name. - * - * @param string $name The application name - */ - public function setName($name) - { - $this->name = $name; - } - - /** - * Gets the application version. - * - * @return string The application version - */ - public function getVersion() - { - return $this->version; - } - - /** - * Sets the application version. - * - * @param string $version The application version - */ - public function setVersion($version) - { - $this->version = $version; - } - - /** - * Returns the long version of the application. - * - * @return string The long application version - */ - public function getLongVersion() - { - if ('UNKNOWN' !== $this->getName()) { - if ('UNKNOWN' !== $this->getVersion()) { - return sprintf('%s %s', $this->getName(), $this->getVersion()); - } - - return $this->getName(); - } - - return 'Console Tool'; - } - - /** - * Registers a new command. - * - * @param string $name The command name - * - * @return Command The newly created command - */ - public function register($name) - { - return $this->add(new Command($name)); - } - - /** - * Adds an array of command objects. - * - * If a Command is not enabled it will not be added. - * - * @param Command[] $commands An array of commands - */ - public function addCommands(array $commands) - { - foreach ($commands as $command) { - $this->add($command); - } - } - - /** - * Adds a command object. - * - * If a command with the same name already exists, it will be overridden. - * If the command is not enabled it will not be added. - * - * @return Command|null The registered command if enabled or null - */ - public function add(Command $command) - { - $this->init(); - - $command->setApplication($this); - - if (!$command->isEnabled()) { - $command->setApplication(null); - - return null; - } - - // Will throw if the command is not correctly initialized. - $command->getDefinition(); - - if (!$command->getName()) { - throw new LogicException(sprintf('The command defined in "%s" cannot have an empty name.', \get_class($command))); - } - - $this->commands[$command->getName()] = $command; - - foreach ($command->getAliases() as $alias) { - $this->commands[$alias] = $command; - } - - return $command; - } - - /** - * Returns a registered command by name or alias. - * - * @param string $name The command name or alias - * - * @return Command A Command object - * - * @throws CommandNotFoundException When given command name does not exist - */ - public function get($name) - { - $this->init(); - - if (!$this->has($name)) { - throw new CommandNotFoundException(sprintf('The command "%s" does not exist.', $name)); - } - - // When the command has a different name than the one used at the command loader level - if (!isset($this->commands[$name])) { - throw new CommandNotFoundException(sprintf('The "%s" command cannot be found because it is registered under multiple names. Make sure you don\'t set a different name via constructor or "setName()".', $name)); - } - - $command = $this->commands[$name]; - - if ($this->wantHelps) { - $this->wantHelps = false; - - $helpCommand = $this->get('help'); - $helpCommand->setCommand($command); - - return $helpCommand; - } - - return $command; - } - - /** - * Returns true if the command exists, false otherwise. - * - * @param string $name The command name or alias - * - * @return bool true if the command exists, false otherwise - */ - public function has($name) - { - $this->init(); - - return isset($this->commands[$name]) || ($this->commandLoader && $this->commandLoader->has($name) && $this->add($this->commandLoader->get($name))); - } - - /** - * Returns an array of all unique namespaces used by currently registered commands. - * - * It does not return the global namespace which always exists. - * - * @return string[] An array of namespaces - */ - public function getNamespaces() - { - $namespaces = []; - foreach ($this->all() as $command) { - if ($command->isHidden()) { - continue; - } - - $namespaces = array_merge($namespaces, $this->extractAllNamespaces($command->getName())); - - foreach ($command->getAliases() as $alias) { - $namespaces = array_merge($namespaces, $this->extractAllNamespaces($alias)); - } - } - - return array_values(array_unique(array_filter($namespaces))); - } - - /** - * Finds a registered namespace by a name or an abbreviation. - * - * @param string $namespace A namespace or abbreviation to search for - * - * @return string A registered namespace - * - * @throws NamespaceNotFoundException When namespace is incorrect or ambiguous - */ - public function findNamespace($namespace) - { - $allNamespaces = $this->getNamespaces(); - $expr = preg_replace_callback('{([^:]+|)}', function ($matches) { return preg_quote($matches[1]).'[^:]*'; }, $namespace); - $namespaces = preg_grep('{^'.$expr.'}', $allNamespaces); - - if (empty($namespaces)) { - $message = sprintf('There are no commands defined in the "%s" namespace.', $namespace); - - if ($alternatives = $this->findAlternatives($namespace, $allNamespaces)) { - if (1 == \count($alternatives)) { - $message .= "\n\nDid you mean this?\n "; - } else { - $message .= "\n\nDid you mean one of these?\n "; - } - - $message .= implode("\n ", $alternatives); - } - - throw new NamespaceNotFoundException($message, $alternatives); - } - - $exact = \in_array($namespace, $namespaces, true); - if (\count($namespaces) > 1 && !$exact) { - throw new NamespaceNotFoundException(sprintf("The namespace \"%s\" is ambiguous.\nDid you mean one of these?\n%s.", $namespace, $this->getAbbreviationSuggestions(array_values($namespaces))), array_values($namespaces)); - } - - return $exact ? $namespace : reset($namespaces); - } - - /** - * Finds a command by name or alias. - * - * Contrary to get, this command tries to find the best - * match if you give it an abbreviation of a name or alias. - * - * @param string $name A command name or a command alias - * - * @return Command A Command instance - * - * @throws CommandNotFoundException When command name is incorrect or ambiguous - */ - public function find($name) - { - $this->init(); - - $aliases = []; - - foreach ($this->commands as $command) { - foreach ($command->getAliases() as $alias) { - if (!$this->has($alias)) { - $this->commands[$alias] = $command; - } - } - } - - if ($this->has($name)) { - return $this->get($name); - } - - $allCommands = $this->commandLoader ? array_merge($this->commandLoader->getNames(), array_keys($this->commands)) : array_keys($this->commands); - $expr = preg_replace_callback('{([^:]+|)}', function ($matches) { return preg_quote($matches[1]).'[^:]*'; }, $name); - $commands = preg_grep('{^'.$expr.'}', $allCommands); - - if (empty($commands)) { - $commands = preg_grep('{^'.$expr.'}i', $allCommands); - } - - // if no commands matched or we just matched namespaces - if (empty($commands) || \count(preg_grep('{^'.$expr.'$}i', $commands)) < 1) { - if (false !== $pos = strrpos($name, ':')) { - // check if a namespace exists and contains commands - $this->findNamespace(substr($name, 0, $pos)); - } - - $message = sprintf('Command "%s" is not defined.', $name); - - if ($alternatives = $this->findAlternatives($name, $allCommands)) { - // remove hidden commands - $alternatives = array_filter($alternatives, function ($name) { - return !$this->get($name)->isHidden(); - }); - - if (1 == \count($alternatives)) { - $message .= "\n\nDid you mean this?\n "; - } else { - $message .= "\n\nDid you mean one of these?\n "; - } - $message .= implode("\n ", $alternatives); - } - - throw new CommandNotFoundException($message, array_values($alternatives)); - } - - // filter out aliases for commands which are already on the list - if (\count($commands) > 1) { - $commandList = $this->commandLoader ? array_merge(array_flip($this->commandLoader->getNames()), $this->commands) : $this->commands; - $commands = array_unique(array_filter($commands, function ($nameOrAlias) use (&$commandList, $commands, &$aliases) { - if (!$commandList[$nameOrAlias] instanceof Command) { - $commandList[$nameOrAlias] = $this->commandLoader->get($nameOrAlias); - } - - $commandName = $commandList[$nameOrAlias]->getName(); - - $aliases[$nameOrAlias] = $commandName; - - return $commandName === $nameOrAlias || !\in_array($commandName, $commands); - })); - } - - if (\count($commands) > 1) { - $usableWidth = $this->terminal->getWidth() - 10; - $abbrevs = array_values($commands); - $maxLen = 0; - foreach ($abbrevs as $abbrev) { - $maxLen = max(Helper::strlen($abbrev), $maxLen); - } - $abbrevs = array_map(function ($cmd) use ($commandList, $usableWidth, $maxLen, &$commands) { - if ($commandList[$cmd]->isHidden()) { - unset($commands[array_search($cmd, $commands)]); - - return false; - } - - $abbrev = str_pad($cmd, $maxLen, ' ').' '.$commandList[$cmd]->getDescription(); - - return Helper::strlen($abbrev) > $usableWidth ? Helper::substr($abbrev, 0, $usableWidth - 3).'...' : $abbrev; - }, array_values($commands)); - - if (\count($commands) > 1) { - $suggestions = $this->getAbbreviationSuggestions(array_filter($abbrevs)); - - throw new CommandNotFoundException(sprintf("Command \"%s\" is ambiguous.\nDid you mean one of these?\n%s.", $name, $suggestions), array_values($commands)); - } - } - - $command = $this->get(reset($commands)); - - if ($command->isHidden()) { - @trigger_error(sprintf('Command "%s" is hidden, finding it using an abbreviation is deprecated since Symfony 4.4, use its full name instead.', $command->getName()), \E_USER_DEPRECATED); - } - - return $command; - } - - /** - * Gets the commands (registered in the given namespace if provided). - * - * The array keys are the full names and the values the command instances. - * - * @param string $namespace A namespace name - * - * @return Command[] An array of Command instances - */ - public function all($namespace = null) - { - $this->init(); - - if (null === $namespace) { - if (!$this->commandLoader) { - return $this->commands; - } - - $commands = $this->commands; - foreach ($this->commandLoader->getNames() as $name) { - if (!isset($commands[$name]) && $this->has($name)) { - $commands[$name] = $this->get($name); - } - } - - return $commands; - } - - $commands = []; - foreach ($this->commands as $name => $command) { - if ($namespace === $this->extractNamespace($name, substr_count($namespace, ':') + 1)) { - $commands[$name] = $command; - } - } - - if ($this->commandLoader) { - foreach ($this->commandLoader->getNames() as $name) { - if (!isset($commands[$name]) && $namespace === $this->extractNamespace($name, substr_count($namespace, ':') + 1) && $this->has($name)) { - $commands[$name] = $this->get($name); - } - } - } - - return $commands; - } - - /** - * Returns an array of possible abbreviations given a set of names. - * - * @param array $names An array of names - * - * @return array An array of abbreviations - */ - public static function getAbbreviations($names) - { - $abbrevs = []; - foreach ($names as $name) { - for ($len = \strlen($name); $len > 0; --$len) { - $abbrev = substr($name, 0, $len); - $abbrevs[$abbrev][] = $name; - } - } - - return $abbrevs; - } - - /** - * Renders a caught exception. - * - * @deprecated since Symfony 4.4, use "renderThrowable()" instead - */ - public function renderException(\Exception $e, OutputInterface $output) - { - @trigger_error(sprintf('The "%s::renderException()" method is deprecated since Symfony 4.4, use "renderThrowable()" instead.', __CLASS__), \E_USER_DEPRECATED); - - $output->writeln('', OutputInterface::VERBOSITY_QUIET); - - $this->doRenderException($e, $output); - - $this->finishRenderThrowableOrException($output); - } - - public function renderThrowable(\Throwable $e, OutputInterface $output): void - { - if (__CLASS__ !== static::class && __CLASS__ === (new \ReflectionMethod($this, 'renderThrowable'))->getDeclaringClass()->getName() && __CLASS__ !== (new \ReflectionMethod($this, 'renderException'))->getDeclaringClass()->getName()) { - @trigger_error(sprintf('The "%s::renderException()" method is deprecated since Symfony 4.4, use "renderThrowable()" instead.', __CLASS__), \E_USER_DEPRECATED); - - if (!$e instanceof \Exception) { - $e = class_exists(FatalThrowableError::class) ? new FatalThrowableError($e) : new \ErrorException($e->getMessage(), $e->getCode(), \E_ERROR, $e->getFile(), $e->getLine()); - } - - $this->renderException($e, $output); - - return; - } - - $output->writeln('', OutputInterface::VERBOSITY_QUIET); - - $this->doRenderThrowable($e, $output); - - $this->finishRenderThrowableOrException($output); - } - - private function finishRenderThrowableOrException(OutputInterface $output): void - { - if (null !== $this->runningCommand) { - $output->writeln(sprintf('%s', OutputFormatter::escape(sprintf($this->runningCommand->getSynopsis(), $this->getName()))), OutputInterface::VERBOSITY_QUIET); - $output->writeln('', OutputInterface::VERBOSITY_QUIET); - } - } - - /** - * @deprecated since Symfony 4.4, use "doRenderThrowable()" instead - */ - protected function doRenderException(\Exception $e, OutputInterface $output) - { - @trigger_error(sprintf('The "%s::doRenderException()" method is deprecated since Symfony 4.4, use "doRenderThrowable()" instead.', __CLASS__), \E_USER_DEPRECATED); - - $this->doActuallyRenderThrowable($e, $output); - } - - protected function doRenderThrowable(\Throwable $e, OutputInterface $output): void - { - if (__CLASS__ !== static::class && __CLASS__ === (new \ReflectionMethod($this, 'doRenderThrowable'))->getDeclaringClass()->getName() && __CLASS__ !== (new \ReflectionMethod($this, 'doRenderException'))->getDeclaringClass()->getName()) { - @trigger_error(sprintf('The "%s::doRenderException()" method is deprecated since Symfony 4.4, use "doRenderThrowable()" instead.', __CLASS__), \E_USER_DEPRECATED); - - if (!$e instanceof \Exception) { - $e = class_exists(FatalThrowableError::class) ? new FatalThrowableError($e) : new \ErrorException($e->getMessage(), $e->getCode(), \E_ERROR, $e->getFile(), $e->getLine()); - } - - $this->doRenderException($e, $output); - - return; - } - - $this->doActuallyRenderThrowable($e, $output); - } - - private function doActuallyRenderThrowable(\Throwable $e, OutputInterface $output): void - { - do { - $message = trim($e->getMessage()); - if ('' === $message || OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) { - $class = get_debug_type($e); - $title = sprintf(' [%s%s] ', $class, 0 !== ($code = $e->getCode()) ? ' ('.$code.')' : ''); - $len = Helper::strlen($title); - } else { - $len = 0; - } - - if (str_contains($message, "@anonymous\0")) { - $message = preg_replace_callback('/[a-zA-Z_\x7f-\xff][\\\\a-zA-Z0-9_\x7f-\xff]*+@anonymous\x00.*?\.php(?:0x?|:[0-9]++\$)[0-9a-fA-F]++/', function ($m) { - return class_exists($m[0], false) ? (get_parent_class($m[0]) ?: key(class_implements($m[0])) ?: 'class').'@anonymous' : $m[0]; - }, $message); - } - - $width = $this->terminal->getWidth() ? $this->terminal->getWidth() - 1 : \PHP_INT_MAX; - $lines = []; - foreach ('' !== $message ? preg_split('/\r?\n/', $message) : [] as $line) { - foreach ($this->splitStringByWidth($line, $width - 4) as $line) { - // pre-format lines to get the right string length - $lineLength = Helper::strlen($line) + 4; - $lines[] = [$line, $lineLength]; - - $len = max($lineLength, $len); - } - } - - $messages = []; - if (!$e instanceof ExceptionInterface || OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) { - $messages[] = sprintf('%s', OutputFormatter::escape(sprintf('In %s line %s:', basename($e->getFile()) ?: 'n/a', $e->getLine() ?: 'n/a'))); - } - $messages[] = $emptyLine = sprintf('%s', str_repeat(' ', $len)); - if ('' === $message || OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) { - $messages[] = sprintf('%s%s', $title, str_repeat(' ', max(0, $len - Helper::strlen($title)))); - } - foreach ($lines as $line) { - $messages[] = sprintf(' %s %s', OutputFormatter::escape($line[0]), str_repeat(' ', $len - $line[1])); - } - $messages[] = $emptyLine; - $messages[] = ''; - - $output->writeln($messages, OutputInterface::VERBOSITY_QUIET); - - if (OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) { - $output->writeln('Exception trace:', OutputInterface::VERBOSITY_QUIET); - - // exception related properties - $trace = $e->getTrace(); - - array_unshift($trace, [ - 'function' => '', - 'file' => $e->getFile() ?: 'n/a', - 'line' => $e->getLine() ?: 'n/a', - 'args' => [], - ]); - - for ($i = 0, $count = \count($trace); $i < $count; ++$i) { - $class = $trace[$i]['class'] ?? ''; - $type = $trace[$i]['type'] ?? ''; - $function = $trace[$i]['function'] ?? ''; - $file = $trace[$i]['file'] ?? 'n/a'; - $line = $trace[$i]['line'] ?? 'n/a'; - - $output->writeln(sprintf(' %s%s at %s:%s', $class, $function ? $type.$function.'()' : '', $file, $line), OutputInterface::VERBOSITY_QUIET); - } - - $output->writeln('', OutputInterface::VERBOSITY_QUIET); - } - } while ($e = $e->getPrevious()); - } - - /** - * Configures the input and output instances based on the user arguments and options. - */ - protected function configureIO(InputInterface $input, OutputInterface $output) - { - if (true === $input->hasParameterOption(['--ansi'], true)) { - $output->setDecorated(true); - } elseif (true === $input->hasParameterOption(['--no-ansi'], true)) { - $output->setDecorated(false); - } - - if (true === $input->hasParameterOption(['--no-interaction', '-n'], true)) { - $input->setInteractive(false); - } - - switch ($shellVerbosity = (int) getenv('SHELL_VERBOSITY')) { - case -1: $output->setVerbosity(OutputInterface::VERBOSITY_QUIET); break; - case 1: $output->setVerbosity(OutputInterface::VERBOSITY_VERBOSE); break; - case 2: $output->setVerbosity(OutputInterface::VERBOSITY_VERY_VERBOSE); break; - case 3: $output->setVerbosity(OutputInterface::VERBOSITY_DEBUG); break; - default: $shellVerbosity = 0; break; - } - - if (true === $input->hasParameterOption(['--quiet', '-q'], true)) { - $output->setVerbosity(OutputInterface::VERBOSITY_QUIET); - $shellVerbosity = -1; - } else { - if ($input->hasParameterOption('-vvv', true) || $input->hasParameterOption('--verbose=3', true) || 3 === $input->getParameterOption('--verbose', false, true)) { - $output->setVerbosity(OutputInterface::VERBOSITY_DEBUG); - $shellVerbosity = 3; - } elseif ($input->hasParameterOption('-vv', true) || $input->hasParameterOption('--verbose=2', true) || 2 === $input->getParameterOption('--verbose', false, true)) { - $output->setVerbosity(OutputInterface::VERBOSITY_VERY_VERBOSE); - $shellVerbosity = 2; - } elseif ($input->hasParameterOption('-v', true) || $input->hasParameterOption('--verbose=1', true) || $input->hasParameterOption('--verbose', true) || $input->getParameterOption('--verbose', false, true)) { - $output->setVerbosity(OutputInterface::VERBOSITY_VERBOSE); - $shellVerbosity = 1; - } - } - - if (-1 === $shellVerbosity) { - $input->setInteractive(false); - } - - if (\function_exists('putenv')) { - @putenv('SHELL_VERBOSITY='.$shellVerbosity); - } - $_ENV['SHELL_VERBOSITY'] = $shellVerbosity; - $_SERVER['SHELL_VERBOSITY'] = $shellVerbosity; - } - - /** - * Runs the current command. - * - * If an event dispatcher has been attached to the application, - * events are also dispatched during the life-cycle of the command. - * - * @return int 0 if everything went fine, or an error code - */ - protected function doRunCommand(Command $command, InputInterface $input, OutputInterface $output) - { - foreach ($command->getHelperSet() as $helper) { - if ($helper instanceof InputAwareInterface) { - $helper->setInput($input); - } - } - - if (null === $this->dispatcher) { - return $command->run($input, $output); - } - - // bind before the console.command event, so the listeners have access to input options/arguments - try { - $command->mergeApplicationDefinition(); - $input->bind($command->getDefinition()); - } catch (ExceptionInterface $e) { - // ignore invalid options/arguments for now, to allow the event listeners to customize the InputDefinition - } - - $event = new ConsoleCommandEvent($command, $input, $output); - $e = null; - - try { - $this->dispatcher->dispatch($event, ConsoleEvents::COMMAND); - - if ($event->commandShouldRun()) { - $exitCode = $command->run($input, $output); - } else { - $exitCode = ConsoleCommandEvent::RETURN_CODE_DISABLED; - } - } catch (\Throwable $e) { - $event = new ConsoleErrorEvent($input, $output, $e, $command); - $this->dispatcher->dispatch($event, ConsoleEvents::ERROR); - $e = $event->getError(); - - if (0 === $exitCode = $event->getExitCode()) { - $e = null; - } - } - - $event = new ConsoleTerminateEvent($command, $input, $output, $exitCode); - $this->dispatcher->dispatch($event, ConsoleEvents::TERMINATE); - - if (null !== $e) { - throw $e; - } - - return $event->getExitCode(); - } - - /** - * Gets the name of the command based on input. - * - * @return string|null - */ - protected function getCommandName(InputInterface $input) - { - return $this->singleCommand ? $this->defaultCommand : $input->getFirstArgument(); - } - - /** - * Gets the default input definition. - * - * @return InputDefinition An InputDefinition instance - */ - protected function getDefaultInputDefinition() - { - return new InputDefinition([ - new InputArgument('command', InputArgument::REQUIRED, 'The command to execute'), - - new InputOption('--help', '-h', InputOption::VALUE_NONE, 'Display this help message'), - new InputOption('--quiet', '-q', InputOption::VALUE_NONE, 'Do not output any message'), - new InputOption('--verbose', '-v|vv|vvv', InputOption::VALUE_NONE, 'Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug'), - new InputOption('--version', '-V', InputOption::VALUE_NONE, 'Display this application version'), - new InputOption('--ansi', '', InputOption::VALUE_NONE, 'Force ANSI output'), - new InputOption('--no-ansi', '', InputOption::VALUE_NONE, 'Disable ANSI output'), - new InputOption('--no-interaction', '-n', InputOption::VALUE_NONE, 'Do not ask any interactive question'), - ]); - } - - /** - * Gets the default commands that should always be available. - * - * @return Command[] An array of default Command instances - */ - protected function getDefaultCommands() - { - return [new HelpCommand(), new ListCommand()]; - } - - /** - * Gets the default helper set with the helpers that should always be available. - * - * @return HelperSet A HelperSet instance - */ - protected function getDefaultHelperSet() - { - return new HelperSet([ - new FormatterHelper(), - new DebugFormatterHelper(), - new ProcessHelper(), - new QuestionHelper(), - ]); - } - - /** - * Returns abbreviated suggestions in string format. - */ - private function getAbbreviationSuggestions(array $abbrevs): string - { - return ' '.implode("\n ", $abbrevs); - } - - /** - * Returns the namespace part of the command name. - * - * This method is not part of public API and should not be used directly. - * - * @param string $name The full name of the command - * @param string $limit The maximum number of parts of the namespace - * - * @return string The namespace of the command - */ - public function extractNamespace($name, $limit = null) - { - $parts = explode(':', $name, -1); - - return implode(':', null === $limit ? $parts : \array_slice($parts, 0, $limit)); - } - - /** - * Finds alternative of $name among $collection, - * if nothing is found in $collection, try in $abbrevs. - * - * @return string[] A sorted array of similar string - */ - private function findAlternatives(string $name, iterable $collection): array - { - $threshold = 1e3; - $alternatives = []; - - $collectionParts = []; - foreach ($collection as $item) { - $collectionParts[$item] = explode(':', $item); - } - - foreach (explode(':', $name) as $i => $subname) { - foreach ($collectionParts as $collectionName => $parts) { - $exists = isset($alternatives[$collectionName]); - if (!isset($parts[$i]) && $exists) { - $alternatives[$collectionName] += $threshold; - continue; - } elseif (!isset($parts[$i])) { - continue; - } - - $lev = levenshtein($subname, $parts[$i]); - if ($lev <= \strlen($subname) / 3 || '' !== $subname && str_contains($parts[$i], $subname)) { - $alternatives[$collectionName] = $exists ? $alternatives[$collectionName] + $lev : $lev; - } elseif ($exists) { - $alternatives[$collectionName] += $threshold; - } - } - } - - foreach ($collection as $item) { - $lev = levenshtein($name, $item); - if ($lev <= \strlen($name) / 3 || str_contains($item, $name)) { - $alternatives[$item] = isset($alternatives[$item]) ? $alternatives[$item] - $lev : $lev; - } - } - - $alternatives = array_filter($alternatives, function ($lev) use ($threshold) { return $lev < 2 * $threshold; }); - ksort($alternatives, \SORT_NATURAL | \SORT_FLAG_CASE); - - return array_keys($alternatives); - } - - /** - * Sets the default Command name. - * - * @param string $commandName The Command name - * @param bool $isSingleCommand Set to true if there is only one command in this application - * - * @return self - */ - public function setDefaultCommand($commandName, $isSingleCommand = false) - { - $this->defaultCommand = $commandName; - - if ($isSingleCommand) { - // Ensure the command exist - $this->find($commandName); - - $this->singleCommand = true; - } - - return $this; - } - - /** - * @internal - */ - public function isSingleCommand(): bool - { - return $this->singleCommand; - } - - private function splitStringByWidth(string $string, int $width): array - { - // str_split is not suitable for multi-byte characters, we should use preg_split to get char array properly. - // additionally, array_slice() is not enough as some character has doubled width. - // we need a function to split string not by character count but by string width - if (false === $encoding = mb_detect_encoding($string, null, true)) { - return str_split($string, $width); - } - - $utf8String = mb_convert_encoding($string, 'utf8', $encoding); - $lines = []; - $line = ''; - - $offset = 0; - while (preg_match('/.{1,10000}/u', $utf8String, $m, 0, $offset)) { - $offset += \strlen($m[0]); - - foreach (preg_split('//u', $m[0]) as $char) { - // test if $char could be appended to current line - if (mb_strwidth($line.$char, 'utf8') <= $width) { - $line .= $char; - continue; - } - // if not, push current line to array and make new line - $lines[] = str_pad($line, $width); - $line = $char; - } - } - - $lines[] = \count($lines) ? str_pad($line, $width) : $line; - - mb_convert_variables($encoding, 'utf8', $lines); - - return $lines; - } - - /** - * Returns all namespaces of the command name. - * - * @return string[] The namespaces of the command - */ - private function extractAllNamespaces(string $name): array - { - // -1 as third argument is needed to skip the command short name when exploding - $parts = explode(':', $name, -1); - $namespaces = []; - - foreach ($parts as $part) { - if (\count($namespaces)) { - $namespaces[] = end($namespaces).':'.$part; - } else { - $namespaces[] = $part; - } - } - - return $namespaces; - } - - private function init() - { - if ($this->initialized) { - return; - } - $this->initialized = true; - - foreach ($this->getDefaultCommands() as $command) { - $this->add($command); - } - } -} diff --git a/source/vendor/symfony/console/Command/Command.php b/source/vendor/symfony/console/Command/Command.php deleted file mode 100644 index da9b9f6..0000000 --- a/source/vendor/symfony/console/Command/Command.php +++ /dev/null @@ -1,667 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Command; - -use Symfony\Component\Console\Application; -use Symfony\Component\Console\Exception\ExceptionInterface; -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Exception\LogicException; -use Symfony\Component\Console\Helper\HelperSet; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputDefinition; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; - -/** - * Base class for all commands. - * - * @author Fabien Potencier - */ -class Command -{ - /** - * @var string|null The default command name - */ - protected static $defaultName; - - private $application; - private $name; - private $processTitle; - private $aliases = []; - private $definition; - private $hidden = false; - private $help = ''; - private $description = ''; - private $ignoreValidationErrors = false; - private $applicationDefinitionMerged = false; - private $applicationDefinitionMergedWithArgs = false; - private $code; - private $synopsis = []; - private $usages = []; - private $helperSet; - - /** - * @return string|null The default command name or null when no default name is set - */ - public static function getDefaultName() - { - $class = static::class; - $r = new \ReflectionProperty($class, 'defaultName'); - - return $class === $r->class ? static::$defaultName : null; - } - - /** - * @param string|null $name The name of the command; passing null means it must be set in configure() - * - * @throws LogicException When the command name is empty - */ - public function __construct(string $name = null) - { - $this->definition = new InputDefinition(); - - if (null !== $name || null !== $name = static::getDefaultName()) { - $this->setName($name); - } - - $this->configure(); - } - - /** - * Ignores validation errors. - * - * This is mainly useful for the help command. - */ - public function ignoreValidationErrors() - { - $this->ignoreValidationErrors = true; - } - - public function setApplication(Application $application = null) - { - $this->application = $application; - if ($application) { - $this->setHelperSet($application->getHelperSet()); - } else { - $this->helperSet = null; - } - } - - public function setHelperSet(HelperSet $helperSet) - { - $this->helperSet = $helperSet; - } - - /** - * Gets the helper set. - * - * @return HelperSet|null A HelperSet instance - */ - public function getHelperSet() - { - return $this->helperSet; - } - - /** - * Gets the application instance for this command. - * - * @return Application|null An Application instance - */ - public function getApplication() - { - return $this->application; - } - - /** - * Checks whether the command is enabled or not in the current environment. - * - * Override this to check for x or y and return false if the command can not - * run properly under the current conditions. - * - * @return bool - */ - public function isEnabled() - { - return true; - } - - /** - * Configures the current command. - */ - protected function configure() - { - } - - /** - * Executes the current command. - * - * This method is not abstract because you can use this class - * as a concrete class. In this case, instead of defining the - * execute() method, you set the code to execute by passing - * a Closure to the setCode() method. - * - * @return int 0 if everything went fine, or an exit code - * - * @throws LogicException When this abstract method is not implemented - * - * @see setCode() - */ - protected function execute(InputInterface $input, OutputInterface $output) - { - throw new LogicException('You must override the execute() method in the concrete command class.'); - } - - /** - * Interacts with the user. - * - * This method is executed before the InputDefinition is validated. - * This means that this is the only place where the command can - * interactively ask for values of missing required arguments. - */ - protected function interact(InputInterface $input, OutputInterface $output) - { - } - - /** - * Initializes the command after the input has been bound and before the input - * is validated. - * - * This is mainly useful when a lot of commands extends one main command - * where some things need to be initialized based on the input arguments and options. - * - * @see InputInterface::bind() - * @see InputInterface::validate() - */ - protected function initialize(InputInterface $input, OutputInterface $output) - { - } - - /** - * Runs the command. - * - * The code to execute is either defined directly with the - * setCode() method or by overriding the execute() method - * in a sub-class. - * - * @return int The command exit code - * - * @throws \Exception When binding input fails. Bypass this by calling {@link ignoreValidationErrors()}. - * - * @see setCode() - * @see execute() - */ - public function run(InputInterface $input, OutputInterface $output) - { - // force the creation of the synopsis before the merge with the app definition - $this->getSynopsis(true); - $this->getSynopsis(false); - - // add the application arguments and options - $this->mergeApplicationDefinition(); - - // bind the input against the command specific arguments/options - try { - $input->bind($this->definition); - } catch (ExceptionInterface $e) { - if (!$this->ignoreValidationErrors) { - throw $e; - } - } - - $this->initialize($input, $output); - - if (null !== $this->processTitle) { - if (\function_exists('cli_set_process_title')) { - if (!@cli_set_process_title($this->processTitle)) { - if ('Darwin' === \PHP_OS) { - $output->writeln('Running "cli_set_process_title" as an unprivileged user is not supported on MacOS.', OutputInterface::VERBOSITY_VERY_VERBOSE); - } else { - cli_set_process_title($this->processTitle); - } - } - } elseif (\function_exists('setproctitle')) { - setproctitle($this->processTitle); - } elseif (OutputInterface::VERBOSITY_VERY_VERBOSE === $output->getVerbosity()) { - $output->writeln('Install the proctitle PECL to be able to change the process title.'); - } - } - - if ($input->isInteractive()) { - $this->interact($input, $output); - } - - // The command name argument is often omitted when a command is executed directly with its run() method. - // It would fail the validation if we didn't make sure the command argument is present, - // since it's required by the application. - if ($input->hasArgument('command') && null === $input->getArgument('command')) { - $input->setArgument('command', $this->getName()); - } - - $input->validate(); - - if ($this->code) { - $statusCode = ($this->code)($input, $output); - } else { - $statusCode = $this->execute($input, $output); - - if (!\is_int($statusCode)) { - @trigger_error(sprintf('Return value of "%s::execute()" should always be of the type int since Symfony 4.4, %s returned.', static::class, \gettype($statusCode)), \E_USER_DEPRECATED); - } - } - - return is_numeric($statusCode) ? (int) $statusCode : 0; - } - - /** - * Sets the code to execute when running this command. - * - * If this method is used, it overrides the code defined - * in the execute() method. - * - * @param callable $code A callable(InputInterface $input, OutputInterface $output) - * - * @return $this - * - * @throws InvalidArgumentException - * - * @see execute() - */ - public function setCode(callable $code) - { - if ($code instanceof \Closure) { - $r = new \ReflectionFunction($code); - if (null === $r->getClosureThis()) { - set_error_handler(static function () {}); - try { - if ($c = \Closure::bind($code, $this)) { - $code = $c; - } - } finally { - restore_error_handler(); - } - } - } - - $this->code = $code; - - return $this; - } - - /** - * Merges the application definition with the command definition. - * - * This method is not part of public API and should not be used directly. - * - * @param bool $mergeArgs Whether to merge or not the Application definition arguments to Command definition arguments - */ - public function mergeApplicationDefinition($mergeArgs = true) - { - if (null === $this->application || (true === $this->applicationDefinitionMerged && ($this->applicationDefinitionMergedWithArgs || !$mergeArgs))) { - return; - } - - $this->definition->addOptions($this->application->getDefinition()->getOptions()); - - $this->applicationDefinitionMerged = true; - - if ($mergeArgs) { - $currentArguments = $this->definition->getArguments(); - $this->definition->setArguments($this->application->getDefinition()->getArguments()); - $this->definition->addArguments($currentArguments); - - $this->applicationDefinitionMergedWithArgs = true; - } - } - - /** - * Sets an array of argument and option instances. - * - * @param array|InputDefinition $definition An array of argument and option instances or a definition instance - * - * @return $this - */ - public function setDefinition($definition) - { - if ($definition instanceof InputDefinition) { - $this->definition = $definition; - } else { - $this->definition->setDefinition($definition); - } - - $this->applicationDefinitionMerged = false; - - return $this; - } - - /** - * Gets the InputDefinition attached to this Command. - * - * @return InputDefinition An InputDefinition instance - */ - public function getDefinition() - { - if (null === $this->definition) { - throw new LogicException(sprintf('Command class "%s" is not correctly initialized. You probably forgot to call the parent constructor.', static::class)); - } - - return $this->definition; - } - - /** - * Gets the InputDefinition to be used to create representations of this Command. - * - * Can be overridden to provide the original command representation when it would otherwise - * be changed by merging with the application InputDefinition. - * - * This method is not part of public API and should not be used directly. - * - * @return InputDefinition An InputDefinition instance - */ - public function getNativeDefinition() - { - return $this->getDefinition(); - } - - /** - * Adds an argument. - * - * @param string $name The argument name - * @param int|null $mode The argument mode: InputArgument::REQUIRED or InputArgument::OPTIONAL - * @param string $description A description text - * @param mixed $default The default value (for InputArgument::OPTIONAL mode only) - * - * @throws InvalidArgumentException When argument mode is not valid - * - * @return $this - */ - public function addArgument($name, $mode = null, $description = '', $default = null) - { - $this->definition->addArgument(new InputArgument($name, $mode, $description, $default)); - - return $this; - } - - /** - * Adds an option. - * - * @param string $name The option name - * @param string|array|null $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts - * @param int|null $mode The option mode: One of the InputOption::VALUE_* constants - * @param string $description A description text - * @param mixed $default The default value (must be null for InputOption::VALUE_NONE) - * - * @throws InvalidArgumentException If option mode is invalid or incompatible - * - * @return $this - */ - public function addOption($name, $shortcut = null, $mode = null, $description = '', $default = null) - { - $this->definition->addOption(new InputOption($name, $shortcut, $mode, $description, $default)); - - return $this; - } - - /** - * Sets the name of the command. - * - * This method can set both the namespace and the name if - * you separate them by a colon (:) - * - * $command->setName('foo:bar'); - * - * @param string $name The command name - * - * @return $this - * - * @throws InvalidArgumentException When the name is invalid - */ - public function setName($name) - { - $this->validateName($name); - - $this->name = $name; - - return $this; - } - - /** - * Sets the process title of the command. - * - * This feature should be used only when creating a long process command, - * like a daemon. - * - * @param string $title The process title - * - * @return $this - */ - public function setProcessTitle($title) - { - $this->processTitle = $title; - - return $this; - } - - /** - * Returns the command name. - * - * @return string|null - */ - public function getName() - { - return $this->name; - } - - /** - * @param bool $hidden Whether or not the command should be hidden from the list of commands - * - * @return $this - */ - public function setHidden($hidden) - { - $this->hidden = (bool) $hidden; - - return $this; - } - - /** - * @return bool whether the command should be publicly shown or not - */ - public function isHidden() - { - return $this->hidden; - } - - /** - * Sets the description for the command. - * - * @param string $description The description for the command - * - * @return $this - */ - public function setDescription($description) - { - $this->description = $description; - - return $this; - } - - /** - * Returns the description for the command. - * - * @return string The description for the command - */ - public function getDescription() - { - return $this->description; - } - - /** - * Sets the help for the command. - * - * @param string $help The help for the command - * - * @return $this - */ - public function setHelp($help) - { - $this->help = $help; - - return $this; - } - - /** - * Returns the help for the command. - * - * @return string The help for the command - */ - public function getHelp() - { - return $this->help; - } - - /** - * Returns the processed help for the command replacing the %command.name% and - * %command.full_name% patterns with the real values dynamically. - * - * @return string The processed help for the command - */ - public function getProcessedHelp() - { - $name = $this->name; - $isSingleCommand = $this->application && $this->application->isSingleCommand(); - - $placeholders = [ - '%command.name%', - '%command.full_name%', - ]; - $replacements = [ - $name, - $isSingleCommand ? $_SERVER['PHP_SELF'] : $_SERVER['PHP_SELF'].' '.$name, - ]; - - return str_replace($placeholders, $replacements, $this->getHelp() ?: $this->getDescription()); - } - - /** - * Sets the aliases for the command. - * - * @param string[] $aliases An array of aliases for the command - * - * @return $this - * - * @throws InvalidArgumentException When an alias is invalid - */ - public function setAliases($aliases) - { - if (!\is_array($aliases) && !$aliases instanceof \Traversable) { - throw new InvalidArgumentException('$aliases must be an array or an instance of \Traversable.'); - } - - foreach ($aliases as $alias) { - $this->validateName($alias); - } - - $this->aliases = $aliases; - - return $this; - } - - /** - * Returns the aliases for the command. - * - * @return array An array of aliases for the command - */ - public function getAliases() - { - return $this->aliases; - } - - /** - * Returns the synopsis for the command. - * - * @param bool $short Whether to show the short version of the synopsis (with options folded) or not - * - * @return string The synopsis - */ - public function getSynopsis($short = false) - { - $key = $short ? 'short' : 'long'; - - if (!isset($this->synopsis[$key])) { - $this->synopsis[$key] = trim(sprintf('%s %s', $this->name, $this->definition->getSynopsis($short))); - } - - return $this->synopsis[$key]; - } - - /** - * Add a command usage example. - * - * @param string $usage The usage, it'll be prefixed with the command name - * - * @return $this - */ - public function addUsage($usage) - { - if (!str_starts_with($usage, $this->name)) { - $usage = sprintf('%s %s', $this->name, $usage); - } - - $this->usages[] = $usage; - - return $this; - } - - /** - * Returns alternative usages of the command. - * - * @return array - */ - public function getUsages() - { - return $this->usages; - } - - /** - * Gets a helper instance by name. - * - * @param string $name The helper name - * - * @return mixed The helper value - * - * @throws LogicException if no HelperSet is defined - * @throws InvalidArgumentException if the helper is not defined - */ - public function getHelper($name) - { - if (null === $this->helperSet) { - throw new LogicException(sprintf('Cannot retrieve helper "%s" because there is no HelperSet defined. Did you forget to add your command to the application or to set the application on the command using the setApplication() method? You can also set the HelperSet directly using the setHelperSet() method.', $name)); - } - - return $this->helperSet->get($name); - } - - /** - * Validates a command name. - * - * It must be non-empty and parts can optionally be separated by ":". - * - * @throws InvalidArgumentException When the name is invalid - */ - private function validateName(string $name) - { - if (!preg_match('/^[^\:]++(\:[^\:]++)*$/', $name)) { - throw new InvalidArgumentException(sprintf('Command name "%s" is invalid.', $name)); - } - } -} diff --git a/source/vendor/symfony/console/Command/HelpCommand.php b/source/vendor/symfony/console/Command/HelpCommand.php deleted file mode 100644 index cece782..0000000 --- a/source/vendor/symfony/console/Command/HelpCommand.php +++ /dev/null @@ -1,83 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Command; - -use Symfony\Component\Console\Helper\DescriptorHelper; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; - -/** - * HelpCommand displays the help for a given command. - * - * @author Fabien Potencier - */ -class HelpCommand extends Command -{ - private $command; - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this->ignoreValidationErrors(); - - $this - ->setName('help') - ->setDefinition([ - new InputArgument('command_name', InputArgument::OPTIONAL, 'The command name', 'help'), - new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (txt, xml, json, or md)', 'txt'), - new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw command help'), - ]) - ->setDescription('Display help for a command') - ->setHelp(<<<'EOF' -The %command.name% command displays help for a given command: - - php %command.full_name% list - -You can also output the help in other formats by using the --format option: - - php %command.full_name% --format=xml list - -To display the list of available commands, please use the list command. -EOF - ) - ; - } - - public function setCommand(Command $command) - { - $this->command = $command; - } - - /** - * {@inheritdoc} - */ - protected function execute(InputInterface $input, OutputInterface $output) - { - if (null === $this->command) { - $this->command = $this->getApplication()->find($input->getArgument('command_name')); - } - - $helper = new DescriptorHelper(); - $helper->describe($output, $this->command, [ - 'format' => $input->getOption('format'), - 'raw_text' => $input->getOption('raw'), - ]); - - $this->command = null; - - return 0; - } -} diff --git a/source/vendor/symfony/console/Command/ListCommand.php b/source/vendor/symfony/console/Command/ListCommand.php deleted file mode 100644 index 44324a5..0000000 --- a/source/vendor/symfony/console/Command/ListCommand.php +++ /dev/null @@ -1,89 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Command; - -use Symfony\Component\Console\Helper\DescriptorHelper; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputDefinition; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; - -/** - * ListCommand displays the list of all available commands for the application. - * - * @author Fabien Potencier - */ -class ListCommand extends Command -{ - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setName('list') - ->setDefinition($this->createDefinition()) - ->setDescription('List commands') - ->setHelp(<<<'EOF' -The %command.name% command lists all commands: - - php %command.full_name% - -You can also display the commands for a specific namespace: - - php %command.full_name% test - -You can also output the information in other formats by using the --format option: - - php %command.full_name% --format=xml - -It's also possible to get raw list of commands (useful for embedding command runner): - - php %command.full_name% --raw -EOF - ) - ; - } - - /** - * {@inheritdoc} - */ - public function getNativeDefinition() - { - return $this->createDefinition(); - } - - /** - * {@inheritdoc} - */ - protected function execute(InputInterface $input, OutputInterface $output) - { - $helper = new DescriptorHelper(); - $helper->describe($output, $this->getApplication(), [ - 'format' => $input->getOption('format'), - 'raw_text' => $input->getOption('raw'), - 'namespace' => $input->getArgument('namespace'), - ]); - - return 0; - } - - private function createDefinition(): InputDefinition - { - return new InputDefinition([ - new InputArgument('namespace', InputArgument::OPTIONAL, 'The namespace name'), - new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw command list'), - new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (txt, xml, json, or md)', 'txt'), - ]); - } -} diff --git a/source/vendor/symfony/console/Command/LockableTrait.php b/source/vendor/symfony/console/Command/LockableTrait.php deleted file mode 100644 index 60cfe36..0000000 --- a/source/vendor/symfony/console/Command/LockableTrait.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Command; - -use Symfony\Component\Console\Exception\LogicException; -use Symfony\Component\Lock\Lock; -use Symfony\Component\Lock\LockFactory; -use Symfony\Component\Lock\Store\FlockStore; -use Symfony\Component\Lock\Store\SemaphoreStore; - -/** - * Basic lock feature for commands. - * - * @author Geoffrey Brier - */ -trait LockableTrait -{ - /** @var Lock */ - private $lock; - - /** - * Locks a command. - */ - private function lock(string $name = null, bool $blocking = false): bool - { - if (!class_exists(SemaphoreStore::class)) { - throw new LogicException('To enable the locking feature you must install the symfony/lock component.'); - } - - if (null !== $this->lock) { - throw new LogicException('A lock is already in place.'); - } - - if (SemaphoreStore::isSupported()) { - $store = new SemaphoreStore(); - } else { - $store = new FlockStore(); - } - - $this->lock = (new LockFactory($store))->createLock($name ?: $this->getName()); - if (!$this->lock->acquire($blocking)) { - $this->lock = null; - - return false; - } - - return true; - } - - /** - * Releases the command lock if there is one. - */ - private function release() - { - if ($this->lock) { - $this->lock->release(); - $this->lock = null; - } - } -} diff --git a/source/vendor/symfony/console/CommandLoader/CommandLoaderInterface.php b/source/vendor/symfony/console/CommandLoader/CommandLoaderInterface.php deleted file mode 100644 index ca1029c..0000000 --- a/source/vendor/symfony/console/CommandLoader/CommandLoaderInterface.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\CommandLoader; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Exception\CommandNotFoundException; - -/** - * @author Robin Chalas - */ -interface CommandLoaderInterface -{ - /** - * Loads a command. - * - * @param string $name - * - * @return Command - * - * @throws CommandNotFoundException - */ - public function get($name); - - /** - * Checks if a command exists. - * - * @param string $name - * - * @return bool - */ - public function has($name); - - /** - * @return string[] All registered command names - */ - public function getNames(); -} diff --git a/source/vendor/symfony/console/CommandLoader/ContainerCommandLoader.php b/source/vendor/symfony/console/CommandLoader/ContainerCommandLoader.php deleted file mode 100644 index 50e5950..0000000 --- a/source/vendor/symfony/console/CommandLoader/ContainerCommandLoader.php +++ /dev/null @@ -1,63 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\CommandLoader; - -use Psr\Container\ContainerInterface; -use Symfony\Component\Console\Exception\CommandNotFoundException; - -/** - * Loads commands from a PSR-11 container. - * - * @author Robin Chalas - */ -class ContainerCommandLoader implements CommandLoaderInterface -{ - private $container; - private $commandMap; - - /** - * @param array $commandMap An array with command names as keys and service ids as values - */ - public function __construct(ContainerInterface $container, array $commandMap) - { - $this->container = $container; - $this->commandMap = $commandMap; - } - - /** - * {@inheritdoc} - */ - public function get($name) - { - if (!$this->has($name)) { - throw new CommandNotFoundException(sprintf('Command "%s" does not exist.', $name)); - } - - return $this->container->get($this->commandMap[$name]); - } - - /** - * {@inheritdoc} - */ - public function has($name) - { - return isset($this->commandMap[$name]) && $this->container->has($this->commandMap[$name]); - } - - /** - * {@inheritdoc} - */ - public function getNames() - { - return array_keys($this->commandMap); - } -} diff --git a/source/vendor/symfony/console/CommandLoader/FactoryCommandLoader.php b/source/vendor/symfony/console/CommandLoader/FactoryCommandLoader.php deleted file mode 100644 index d9c2055..0000000 --- a/source/vendor/symfony/console/CommandLoader/FactoryCommandLoader.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\CommandLoader; - -use Symfony\Component\Console\Exception\CommandNotFoundException; - -/** - * A simple command loader using factories to instantiate commands lazily. - * - * @author Maxime Steinhausser - */ -class FactoryCommandLoader implements CommandLoaderInterface -{ - private $factories; - - /** - * @param callable[] $factories Indexed by command names - */ - public function __construct(array $factories) - { - $this->factories = $factories; - } - - /** - * {@inheritdoc} - */ - public function has($name) - { - return isset($this->factories[$name]); - } - - /** - * {@inheritdoc} - */ - public function get($name) - { - if (!isset($this->factories[$name])) { - throw new CommandNotFoundException(sprintf('Command "%s" does not exist.', $name)); - } - - $factory = $this->factories[$name]; - - return $factory(); - } - - /** - * {@inheritdoc} - */ - public function getNames() - { - return array_keys($this->factories); - } -} diff --git a/source/vendor/symfony/console/ConsoleEvents.php b/source/vendor/symfony/console/ConsoleEvents.php deleted file mode 100644 index 99b423c..0000000 --- a/source/vendor/symfony/console/ConsoleEvents.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console; - -/** - * Contains all events dispatched by an Application. - * - * @author Francesco Levorato - */ -final class ConsoleEvents -{ - /** - * The COMMAND event allows you to attach listeners before any command is - * executed by the console. It also allows you to modify the command, input and output - * before they are handed to the command. - * - * @Event("Symfony\Component\Console\Event\ConsoleCommandEvent") - */ - public const COMMAND = 'console.command'; - - /** - * The TERMINATE event allows you to attach listeners after a command is - * executed by the console. - * - * @Event("Symfony\Component\Console\Event\ConsoleTerminateEvent") - */ - public const TERMINATE = 'console.terminate'; - - /** - * The ERROR event occurs when an uncaught exception or error appears. - * - * This event allows you to deal with the exception/error or - * to modify the thrown exception. - * - * @Event("Symfony\Component\Console\Event\ConsoleErrorEvent") - */ - public const ERROR = 'console.error'; -} diff --git a/source/vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php b/source/vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php deleted file mode 100644 index 666c8fa..0000000 --- a/source/vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php +++ /dev/null @@ -1,98 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\DependencyInjection; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\CommandLoader\ContainerCommandLoader; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\TypedReference; - -/** - * Registers console commands. - * - * @author Grégoire Pineau - */ -class AddConsoleCommandPass implements CompilerPassInterface -{ - private $commandLoaderServiceId; - private $commandTag; - - public function __construct(string $commandLoaderServiceId = 'console.command_loader', string $commandTag = 'console.command') - { - $this->commandLoaderServiceId = $commandLoaderServiceId; - $this->commandTag = $commandTag; - } - - public function process(ContainerBuilder $container) - { - $commandServices = $container->findTaggedServiceIds($this->commandTag, true); - $lazyCommandMap = []; - $lazyCommandRefs = []; - $serviceIds = []; - - foreach ($commandServices as $id => $tags) { - $definition = $container->getDefinition($id); - $class = $container->getParameterBag()->resolveValue($definition->getClass()); - - if (isset($tags[0]['command'])) { - $commandName = $tags[0]['command']; - } else { - if (!$r = $container->getReflectionClass($class)) { - throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id)); - } - if (!$r->isSubclassOf(Command::class)) { - throw new InvalidArgumentException(sprintf('The service "%s" tagged "%s" must be a subclass of "%s".', $id, $this->commandTag, Command::class)); - } - $commandName = $class::getDefaultName(); - } - - if (null === $commandName) { - if (!$definition->isPublic() || $definition->isPrivate()) { - $commandId = 'console.command.public_alias.'.$id; - $container->setAlias($commandId, $id)->setPublic(true); - $id = $commandId; - } - $serviceIds[] = $id; - - continue; - } - - unset($tags[0]); - $lazyCommandMap[$commandName] = $id; - $lazyCommandRefs[$id] = new TypedReference($id, $class); - $aliases = []; - - foreach ($tags as $tag) { - if (isset($tag['command'])) { - $aliases[] = $tag['command']; - $lazyCommandMap[$tag['command']] = $id; - } - } - - $definition->addMethodCall('setName', [$commandName]); - - if ($aliases) { - $definition->addMethodCall('setAliases', [$aliases]); - } - } - - $container - ->register($this->commandLoaderServiceId, ContainerCommandLoader::class) - ->setPublic(true) - ->setArguments([ServiceLocatorTagPass::register($container, $lazyCommandRefs), $lazyCommandMap]); - - $container->setParameter('console.command.ids', $serviceIds); - } -} diff --git a/source/vendor/symfony/console/Descriptor/ApplicationDescription.php b/source/vendor/symfony/console/Descriptor/ApplicationDescription.php deleted file mode 100644 index 3970b90..0000000 --- a/source/vendor/symfony/console/Descriptor/ApplicationDescription.php +++ /dev/null @@ -1,143 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Descriptor; - -use Symfony\Component\Console\Application; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Exception\CommandNotFoundException; - -/** - * @author Jean-François Simon - * - * @internal - */ -class ApplicationDescription -{ - public const GLOBAL_NAMESPACE = '_global'; - - private $application; - private $namespace; - private $showHidden; - - /** - * @var array - */ - private $namespaces; - - /** - * @var Command[] - */ - private $commands; - - /** - * @var Command[] - */ - private $aliases; - - public function __construct(Application $application, string $namespace = null, bool $showHidden = false) - { - $this->application = $application; - $this->namespace = $namespace; - $this->showHidden = $showHidden; - } - - public function getNamespaces(): array - { - if (null === $this->namespaces) { - $this->inspectApplication(); - } - - return $this->namespaces; - } - - /** - * @return Command[] - */ - public function getCommands(): array - { - if (null === $this->commands) { - $this->inspectApplication(); - } - - return $this->commands; - } - - /** - * @throws CommandNotFoundException - */ - public function getCommand(string $name): Command - { - if (!isset($this->commands[$name]) && !isset($this->aliases[$name])) { - throw new CommandNotFoundException(sprintf('Command "%s" does not exist.', $name)); - } - - return $this->commands[$name] ?? $this->aliases[$name]; - } - - private function inspectApplication() - { - $this->commands = []; - $this->namespaces = []; - - $all = $this->application->all($this->namespace ? $this->application->findNamespace($this->namespace) : null); - foreach ($this->sortCommands($all) as $namespace => $commands) { - $names = []; - - /** @var Command $command */ - foreach ($commands as $name => $command) { - if (!$command->getName() || (!$this->showHidden && $command->isHidden())) { - continue; - } - - if ($command->getName() === $name) { - $this->commands[$name] = $command; - } else { - $this->aliases[$name] = $command; - } - - $names[] = $name; - } - - $this->namespaces[$namespace] = ['id' => $namespace, 'commands' => $names]; - } - } - - private function sortCommands(array $commands): array - { - $namespacedCommands = []; - $globalCommands = []; - $sortedCommands = []; - foreach ($commands as $name => $command) { - $key = $this->application->extractNamespace($name, 1); - if (\in_array($key, ['', self::GLOBAL_NAMESPACE], true)) { - $globalCommands[$name] = $command; - } else { - $namespacedCommands[$key][$name] = $command; - } - } - - if ($globalCommands) { - ksort($globalCommands); - $sortedCommands[self::GLOBAL_NAMESPACE] = $globalCommands; - } - - if ($namespacedCommands) { - ksort($namespacedCommands); - foreach ($namespacedCommands as $key => $commandsSet) { - ksort($commandsSet); - $sortedCommands[$key] = $commandsSet; - } - } - - return $sortedCommands; - } -} diff --git a/source/vendor/symfony/console/Descriptor/Descriptor.php b/source/vendor/symfony/console/Descriptor/Descriptor.php deleted file mode 100644 index 9c3878d..0000000 --- a/source/vendor/symfony/console/Descriptor/Descriptor.php +++ /dev/null @@ -1,97 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Descriptor; - -use Symfony\Component\Console\Application; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputDefinition; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; - -/** - * @author Jean-François Simon - * - * @internal - */ -abstract class Descriptor implements DescriptorInterface -{ - /** - * @var OutputInterface - */ - protected $output; - - /** - * {@inheritdoc} - */ - public function describe(OutputInterface $output, $object, array $options = []) - { - $this->output = $output; - - switch (true) { - case $object instanceof InputArgument: - $this->describeInputArgument($object, $options); - break; - case $object instanceof InputOption: - $this->describeInputOption($object, $options); - break; - case $object instanceof InputDefinition: - $this->describeInputDefinition($object, $options); - break; - case $object instanceof Command: - $this->describeCommand($object, $options); - break; - case $object instanceof Application: - $this->describeApplication($object, $options); - break; - default: - throw new InvalidArgumentException(sprintf('Object of type "%s" is not describable.', \get_class($object))); - } - } - - /** - * Writes content to output. - * - * @param string $content - * @param bool $decorated - */ - protected function write($content, $decorated = false) - { - $this->output->write($content, false, $decorated ? OutputInterface::OUTPUT_NORMAL : OutputInterface::OUTPUT_RAW); - } - - /** - * Describes an InputArgument instance. - */ - abstract protected function describeInputArgument(InputArgument $argument, array $options = []); - - /** - * Describes an InputOption instance. - */ - abstract protected function describeInputOption(InputOption $option, array $options = []); - - /** - * Describes an InputDefinition instance. - */ - abstract protected function describeInputDefinition(InputDefinition $definition, array $options = []); - - /** - * Describes a Command instance. - */ - abstract protected function describeCommand(Command $command, array $options = []); - - /** - * Describes an Application instance. - */ - abstract protected function describeApplication(Application $application, array $options = []); -} diff --git a/source/vendor/symfony/console/Descriptor/DescriptorInterface.php b/source/vendor/symfony/console/Descriptor/DescriptorInterface.php deleted file mode 100644 index e3184a6..0000000 --- a/source/vendor/symfony/console/Descriptor/DescriptorInterface.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Descriptor; - -use Symfony\Component\Console\Output\OutputInterface; - -/** - * Descriptor interface. - * - * @author Jean-François Simon - */ -interface DescriptorInterface -{ - /** - * Describes an object if supported. - * - * @param object $object - */ - public function describe(OutputInterface $output, $object, array $options = []); -} diff --git a/source/vendor/symfony/console/Descriptor/JsonDescriptor.php b/source/vendor/symfony/console/Descriptor/JsonDescriptor.php deleted file mode 100644 index 4c09e12..0000000 --- a/source/vendor/symfony/console/Descriptor/JsonDescriptor.php +++ /dev/null @@ -1,156 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Descriptor; - -use Symfony\Component\Console\Application; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputDefinition; -use Symfony\Component\Console\Input\InputOption; - -/** - * JSON descriptor. - * - * @author Jean-François Simon - * - * @internal - */ -class JsonDescriptor extends Descriptor -{ - /** - * {@inheritdoc} - */ - protected function describeInputArgument(InputArgument $argument, array $options = []) - { - $this->writeData($this->getInputArgumentData($argument), $options); - } - - /** - * {@inheritdoc} - */ - protected function describeInputOption(InputOption $option, array $options = []) - { - $this->writeData($this->getInputOptionData($option), $options); - } - - /** - * {@inheritdoc} - */ - protected function describeInputDefinition(InputDefinition $definition, array $options = []) - { - $this->writeData($this->getInputDefinitionData($definition), $options); - } - - /** - * {@inheritdoc} - */ - protected function describeCommand(Command $command, array $options = []) - { - $this->writeData($this->getCommandData($command), $options); - } - - /** - * {@inheritdoc} - */ - protected function describeApplication(Application $application, array $options = []) - { - $describedNamespace = $options['namespace'] ?? null; - $description = new ApplicationDescription($application, $describedNamespace, true); - $commands = []; - - foreach ($description->getCommands() as $command) { - $commands[] = $this->getCommandData($command); - } - - $data = []; - if ('UNKNOWN' !== $application->getName()) { - $data['application']['name'] = $application->getName(); - if ('UNKNOWN' !== $application->getVersion()) { - $data['application']['version'] = $application->getVersion(); - } - } - - $data['commands'] = $commands; - - if ($describedNamespace) { - $data['namespace'] = $describedNamespace; - } else { - $data['namespaces'] = array_values($description->getNamespaces()); - } - - $this->writeData($data, $options); - } - - /** - * Writes data as json. - */ - private function writeData(array $data, array $options) - { - $flags = $options['json_encoding'] ?? 0; - - $this->write(json_encode($data, $flags)); - } - - private function getInputArgumentData(InputArgument $argument): array - { - return [ - 'name' => $argument->getName(), - 'is_required' => $argument->isRequired(), - 'is_array' => $argument->isArray(), - 'description' => preg_replace('/\s*[\r\n]\s*/', ' ', $argument->getDescription()), - 'default' => \INF === $argument->getDefault() ? 'INF' : $argument->getDefault(), - ]; - } - - private function getInputOptionData(InputOption $option): array - { - return [ - 'name' => '--'.$option->getName(), - 'shortcut' => $option->getShortcut() ? '-'.str_replace('|', '|-', $option->getShortcut()) : '', - 'accept_value' => $option->acceptValue(), - 'is_value_required' => $option->isValueRequired(), - 'is_multiple' => $option->isArray(), - 'description' => preg_replace('/\s*[\r\n]\s*/', ' ', $option->getDescription()), - 'default' => \INF === $option->getDefault() ? 'INF' : $option->getDefault(), - ]; - } - - private function getInputDefinitionData(InputDefinition $definition): array - { - $inputArguments = []; - foreach ($definition->getArguments() as $name => $argument) { - $inputArguments[$name] = $this->getInputArgumentData($argument); - } - - $inputOptions = []; - foreach ($definition->getOptions() as $name => $option) { - $inputOptions[$name] = $this->getInputOptionData($option); - } - - return ['arguments' => $inputArguments, 'options' => $inputOptions]; - } - - private function getCommandData(Command $command): array - { - $command->getSynopsis(); - $command->mergeApplicationDefinition(false); - - return [ - 'name' => $command->getName(), - 'usage' => array_merge([$command->getSynopsis()], $command->getUsages(), $command->getAliases()), - 'description' => $command->getDescription(), - 'help' => $command->getProcessedHelp(), - 'definition' => $this->getInputDefinitionData($command->getNativeDefinition()), - 'hidden' => $command->isHidden(), - ]; - } -} diff --git a/source/vendor/symfony/console/Descriptor/MarkdownDescriptor.php b/source/vendor/symfony/console/Descriptor/MarkdownDescriptor.php deleted file mode 100644 index 9a9d280..0000000 --- a/source/vendor/symfony/console/Descriptor/MarkdownDescriptor.php +++ /dev/null @@ -1,182 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Descriptor; - -use Symfony\Component\Console\Application; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Helper\Helper; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputDefinition; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; - -/** - * Markdown descriptor. - * - * @author Jean-François Simon - * - * @internal - */ -class MarkdownDescriptor extends Descriptor -{ - /** - * {@inheritdoc} - */ - public function describe(OutputInterface $output, $object, array $options = []) - { - $decorated = $output->isDecorated(); - $output->setDecorated(false); - - parent::describe($output, $object, $options); - - $output->setDecorated($decorated); - } - - /** - * {@inheritdoc} - */ - protected function write($content, $decorated = true) - { - parent::write($content, $decorated); - } - - /** - * {@inheritdoc} - */ - protected function describeInputArgument(InputArgument $argument, array $options = []) - { - $this->write( - '#### `'.($argument->getName() ?: '')."`\n\n" - .($argument->getDescription() ? preg_replace('/\s*[\r\n]\s*/', "\n", $argument->getDescription())."\n\n" : '') - .'* Is required: '.($argument->isRequired() ? 'yes' : 'no')."\n" - .'* Is array: '.($argument->isArray() ? 'yes' : 'no')."\n" - .'* Default: `'.str_replace("\n", '', var_export($argument->getDefault(), true)).'`' - ); - } - - /** - * {@inheritdoc} - */ - protected function describeInputOption(InputOption $option, array $options = []) - { - $name = '--'.$option->getName(); - if ($option->getShortcut()) { - $name .= '|-'.str_replace('|', '|-', $option->getShortcut()).''; - } - - $this->write( - '#### `'.$name.'`'."\n\n" - .($option->getDescription() ? preg_replace('/\s*[\r\n]\s*/', "\n", $option->getDescription())."\n\n" : '') - .'* Accept value: '.($option->acceptValue() ? 'yes' : 'no')."\n" - .'* Is value required: '.($option->isValueRequired() ? 'yes' : 'no')."\n" - .'* Is multiple: '.($option->isArray() ? 'yes' : 'no')."\n" - .'* Default: `'.str_replace("\n", '', var_export($option->getDefault(), true)).'`' - ); - } - - /** - * {@inheritdoc} - */ - protected function describeInputDefinition(InputDefinition $definition, array $options = []) - { - if ($showArguments = \count($definition->getArguments()) > 0) { - $this->write('### Arguments'); - foreach ($definition->getArguments() as $argument) { - $this->write("\n\n"); - $this->write($this->describeInputArgument($argument)); - } - } - - if (\count($definition->getOptions()) > 0) { - if ($showArguments) { - $this->write("\n\n"); - } - - $this->write('### Options'); - foreach ($definition->getOptions() as $option) { - $this->write("\n\n"); - $this->write($this->describeInputOption($option)); - } - } - } - - /** - * {@inheritdoc} - */ - protected function describeCommand(Command $command, array $options = []) - { - $command->getSynopsis(); - $command->mergeApplicationDefinition(false); - - $this->write( - '`'.$command->getName()."`\n" - .str_repeat('-', Helper::strlen($command->getName()) + 2)."\n\n" - .($command->getDescription() ? $command->getDescription()."\n\n" : '') - .'### Usage'."\n\n" - .array_reduce(array_merge([$command->getSynopsis()], $command->getAliases(), $command->getUsages()), function ($carry, $usage) { - return $carry.'* `'.$usage.'`'."\n"; - }) - ); - - if ($help = $command->getProcessedHelp()) { - $this->write("\n"); - $this->write($help); - } - - if ($command->getNativeDefinition()) { - $this->write("\n\n"); - $this->describeInputDefinition($command->getNativeDefinition()); - } - } - - /** - * {@inheritdoc} - */ - protected function describeApplication(Application $application, array $options = []) - { - $describedNamespace = $options['namespace'] ?? null; - $description = new ApplicationDescription($application, $describedNamespace); - $title = $this->getApplicationTitle($application); - - $this->write($title."\n".str_repeat('=', Helper::strlen($title))); - - foreach ($description->getNamespaces() as $namespace) { - if (ApplicationDescription::GLOBAL_NAMESPACE !== $namespace['id']) { - $this->write("\n\n"); - $this->write('**'.$namespace['id'].':**'); - } - - $this->write("\n\n"); - $this->write(implode("\n", array_map(function ($commandName) use ($description) { - return sprintf('* [`%s`](#%s)', $commandName, str_replace(':', '', $description->getCommand($commandName)->getName())); - }, $namespace['commands']))); - } - - foreach ($description->getCommands() as $command) { - $this->write("\n\n"); - $this->write($this->describeCommand($command)); - } - } - - private function getApplicationTitle(Application $application): string - { - if ('UNKNOWN' !== $application->getName()) { - if ('UNKNOWN' !== $application->getVersion()) { - return sprintf('%s %s', $application->getName(), $application->getVersion()); - } - - return $application->getName(); - } - - return 'Console Tool'; - } -} diff --git a/source/vendor/symfony/console/Descriptor/TextDescriptor.php b/source/vendor/symfony/console/Descriptor/TextDescriptor.php deleted file mode 100644 index 7d4d5f0..0000000 --- a/source/vendor/symfony/console/Descriptor/TextDescriptor.php +++ /dev/null @@ -1,342 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Descriptor; - -use Symfony\Component\Console\Application; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Formatter\OutputFormatter; -use Symfony\Component\Console\Helper\Helper; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputDefinition; -use Symfony\Component\Console\Input\InputOption; - -/** - * Text descriptor. - * - * @author Jean-François Simon - * - * @internal - */ -class TextDescriptor extends Descriptor -{ - /** - * {@inheritdoc} - */ - protected function describeInputArgument(InputArgument $argument, array $options = []) - { - if (null !== $argument->getDefault() && (!\is_array($argument->getDefault()) || \count($argument->getDefault()))) { - $default = sprintf(' [default: %s]', $this->formatDefaultValue($argument->getDefault())); - } else { - $default = ''; - } - - $totalWidth = $options['total_width'] ?? Helper::strlen($argument->getName()); - $spacingWidth = $totalWidth - \strlen($argument->getName()); - - $this->writeText(sprintf(' %s %s%s%s', - $argument->getName(), - str_repeat(' ', $spacingWidth), - // + 4 = 2 spaces before , 2 spaces after - preg_replace('/\s*[\r\n]\s*/', "\n".str_repeat(' ', $totalWidth + 4), $argument->getDescription()), - $default - ), $options); - } - - /** - * {@inheritdoc} - */ - protected function describeInputOption(InputOption $option, array $options = []) - { - if ($option->acceptValue() && null !== $option->getDefault() && (!\is_array($option->getDefault()) || \count($option->getDefault()))) { - $default = sprintf(' [default: %s]', $this->formatDefaultValue($option->getDefault())); - } else { - $default = ''; - } - - $value = ''; - if ($option->acceptValue()) { - $value = '='.strtoupper($option->getName()); - - if ($option->isValueOptional()) { - $value = '['.$value.']'; - } - } - - $totalWidth = $options['total_width'] ?? $this->calculateTotalWidthForOptions([$option]); - $synopsis = sprintf('%s%s', - $option->getShortcut() ? sprintf('-%s, ', $option->getShortcut()) : ' ', - sprintf('--%s%s', $option->getName(), $value) - ); - - $spacingWidth = $totalWidth - Helper::strlen($synopsis); - - $this->writeText(sprintf(' %s %s%s%s%s', - $synopsis, - str_repeat(' ', $spacingWidth), - // + 4 = 2 spaces before , 2 spaces after - preg_replace('/\s*[\r\n]\s*/', "\n".str_repeat(' ', $totalWidth + 4), $option->getDescription()), - $default, - $option->isArray() ? ' (multiple values allowed)' : '' - ), $options); - } - - /** - * {@inheritdoc} - */ - protected function describeInputDefinition(InputDefinition $definition, array $options = []) - { - $totalWidth = $this->calculateTotalWidthForOptions($definition->getOptions()); - foreach ($definition->getArguments() as $argument) { - $totalWidth = max($totalWidth, Helper::strlen($argument->getName())); - } - - if ($definition->getArguments()) { - $this->writeText('Arguments:', $options); - $this->writeText("\n"); - foreach ($definition->getArguments() as $argument) { - $this->describeInputArgument($argument, array_merge($options, ['total_width' => $totalWidth])); - $this->writeText("\n"); - } - } - - if ($definition->getArguments() && $definition->getOptions()) { - $this->writeText("\n"); - } - - if ($definition->getOptions()) { - $laterOptions = []; - - $this->writeText('Options:', $options); - foreach ($definition->getOptions() as $option) { - if (\strlen($option->getShortcut() ?? '') > 1) { - $laterOptions[] = $option; - continue; - } - $this->writeText("\n"); - $this->describeInputOption($option, array_merge($options, ['total_width' => $totalWidth])); - } - foreach ($laterOptions as $option) { - $this->writeText("\n"); - $this->describeInputOption($option, array_merge($options, ['total_width' => $totalWidth])); - } - } - } - - /** - * {@inheritdoc} - */ - protected function describeCommand(Command $command, array $options = []) - { - $command->getSynopsis(true); - $command->getSynopsis(false); - $command->mergeApplicationDefinition(false); - - if ($description = $command->getDescription()) { - $this->writeText('Description:', $options); - $this->writeText("\n"); - $this->writeText(' '.$description); - $this->writeText("\n\n"); - } - - $this->writeText('Usage:', $options); - foreach (array_merge([$command->getSynopsis(true)], $command->getAliases(), $command->getUsages()) as $usage) { - $this->writeText("\n"); - $this->writeText(' '.OutputFormatter::escape($usage), $options); - } - $this->writeText("\n"); - - $definition = $command->getNativeDefinition(); - if ($definition->getOptions() || $definition->getArguments()) { - $this->writeText("\n"); - $this->describeInputDefinition($definition, $options); - $this->writeText("\n"); - } - - $help = $command->getProcessedHelp(); - if ($help && $help !== $description) { - $this->writeText("\n"); - $this->writeText('Help:', $options); - $this->writeText("\n"); - $this->writeText(' '.str_replace("\n", "\n ", $help), $options); - $this->writeText("\n"); - } - } - - /** - * {@inheritdoc} - */ - protected function describeApplication(Application $application, array $options = []) - { - $describedNamespace = $options['namespace'] ?? null; - $description = new ApplicationDescription($application, $describedNamespace); - - if (isset($options['raw_text']) && $options['raw_text']) { - $width = $this->getColumnWidth($description->getCommands()); - - foreach ($description->getCommands() as $command) { - $this->writeText(sprintf("%-{$width}s %s", $command->getName(), $command->getDescription()), $options); - $this->writeText("\n"); - } - } else { - if ('' != $help = $application->getHelp()) { - $this->writeText("$help\n\n", $options); - } - - $this->writeText("Usage:\n", $options); - $this->writeText(" command [options] [arguments]\n\n", $options); - - $this->describeInputDefinition(new InputDefinition($application->getDefinition()->getOptions()), $options); - - $this->writeText("\n"); - $this->writeText("\n"); - - $commands = $description->getCommands(); - $namespaces = $description->getNamespaces(); - if ($describedNamespace && $namespaces) { - // make sure all alias commands are included when describing a specific namespace - $describedNamespaceInfo = reset($namespaces); - foreach ($describedNamespaceInfo['commands'] as $name) { - $commands[$name] = $description->getCommand($name); - } - } - - // calculate max. width based on available commands per namespace - $width = $this->getColumnWidth(array_merge(...array_values(array_map(function ($namespace) use ($commands) { - return array_intersect($namespace['commands'], array_keys($commands)); - }, array_values($namespaces))))); - - if ($describedNamespace) { - $this->writeText(sprintf('Available commands for the "%s" namespace:', $describedNamespace), $options); - } else { - $this->writeText('Available commands:', $options); - } - - foreach ($namespaces as $namespace) { - $namespace['commands'] = array_filter($namespace['commands'], function ($name) use ($commands) { - return isset($commands[$name]); - }); - - if (!$namespace['commands']) { - continue; - } - - if (!$describedNamespace && ApplicationDescription::GLOBAL_NAMESPACE !== $namespace['id']) { - $this->writeText("\n"); - $this->writeText(' '.$namespace['id'].'', $options); - } - - foreach ($namespace['commands'] as $name) { - $this->writeText("\n"); - $spacingWidth = $width - Helper::strlen($name); - $command = $commands[$name]; - $commandAliases = $name === $command->getName() ? $this->getCommandAliasesText($command) : ''; - $this->writeText(sprintf(' %s%s%s', $name, str_repeat(' ', $spacingWidth), $commandAliases.$command->getDescription()), $options); - } - } - - $this->writeText("\n"); - } - } - - /** - * {@inheritdoc} - */ - private function writeText(string $content, array $options = []) - { - $this->write( - isset($options['raw_text']) && $options['raw_text'] ? strip_tags($content) : $content, - isset($options['raw_output']) ? !$options['raw_output'] : true - ); - } - - /** - * Formats command aliases to show them in the command description. - */ - private function getCommandAliasesText(Command $command): string - { - $text = ''; - $aliases = $command->getAliases(); - - if ($aliases) { - $text = '['.implode('|', $aliases).'] '; - } - - return $text; - } - - /** - * Formats input option/argument default value. - * - * @param mixed $default - */ - private function formatDefaultValue($default): string - { - if (\INF === $default) { - return 'INF'; - } - - if (\is_string($default)) { - $default = OutputFormatter::escape($default); - } elseif (\is_array($default)) { - foreach ($default as $key => $value) { - if (\is_string($value)) { - $default[$key] = OutputFormatter::escape($value); - } - } - } - - return str_replace('\\\\', '\\', json_encode($default, \JSON_UNESCAPED_SLASHES | \JSON_UNESCAPED_UNICODE)); - } - - /** - * @param array $commands - */ - private function getColumnWidth(array $commands): int - { - $widths = []; - - foreach ($commands as $command) { - if ($command instanceof Command) { - $widths[] = Helper::strlen($command->getName()); - foreach ($command->getAliases() as $alias) { - $widths[] = Helper::strlen($alias); - } - } else { - $widths[] = Helper::strlen($command); - } - } - - return $widths ? max($widths) + 2 : 0; - } - - /** - * @param InputOption[] $options - */ - private function calculateTotalWidthForOptions(array $options): int - { - $totalWidth = 0; - foreach ($options as $option) { - // "-" + shortcut + ", --" + name - $nameLength = 1 + max(Helper::strlen($option->getShortcut()), 1) + 4 + Helper::strlen($option->getName()); - - if ($option->acceptValue()) { - $valueLength = 1 + Helper::strlen($option->getName()); // = + value - $valueLength += $option->isValueOptional() ? 2 : 0; // [ + ] - - $nameLength += $valueLength; - } - $totalWidth = max($totalWidth, $nameLength); - } - - return $totalWidth; - } -} diff --git a/source/vendor/symfony/console/Descriptor/XmlDescriptor.php b/source/vendor/symfony/console/Descriptor/XmlDescriptor.php deleted file mode 100644 index e0ed53a..0000000 --- a/source/vendor/symfony/console/Descriptor/XmlDescriptor.php +++ /dev/null @@ -1,231 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Descriptor; - -use Symfony\Component\Console\Application; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputDefinition; -use Symfony\Component\Console\Input\InputOption; - -/** - * XML descriptor. - * - * @author Jean-François Simon - * - * @internal - */ -class XmlDescriptor extends Descriptor -{ - public function getInputDefinitionDocument(InputDefinition $definition): \DOMDocument - { - $dom = new \DOMDocument('1.0', 'UTF-8'); - $dom->appendChild($definitionXML = $dom->createElement('definition')); - - $definitionXML->appendChild($argumentsXML = $dom->createElement('arguments')); - foreach ($definition->getArguments() as $argument) { - $this->appendDocument($argumentsXML, $this->getInputArgumentDocument($argument)); - } - - $definitionXML->appendChild($optionsXML = $dom->createElement('options')); - foreach ($definition->getOptions() as $option) { - $this->appendDocument($optionsXML, $this->getInputOptionDocument($option)); - } - - return $dom; - } - - public function getCommandDocument(Command $command): \DOMDocument - { - $dom = new \DOMDocument('1.0', 'UTF-8'); - $dom->appendChild($commandXML = $dom->createElement('command')); - - $command->getSynopsis(); - $command->mergeApplicationDefinition(false); - - $commandXML->setAttribute('id', $command->getName()); - $commandXML->setAttribute('name', $command->getName()); - $commandXML->setAttribute('hidden', $command->isHidden() ? 1 : 0); - - $commandXML->appendChild($usagesXML = $dom->createElement('usages')); - - foreach (array_merge([$command->getSynopsis()], $command->getAliases(), $command->getUsages()) as $usage) { - $usagesXML->appendChild($dom->createElement('usage', $usage)); - } - - $commandXML->appendChild($descriptionXML = $dom->createElement('description')); - $descriptionXML->appendChild($dom->createTextNode(str_replace("\n", "\n ", $command->getDescription()))); - - $commandXML->appendChild($helpXML = $dom->createElement('help')); - $helpXML->appendChild($dom->createTextNode(str_replace("\n", "\n ", $command->getProcessedHelp()))); - - $definitionXML = $this->getInputDefinitionDocument($command->getNativeDefinition()); - $this->appendDocument($commandXML, $definitionXML->getElementsByTagName('definition')->item(0)); - - return $dom; - } - - public function getApplicationDocument(Application $application, string $namespace = null): \DOMDocument - { - $dom = new \DOMDocument('1.0', 'UTF-8'); - $dom->appendChild($rootXml = $dom->createElement('symfony')); - - if ('UNKNOWN' !== $application->getName()) { - $rootXml->setAttribute('name', $application->getName()); - if ('UNKNOWN' !== $application->getVersion()) { - $rootXml->setAttribute('version', $application->getVersion()); - } - } - - $rootXml->appendChild($commandsXML = $dom->createElement('commands')); - - $description = new ApplicationDescription($application, $namespace, true); - - if ($namespace) { - $commandsXML->setAttribute('namespace', $namespace); - } - - foreach ($description->getCommands() as $command) { - $this->appendDocument($commandsXML, $this->getCommandDocument($command)); - } - - if (!$namespace) { - $rootXml->appendChild($namespacesXML = $dom->createElement('namespaces')); - - foreach ($description->getNamespaces() as $namespaceDescription) { - $namespacesXML->appendChild($namespaceArrayXML = $dom->createElement('namespace')); - $namespaceArrayXML->setAttribute('id', $namespaceDescription['id']); - - foreach ($namespaceDescription['commands'] as $name) { - $namespaceArrayXML->appendChild($commandXML = $dom->createElement('command')); - $commandXML->appendChild($dom->createTextNode($name)); - } - } - } - - return $dom; - } - - /** - * {@inheritdoc} - */ - protected function describeInputArgument(InputArgument $argument, array $options = []) - { - $this->writeDocument($this->getInputArgumentDocument($argument)); - } - - /** - * {@inheritdoc} - */ - protected function describeInputOption(InputOption $option, array $options = []) - { - $this->writeDocument($this->getInputOptionDocument($option)); - } - - /** - * {@inheritdoc} - */ - protected function describeInputDefinition(InputDefinition $definition, array $options = []) - { - $this->writeDocument($this->getInputDefinitionDocument($definition)); - } - - /** - * {@inheritdoc} - */ - protected function describeCommand(Command $command, array $options = []) - { - $this->writeDocument($this->getCommandDocument($command)); - } - - /** - * {@inheritdoc} - */ - protected function describeApplication(Application $application, array $options = []) - { - $this->writeDocument($this->getApplicationDocument($application, $options['namespace'] ?? null)); - } - - /** - * Appends document children to parent node. - */ - private function appendDocument(\DOMNode $parentNode, \DOMNode $importedParent) - { - foreach ($importedParent->childNodes as $childNode) { - $parentNode->appendChild($parentNode->ownerDocument->importNode($childNode, true)); - } - } - - /** - * Writes DOM document. - */ - private function writeDocument(\DOMDocument $dom) - { - $dom->formatOutput = true; - $this->write($dom->saveXML()); - } - - private function getInputArgumentDocument(InputArgument $argument): \DOMDocument - { - $dom = new \DOMDocument('1.0', 'UTF-8'); - - $dom->appendChild($objectXML = $dom->createElement('argument')); - $objectXML->setAttribute('name', $argument->getName()); - $objectXML->setAttribute('is_required', $argument->isRequired() ? 1 : 0); - $objectXML->setAttribute('is_array', $argument->isArray() ? 1 : 0); - $objectXML->appendChild($descriptionXML = $dom->createElement('description')); - $descriptionXML->appendChild($dom->createTextNode($argument->getDescription())); - - $objectXML->appendChild($defaultsXML = $dom->createElement('defaults')); - $defaults = \is_array($argument->getDefault()) ? $argument->getDefault() : (\is_bool($argument->getDefault()) ? [var_export($argument->getDefault(), true)] : ($argument->getDefault() ? [$argument->getDefault()] : [])); - foreach ($defaults as $default) { - $defaultsXML->appendChild($defaultXML = $dom->createElement('default')); - $defaultXML->appendChild($dom->createTextNode($default)); - } - - return $dom; - } - - private function getInputOptionDocument(InputOption $option): \DOMDocument - { - $dom = new \DOMDocument('1.0', 'UTF-8'); - - $dom->appendChild($objectXML = $dom->createElement('option')); - $objectXML->setAttribute('name', '--'.$option->getName()); - $pos = strpos($option->getShortcut() ?? '', '|'); - if (false !== $pos) { - $objectXML->setAttribute('shortcut', '-'.substr($option->getShortcut(), 0, $pos)); - $objectXML->setAttribute('shortcuts', '-'.str_replace('|', '|-', $option->getShortcut())); - } else { - $objectXML->setAttribute('shortcut', $option->getShortcut() ? '-'.$option->getShortcut() : ''); - } - $objectXML->setAttribute('accept_value', $option->acceptValue() ? 1 : 0); - $objectXML->setAttribute('is_value_required', $option->isValueRequired() ? 1 : 0); - $objectXML->setAttribute('is_multiple', $option->isArray() ? 1 : 0); - $objectXML->appendChild($descriptionXML = $dom->createElement('description')); - $descriptionXML->appendChild($dom->createTextNode($option->getDescription())); - - if ($option->acceptValue()) { - $defaults = \is_array($option->getDefault()) ? $option->getDefault() : (\is_bool($option->getDefault()) ? [var_export($option->getDefault(), true)] : ($option->getDefault() ? [$option->getDefault()] : [])); - $objectXML->appendChild($defaultsXML = $dom->createElement('defaults')); - - if (!empty($defaults)) { - foreach ($defaults as $default) { - $defaultsXML->appendChild($defaultXML = $dom->createElement('default')); - $defaultXML->appendChild($dom->createTextNode($default)); - } - } - } - - return $dom; - } -} diff --git a/source/vendor/symfony/console/Event/ConsoleCommandEvent.php b/source/vendor/symfony/console/Event/ConsoleCommandEvent.php deleted file mode 100644 index 9691db6..0000000 --- a/source/vendor/symfony/console/Event/ConsoleCommandEvent.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Event; - -/** - * Allows to do things before the command is executed, like skipping the command or changing the input. - * - * @author Fabien Potencier - * - * @final since Symfony 4.4 - */ -class ConsoleCommandEvent extends ConsoleEvent -{ - /** - * The return code for skipped commands, this will also be passed into the terminate event. - */ - public const RETURN_CODE_DISABLED = 113; - - /** - * Indicates if the command should be run or skipped. - */ - private $commandShouldRun = true; - - /** - * Disables the command, so it won't be run. - * - * @return bool - */ - public function disableCommand() - { - return $this->commandShouldRun = false; - } - - /** - * Enables the command. - * - * @return bool - */ - public function enableCommand() - { - return $this->commandShouldRun = true; - } - - /** - * Returns true if the command is runnable, false otherwise. - * - * @return bool - */ - public function commandShouldRun() - { - return $this->commandShouldRun; - } -} diff --git a/source/vendor/symfony/console/Event/ConsoleErrorEvent.php b/source/vendor/symfony/console/Event/ConsoleErrorEvent.php deleted file mode 100644 index 57d9b38..0000000 --- a/source/vendor/symfony/console/Event/ConsoleErrorEvent.php +++ /dev/null @@ -1,58 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Event; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; - -/** - * Allows to handle throwables thrown while running a command. - * - * @author Wouter de Jong - */ -final class ConsoleErrorEvent extends ConsoleEvent -{ - private $error; - private $exitCode; - - public function __construct(InputInterface $input, OutputInterface $output, \Throwable $error, Command $command = null) - { - parent::__construct($command, $input, $output); - - $this->error = $error; - } - - public function getError(): \Throwable - { - return $this->error; - } - - public function setError(\Throwable $error): void - { - $this->error = $error; - } - - public function setExitCode(int $exitCode): void - { - $this->exitCode = $exitCode; - - $r = new \ReflectionProperty($this->error, 'code'); - $r->setAccessible(true); - $r->setValue($this->error, $this->exitCode); - } - - public function getExitCode(): int - { - return $this->exitCode ?? (\is_int($this->error->getCode()) && 0 !== $this->error->getCode() ? $this->error->getCode() : 1); - } -} diff --git a/source/vendor/symfony/console/Event/ConsoleEvent.php b/source/vendor/symfony/console/Event/ConsoleEvent.php deleted file mode 100644 index 400eb57..0000000 --- a/source/vendor/symfony/console/Event/ConsoleEvent.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Event; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\EventDispatcher\Event; - -/** - * Allows to inspect input and output of a command. - * - * @author Francesco Levorato - */ -class ConsoleEvent extends Event -{ - protected $command; - - private $input; - private $output; - - public function __construct(?Command $command, InputInterface $input, OutputInterface $output) - { - $this->command = $command; - $this->input = $input; - $this->output = $output; - } - - /** - * Gets the command that is executed. - * - * @return Command|null A Command instance - */ - public function getCommand() - { - return $this->command; - } - - /** - * Gets the input instance. - * - * @return InputInterface An InputInterface instance - */ - public function getInput() - { - return $this->input; - } - - /** - * Gets the output instance. - * - * @return OutputInterface An OutputInterface instance - */ - public function getOutput() - { - return $this->output; - } -} diff --git a/source/vendor/symfony/console/Event/ConsoleTerminateEvent.php b/source/vendor/symfony/console/Event/ConsoleTerminateEvent.php deleted file mode 100644 index 43d0f8a..0000000 --- a/source/vendor/symfony/console/Event/ConsoleTerminateEvent.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Event; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; - -/** - * Allows to manipulate the exit code of a command after its execution. - * - * @author Francesco Levorato - * - * @final since Symfony 4.4 - */ -class ConsoleTerminateEvent extends ConsoleEvent -{ - private $exitCode; - - public function __construct(Command $command, InputInterface $input, OutputInterface $output, int $exitCode) - { - parent::__construct($command, $input, $output); - - $this->setExitCode($exitCode); - } - - /** - * Sets the exit code. - * - * @param int $exitCode The command exit code - */ - public function setExitCode($exitCode) - { - $this->exitCode = (int) $exitCode; - } - - /** - * Gets the exit code. - * - * @return int The command exit code - */ - public function getExitCode() - { - return $this->exitCode; - } -} diff --git a/source/vendor/symfony/console/EventListener/ErrorListener.php b/source/vendor/symfony/console/EventListener/ErrorListener.php deleted file mode 100644 index 897d985..0000000 --- a/source/vendor/symfony/console/EventListener/ErrorListener.php +++ /dev/null @@ -1,95 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\EventListener; - -use Psr\Log\LoggerInterface; -use Symfony\Component\Console\ConsoleEvents; -use Symfony\Component\Console\Event\ConsoleErrorEvent; -use Symfony\Component\Console\Event\ConsoleEvent; -use Symfony\Component\Console\Event\ConsoleTerminateEvent; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; - -/** - * @author James Halsall - * @author Robin Chalas - */ -class ErrorListener implements EventSubscriberInterface -{ - private $logger; - - public function __construct(LoggerInterface $logger = null) - { - $this->logger = $logger; - } - - public function onConsoleError(ConsoleErrorEvent $event) - { - if (null === $this->logger) { - return; - } - - $error = $event->getError(); - - if (!$inputString = $this->getInputString($event)) { - $this->logger->critical('An error occurred while using the console. Message: "{message}"', ['exception' => $error, 'message' => $error->getMessage()]); - - return; - } - - $this->logger->critical('Error thrown while running command "{command}". Message: "{message}"', ['exception' => $error, 'command' => $inputString, 'message' => $error->getMessage()]); - } - - public function onConsoleTerminate(ConsoleTerminateEvent $event) - { - if (null === $this->logger) { - return; - } - - $exitCode = $event->getExitCode(); - - if (0 === $exitCode) { - return; - } - - if (!$inputString = $this->getInputString($event)) { - $this->logger->debug('The console exited with code "{code}"', ['code' => $exitCode]); - - return; - } - - $this->logger->debug('Command "{command}" exited with code "{code}"', ['command' => $inputString, 'code' => $exitCode]); - } - - public static function getSubscribedEvents() - { - return [ - ConsoleEvents::ERROR => ['onConsoleError', -128], - ConsoleEvents::TERMINATE => ['onConsoleTerminate', -128], - ]; - } - - private static function getInputString(ConsoleEvent $event): ?string - { - $commandName = $event->getCommand() ? $event->getCommand()->getName() : null; - $input = $event->getInput(); - - if (method_exists($input, '__toString')) { - if ($commandName) { - return str_replace(["'$commandName'", "\"$commandName\""], $commandName, (string) $input); - } - - return (string) $input; - } - - return $commandName; - } -} diff --git a/source/vendor/symfony/console/Exception/CommandNotFoundException.php b/source/vendor/symfony/console/Exception/CommandNotFoundException.php deleted file mode 100644 index 590a71c..0000000 --- a/source/vendor/symfony/console/Exception/CommandNotFoundException.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Exception; - -/** - * Represents an incorrect command name typed in the console. - * - * @author Jérôme Tamarelle - */ -class CommandNotFoundException extends \InvalidArgumentException implements ExceptionInterface -{ - private $alternatives; - - /** - * @param string $message Exception message to throw - * @param string[] $alternatives List of similar defined names - * @param int $code Exception code - * @param \Throwable|null $previous Previous exception used for the exception chaining - */ - public function __construct(string $message, array $alternatives = [], int $code = 0, \Throwable $previous = null) - { - parent::__construct($message, $code, $previous); - - $this->alternatives = $alternatives; - } - - /** - * @return string[] A list of similar defined names - */ - public function getAlternatives() - { - return $this->alternatives; - } -} diff --git a/source/vendor/symfony/console/Exception/ExceptionInterface.php b/source/vendor/symfony/console/Exception/ExceptionInterface.php deleted file mode 100644 index 1624e13..0000000 --- a/source/vendor/symfony/console/Exception/ExceptionInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Exception; - -/** - * ExceptionInterface. - * - * @author Jérôme Tamarelle - */ -interface ExceptionInterface extends \Throwable -{ -} diff --git a/source/vendor/symfony/console/Exception/InvalidArgumentException.php b/source/vendor/symfony/console/Exception/InvalidArgumentException.php deleted file mode 100644 index 07cc0b6..0000000 --- a/source/vendor/symfony/console/Exception/InvalidArgumentException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Exception; - -/** - * @author Jérôme Tamarelle - */ -class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface -{ -} diff --git a/source/vendor/symfony/console/Exception/InvalidOptionException.php b/source/vendor/symfony/console/Exception/InvalidOptionException.php deleted file mode 100644 index b2eec61..0000000 --- a/source/vendor/symfony/console/Exception/InvalidOptionException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Exception; - -/** - * Represents an incorrect option name typed in the console. - * - * @author Jérôme Tamarelle - */ -class InvalidOptionException extends \InvalidArgumentException implements ExceptionInterface -{ -} diff --git a/source/vendor/symfony/console/Exception/LogicException.php b/source/vendor/symfony/console/Exception/LogicException.php deleted file mode 100644 index fc37b8d..0000000 --- a/source/vendor/symfony/console/Exception/LogicException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Exception; - -/** - * @author Jérôme Tamarelle - */ -class LogicException extends \LogicException implements ExceptionInterface -{ -} diff --git a/source/vendor/symfony/console/Exception/MissingInputException.php b/source/vendor/symfony/console/Exception/MissingInputException.php deleted file mode 100644 index 04f02ad..0000000 --- a/source/vendor/symfony/console/Exception/MissingInputException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Exception; - -/** - * Represents failure to read input from stdin. - * - * @author Gabriel Ostrolucký - */ -class MissingInputException extends RuntimeException implements ExceptionInterface -{ -} diff --git a/source/vendor/symfony/console/Exception/NamespaceNotFoundException.php b/source/vendor/symfony/console/Exception/NamespaceNotFoundException.php deleted file mode 100644 index dd16e45..0000000 --- a/source/vendor/symfony/console/Exception/NamespaceNotFoundException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Exception; - -/** - * Represents an incorrect namespace typed in the console. - * - * @author Pierre du Plessis - */ -class NamespaceNotFoundException extends CommandNotFoundException -{ -} diff --git a/source/vendor/symfony/console/Exception/RuntimeException.php b/source/vendor/symfony/console/Exception/RuntimeException.php deleted file mode 100644 index 51d7d80..0000000 --- a/source/vendor/symfony/console/Exception/RuntimeException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Exception; - -/** - * @author Jérôme Tamarelle - */ -class RuntimeException extends \RuntimeException implements ExceptionInterface -{ -} diff --git a/source/vendor/symfony/console/Formatter/OutputFormatter.php b/source/vendor/symfony/console/Formatter/OutputFormatter.php deleted file mode 100644 index 0f969c7..0000000 --- a/source/vendor/symfony/console/Formatter/OutputFormatter.php +++ /dev/null @@ -1,285 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Formatter; - -use Symfony\Component\Console\Exception\InvalidArgumentException; - -/** - * Formatter class for console output. - * - * @author Konstantin Kudryashov - * @author Roland Franssen - */ -class OutputFormatter implements WrappableOutputFormatterInterface -{ - private $decorated; - private $styles = []; - private $styleStack; - - public function __clone() - { - $this->styleStack = clone $this->styleStack; - foreach ($this->styles as $key => $value) { - $this->styles[$key] = clone $value; - } - } - - /** - * Escapes "<" special char in given text. - * - * @param string $text Text to escape - * - * @return string Escaped text - */ - public static function escape($text) - { - $text = preg_replace('/([^\\\\]?) FormatterStyle" instances - */ - public function __construct(bool $decorated = false, array $styles = []) - { - $this->decorated = $decorated; - - $this->setStyle('error', new OutputFormatterStyle('white', 'red')); - $this->setStyle('info', new OutputFormatterStyle('green')); - $this->setStyle('comment', new OutputFormatterStyle('yellow')); - $this->setStyle('question', new OutputFormatterStyle('black', 'cyan')); - - foreach ($styles as $name => $style) { - $this->setStyle($name, $style); - } - - $this->styleStack = new OutputFormatterStyleStack(); - } - - /** - * {@inheritdoc} - */ - public function setDecorated($decorated) - { - $this->decorated = (bool) $decorated; - } - - /** - * {@inheritdoc} - */ - public function isDecorated() - { - return $this->decorated; - } - - /** - * {@inheritdoc} - */ - public function setStyle($name, OutputFormatterStyleInterface $style) - { - $this->styles[strtolower($name)] = $style; - } - - /** - * {@inheritdoc} - */ - public function hasStyle($name) - { - return isset($this->styles[strtolower($name)]); - } - - /** - * {@inheritdoc} - */ - public function getStyle($name) - { - if (!$this->hasStyle($name)) { - throw new InvalidArgumentException(sprintf('Undefined style: "%s".', $name)); - } - - return $this->styles[strtolower($name)]; - } - - /** - * {@inheritdoc} - */ - public function format($message) - { - return $this->formatAndWrap((string) $message, 0); - } - - /** - * {@inheritdoc} - */ - public function formatAndWrap(string $message, int $width) - { - $offset = 0; - $output = ''; - $tagRegex = '[a-z][^<>]*+'; - $currentLineLength = 0; - preg_match_all("#<(($tagRegex) | /($tagRegex)?)>#ix", $message, $matches, \PREG_OFFSET_CAPTURE); - foreach ($matches[0] as $i => $match) { - $pos = $match[1]; - $text = $match[0]; - - if (0 != $pos && '\\' == $message[$pos - 1]) { - continue; - } - - // add the text up to the next tag - $output .= $this->applyCurrentStyle(substr($message, $offset, $pos - $offset), $output, $width, $currentLineLength); - $offset = $pos + \strlen($text); - - // opening tag? - if ($open = '/' != $text[1]) { - $tag = $matches[1][$i][0]; - } else { - $tag = $matches[3][$i][0] ?? ''; - } - - if (!$open && !$tag) { - // - $this->styleStack->pop(); - } elseif (null === $style = $this->createStyleFromString($tag)) { - $output .= $this->applyCurrentStyle($text, $output, $width, $currentLineLength); - } elseif ($open) { - $this->styleStack->push($style); - } else { - $this->styleStack->pop($style); - } - } - - $output .= $this->applyCurrentStyle(substr($message, $offset), $output, $width, $currentLineLength); - - if (str_contains($output, "\0")) { - return strtr($output, ["\0" => '\\', '\\<' => '<']); - } - - return str_replace('\\<', '<', $output); - } - - /** - * @return OutputFormatterStyleStack - */ - public function getStyleStack() - { - return $this->styleStack; - } - - /** - * Tries to create new style instance from string. - */ - private function createStyleFromString(string $string): ?OutputFormatterStyleInterface - { - if (isset($this->styles[$string])) { - return $this->styles[$string]; - } - - if (!preg_match_all('/([^=]+)=([^;]+)(;|$)/', $string, $matches, \PREG_SET_ORDER)) { - return null; - } - - $style = new OutputFormatterStyle(); - foreach ($matches as $match) { - array_shift($match); - $match[0] = strtolower($match[0]); - - if ('fg' == $match[0]) { - $style->setForeground(strtolower($match[1])); - } elseif ('bg' == $match[0]) { - $style->setBackground(strtolower($match[1])); - } elseif ('href' === $match[0]) { - $style->setHref($match[1]); - } elseif ('options' === $match[0]) { - preg_match_all('([^,;]+)', strtolower($match[1]), $options); - $options = array_shift($options); - foreach ($options as $option) { - $style->setOption($option); - } - } else { - return null; - } - } - - return $style; - } - - /** - * Applies current style from stack to text, if must be applied. - */ - private function applyCurrentStyle(string $text, string $current, int $width, int &$currentLineLength): string - { - if ('' === $text) { - return ''; - } - - if (!$width) { - return $this->isDecorated() ? $this->styleStack->getCurrent()->apply($text) : $text; - } - - if (!$currentLineLength && '' !== $current) { - $text = ltrim($text); - } - - if ($currentLineLength) { - $prefix = substr($text, 0, $i = $width - $currentLineLength)."\n"; - $text = substr($text, $i); - } else { - $prefix = ''; - } - - preg_match('~(\\n)$~', $text, $matches); - $text = $prefix.preg_replace('~([^\\n]{'.$width.'})\\ *~', "\$1\n", $text); - $text = rtrim($text, "\n").($matches[1] ?? ''); - - if (!$currentLineLength && '' !== $current && "\n" !== substr($current, -1)) { - $text = "\n".$text; - } - - $lines = explode("\n", $text); - - foreach ($lines as $line) { - $currentLineLength += \strlen($line); - if ($width <= $currentLineLength) { - $currentLineLength = 0; - } - } - - if ($this->isDecorated()) { - foreach ($lines as $i => $line) { - $lines[$i] = $this->styleStack->getCurrent()->apply($line); - } - } - - return implode("\n", $lines); - } -} diff --git a/source/vendor/symfony/console/Formatter/OutputFormatterInterface.php b/source/vendor/symfony/console/Formatter/OutputFormatterInterface.php deleted file mode 100644 index 22f40a3..0000000 --- a/source/vendor/symfony/console/Formatter/OutputFormatterInterface.php +++ /dev/null @@ -1,70 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Formatter; - -/** - * Formatter interface for console output. - * - * @author Konstantin Kudryashov - */ -interface OutputFormatterInterface -{ - /** - * Sets the decorated flag. - * - * @param bool $decorated Whether to decorate the messages or not - */ - public function setDecorated($decorated); - - /** - * Gets the decorated flag. - * - * @return bool true if the output will decorate messages, false otherwise - */ - public function isDecorated(); - - /** - * Sets a new style. - * - * @param string $name The style name - */ - public function setStyle($name, OutputFormatterStyleInterface $style); - - /** - * Checks if output formatter has style with specified name. - * - * @param string $name - * - * @return bool - */ - public function hasStyle($name); - - /** - * Gets style options from style with specified name. - * - * @param string $name - * - * @return OutputFormatterStyleInterface - * - * @throws \InvalidArgumentException When style isn't defined - */ - public function getStyle($name); - - /** - * Formats a message according to the given styles. - * - * @param string $message The message to style - * - * @return string The styled message - */ - public function format($message); -} diff --git a/source/vendor/symfony/console/Formatter/OutputFormatterStyle.php b/source/vendor/symfony/console/Formatter/OutputFormatterStyle.php deleted file mode 100644 index 7cb6116..0000000 --- a/source/vendor/symfony/console/Formatter/OutputFormatterStyle.php +++ /dev/null @@ -1,197 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Formatter; - -use Symfony\Component\Console\Exception\InvalidArgumentException; - -/** - * Formatter style class for defining styles. - * - * @author Konstantin Kudryashov - */ -class OutputFormatterStyle implements OutputFormatterStyleInterface -{ - private static $availableForegroundColors = [ - 'black' => ['set' => 30, 'unset' => 39], - 'red' => ['set' => 31, 'unset' => 39], - 'green' => ['set' => 32, 'unset' => 39], - 'yellow' => ['set' => 33, 'unset' => 39], - 'blue' => ['set' => 34, 'unset' => 39], - 'magenta' => ['set' => 35, 'unset' => 39], - 'cyan' => ['set' => 36, 'unset' => 39], - 'white' => ['set' => 37, 'unset' => 39], - 'default' => ['set' => 39, 'unset' => 39], - ]; - private static $availableBackgroundColors = [ - 'black' => ['set' => 40, 'unset' => 49], - 'red' => ['set' => 41, 'unset' => 49], - 'green' => ['set' => 42, 'unset' => 49], - 'yellow' => ['set' => 43, 'unset' => 49], - 'blue' => ['set' => 44, 'unset' => 49], - 'magenta' => ['set' => 45, 'unset' => 49], - 'cyan' => ['set' => 46, 'unset' => 49], - 'white' => ['set' => 47, 'unset' => 49], - 'default' => ['set' => 49, 'unset' => 49], - ]; - private static $availableOptions = [ - 'bold' => ['set' => 1, 'unset' => 22], - 'underscore' => ['set' => 4, 'unset' => 24], - 'blink' => ['set' => 5, 'unset' => 25], - 'reverse' => ['set' => 7, 'unset' => 27], - 'conceal' => ['set' => 8, 'unset' => 28], - ]; - - private $foreground; - private $background; - private $href; - private $options = []; - private $handlesHrefGracefully; - - /** - * Initializes output formatter style. - * - * @param string|null $foreground The style foreground color name - * @param string|null $background The style background color name - */ - public function __construct(string $foreground = null, string $background = null, array $options = []) - { - if (null !== $foreground) { - $this->setForeground($foreground); - } - if (null !== $background) { - $this->setBackground($background); - } - if (\count($options)) { - $this->setOptions($options); - } - } - - /** - * {@inheritdoc} - */ - public function setForeground($color = null) - { - if (null === $color) { - $this->foreground = null; - - return; - } - - if (!isset(static::$availableForegroundColors[$color])) { - throw new InvalidArgumentException(sprintf('Invalid foreground color specified: "%s". Expected one of (%s).', $color, implode(', ', array_keys(static::$availableForegroundColors)))); - } - - $this->foreground = static::$availableForegroundColors[$color]; - } - - /** - * {@inheritdoc} - */ - public function setBackground($color = null) - { - if (null === $color) { - $this->background = null; - - return; - } - - if (!isset(static::$availableBackgroundColors[$color])) { - throw new InvalidArgumentException(sprintf('Invalid background color specified: "%s". Expected one of (%s).', $color, implode(', ', array_keys(static::$availableBackgroundColors)))); - } - - $this->background = static::$availableBackgroundColors[$color]; - } - - public function setHref(string $url): void - { - $this->href = $url; - } - - /** - * {@inheritdoc} - */ - public function setOption($option) - { - if (!isset(static::$availableOptions[$option])) { - throw new InvalidArgumentException(sprintf('Invalid option specified: "%s". Expected one of (%s).', $option, implode(', ', array_keys(static::$availableOptions)))); - } - - if (!\in_array(static::$availableOptions[$option], $this->options)) { - $this->options[] = static::$availableOptions[$option]; - } - } - - /** - * {@inheritdoc} - */ - public function unsetOption($option) - { - if (!isset(static::$availableOptions[$option])) { - throw new InvalidArgumentException(sprintf('Invalid option specified: "%s". Expected one of (%s).', $option, implode(', ', array_keys(static::$availableOptions)))); - } - - $pos = array_search(static::$availableOptions[$option], $this->options); - if (false !== $pos) { - unset($this->options[$pos]); - } - } - - /** - * {@inheritdoc} - */ - public function setOptions(array $options) - { - $this->options = []; - - foreach ($options as $option) { - $this->setOption($option); - } - } - - /** - * {@inheritdoc} - */ - public function apply($text) - { - $setCodes = []; - $unsetCodes = []; - - if (null === $this->handlesHrefGracefully) { - $this->handlesHrefGracefully = 'JetBrains-JediTerm' !== getenv('TERMINAL_EMULATOR') - && (!getenv('KONSOLE_VERSION') || (int) getenv('KONSOLE_VERSION') > 201100); - } - - if (null !== $this->foreground) { - $setCodes[] = $this->foreground['set']; - $unsetCodes[] = $this->foreground['unset']; - } - if (null !== $this->background) { - $setCodes[] = $this->background['set']; - $unsetCodes[] = $this->background['unset']; - } - - foreach ($this->options as $option) { - $setCodes[] = $option['set']; - $unsetCodes[] = $option['unset']; - } - - if (null !== $this->href && $this->handlesHrefGracefully) { - $text = "\033]8;;$this->href\033\\$text\033]8;;\033\\"; - } - - if (0 === \count($setCodes)) { - return $text; - } - - return sprintf("\033[%sm%s\033[%sm", implode(';', $setCodes), $text, implode(';', $unsetCodes)); - } -} diff --git a/source/vendor/symfony/console/Formatter/OutputFormatterStyleInterface.php b/source/vendor/symfony/console/Formatter/OutputFormatterStyleInterface.php deleted file mode 100644 index af171c2..0000000 --- a/source/vendor/symfony/console/Formatter/OutputFormatterStyleInterface.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Formatter; - -/** - * Formatter style interface for defining styles. - * - * @author Konstantin Kudryashov - */ -interface OutputFormatterStyleInterface -{ - /** - * Sets style foreground color. - * - * @param string|null $color The color name - */ - public function setForeground($color = null); - - /** - * Sets style background color. - * - * @param string $color The color name - */ - public function setBackground($color = null); - - /** - * Sets some specific style option. - * - * @param string $option The option name - */ - public function setOption($option); - - /** - * Unsets some specific style option. - * - * @param string $option The option name - */ - public function unsetOption($option); - - /** - * Sets multiple style options at once. - */ - public function setOptions(array $options); - - /** - * Applies the style to a given text. - * - * @param string $text The text to style - * - * @return string - */ - public function apply($text); -} diff --git a/source/vendor/symfony/console/Formatter/OutputFormatterStyleStack.php b/source/vendor/symfony/console/Formatter/OutputFormatterStyleStack.php deleted file mode 100644 index fc48dc0..0000000 --- a/source/vendor/symfony/console/Formatter/OutputFormatterStyleStack.php +++ /dev/null @@ -1,110 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Formatter; - -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Contracts\Service\ResetInterface; - -/** - * @author Jean-François Simon - */ -class OutputFormatterStyleStack implements ResetInterface -{ - /** - * @var OutputFormatterStyleInterface[] - */ - private $styles; - - private $emptyStyle; - - public function __construct(OutputFormatterStyleInterface $emptyStyle = null) - { - $this->emptyStyle = $emptyStyle ?? new OutputFormatterStyle(); - $this->reset(); - } - - /** - * Resets stack (ie. empty internal arrays). - */ - public function reset() - { - $this->styles = []; - } - - /** - * Pushes a style in the stack. - */ - public function push(OutputFormatterStyleInterface $style) - { - $this->styles[] = $style; - } - - /** - * Pops a style from the stack. - * - * @return OutputFormatterStyleInterface - * - * @throws InvalidArgumentException When style tags incorrectly nested - */ - public function pop(OutputFormatterStyleInterface $style = null) - { - if (empty($this->styles)) { - return $this->emptyStyle; - } - - if (null === $style) { - return array_pop($this->styles); - } - - foreach (array_reverse($this->styles, true) as $index => $stackedStyle) { - if ($style->apply('') === $stackedStyle->apply('')) { - $this->styles = \array_slice($this->styles, 0, $index); - - return $stackedStyle; - } - } - - throw new InvalidArgumentException('Incorrectly nested style tag found.'); - } - - /** - * Computes current style with stacks top codes. - * - * @return OutputFormatterStyle - */ - public function getCurrent() - { - if (empty($this->styles)) { - return $this->emptyStyle; - } - - return $this->styles[\count($this->styles) - 1]; - } - - /** - * @return $this - */ - public function setEmptyStyle(OutputFormatterStyleInterface $emptyStyle) - { - $this->emptyStyle = $emptyStyle; - - return $this; - } - - /** - * @return OutputFormatterStyleInterface - */ - public function getEmptyStyle() - { - return $this->emptyStyle; - } -} diff --git a/source/vendor/symfony/console/Formatter/WrappableOutputFormatterInterface.php b/source/vendor/symfony/console/Formatter/WrappableOutputFormatterInterface.php deleted file mode 100644 index 6694053..0000000 --- a/source/vendor/symfony/console/Formatter/WrappableOutputFormatterInterface.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Formatter; - -/** - * Formatter interface for console output that supports word wrapping. - * - * @author Roland Franssen - */ -interface WrappableOutputFormatterInterface extends OutputFormatterInterface -{ - /** - * Formats a message according to the given styles, wrapping at `$width` (0 means no wrapping). - */ - public function formatAndWrap(string $message, int $width); -} diff --git a/source/vendor/symfony/console/Helper/DebugFormatterHelper.php b/source/vendor/symfony/console/Helper/DebugFormatterHelper.php deleted file mode 100644 index 1653ede..0000000 --- a/source/vendor/symfony/console/Helper/DebugFormatterHelper.php +++ /dev/null @@ -1,122 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Helper; - -/** - * Helps outputting debug information when running an external program from a command. - * - * An external program can be a Process, an HTTP request, or anything else. - * - * @author Fabien Potencier - */ -class DebugFormatterHelper extends Helper -{ - private $colors = ['black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white', 'default']; - private $started = []; - private $count = -1; - - /** - * Starts a debug formatting session. - * - * @param string $id The id of the formatting session - * @param string $message The message to display - * @param string $prefix The prefix to use - * - * @return string - */ - public function start($id, $message, $prefix = 'RUN') - { - $this->started[$id] = ['border' => ++$this->count % \count($this->colors)]; - - return sprintf("%s %s %s\n", $this->getBorder($id), $prefix, $message); - } - - /** - * Adds progress to a formatting session. - * - * @param string $id The id of the formatting session - * @param string $buffer The message to display - * @param bool $error Whether to consider the buffer as error - * @param string $prefix The prefix for output - * @param string $errorPrefix The prefix for error output - * - * @return string - */ - public function progress($id, $buffer, $error = false, $prefix = 'OUT', $errorPrefix = 'ERR') - { - $message = ''; - - if ($error) { - if (isset($this->started[$id]['out'])) { - $message .= "\n"; - unset($this->started[$id]['out']); - } - if (!isset($this->started[$id]['err'])) { - $message .= sprintf('%s %s ', $this->getBorder($id), $errorPrefix); - $this->started[$id]['err'] = true; - } - - $message .= str_replace("\n", sprintf("\n%s %s ", $this->getBorder($id), $errorPrefix), $buffer); - } else { - if (isset($this->started[$id]['err'])) { - $message .= "\n"; - unset($this->started[$id]['err']); - } - if (!isset($this->started[$id]['out'])) { - $message .= sprintf('%s %s ', $this->getBorder($id), $prefix); - $this->started[$id]['out'] = true; - } - - $message .= str_replace("\n", sprintf("\n%s %s ", $this->getBorder($id), $prefix), $buffer); - } - - return $message; - } - - /** - * Stops a formatting session. - * - * @param string $id The id of the formatting session - * @param string $message The message to display - * @param bool $successful Whether to consider the result as success - * @param string $prefix The prefix for the end output - * - * @return string - */ - public function stop($id, $message, $successful, $prefix = 'RES') - { - $trailingEOL = isset($this->started[$id]['out']) || isset($this->started[$id]['err']) ? "\n" : ''; - - if ($successful) { - return sprintf("%s%s %s %s\n", $trailingEOL, $this->getBorder($id), $prefix, $message); - } - - $message = sprintf("%s%s %s %s\n", $trailingEOL, $this->getBorder($id), $prefix, $message); - - unset($this->started[$id]['out'], $this->started[$id]['err']); - - return $message; - } - - private function getBorder(string $id): string - { - return sprintf(' ', $this->colors[$this->started[$id]['border']]); - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return 'debug_formatter'; - } -} diff --git a/source/vendor/symfony/console/Helper/DescriptorHelper.php b/source/vendor/symfony/console/Helper/DescriptorHelper.php deleted file mode 100644 index 3055bae..0000000 --- a/source/vendor/symfony/console/Helper/DescriptorHelper.php +++ /dev/null @@ -1,91 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Helper; - -use Symfony\Component\Console\Descriptor\DescriptorInterface; -use Symfony\Component\Console\Descriptor\JsonDescriptor; -use Symfony\Component\Console\Descriptor\MarkdownDescriptor; -use Symfony\Component\Console\Descriptor\TextDescriptor; -use Symfony\Component\Console\Descriptor\XmlDescriptor; -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Output\OutputInterface; - -/** - * This class adds helper method to describe objects in various formats. - * - * @author Jean-François Simon - */ -class DescriptorHelper extends Helper -{ - /** - * @var DescriptorInterface[] - */ - private $descriptors = []; - - public function __construct() - { - $this - ->register('txt', new TextDescriptor()) - ->register('xml', new XmlDescriptor()) - ->register('json', new JsonDescriptor()) - ->register('md', new MarkdownDescriptor()) - ; - } - - /** - * Describes an object if supported. - * - * Available options are: - * * format: string, the output format name - * * raw_text: boolean, sets output type as raw - * - * @param object $object - * - * @throws InvalidArgumentException when the given format is not supported - */ - public function describe(OutputInterface $output, $object, array $options = []) - { - $options = array_merge([ - 'raw_text' => false, - 'format' => 'txt', - ], $options); - - if (!isset($this->descriptors[$options['format']])) { - throw new InvalidArgumentException(sprintf('Unsupported format "%s".', $options['format'])); - } - - $descriptor = $this->descriptors[$options['format']]; - $descriptor->describe($output, $object, $options); - } - - /** - * Registers a descriptor. - * - * @param string $format - * - * @return $this - */ - public function register($format, DescriptorInterface $descriptor) - { - $this->descriptors[$format] = $descriptor; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return 'descriptor'; - } -} diff --git a/source/vendor/symfony/console/Helper/Dumper.php b/source/vendor/symfony/console/Helper/Dumper.php deleted file mode 100644 index b013b6c..0000000 --- a/source/vendor/symfony/console/Helper/Dumper.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Helper; - -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\VarDumper\Cloner\ClonerInterface; -use Symfony\Component\VarDumper\Cloner\VarCloner; -use Symfony\Component\VarDumper\Dumper\CliDumper; - -/** - * @author Roland Franssen - */ -final class Dumper -{ - private $output; - private $dumper; - private $cloner; - private $handler; - - public function __construct(OutputInterface $output, CliDumper $dumper = null, ClonerInterface $cloner = null) - { - $this->output = $output; - $this->dumper = $dumper; - $this->cloner = $cloner; - - if (class_exists(CliDumper::class)) { - $this->handler = function ($var): string { - $dumper = $this->dumper ?? $this->dumper = new CliDumper(null, null, CliDumper::DUMP_LIGHT_ARRAY | CliDumper::DUMP_COMMA_SEPARATOR); - $dumper->setColors($this->output->isDecorated()); - - return rtrim($dumper->dump(($this->cloner ?? $this->cloner = new VarCloner())->cloneVar($var)->withRefHandles(false), true)); - }; - } else { - $this->handler = function ($var): string { - switch (true) { - case null === $var: - return 'null'; - case true === $var: - return 'true'; - case false === $var: - return 'false'; - case \is_string($var): - return '"'.$var.'"'; - default: - return rtrim(print_r($var, true)); - } - }; - } - } - - public function __invoke($var): string - { - return ($this->handler)($var); - } -} diff --git a/source/vendor/symfony/console/Helper/FormatterHelper.php b/source/vendor/symfony/console/Helper/FormatterHelper.php deleted file mode 100644 index d6eccee..0000000 --- a/source/vendor/symfony/console/Helper/FormatterHelper.php +++ /dev/null @@ -1,102 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Helper; - -use Symfony\Component\Console\Formatter\OutputFormatter; - -/** - * The Formatter class provides helpers to format messages. - * - * @author Fabien Potencier - */ -class FormatterHelper extends Helper -{ - /** - * Formats a message within a section. - * - * @param string $section The section name - * @param string $message The message - * @param string $style The style to apply to the section - * - * @return string The format section - */ - public function formatSection($section, $message, $style = 'info') - { - return sprintf('<%s>[%s] %s', $style, $section, $style, $message); - } - - /** - * Formats a message as a block of text. - * - * @param string|array $messages The message to write in the block - * @param string $style The style to apply to the whole block - * @param bool $large Whether to return a large block - * - * @return string The formatter message - */ - public function formatBlock($messages, $style, $large = false) - { - if (!\is_array($messages)) { - $messages = [$messages]; - } - - $len = 0; - $lines = []; - foreach ($messages as $message) { - $message = OutputFormatter::escape($message); - $lines[] = sprintf($large ? ' %s ' : ' %s ', $message); - $len = max(self::strlen($message) + ($large ? 4 : 2), $len); - } - - $messages = $large ? [str_repeat(' ', $len)] : []; - for ($i = 0; isset($lines[$i]); ++$i) { - $messages[] = $lines[$i].str_repeat(' ', $len - self::strlen($lines[$i])); - } - if ($large) { - $messages[] = str_repeat(' ', $len); - } - - for ($i = 0; isset($messages[$i]); ++$i) { - $messages[$i] = sprintf('<%s>%s', $style, $messages[$i], $style); - } - - return implode("\n", $messages); - } - - /** - * Truncates a message to the given length. - * - * @param string $message - * @param int $length - * @param string $suffix - * - * @return string - */ - public function truncate($message, $length, $suffix = '...') - { - $computedLength = $length - self::strlen($suffix); - - if ($computedLength > self::strlen($message)) { - return $message; - } - - return self::substr($message, 0, $length).$suffix; - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return 'formatter'; - } -} diff --git a/source/vendor/symfony/console/Helper/Helper.php b/source/vendor/symfony/console/Helper/Helper.php deleted file mode 100644 index 0521aaf..0000000 --- a/source/vendor/symfony/console/Helper/Helper.php +++ /dev/null @@ -1,142 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Helper; - -use Symfony\Component\Console\Formatter\OutputFormatterInterface; - -/** - * Helper is the base class for all helper classes. - * - * @author Fabien Potencier - */ -abstract class Helper implements HelperInterface -{ - protected $helperSet = null; - - /** - * {@inheritdoc} - */ - public function setHelperSet(HelperSet $helperSet = null) - { - $this->helperSet = $helperSet; - } - - /** - * {@inheritdoc} - */ - public function getHelperSet() - { - return $this->helperSet; - } - - /** - * Returns the length of a string, using mb_strwidth if it is available. - * - * @param string $string The string to check its length - * - * @return int The length of the string - */ - public static function strlen($string) - { - $string = (string) $string; - - if (false === $encoding = mb_detect_encoding($string, null, true)) { - return \strlen($string); - } - - return mb_strwidth($string, $encoding); - } - - /** - * Returns the subset of a string, using mb_substr if it is available. - * - * @param string $string String to subset - * @param int $from Start offset - * @param int|null $length Length to read - * - * @return string The string subset - */ - public static function substr($string, $from, $length = null) - { - $string = (string) $string; - - if (false === $encoding = mb_detect_encoding($string, null, true)) { - return substr($string, $from, $length); - } - - return mb_substr($string, $from, $length, $encoding); - } - - public static function formatTime($secs) - { - static $timeFormats = [ - [0, '< 1 sec'], - [1, '1 sec'], - [2, 'secs', 1], - [60, '1 min'], - [120, 'mins', 60], - [3600, '1 hr'], - [7200, 'hrs', 3600], - [86400, '1 day'], - [172800, 'days', 86400], - ]; - - foreach ($timeFormats as $index => $format) { - if ($secs >= $format[0]) { - if ((isset($timeFormats[$index + 1]) && $secs < $timeFormats[$index + 1][0]) - || $index == \count($timeFormats) - 1 - ) { - if (2 == \count($format)) { - return $format[1]; - } - - return floor($secs / $format[2]).' '.$format[1]; - } - } - } - } - - public static function formatMemory($memory) - { - if ($memory >= 1024 * 1024 * 1024) { - return sprintf('%.1f GiB', $memory / 1024 / 1024 / 1024); - } - - if ($memory >= 1024 * 1024) { - return sprintf('%.1f MiB', $memory / 1024 / 1024); - } - - if ($memory >= 1024) { - return sprintf('%d KiB', $memory / 1024); - } - - return sprintf('%d B', $memory); - } - - public static function strlenWithoutDecoration(OutputFormatterInterface $formatter, $string) - { - return self::strlen(self::removeDecoration($formatter, $string)); - } - - public static function removeDecoration(OutputFormatterInterface $formatter, $string) - { - $isDecorated = $formatter->isDecorated(); - $formatter->setDecorated(false); - // remove <...> formatting - $string = $formatter->format($string); - // remove already formatted characters - $string = preg_replace("/\033\[[^m]*m/", '', $string); - $formatter->setDecorated($isDecorated); - - return $string; - } -} diff --git a/source/vendor/symfony/console/Helper/HelperInterface.php b/source/vendor/symfony/console/Helper/HelperInterface.php deleted file mode 100644 index 1ce8235..0000000 --- a/source/vendor/symfony/console/Helper/HelperInterface.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Helper; - -/** - * HelperInterface is the interface all helpers must implement. - * - * @author Fabien Potencier - */ -interface HelperInterface -{ - /** - * Sets the helper set associated with this helper. - */ - public function setHelperSet(HelperSet $helperSet = null); - - /** - * Gets the helper set associated with this helper. - * - * @return HelperSet A HelperSet instance - */ - public function getHelperSet(); - - /** - * Returns the canonical name of this helper. - * - * @return string The canonical name - */ - public function getName(); -} diff --git a/source/vendor/symfony/console/Helper/HelperSet.php b/source/vendor/symfony/console/Helper/HelperSet.php deleted file mode 100644 index 9aa1e67..0000000 --- a/source/vendor/symfony/console/Helper/HelperSet.php +++ /dev/null @@ -1,108 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Helper; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Exception\InvalidArgumentException; - -/** - * HelperSet represents a set of helpers to be used with a command. - * - * @author Fabien Potencier - */ -class HelperSet implements \IteratorAggregate -{ - /** - * @var Helper[] - */ - private $helpers = []; - private $command; - - /** - * @param Helper[] $helpers An array of helper - */ - public function __construct(array $helpers = []) - { - foreach ($helpers as $alias => $helper) { - $this->set($helper, \is_int($alias) ? null : $alias); - } - } - - /** - * Sets a helper. - * - * @param string $alias An alias - */ - public function set(HelperInterface $helper, $alias = null) - { - $this->helpers[$helper->getName()] = $helper; - if (null !== $alias) { - $this->helpers[$alias] = $helper; - } - - $helper->setHelperSet($this); - } - - /** - * Returns true if the helper if defined. - * - * @param string $name The helper name - * - * @return bool true if the helper is defined, false otherwise - */ - public function has($name) - { - return isset($this->helpers[$name]); - } - - /** - * Gets a helper value. - * - * @param string $name The helper name - * - * @return HelperInterface The helper instance - * - * @throws InvalidArgumentException if the helper is not defined - */ - public function get($name) - { - if (!$this->has($name)) { - throw new InvalidArgumentException(sprintf('The helper "%s" is not defined.', $name)); - } - - return $this->helpers[$name]; - } - - public function setCommand(Command $command = null) - { - $this->command = $command; - } - - /** - * Gets the command associated with this helper set. - * - * @return Command A Command instance - */ - public function getCommand() - { - return $this->command; - } - - /** - * @return \Traversable - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - return new \ArrayIterator($this->helpers); - } -} diff --git a/source/vendor/symfony/console/Helper/InputAwareHelper.php b/source/vendor/symfony/console/Helper/InputAwareHelper.php deleted file mode 100644 index 0d0dba2..0000000 --- a/source/vendor/symfony/console/Helper/InputAwareHelper.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Helper; - -use Symfony\Component\Console\Input\InputAwareInterface; -use Symfony\Component\Console\Input\InputInterface; - -/** - * An implementation of InputAwareInterface for Helpers. - * - * @author Wouter J - */ -abstract class InputAwareHelper extends Helper implements InputAwareInterface -{ - protected $input; - - /** - * {@inheritdoc} - */ - public function setInput(InputInterface $input) - { - $this->input = $input; - } -} diff --git a/source/vendor/symfony/console/Helper/ProcessHelper.php b/source/vendor/symfony/console/Helper/ProcessHelper.php deleted file mode 100644 index d580357..0000000 --- a/source/vendor/symfony/console/Helper/ProcessHelper.php +++ /dev/null @@ -1,154 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Helper; - -use Symfony\Component\Console\Output\ConsoleOutputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Process\Exception\ProcessFailedException; -use Symfony\Component\Process\Process; - -/** - * The ProcessHelper class provides helpers to run external processes. - * - * @author Fabien Potencier - * - * @final since Symfony 4.2 - */ -class ProcessHelper extends Helper -{ - /** - * Runs an external process. - * - * @param array|Process $cmd An instance of Process or an array of the command and arguments - * @param string|null $error An error message that must be displayed if something went wrong - * @param callable|null $callback A PHP callback to run whenever there is some - * output available on STDOUT or STDERR - * @param int $verbosity The threshold for verbosity - * - * @return Process The process that ran - */ - public function run(OutputInterface $output, $cmd, $error = null, callable $callback = null, $verbosity = OutputInterface::VERBOSITY_VERY_VERBOSE) - { - if (!class_exists(Process::class)) { - throw new \LogicException('The ProcessHelper cannot be run as the Process component is not installed. Try running "compose require symfony/process".'); - } - - if ($output instanceof ConsoleOutputInterface) { - $output = $output->getErrorOutput(); - } - - $formatter = $this->getHelperSet()->get('debug_formatter'); - - if ($cmd instanceof Process) { - $cmd = [$cmd]; - } - - if (!\is_array($cmd)) { - @trigger_error(sprintf('Passing a command as a string to "%s()" is deprecated since Symfony 4.2, pass it the command as an array of arguments instead.', __METHOD__), \E_USER_DEPRECATED); - $cmd = [method_exists(Process::class, 'fromShellCommandline') ? Process::fromShellCommandline($cmd) : new Process($cmd)]; - } - - if (\is_string($cmd[0] ?? null)) { - $process = new Process($cmd); - $cmd = []; - } elseif (($cmd[0] ?? null) instanceof Process) { - $process = $cmd[0]; - unset($cmd[0]); - } else { - throw new \InvalidArgumentException(sprintf('Invalid command provided to "%s()": the command should be an array whose first element is either the path to the binary to run or a "Process" object.', __METHOD__)); - } - - if ($verbosity <= $output->getVerbosity()) { - $output->write($formatter->start(spl_object_hash($process), $this->escapeString($process->getCommandLine()))); - } - - if ($output->isDebug()) { - $callback = $this->wrapCallback($output, $process, $callback); - } - - $process->run($callback, $cmd); - - if ($verbosity <= $output->getVerbosity()) { - $message = $process->isSuccessful() ? 'Command ran successfully' : sprintf('%s Command did not run successfully', $process->getExitCode()); - $output->write($formatter->stop(spl_object_hash($process), $message, $process->isSuccessful())); - } - - if (!$process->isSuccessful() && null !== $error) { - $output->writeln(sprintf('%s', $this->escapeString($error))); - } - - return $process; - } - - /** - * Runs the process. - * - * This is identical to run() except that an exception is thrown if the process - * exits with a non-zero exit code. - * - * @param string|Process $cmd An instance of Process or a command to run - * @param string|null $error An error message that must be displayed if something went wrong - * @param callable|null $callback A PHP callback to run whenever there is some - * output available on STDOUT or STDERR - * - * @return Process The process that ran - * - * @throws ProcessFailedException - * - * @see run() - */ - public function mustRun(OutputInterface $output, $cmd, $error = null, callable $callback = null) - { - $process = $this->run($output, $cmd, $error, $callback); - - if (!$process->isSuccessful()) { - throw new ProcessFailedException($process); - } - - return $process; - } - - /** - * Wraps a Process callback to add debugging output. - * - * @return callable - */ - public function wrapCallback(OutputInterface $output, Process $process, callable $callback = null) - { - if ($output instanceof ConsoleOutputInterface) { - $output = $output->getErrorOutput(); - } - - $formatter = $this->getHelperSet()->get('debug_formatter'); - - return function ($type, $buffer) use ($output, $process, $callback, $formatter) { - $output->write($formatter->progress(spl_object_hash($process), $this->escapeString($buffer), Process::ERR === $type)); - - if (null !== $callback) { - $callback($type, $buffer); - } - }; - } - - private function escapeString(string $str): string - { - return str_replace('<', '\\<', $str); - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return 'process'; - } -} diff --git a/source/vendor/symfony/console/Helper/ProgressBar.php b/source/vendor/symfony/console/Helper/ProgressBar.php deleted file mode 100644 index 1de9b7b..0000000 --- a/source/vendor/symfony/console/Helper/ProgressBar.php +++ /dev/null @@ -1,599 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Helper; - -use Symfony\Component\Console\Exception\LogicException; -use Symfony\Component\Console\Output\ConsoleOutputInterface; -use Symfony\Component\Console\Output\ConsoleSectionOutput; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Terminal; - -/** - * The ProgressBar provides helpers to display progress output. - * - * @author Fabien Potencier - * @author Chris Jones - */ -final class ProgressBar -{ - private $barWidth = 28; - private $barChar; - private $emptyBarChar = '-'; - private $progressChar = '>'; - private $format; - private $internalFormat; - private $redrawFreq = 1; - private $writeCount; - private $lastWriteTime; - private $minSecondsBetweenRedraws = 0; - private $maxSecondsBetweenRedraws = 1; - private $output; - private $step = 0; - private $max; - private $startTime; - private $stepWidth; - private $percent = 0.0; - private $formatLineCount; - private $messages = []; - private $overwrite = true; - private $terminal; - private $previousMessage; - - private static $formatters; - private static $formats; - - /** - * @param int $max Maximum steps (0 if unknown) - */ - public function __construct(OutputInterface $output, int $max = 0, float $minSecondsBetweenRedraws = 0.1) - { - if ($output instanceof ConsoleOutputInterface) { - $output = $output->getErrorOutput(); - } - - $this->output = $output; - $this->setMaxSteps($max); - $this->terminal = new Terminal(); - - if (0 < $minSecondsBetweenRedraws) { - $this->redrawFreq = null; - $this->minSecondsBetweenRedraws = $minSecondsBetweenRedraws; - } - - if (!$this->output->isDecorated()) { - // disable overwrite when output does not support ANSI codes. - $this->overwrite = false; - - // set a reasonable redraw frequency so output isn't flooded - $this->redrawFreq = null; - } - - $this->startTime = time(); - } - - /** - * Sets a placeholder formatter for a given name. - * - * This method also allow you to override an existing placeholder. - * - * @param string $name The placeholder name (including the delimiter char like %) - * @param callable $callable A PHP callable - */ - public static function setPlaceholderFormatterDefinition(string $name, callable $callable): void - { - if (!self::$formatters) { - self::$formatters = self::initPlaceholderFormatters(); - } - - self::$formatters[$name] = $callable; - } - - /** - * Gets the placeholder formatter for a given name. - * - * @param string $name The placeholder name (including the delimiter char like %) - * - * @return callable|null A PHP callable - */ - public static function getPlaceholderFormatterDefinition(string $name): ?callable - { - if (!self::$formatters) { - self::$formatters = self::initPlaceholderFormatters(); - } - - return self::$formatters[$name] ?? null; - } - - /** - * Sets a format for a given name. - * - * This method also allow you to override an existing format. - * - * @param string $name The format name - * @param string $format A format string - */ - public static function setFormatDefinition(string $name, string $format): void - { - if (!self::$formats) { - self::$formats = self::initFormats(); - } - - self::$formats[$name] = $format; - } - - /** - * Gets the format for a given name. - * - * @param string $name The format name - * - * @return string|null A format string - */ - public static function getFormatDefinition(string $name): ?string - { - if (!self::$formats) { - self::$formats = self::initFormats(); - } - - return self::$formats[$name] ?? null; - } - - /** - * Associates a text with a named placeholder. - * - * The text is displayed when the progress bar is rendered but only - * when the corresponding placeholder is part of the custom format line - * (by wrapping the name with %). - * - * @param string $message The text to associate with the placeholder - * @param string $name The name of the placeholder - */ - public function setMessage(string $message, string $name = 'message') - { - $this->messages[$name] = $message; - } - - public function getMessage(string $name = 'message') - { - return $this->messages[$name]; - } - - public function getStartTime(): int - { - return $this->startTime; - } - - public function getMaxSteps(): int - { - return $this->max; - } - - public function getProgress(): int - { - return $this->step; - } - - private function getStepWidth(): int - { - return $this->stepWidth; - } - - public function getProgressPercent(): float - { - return $this->percent; - } - - public function getBarOffset(): int - { - return floor($this->max ? $this->percent * $this->barWidth : (null === $this->redrawFreq ? (int) (min(5, $this->barWidth / 15) * $this->writeCount) : $this->step) % $this->barWidth); - } - - public function setBarWidth(int $size) - { - $this->barWidth = max(1, $size); - } - - public function getBarWidth(): int - { - return $this->barWidth; - } - - public function setBarCharacter(string $char) - { - $this->barChar = $char; - } - - public function getBarCharacter(): string - { - if (null === $this->barChar) { - return $this->max ? '=' : $this->emptyBarChar; - } - - return $this->barChar; - } - - public function setEmptyBarCharacter(string $char) - { - $this->emptyBarChar = $char; - } - - public function getEmptyBarCharacter(): string - { - return $this->emptyBarChar; - } - - public function setProgressCharacter(string $char) - { - $this->progressChar = $char; - } - - public function getProgressCharacter(): string - { - return $this->progressChar; - } - - public function setFormat(string $format) - { - $this->format = null; - $this->internalFormat = $format; - } - - /** - * Sets the redraw frequency. - * - * @param int|null $freq The frequency in steps - */ - public function setRedrawFrequency(?int $freq) - { - $this->redrawFreq = null !== $freq ? max(1, $freq) : null; - } - - public function minSecondsBetweenRedraws(float $seconds): void - { - $this->minSecondsBetweenRedraws = $seconds; - } - - public function maxSecondsBetweenRedraws(float $seconds): void - { - $this->maxSecondsBetweenRedraws = $seconds; - } - - /** - * Returns an iterator that will automatically update the progress bar when iterated. - * - * @param int|null $max Number of steps to complete the bar (0 if indeterminate), if null it will be inferred from $iterable - */ - public function iterate(iterable $iterable, int $max = null): iterable - { - $this->start($max ?? (is_countable($iterable) ? \count($iterable) : 0)); - - foreach ($iterable as $key => $value) { - yield $key => $value; - - $this->advance(); - } - - $this->finish(); - } - - /** - * Starts the progress output. - * - * @param int|null $max Number of steps to complete the bar (0 if indeterminate), null to leave unchanged - */ - public function start(int $max = null) - { - $this->startTime = time(); - $this->step = 0; - $this->percent = 0.0; - - if (null !== $max) { - $this->setMaxSteps($max); - } - - $this->display(); - } - - /** - * Advances the progress output X steps. - * - * @param int $step Number of steps to advance - */ - public function advance(int $step = 1) - { - $this->setProgress($this->step + $step); - } - - /** - * Sets whether to overwrite the progressbar, false for new line. - */ - public function setOverwrite(bool $overwrite) - { - $this->overwrite = $overwrite; - } - - public function setProgress(int $step) - { - if ($this->max && $step > $this->max) { - $this->max = $step; - } elseif ($step < 0) { - $step = 0; - } - - $redrawFreq = $this->redrawFreq ?? (($this->max ?: 10) / 10); - $prevPeriod = (int) ($this->step / $redrawFreq); - $currPeriod = (int) ($step / $redrawFreq); - $this->step = $step; - $this->percent = $this->max ? (float) $this->step / $this->max : 0; - $timeInterval = microtime(true) - $this->lastWriteTime; - - // Draw regardless of other limits - if ($this->max === $step) { - $this->display(); - - return; - } - - // Throttling - if ($timeInterval < $this->minSecondsBetweenRedraws) { - return; - } - - // Draw each step period, but not too late - if ($prevPeriod !== $currPeriod || $timeInterval >= $this->maxSecondsBetweenRedraws) { - $this->display(); - } - } - - public function setMaxSteps(int $max) - { - $this->format = null; - $this->max = max(0, $max); - $this->stepWidth = $this->max ? Helper::strlen((string) $this->max) : 4; - } - - /** - * Finishes the progress output. - */ - public function finish(): void - { - if (!$this->max) { - $this->max = $this->step; - } - - if ($this->step === $this->max && !$this->overwrite) { - // prevent double 100% output - return; - } - - $this->setProgress($this->max); - } - - /** - * Outputs the current progress string. - */ - public function display(): void - { - if (OutputInterface::VERBOSITY_QUIET === $this->output->getVerbosity()) { - return; - } - - if (null === $this->format) { - $this->setRealFormat($this->internalFormat ?: $this->determineBestFormat()); - } - - $this->overwrite($this->buildLine()); - } - - /** - * Removes the progress bar from the current line. - * - * This is useful if you wish to write some output - * while a progress bar is running. - * Call display() to show the progress bar again. - */ - public function clear(): void - { - if (!$this->overwrite) { - return; - } - - if (null === $this->format) { - $this->setRealFormat($this->internalFormat ?: $this->determineBestFormat()); - } - - $this->overwrite(''); - } - - private function setRealFormat(string $format) - { - // try to use the _nomax variant if available - if (!$this->max && null !== self::getFormatDefinition($format.'_nomax')) { - $this->format = self::getFormatDefinition($format.'_nomax'); - } elseif (null !== self::getFormatDefinition($format)) { - $this->format = self::getFormatDefinition($format); - } else { - $this->format = $format; - } - - $this->formatLineCount = substr_count($this->format, "\n"); - } - - /** - * Overwrites a previous message to the output. - */ - private function overwrite(string $message): void - { - if ($this->previousMessage === $message) { - return; - } - - $originalMessage = $message; - - if ($this->overwrite) { - if (null !== $this->previousMessage) { - if ($this->output instanceof ConsoleSectionOutput) { - $messageLines = explode("\n", $message); - $lineCount = \count($messageLines); - foreach ($messageLines as $messageLine) { - $messageLineLength = Helper::strlenWithoutDecoration($this->output->getFormatter(), $messageLine); - if ($messageLineLength > $this->terminal->getWidth()) { - $lineCount += floor($messageLineLength / $this->terminal->getWidth()); - } - } - $this->output->clear($lineCount); - } else { - // Erase previous lines - if ($this->formatLineCount > 0) { - $message = str_repeat("\x1B[1A\x1B[2K", $this->formatLineCount).$message; - } - - // Move the cursor to the beginning of the line and erase the line - $message = "\x0D\x1B[2K$message"; - } - } - } elseif ($this->step > 0) { - $message = \PHP_EOL.$message; - } - - $this->previousMessage = $originalMessage; - $this->lastWriteTime = microtime(true); - - $this->output->write($message); - ++$this->writeCount; - } - - private function determineBestFormat(): string - { - switch ($this->output->getVerbosity()) { - // OutputInterface::VERBOSITY_QUIET: display is disabled anyway - case OutputInterface::VERBOSITY_VERBOSE: - return $this->max ? 'verbose' : 'verbose_nomax'; - case OutputInterface::VERBOSITY_VERY_VERBOSE: - return $this->max ? 'very_verbose' : 'very_verbose_nomax'; - case OutputInterface::VERBOSITY_DEBUG: - return $this->max ? 'debug' : 'debug_nomax'; - default: - return $this->max ? 'normal' : 'normal_nomax'; - } - } - - private static function initPlaceholderFormatters(): array - { - return [ - 'bar' => function (self $bar, OutputInterface $output) { - $completeBars = $bar->getBarOffset(); - $display = str_repeat($bar->getBarCharacter(), $completeBars); - if ($completeBars < $bar->getBarWidth()) { - $emptyBars = $bar->getBarWidth() - $completeBars - Helper::strlenWithoutDecoration($output->getFormatter(), $bar->getProgressCharacter()); - $display .= $bar->getProgressCharacter().str_repeat($bar->getEmptyBarCharacter(), $emptyBars); - } - - return $display; - }, - 'elapsed' => function (self $bar) { - return Helper::formatTime(time() - $bar->getStartTime()); - }, - 'remaining' => function (self $bar) { - if (!$bar->getMaxSteps()) { - throw new LogicException('Unable to display the remaining time if the maximum number of steps is not set.'); - } - - if (!$bar->getProgress()) { - $remaining = 0; - } else { - $remaining = round((time() - $bar->getStartTime()) / $bar->getProgress() * ($bar->getMaxSteps() - $bar->getProgress())); - } - - return Helper::formatTime($remaining); - }, - 'estimated' => function (self $bar) { - if (!$bar->getMaxSteps()) { - throw new LogicException('Unable to display the estimated time if the maximum number of steps is not set.'); - } - - if (!$bar->getProgress()) { - $estimated = 0; - } else { - $estimated = round((time() - $bar->getStartTime()) / $bar->getProgress() * $bar->getMaxSteps()); - } - - return Helper::formatTime($estimated); - }, - 'memory' => function (self $bar) { - return Helper::formatMemory(memory_get_usage(true)); - }, - 'current' => function (self $bar) { - return str_pad($bar->getProgress(), $bar->getStepWidth(), ' ', \STR_PAD_LEFT); - }, - 'max' => function (self $bar) { - return $bar->getMaxSteps(); - }, - 'percent' => function (self $bar) { - return floor($bar->getProgressPercent() * 100); - }, - ]; - } - - private static function initFormats(): array - { - return [ - 'normal' => ' %current%/%max% [%bar%] %percent:3s%%', - 'normal_nomax' => ' %current% [%bar%]', - - 'verbose' => ' %current%/%max% [%bar%] %percent:3s%% %elapsed:6s%', - 'verbose_nomax' => ' %current% [%bar%] %elapsed:6s%', - - 'very_verbose' => ' %current%/%max% [%bar%] %percent:3s%% %elapsed:6s%/%estimated:-6s%', - 'very_verbose_nomax' => ' %current% [%bar%] %elapsed:6s%', - - 'debug' => ' %current%/%max% [%bar%] %percent:3s%% %elapsed:6s%/%estimated:-6s% %memory:6s%', - 'debug_nomax' => ' %current% [%bar%] %elapsed:6s% %memory:6s%', - ]; - } - - private function buildLine(): string - { - $regex = "{%([a-z\-_]+)(?:\:([^%]+))?%}i"; - $callback = function ($matches) { - if ($formatter = $this::getPlaceholderFormatterDefinition($matches[1])) { - $text = $formatter($this, $this->output); - } elseif (isset($this->messages[$matches[1]])) { - $text = $this->messages[$matches[1]]; - } else { - return $matches[0]; - } - - if (isset($matches[2])) { - $text = sprintf('%'.$matches[2], $text); - } - - return $text; - }; - $line = preg_replace_callback($regex, $callback, $this->format); - - // gets string length for each sub line with multiline format - $linesLength = array_map(function ($subLine) { - return Helper::strlenWithoutDecoration($this->output->getFormatter(), rtrim($subLine, "\r")); - }, explode("\n", $line)); - - $linesWidth = max($linesLength); - - $terminalWidth = $this->terminal->getWidth(); - if ($linesWidth <= $terminalWidth) { - return $line; - } - - $this->setBarWidth($this->barWidth - $linesWidth + $terminalWidth); - - return preg_replace_callback($regex, $callback, $this->format); - } -} diff --git a/source/vendor/symfony/console/Helper/ProgressIndicator.php b/source/vendor/symfony/console/Helper/ProgressIndicator.php deleted file mode 100644 index dc37148..0000000 --- a/source/vendor/symfony/console/Helper/ProgressIndicator.php +++ /dev/null @@ -1,266 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Helper; - -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Exception\LogicException; -use Symfony\Component\Console\Output\OutputInterface; - -/** - * @author Kevin Bond - */ -class ProgressIndicator -{ - private $output; - private $startTime; - private $format; - private $message; - private $indicatorValues; - private $indicatorCurrent; - private $indicatorChangeInterval; - private $indicatorUpdateTime; - private $started = false; - - private static $formatters; - private static $formats; - - /** - * @param string|null $format Indicator format - * @param int $indicatorChangeInterval Change interval in milliseconds - * @param array|null $indicatorValues Animated indicator characters - */ - public function __construct(OutputInterface $output, string $format = null, int $indicatorChangeInterval = 100, array $indicatorValues = null) - { - $this->output = $output; - - if (null === $format) { - $format = $this->determineBestFormat(); - } - - if (null === $indicatorValues) { - $indicatorValues = ['-', '\\', '|', '/']; - } - - $indicatorValues = array_values($indicatorValues); - - if (2 > \count($indicatorValues)) { - throw new InvalidArgumentException('Must have at least 2 indicator value characters.'); - } - - $this->format = self::getFormatDefinition($format); - $this->indicatorChangeInterval = $indicatorChangeInterval; - $this->indicatorValues = $indicatorValues; - $this->startTime = time(); - } - - /** - * Sets the current indicator message. - * - * @param string|null $message - */ - public function setMessage($message) - { - $this->message = $message; - - $this->display(); - } - - /** - * Starts the indicator output. - * - * @param $message - */ - public function start($message) - { - if ($this->started) { - throw new LogicException('Progress indicator already started.'); - } - - $this->message = $message; - $this->started = true; - $this->startTime = time(); - $this->indicatorUpdateTime = $this->getCurrentTimeInMilliseconds() + $this->indicatorChangeInterval; - $this->indicatorCurrent = 0; - - $this->display(); - } - - /** - * Advances the indicator. - */ - public function advance() - { - if (!$this->started) { - throw new LogicException('Progress indicator has not yet been started.'); - } - - if (!$this->output->isDecorated()) { - return; - } - - $currentTime = $this->getCurrentTimeInMilliseconds(); - - if ($currentTime < $this->indicatorUpdateTime) { - return; - } - - $this->indicatorUpdateTime = $currentTime + $this->indicatorChangeInterval; - ++$this->indicatorCurrent; - - $this->display(); - } - - /** - * Finish the indicator with message. - * - * @param $message - */ - public function finish($message) - { - if (!$this->started) { - throw new LogicException('Progress indicator has not yet been started.'); - } - - $this->message = $message; - $this->display(); - $this->output->writeln(''); - $this->started = false; - } - - /** - * Gets the format for a given name. - * - * @param string $name The format name - * - * @return string|null A format string - */ - public static function getFormatDefinition($name) - { - if (!self::$formats) { - self::$formats = self::initFormats(); - } - - return self::$formats[$name] ?? null; - } - - /** - * Sets a placeholder formatter for a given name. - * - * This method also allow you to override an existing placeholder. - * - * @param string $name The placeholder name (including the delimiter char like %) - * @param callable $callable A PHP callable - */ - public static function setPlaceholderFormatterDefinition($name, $callable) - { - if (!self::$formatters) { - self::$formatters = self::initPlaceholderFormatters(); - } - - self::$formatters[$name] = $callable; - } - - /** - * Gets the placeholder formatter for a given name. - * - * @param string $name The placeholder name (including the delimiter char like %) - * - * @return callable|null A PHP callable - */ - public static function getPlaceholderFormatterDefinition($name) - { - if (!self::$formatters) { - self::$formatters = self::initPlaceholderFormatters(); - } - - return self::$formatters[$name] ?? null; - } - - private function display() - { - if (OutputInterface::VERBOSITY_QUIET === $this->output->getVerbosity()) { - return; - } - - $this->overwrite(preg_replace_callback("{%([a-z\-_]+)(?:\:([^%]+))?%}i", function ($matches) { - if ($formatter = self::getPlaceholderFormatterDefinition($matches[1])) { - return $formatter($this); - } - - return $matches[0]; - }, $this->format ?? '')); - } - - private function determineBestFormat(): string - { - switch ($this->output->getVerbosity()) { - // OutputInterface::VERBOSITY_QUIET: display is disabled anyway - case OutputInterface::VERBOSITY_VERBOSE: - return $this->output->isDecorated() ? 'verbose' : 'verbose_no_ansi'; - case OutputInterface::VERBOSITY_VERY_VERBOSE: - case OutputInterface::VERBOSITY_DEBUG: - return $this->output->isDecorated() ? 'very_verbose' : 'very_verbose_no_ansi'; - default: - return $this->output->isDecorated() ? 'normal' : 'normal_no_ansi'; - } - } - - /** - * Overwrites a previous message to the output. - */ - private function overwrite(string $message) - { - if ($this->output->isDecorated()) { - $this->output->write("\x0D\x1B[2K"); - $this->output->write($message); - } else { - $this->output->writeln($message); - } - } - - private function getCurrentTimeInMilliseconds(): float - { - return round(microtime(true) * 1000); - } - - private static function initPlaceholderFormatters(): array - { - return [ - 'indicator' => function (self $indicator) { - return $indicator->indicatorValues[$indicator->indicatorCurrent % \count($indicator->indicatorValues)]; - }, - 'message' => function (self $indicator) { - return $indicator->message; - }, - 'elapsed' => function (self $indicator) { - return Helper::formatTime(time() - $indicator->startTime); - }, - 'memory' => function () { - return Helper::formatMemory(memory_get_usage(true)); - }, - ]; - } - - private static function initFormats(): array - { - return [ - 'normal' => ' %indicator% %message%', - 'normal_no_ansi' => ' %message%', - - 'verbose' => ' %indicator% %message% (%elapsed:6s%)', - 'verbose_no_ansi' => ' %message% (%elapsed:6s%)', - - 'very_verbose' => ' %indicator% %message% (%elapsed:6s%, %memory:6s%)', - 'very_verbose_no_ansi' => ' %message% (%elapsed:6s%, %memory:6s%)', - ]; - } -} diff --git a/source/vendor/symfony/console/Helper/QuestionHelper.php b/source/vendor/symfony/console/Helper/QuestionHelper.php deleted file mode 100644 index 089de76..0000000 --- a/source/vendor/symfony/console/Helper/QuestionHelper.php +++ /dev/null @@ -1,540 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Helper; - -use Symfony\Component\Console\Exception\MissingInputException; -use Symfony\Component\Console\Exception\RuntimeException; -use Symfony\Component\Console\Formatter\OutputFormatter; -use Symfony\Component\Console\Formatter\OutputFormatterStyle; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\StreamableInputInterface; -use Symfony\Component\Console\Output\ConsoleOutputInterface; -use Symfony\Component\Console\Output\ConsoleSectionOutput; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Question\ChoiceQuestion; -use Symfony\Component\Console\Question\Question; -use Symfony\Component\Console\Terminal; - -/** - * The QuestionHelper class provides helpers to interact with the user. - * - * @author Fabien Potencier - */ -class QuestionHelper extends Helper -{ - private $inputStream; - private static $shell; - private static $stty = true; - private static $stdinIsInteractive; - - /** - * Asks a question to the user. - * - * @return mixed The user answer - * - * @throws RuntimeException If there is no data to read in the input stream - */ - public function ask(InputInterface $input, OutputInterface $output, Question $question) - { - if ($output instanceof ConsoleOutputInterface) { - $output = $output->getErrorOutput(); - } - - if (!$input->isInteractive()) { - return $this->getDefaultAnswer($question); - } - - if ($input instanceof StreamableInputInterface && $stream = $input->getStream()) { - $this->inputStream = $stream; - } - - try { - if (!$question->getValidator()) { - return $this->doAsk($output, $question); - } - - $interviewer = function () use ($output, $question) { - return $this->doAsk($output, $question); - }; - - return $this->validateAttempts($interviewer, $output, $question); - } catch (MissingInputException $exception) { - $input->setInteractive(false); - - if (null === $fallbackOutput = $this->getDefaultAnswer($question)) { - throw $exception; - } - - return $fallbackOutput; - } - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return 'question'; - } - - /** - * Prevents usage of stty. - */ - public static function disableStty() - { - self::$stty = false; - } - - /** - * Asks the question to the user. - * - * @return mixed - * - * @throws RuntimeException In case the fallback is deactivated and the response cannot be hidden - */ - private function doAsk(OutputInterface $output, Question $question) - { - $this->writePrompt($output, $question); - - $inputStream = $this->inputStream ?: \STDIN; - $autocomplete = $question->getAutocompleterCallback(); - - if (null === $autocomplete || !self::$stty || !Terminal::hasSttyAvailable()) { - $ret = false; - if ($question->isHidden()) { - try { - $hiddenResponse = $this->getHiddenResponse($output, $inputStream, $question->isTrimmable()); - $ret = $question->isTrimmable() ? trim($hiddenResponse) : $hiddenResponse; - } catch (RuntimeException $e) { - if (!$question->isHiddenFallback()) { - throw $e; - } - } - } - - if (false === $ret) { - $cp = $this->setIOCodepage(); - $ret = fgets($inputStream, 4096); - $ret = $this->resetIOCodepage($cp, $ret); - if (false === $ret) { - throw new MissingInputException('Aborted.'); - } - if ($question->isTrimmable()) { - $ret = trim($ret); - } - } - } else { - $autocomplete = $this->autocomplete($output, $question, $inputStream, $autocomplete); - $ret = $question->isTrimmable() ? trim($autocomplete) : $autocomplete; - } - - if ($output instanceof ConsoleSectionOutput) { - $output->addContent($ret); - } - - $ret = \strlen($ret) > 0 ? $ret : $question->getDefault(); - - if ($normalizer = $question->getNormalizer()) { - return $normalizer($ret); - } - - return $ret; - } - - /** - * @return mixed - */ - private function getDefaultAnswer(Question $question) - { - $default = $question->getDefault(); - - if (null === $default) { - return $default; - } - - if ($validator = $question->getValidator()) { - return \call_user_func($question->getValidator(), $default); - } elseif ($question instanceof ChoiceQuestion) { - $choices = $question->getChoices(); - - if (!$question->isMultiselect()) { - return $choices[$default] ?? $default; - } - - $default = explode(',', $default); - foreach ($default as $k => $v) { - $v = $question->isTrimmable() ? trim($v) : $v; - $default[$k] = $choices[$v] ?? $v; - } - } - - return $default; - } - - /** - * Outputs the question prompt. - */ - protected function writePrompt(OutputInterface $output, Question $question) - { - $message = $question->getQuestion(); - - if ($question instanceof ChoiceQuestion) { - $output->writeln(array_merge([ - $question->getQuestion(), - ], $this->formatChoiceQuestionChoices($question, 'info'))); - - $message = $question->getPrompt(); - } - - $output->write($message); - } - - /** - * @param string $tag - * - * @return string[] - */ - protected function formatChoiceQuestionChoices(ChoiceQuestion $question, $tag) - { - $messages = []; - - $maxWidth = max(array_map('self::strlen', array_keys($choices = $question->getChoices()))); - - foreach ($choices as $key => $value) { - $padding = str_repeat(' ', $maxWidth - self::strlen($key)); - - $messages[] = sprintf(" [<$tag>%s$padding] %s", $key, $value); - } - - return $messages; - } - - /** - * Outputs an error message. - */ - protected function writeError(OutputInterface $output, \Exception $error) - { - if (null !== $this->getHelperSet() && $this->getHelperSet()->has('formatter')) { - $message = $this->getHelperSet()->get('formatter')->formatBlock($error->getMessage(), 'error'); - } else { - $message = ''.$error->getMessage().''; - } - - $output->writeln($message); - } - - /** - * Autocompletes a question. - * - * @param resource $inputStream - */ - private function autocomplete(OutputInterface $output, Question $question, $inputStream, callable $autocomplete): string - { - $fullChoice = ''; - $ret = ''; - - $i = 0; - $ofs = -1; - $matches = $autocomplete($ret); - $numMatches = \count($matches); - - $sttyMode = shell_exec('stty -g'); - - // Disable icanon (so we can fread each keypress) and echo (we'll do echoing here instead) - shell_exec('stty -icanon -echo'); - - // Add highlighted text style - $output->getFormatter()->setStyle('hl', new OutputFormatterStyle('black', 'white')); - - // Read a keypress - while (!feof($inputStream)) { - $c = fread($inputStream, 1); - - // as opposed to fgets(), fread() returns an empty string when the stream content is empty, not false. - if (false === $c || ('' === $ret && '' === $c && null === $question->getDefault())) { - shell_exec(sprintf('stty %s', $sttyMode)); - throw new MissingInputException('Aborted.'); - } elseif ("\177" === $c) { // Backspace Character - if (0 === $numMatches && 0 !== $i) { - --$i; - $fullChoice = self::substr($fullChoice, 0, $i); - // Move cursor backwards - $output->write("\033[1D"); - } - - if (0 === $i) { - $ofs = -1; - $matches = $autocomplete($ret); - $numMatches = \count($matches); - } else { - $numMatches = 0; - } - - // Pop the last character off the end of our string - $ret = self::substr($ret, 0, $i); - } elseif ("\033" === $c) { - // Did we read an escape sequence? - $c .= fread($inputStream, 2); - - // A = Up Arrow. B = Down Arrow - if (isset($c[2]) && ('A' === $c[2] || 'B' === $c[2])) { - if ('A' === $c[2] && -1 === $ofs) { - $ofs = 0; - } - - if (0 === $numMatches) { - continue; - } - - $ofs += ('A' === $c[2]) ? -1 : 1; - $ofs = ($numMatches + $ofs) % $numMatches; - } - } elseif (\ord($c) < 32) { - if ("\t" === $c || "\n" === $c) { - if ($numMatches > 0 && -1 !== $ofs) { - $ret = (string) $matches[$ofs]; - // Echo out remaining chars for current match - $remainingCharacters = substr($ret, \strlen(trim($this->mostRecentlyEnteredValue($fullChoice)))); - $output->write($remainingCharacters); - $fullChoice .= $remainingCharacters; - $i = (false === $encoding = mb_detect_encoding($fullChoice, null, true)) ? \strlen($fullChoice) : mb_strlen($fullChoice, $encoding); - - $matches = array_filter( - $autocomplete($ret), - function ($match) use ($ret) { - return '' === $ret || str_starts_with($match, $ret); - } - ); - $numMatches = \count($matches); - $ofs = -1; - } - - if ("\n" === $c) { - $output->write($c); - break; - } - - $numMatches = 0; - } - - continue; - } else { - if ("\x80" <= $c) { - $c .= fread($inputStream, ["\xC0" => 1, "\xD0" => 1, "\xE0" => 2, "\xF0" => 3][$c & "\xF0"]); - } - - $output->write($c); - $ret .= $c; - $fullChoice .= $c; - ++$i; - - $tempRet = $ret; - - if ($question instanceof ChoiceQuestion && $question->isMultiselect()) { - $tempRet = $this->mostRecentlyEnteredValue($fullChoice); - } - - $numMatches = 0; - $ofs = 0; - - foreach ($autocomplete($ret) as $value) { - // If typed characters match the beginning chunk of value (e.g. [AcmeDe]moBundle) - if (str_starts_with($value, $tempRet)) { - $matches[$numMatches++] = $value; - } - } - } - - // Erase characters from cursor to end of line - $output->write("\033[K"); - - if ($numMatches > 0 && -1 !== $ofs) { - // Save cursor position - $output->write("\0337"); - // Write highlighted text, complete the partially entered response - $charactersEntered = \strlen(trim($this->mostRecentlyEnteredValue($fullChoice))); - $output->write(''.OutputFormatter::escapeTrailingBackslash(substr($matches[$ofs], $charactersEntered)).''); - // Restore cursor position - $output->write("\0338"); - } - } - - // Reset stty so it behaves normally again - shell_exec(sprintf('stty %s', $sttyMode)); - - return $fullChoice; - } - - private function mostRecentlyEnteredValue(string $entered): string - { - // Determine the most recent value that the user entered - if (!str_contains($entered, ',')) { - return $entered; - } - - $choices = explode(',', $entered); - if ('' !== $lastChoice = trim($choices[\count($choices) - 1])) { - return $lastChoice; - } - - return $entered; - } - - /** - * Gets a hidden response from user. - * - * @param resource $inputStream The handler resource - * @param bool $trimmable Is the answer trimmable - * - * @throws RuntimeException In case the fallback is deactivated and the response cannot be hidden - */ - private function getHiddenResponse(OutputInterface $output, $inputStream, bool $trimmable = true): string - { - if ('\\' === \DIRECTORY_SEPARATOR) { - $exe = __DIR__.'/../Resources/bin/hiddeninput.exe'; - - // handle code running from a phar - if ('phar:' === substr(__FILE__, 0, 5)) { - $tmpExe = sys_get_temp_dir().'/hiddeninput.exe'; - copy($exe, $tmpExe); - $exe = $tmpExe; - } - - $sExec = shell_exec('"'.$exe.'"'); - $value = $trimmable ? rtrim($sExec) : $sExec; - $output->writeln(''); - - if (isset($tmpExe)) { - unlink($tmpExe); - } - - return $value; - } - - if (self::$stty && Terminal::hasSttyAvailable()) { - $sttyMode = shell_exec('stty -g'); - shell_exec('stty -echo'); - } elseif ($this->isInteractiveInput($inputStream)) { - throw new RuntimeException('Unable to hide the response.'); - } - - $value = fgets($inputStream, 4096); - - if (self::$stty && Terminal::hasSttyAvailable()) { - shell_exec(sprintf('stty %s', $sttyMode)); - } - - if (false === $value) { - throw new MissingInputException('Aborted.'); - } - if ($trimmable) { - $value = trim($value); - } - $output->writeln(''); - - return $value; - } - - /** - * Validates an attempt. - * - * @param callable $interviewer A callable that will ask for a question and return the result - * - * @return mixed The validated response - * - * @throws \Exception In case the max number of attempts has been reached and no valid response has been given - */ - private function validateAttempts(callable $interviewer, OutputInterface $output, Question $question) - { - $error = null; - $attempts = $question->getMaxAttempts(); - - while (null === $attempts || $attempts--) { - if (null !== $error) { - $this->writeError($output, $error); - } - - try { - return $question->getValidator()($interviewer()); - } catch (RuntimeException $e) { - throw $e; - } catch (\Exception $error) { - } - } - - throw $error; - } - - private function isInteractiveInput($inputStream): bool - { - if ('php://stdin' !== (stream_get_meta_data($inputStream)['uri'] ?? null)) { - return false; - } - - if (null !== self::$stdinIsInteractive) { - return self::$stdinIsInteractive; - } - - if (\function_exists('stream_isatty')) { - return self::$stdinIsInteractive = stream_isatty(fopen('php://stdin', 'r')); - } - - if (\function_exists('posix_isatty')) { - return self::$stdinIsInteractive = posix_isatty(fopen('php://stdin', 'r')); - } - - if (!\function_exists('exec')) { - return self::$stdinIsInteractive = true; - } - - exec('stty 2> /dev/null', $output, $status); - - return self::$stdinIsInteractive = 1 !== $status; - } - - /** - * Sets console I/O to the host code page. - * - * @return int Previous code page in IBM/EBCDIC format - */ - private function setIOCodepage(): int - { - if (\function_exists('sapi_windows_cp_set')) { - $cp = sapi_windows_cp_get(); - sapi_windows_cp_set(sapi_windows_cp_get('oem')); - - return $cp; - } - - return 0; - } - - /** - * Sets console I/O to the specified code page and converts the user input. - * - * @param string|false $input - * - * @return string|false - */ - private function resetIOCodepage(int $cp, $input) - { - if (0 !== $cp) { - sapi_windows_cp_set($cp); - - if (false !== $input && '' !== $input) { - $input = sapi_windows_cp_conv(sapi_windows_cp_get('oem'), $cp, $input); - } - } - - return $input; - } -} diff --git a/source/vendor/symfony/console/Helper/SymfonyQuestionHelper.php b/source/vendor/symfony/console/Helper/SymfonyQuestionHelper.php deleted file mode 100644 index ace5e18..0000000 --- a/source/vendor/symfony/console/Helper/SymfonyQuestionHelper.php +++ /dev/null @@ -1,96 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Helper; - -use Symfony\Component\Console\Formatter\OutputFormatter; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Question\ChoiceQuestion; -use Symfony\Component\Console\Question\ConfirmationQuestion; -use Symfony\Component\Console\Question\Question; -use Symfony\Component\Console\Style\SymfonyStyle; - -/** - * Symfony Style Guide compliant question helper. - * - * @author Kevin Bond - */ -class SymfonyQuestionHelper extends QuestionHelper -{ - /** - * {@inheritdoc} - */ - protected function writePrompt(OutputInterface $output, Question $question) - { - $text = OutputFormatter::escapeTrailingBackslash($question->getQuestion()); - $default = $question->getDefault(); - - switch (true) { - case null === $default: - $text = sprintf(' %s:', $text); - - break; - - case $question instanceof ConfirmationQuestion: - $text = sprintf(' %s (yes/no) [%s]:', $text, $default ? 'yes' : 'no'); - - break; - - case $question instanceof ChoiceQuestion && $question->isMultiselect(): - $choices = $question->getChoices(); - $default = explode(',', $default); - - foreach ($default as $key => $value) { - $default[$key] = $choices[trim($value)]; - } - - $text = sprintf(' %s [%s]:', $text, OutputFormatter::escape(implode(', ', $default))); - - break; - - case $question instanceof ChoiceQuestion: - $choices = $question->getChoices(); - $text = sprintf(' %s [%s]:', $text, OutputFormatter::escape($choices[$default] ?? $default)); - - break; - - default: - $text = sprintf(' %s [%s]:', $text, OutputFormatter::escape($default)); - } - - $output->writeln($text); - - $prompt = ' > '; - - if ($question instanceof ChoiceQuestion) { - $output->writeln($this->formatChoiceQuestionChoices($question, 'comment')); - - $prompt = $question->getPrompt(); - } - - $output->write($prompt); - } - - /** - * {@inheritdoc} - */ - protected function writeError(OutputInterface $output, \Exception $error) - { - if ($output instanceof SymfonyStyle) { - $output->newLine(); - $output->error($error->getMessage()); - - return; - } - - parent::writeError($output, $error); - } -} diff --git a/source/vendor/symfony/console/Helper/Table.php b/source/vendor/symfony/console/Helper/Table.php deleted file mode 100644 index 1d0a22b..0000000 --- a/source/vendor/symfony/console/Helper/Table.php +++ /dev/null @@ -1,854 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Helper; - -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Exception\RuntimeException; -use Symfony\Component\Console\Formatter\OutputFormatter; -use Symfony\Component\Console\Formatter\WrappableOutputFormatterInterface; -use Symfony\Component\Console\Output\ConsoleSectionOutput; -use Symfony\Component\Console\Output\OutputInterface; - -/** - * Provides helpers to display a table. - * - * @author Fabien Potencier - * @author Саша Стаменковић - * @author Abdellatif Ait boudad - * @author Max Grigorian - * @author Dany Maillard - */ -class Table -{ - private const SEPARATOR_TOP = 0; - private const SEPARATOR_TOP_BOTTOM = 1; - private const SEPARATOR_MID = 2; - private const SEPARATOR_BOTTOM = 3; - private const BORDER_OUTSIDE = 0; - private const BORDER_INSIDE = 1; - - private $headerTitle; - private $footerTitle; - - /** - * Table headers. - */ - private $headers = []; - - /** - * Table rows. - */ - private $rows = []; - private $horizontal = false; - - /** - * Column widths cache. - */ - private $effectiveColumnWidths = []; - - /** - * Number of columns cache. - * - * @var int - */ - private $numberOfColumns; - - /** - * @var OutputInterface - */ - private $output; - - /** - * @var TableStyle - */ - private $style; - - /** - * @var array - */ - private $columnStyles = []; - - /** - * User set column widths. - * - * @var array - */ - private $columnWidths = []; - private $columnMaxWidths = []; - - private static $styles; - - private $rendered = false; - - public function __construct(OutputInterface $output) - { - $this->output = $output; - - if (!self::$styles) { - self::$styles = self::initStyles(); - } - - $this->setStyle('default'); - } - - /** - * Sets a style definition. - * - * @param string $name The style name - */ - public static function setStyleDefinition($name, TableStyle $style) - { - if (!self::$styles) { - self::$styles = self::initStyles(); - } - - self::$styles[$name] = $style; - } - - /** - * Gets a style definition by name. - * - * @param string $name The style name - * - * @return TableStyle - */ - public static function getStyleDefinition($name) - { - if (!self::$styles) { - self::$styles = self::initStyles(); - } - - if (isset(self::$styles[$name])) { - return self::$styles[$name]; - } - - throw new InvalidArgumentException(sprintf('Style "%s" is not defined.', $name)); - } - - /** - * Sets table style. - * - * @param TableStyle|string $name The style name or a TableStyle instance - * - * @return $this - */ - public function setStyle($name) - { - $this->style = $this->resolveStyle($name); - - return $this; - } - - /** - * Gets the current table style. - * - * @return TableStyle - */ - public function getStyle() - { - return $this->style; - } - - /** - * Sets table column style. - * - * @param int $columnIndex Column index - * @param TableStyle|string $name The style name or a TableStyle instance - * - * @return $this - */ - public function setColumnStyle($columnIndex, $name) - { - $columnIndex = (int) $columnIndex; - - $this->columnStyles[$columnIndex] = $this->resolveStyle($name); - - return $this; - } - - /** - * Gets the current style for a column. - * - * If style was not set, it returns the global table style. - * - * @param int $columnIndex Column index - * - * @return TableStyle - */ - public function getColumnStyle($columnIndex) - { - return $this->columnStyles[$columnIndex] ?? $this->getStyle(); - } - - /** - * Sets the minimum width of a column. - * - * @param int $columnIndex Column index - * @param int $width Minimum column width in characters - * - * @return $this - */ - public function setColumnWidth($columnIndex, $width) - { - $this->columnWidths[(int) $columnIndex] = (int) $width; - - return $this; - } - - /** - * Sets the minimum width of all columns. - * - * @return $this - */ - public function setColumnWidths(array $widths) - { - $this->columnWidths = []; - foreach ($widths as $index => $width) { - $this->setColumnWidth($index, $width); - } - - return $this; - } - - /** - * Sets the maximum width of a column. - * - * Any cell within this column which contents exceeds the specified width will be wrapped into multiple lines, while - * formatted strings are preserved. - * - * @return $this - */ - public function setColumnMaxWidth(int $columnIndex, int $width): self - { - if (!$this->output->getFormatter() instanceof WrappableOutputFormatterInterface) { - throw new \LogicException(sprintf('Setting a maximum column width is only supported when using a "%s" formatter, got "%s".', WrappableOutputFormatterInterface::class, \get_class($this->output->getFormatter()))); - } - - $this->columnMaxWidths[$columnIndex] = $width; - - return $this; - } - - public function setHeaders(array $headers) - { - $headers = array_values($headers); - if (!empty($headers) && !\is_array($headers[0])) { - $headers = [$headers]; - } - - $this->headers = $headers; - - return $this; - } - - public function setRows(array $rows) - { - $this->rows = []; - - return $this->addRows($rows); - } - - public function addRows(array $rows) - { - foreach ($rows as $row) { - $this->addRow($row); - } - - return $this; - } - - public function addRow($row) - { - if ($row instanceof TableSeparator) { - $this->rows[] = $row; - - return $this; - } - - if (!\is_array($row)) { - throw new InvalidArgumentException('A row must be an array or a TableSeparator instance.'); - } - - $this->rows[] = array_values($row); - - return $this; - } - - /** - * Adds a row to the table, and re-renders the table. - */ - public function appendRow($row): self - { - if (!$this->output instanceof ConsoleSectionOutput) { - throw new RuntimeException(sprintf('Output should be an instance of "%s" when calling "%s".', ConsoleSectionOutput::class, __METHOD__)); - } - - if ($this->rendered) { - $this->output->clear($this->calculateRowCount()); - } - - $this->addRow($row); - $this->render(); - - return $this; - } - - public function setRow($column, array $row) - { - $this->rows[$column] = $row; - - return $this; - } - - public function setHeaderTitle(?string $title): self - { - $this->headerTitle = $title; - - return $this; - } - - public function setFooterTitle(?string $title): self - { - $this->footerTitle = $title; - - return $this; - } - - public function setHorizontal(bool $horizontal = true): self - { - $this->horizontal = $horizontal; - - return $this; - } - - /** - * Renders table to output. - * - * Example: - * - * +---------------+-----------------------+------------------+ - * | ISBN | Title | Author | - * +---------------+-----------------------+------------------+ - * | 99921-58-10-7 | Divine Comedy | Dante Alighieri | - * | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens | - * | 960-425-059-0 | The Lord of the Rings | J. R. R. Tolkien | - * +---------------+-----------------------+------------------+ - */ - public function render() - { - $divider = new TableSeparator(); - if ($this->horizontal) { - $rows = []; - foreach ($this->headers[0] ?? [] as $i => $header) { - $rows[$i] = [$header]; - foreach ($this->rows as $row) { - if ($row instanceof TableSeparator) { - continue; - } - if (isset($row[$i])) { - $rows[$i][] = $row[$i]; - } elseif ($rows[$i][0] instanceof TableCell && $rows[$i][0]->getColspan() >= 2) { - // Noop, there is a "title" - } else { - $rows[$i][] = null; - } - } - } - } else { - $rows = array_merge($this->headers, [$divider], $this->rows); - } - - $this->calculateNumberOfColumns($rows); - - $rows = $this->buildTableRows($rows); - $this->calculateColumnsWidth($rows); - - $isHeader = !$this->horizontal; - $isFirstRow = $this->horizontal; - $hasTitle = (bool) $this->headerTitle; - foreach ($rows as $row) { - if ($divider === $row) { - $isHeader = false; - $isFirstRow = true; - - continue; - } - if ($row instanceof TableSeparator) { - $this->renderRowSeparator(); - - continue; - } - if (!$row) { - continue; - } - - if ($isHeader || $isFirstRow) { - $this->renderRowSeparator( - $isHeader ? self::SEPARATOR_TOP : self::SEPARATOR_TOP_BOTTOM, - $hasTitle ? $this->headerTitle : null, - $hasTitle ? $this->style->getHeaderTitleFormat() : null - ); - $isFirstRow = false; - $hasTitle = false; - } - if ($this->horizontal) { - $this->renderRow($row, $this->style->getCellRowFormat(), $this->style->getCellHeaderFormat()); - } else { - $this->renderRow($row, $isHeader ? $this->style->getCellHeaderFormat() : $this->style->getCellRowFormat()); - } - } - $this->renderRowSeparator(self::SEPARATOR_BOTTOM, $this->footerTitle, $this->style->getFooterTitleFormat()); - - $this->cleanup(); - $this->rendered = true; - } - - /** - * Renders horizontal header separator. - * - * Example: - * - * +-----+-----------+-------+ - */ - private function renderRowSeparator(int $type = self::SEPARATOR_MID, string $title = null, string $titleFormat = null) - { - if (0 === $count = $this->numberOfColumns) { - return; - } - - $borders = $this->style->getBorderChars(); - if (!$borders[0] && !$borders[2] && !$this->style->getCrossingChar()) { - return; - } - - $crossings = $this->style->getCrossingChars(); - if (self::SEPARATOR_MID === $type) { - [$horizontal, $leftChar, $midChar, $rightChar] = [$borders[2], $crossings[8], $crossings[0], $crossings[4]]; - } elseif (self::SEPARATOR_TOP === $type) { - [$horizontal, $leftChar, $midChar, $rightChar] = [$borders[0], $crossings[1], $crossings[2], $crossings[3]]; - } elseif (self::SEPARATOR_TOP_BOTTOM === $type) { - [$horizontal, $leftChar, $midChar, $rightChar] = [$borders[0], $crossings[9], $crossings[10], $crossings[11]]; - } else { - [$horizontal, $leftChar, $midChar, $rightChar] = [$borders[0], $crossings[7], $crossings[6], $crossings[5]]; - } - - $markup = $leftChar; - for ($column = 0; $column < $count; ++$column) { - $markup .= str_repeat($horizontal, $this->effectiveColumnWidths[$column]); - $markup .= $column === $count - 1 ? $rightChar : $midChar; - } - - if (null !== $title) { - $titleLength = Helper::strlenWithoutDecoration($formatter = $this->output->getFormatter(), $formattedTitle = sprintf($titleFormat, $title)); - $markupLength = Helper::strlen($markup); - if ($titleLength > $limit = $markupLength - 4) { - $titleLength = $limit; - $formatLength = Helper::strlenWithoutDecoration($formatter, sprintf($titleFormat, '')); - $formattedTitle = sprintf($titleFormat, Helper::substr($title, 0, $limit - $formatLength - 3).'...'); - } - - $titleStart = intdiv($markupLength - $titleLength, 2); - if (false === mb_detect_encoding($markup, null, true)) { - $markup = substr_replace($markup, $formattedTitle, $titleStart, $titleLength); - } else { - $markup = mb_substr($markup, 0, $titleStart).$formattedTitle.mb_substr($markup, $titleStart + $titleLength); - } - } - - $this->output->writeln(sprintf($this->style->getBorderFormat(), $markup)); - } - - /** - * Renders vertical column separator. - */ - private function renderColumnSeparator(int $type = self::BORDER_OUTSIDE): string - { - $borders = $this->style->getBorderChars(); - - return sprintf($this->style->getBorderFormat(), self::BORDER_OUTSIDE === $type ? $borders[1] : $borders[3]); - } - - /** - * Renders table row. - * - * Example: - * - * | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens | - */ - private function renderRow(array $row, string $cellFormat, string $firstCellFormat = null) - { - $rowContent = $this->renderColumnSeparator(self::BORDER_OUTSIDE); - $columns = $this->getRowColumns($row); - $last = \count($columns) - 1; - foreach ($columns as $i => $column) { - if ($firstCellFormat && 0 === $i) { - $rowContent .= $this->renderCell($row, $column, $firstCellFormat); - } else { - $rowContent .= $this->renderCell($row, $column, $cellFormat); - } - $rowContent .= $this->renderColumnSeparator($last === $i ? self::BORDER_OUTSIDE : self::BORDER_INSIDE); - } - $this->output->writeln($rowContent); - } - - /** - * Renders table cell with padding. - */ - private function renderCell(array $row, int $column, string $cellFormat): string - { - $cell = $row[$column] ?? ''; - $width = $this->effectiveColumnWidths[$column]; - if ($cell instanceof TableCell && $cell->getColspan() > 1) { - // add the width of the following columns(numbers of colspan). - foreach (range($column + 1, $column + $cell->getColspan() - 1) as $nextColumn) { - $width += $this->getColumnSeparatorWidth() + $this->effectiveColumnWidths[$nextColumn]; - } - } - - // str_pad won't work properly with multi-byte strings, we need to fix the padding - if (false !== $encoding = mb_detect_encoding($cell, null, true)) { - $width += \strlen($cell) - mb_strwidth($cell, $encoding); - } - - $style = $this->getColumnStyle($column); - - if ($cell instanceof TableSeparator) { - return sprintf($style->getBorderFormat(), str_repeat($style->getBorderChars()[2], $width)); - } - - $width += Helper::strlen($cell) - Helper::strlenWithoutDecoration($this->output->getFormatter(), $cell); - $content = sprintf($style->getCellRowContentFormat(), $cell); - - return sprintf($cellFormat, str_pad($content, $width, $style->getPaddingChar(), $style->getPadType())); - } - - /** - * Calculate number of columns for this table. - */ - private function calculateNumberOfColumns(array $rows) - { - $columns = [0]; - foreach ($rows as $row) { - if ($row instanceof TableSeparator) { - continue; - } - - $columns[] = $this->getNumberOfColumns($row); - } - - $this->numberOfColumns = max($columns); - } - - private function buildTableRows(array $rows): TableRows - { - /** @var WrappableOutputFormatterInterface $formatter */ - $formatter = $this->output->getFormatter(); - $unmergedRows = []; - for ($rowKey = 0; $rowKey < \count($rows); ++$rowKey) { - $rows = $this->fillNextRows($rows, $rowKey); - - // Remove any new line breaks and replace it with a new line - foreach ($rows[$rowKey] as $column => $cell) { - $colspan = $cell instanceof TableCell ? $cell->getColspan() : 1; - - if (isset($this->columnMaxWidths[$column]) && Helper::strlenWithoutDecoration($formatter, $cell) > $this->columnMaxWidths[$column]) { - $cell = $formatter->formatAndWrap($cell, $this->columnMaxWidths[$column] * $colspan); - } - if (!strstr($cell ?? '', "\n")) { - continue; - } - $escaped = implode("\n", array_map([OutputFormatter::class, 'escapeTrailingBackslash'], explode("\n", $cell))); - $cell = $cell instanceof TableCell ? new TableCell($escaped, ['colspan' => $cell->getColspan()]) : $escaped; - $lines = explode("\n", str_replace("\n", "\n", $cell)); - foreach ($lines as $lineKey => $line) { - if ($colspan > 1) { - $line = new TableCell($line, ['colspan' => $colspan]); - } - if (0 === $lineKey) { - $rows[$rowKey][$column] = $line; - } else { - if (!\array_key_exists($rowKey, $unmergedRows) || !\array_key_exists($lineKey, $unmergedRows[$rowKey])) { - $unmergedRows[$rowKey][$lineKey] = $this->copyRow($rows, $rowKey); - } - $unmergedRows[$rowKey][$lineKey][$column] = $line; - } - } - } - } - - return new TableRows(function () use ($rows, $unmergedRows): \Traversable { - foreach ($rows as $rowKey => $row) { - yield $row instanceof TableSeparator ? $row : $this->fillCells($row); - - if (isset($unmergedRows[$rowKey])) { - foreach ($unmergedRows[$rowKey] as $row) { - yield $row instanceof TableSeparator ? $row : $this->fillCells($row); - } - } - } - }); - } - - private function calculateRowCount(): int - { - $numberOfRows = \count(iterator_to_array($this->buildTableRows(array_merge($this->headers, [new TableSeparator()], $this->rows)))); - - if ($this->headers) { - ++$numberOfRows; // Add row for header separator - } - - if (\count($this->rows) > 0) { - ++$numberOfRows; // Add row for footer separator - } - - return $numberOfRows; - } - - /** - * fill rows that contains rowspan > 1. - * - * @throws InvalidArgumentException - */ - private function fillNextRows(array $rows, int $line): array - { - $unmergedRows = []; - foreach ($rows[$line] as $column => $cell) { - if (null !== $cell && !$cell instanceof TableCell && !is_scalar($cell) && !(\is_object($cell) && method_exists($cell, '__toString'))) { - throw new InvalidArgumentException(sprintf('A cell must be a TableCell, a scalar or an object implementing "__toString()", "%s" given.', \gettype($cell))); - } - if ($cell instanceof TableCell && $cell->getRowspan() > 1) { - $nbLines = $cell->getRowspan() - 1; - $lines = [$cell]; - if (strstr($cell, "\n")) { - $lines = explode("\n", str_replace("\n", "\n", $cell)); - $nbLines = \count($lines) > $nbLines ? substr_count($cell, "\n") : $nbLines; - - $rows[$line][$column] = new TableCell($lines[0], ['colspan' => $cell->getColspan()]); - unset($lines[0]); - } - - // create a two dimensional array (rowspan x colspan) - $unmergedRows = array_replace_recursive(array_fill($line + 1, $nbLines, []), $unmergedRows); - foreach ($unmergedRows as $unmergedRowKey => $unmergedRow) { - $value = $lines[$unmergedRowKey - $line] ?? ''; - $unmergedRows[$unmergedRowKey][$column] = new TableCell($value, ['colspan' => $cell->getColspan()]); - if ($nbLines === $unmergedRowKey - $line) { - break; - } - } - } - } - - foreach ($unmergedRows as $unmergedRowKey => $unmergedRow) { - // we need to know if $unmergedRow will be merged or inserted into $rows - if (isset($rows[$unmergedRowKey]) && \is_array($rows[$unmergedRowKey]) && ($this->getNumberOfColumns($rows[$unmergedRowKey]) + $this->getNumberOfColumns($unmergedRows[$unmergedRowKey]) <= $this->numberOfColumns)) { - foreach ($unmergedRow as $cellKey => $cell) { - // insert cell into row at cellKey position - array_splice($rows[$unmergedRowKey], $cellKey, 0, [$cell]); - } - } else { - $row = $this->copyRow($rows, $unmergedRowKey - 1); - foreach ($unmergedRow as $column => $cell) { - if (!empty($cell)) { - $row[$column] = $unmergedRow[$column]; - } - } - array_splice($rows, $unmergedRowKey, 0, [$row]); - } - } - - return $rows; - } - - /** - * fill cells for a row that contains colspan > 1. - */ - private function fillCells(iterable $row) - { - $newRow = []; - - foreach ($row as $column => $cell) { - $newRow[] = $cell; - if ($cell instanceof TableCell && $cell->getColspan() > 1) { - foreach (range($column + 1, $column + $cell->getColspan() - 1) as $position) { - // insert empty value at column position - $newRow[] = ''; - } - } - } - - return $newRow ?: $row; - } - - private function copyRow(array $rows, int $line): array - { - $row = $rows[$line]; - foreach ($row as $cellKey => $cellValue) { - $row[$cellKey] = ''; - if ($cellValue instanceof TableCell) { - $row[$cellKey] = new TableCell('', ['colspan' => $cellValue->getColspan()]); - } - } - - return $row; - } - - /** - * Gets number of columns by row. - */ - private function getNumberOfColumns(array $row): int - { - $columns = \count($row); - foreach ($row as $column) { - $columns += $column instanceof TableCell ? ($column->getColspan() - 1) : 0; - } - - return $columns; - } - - /** - * Gets list of columns for the given row. - */ - private function getRowColumns(array $row): array - { - $columns = range(0, $this->numberOfColumns - 1); - foreach ($row as $cellKey => $cell) { - if ($cell instanceof TableCell && $cell->getColspan() > 1) { - // exclude grouped columns. - $columns = array_diff($columns, range($cellKey + 1, $cellKey + $cell->getColspan() - 1)); - } - } - - return $columns; - } - - /** - * Calculates columns widths. - */ - private function calculateColumnsWidth(iterable $rows) - { - for ($column = 0; $column < $this->numberOfColumns; ++$column) { - $lengths = []; - foreach ($rows as $row) { - if ($row instanceof TableSeparator) { - continue; - } - - foreach ($row as $i => $cell) { - if ($cell instanceof TableCell) { - $textContent = Helper::removeDecoration($this->output->getFormatter(), $cell); - $textLength = Helper::strlen($textContent); - if ($textLength > 0) { - $contentColumns = str_split($textContent, ceil($textLength / $cell->getColspan())); - foreach ($contentColumns as $position => $content) { - $row[$i + $position] = $content; - } - } - } - } - - $lengths[] = $this->getCellWidth($row, $column); - } - - $this->effectiveColumnWidths[$column] = max($lengths) + Helper::strlen($this->style->getCellRowContentFormat()) - 2; - } - } - - private function getColumnSeparatorWidth(): int - { - return Helper::strlen(sprintf($this->style->getBorderFormat(), $this->style->getBorderChars()[3])); - } - - private function getCellWidth(array $row, int $column): int - { - $cellWidth = 0; - - if (isset($row[$column])) { - $cell = $row[$column]; - $cellWidth = Helper::strlenWithoutDecoration($this->output->getFormatter(), $cell); - } - - $columnWidth = $this->columnWidths[$column] ?? 0; - $cellWidth = max($cellWidth, $columnWidth); - - return isset($this->columnMaxWidths[$column]) ? min($this->columnMaxWidths[$column], $cellWidth) : $cellWidth; - } - - /** - * Called after rendering to cleanup cache data. - */ - private function cleanup() - { - $this->effectiveColumnWidths = []; - $this->numberOfColumns = null; - } - - private static function initStyles(): array - { - $borderless = new TableStyle(); - $borderless - ->setHorizontalBorderChars('=') - ->setVerticalBorderChars(' ') - ->setDefaultCrossingChar(' ') - ; - - $compact = new TableStyle(); - $compact - ->setHorizontalBorderChars('') - ->setVerticalBorderChars(' ') - ->setDefaultCrossingChar('') - ->setCellRowContentFormat('%s') - ; - - $styleGuide = new TableStyle(); - $styleGuide - ->setHorizontalBorderChars('-') - ->setVerticalBorderChars(' ') - ->setDefaultCrossingChar(' ') - ->setCellHeaderFormat('%s') - ; - - $box = (new TableStyle()) - ->setHorizontalBorderChars('─') - ->setVerticalBorderChars('│') - ->setCrossingChars('┼', '┌', '┬', '┐', '┤', '┘', '┴', '└', '├') - ; - - $boxDouble = (new TableStyle()) - ->setHorizontalBorderChars('═', '─') - ->setVerticalBorderChars('║', '│') - ->setCrossingChars('┼', '╔', '╤', '╗', '╢', '╝', '╧', '╚', '╟', '╠', '╪', '╣') - ; - - return [ - 'default' => new TableStyle(), - 'borderless' => $borderless, - 'compact' => $compact, - 'symfony-style-guide' => $styleGuide, - 'box' => $box, - 'box-double' => $boxDouble, - ]; - } - - private function resolveStyle($name): TableStyle - { - if ($name instanceof TableStyle) { - return $name; - } - - if (isset(self::$styles[$name])) { - return self::$styles[$name]; - } - - throw new InvalidArgumentException(sprintf('Style "%s" is not defined.', $name)); - } -} diff --git a/source/vendor/symfony/console/Helper/TableCell.php b/source/vendor/symfony/console/Helper/TableCell.php deleted file mode 100644 index 5b6af4a..0000000 --- a/source/vendor/symfony/console/Helper/TableCell.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Helper; - -use Symfony\Component\Console\Exception\InvalidArgumentException; - -/** - * @author Abdellatif Ait boudad - */ -class TableCell -{ - private $value; - private $options = [ - 'rowspan' => 1, - 'colspan' => 1, - ]; - - public function __construct(string $value = '', array $options = []) - { - $this->value = $value; - - // check option names - if ($diff = array_diff(array_keys($options), array_keys($this->options))) { - throw new InvalidArgumentException(sprintf('The TableCell does not support the following options: \'%s\'.', implode('\', \'', $diff))); - } - - $this->options = array_merge($this->options, $options); - } - - /** - * Returns the cell value. - * - * @return string - */ - public function __toString() - { - return $this->value; - } - - /** - * Gets number of colspan. - * - * @return int - */ - public function getColspan() - { - return (int) $this->options['colspan']; - } - - /** - * Gets number of rowspan. - * - * @return int - */ - public function getRowspan() - { - return (int) $this->options['rowspan']; - } -} diff --git a/source/vendor/symfony/console/Helper/TableRows.php b/source/vendor/symfony/console/Helper/TableRows.php deleted file mode 100644 index 16aabb3..0000000 --- a/source/vendor/symfony/console/Helper/TableRows.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Helper; - -/** - * @internal - */ -class TableRows implements \IteratorAggregate -{ - private $generator; - - public function __construct(callable $generator) - { - $this->generator = $generator; - } - - public function getIterator(): \Traversable - { - $g = $this->generator; - - return $g(); - } -} diff --git a/source/vendor/symfony/console/Helper/TableSeparator.php b/source/vendor/symfony/console/Helper/TableSeparator.php deleted file mode 100644 index e541c53..0000000 --- a/source/vendor/symfony/console/Helper/TableSeparator.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Helper; - -/** - * Marks a row as being a separator. - * - * @author Fabien Potencier - */ -class TableSeparator extends TableCell -{ - public function __construct(array $options = []) - { - parent::__construct('', $options); - } -} diff --git a/source/vendor/symfony/console/Helper/TableStyle.php b/source/vendor/symfony/console/Helper/TableStyle.php deleted file mode 100644 index a8df59b..0000000 --- a/source/vendor/symfony/console/Helper/TableStyle.php +++ /dev/null @@ -1,458 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Helper; - -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Exception\LogicException; - -/** - * Defines the styles for a Table. - * - * @author Fabien Potencier - * @author Саша Стаменковић - * @author Dany Maillard - */ -class TableStyle -{ - private $paddingChar = ' '; - private $horizontalOutsideBorderChar = '-'; - private $horizontalInsideBorderChar = '-'; - private $verticalOutsideBorderChar = '|'; - private $verticalInsideBorderChar = '|'; - private $crossingChar = '+'; - private $crossingTopRightChar = '+'; - private $crossingTopMidChar = '+'; - private $crossingTopLeftChar = '+'; - private $crossingMidRightChar = '+'; - private $crossingBottomRightChar = '+'; - private $crossingBottomMidChar = '+'; - private $crossingBottomLeftChar = '+'; - private $crossingMidLeftChar = '+'; - private $crossingTopLeftBottomChar = '+'; - private $crossingTopMidBottomChar = '+'; - private $crossingTopRightBottomChar = '+'; - private $headerTitleFormat = ' %s '; - private $footerTitleFormat = ' %s '; - private $cellHeaderFormat = '%s'; - private $cellRowFormat = '%s'; - private $cellRowContentFormat = ' %s '; - private $borderFormat = '%s'; - private $padType = \STR_PAD_RIGHT; - - /** - * Sets padding character, used for cell padding. - * - * @param string $paddingChar - * - * @return $this - */ - public function setPaddingChar($paddingChar) - { - if (!$paddingChar) { - throw new LogicException('The padding char must not be empty.'); - } - - $this->paddingChar = $paddingChar; - - return $this; - } - - /** - * Gets padding character, used for cell padding. - * - * @return string - */ - public function getPaddingChar() - { - return $this->paddingChar; - } - - /** - * Sets horizontal border characters. - * - * - * ╔═══════════════╤══════════════════════════╤══════════════════╗ - * 1 ISBN 2 Title │ Author ║ - * ╠═══════════════╪══════════════════════════╪══════════════════╣ - * ║ 99921-58-10-7 │ Divine Comedy │ Dante Alighieri ║ - * ║ 9971-5-0210-0 │ A Tale of Two Cities │ Charles Dickens ║ - * ║ 960-425-059-0 │ The Lord of the Rings │ J. R. R. Tolkien ║ - * ║ 80-902734-1-6 │ And Then There Were None │ Agatha Christie ║ - * ╚═══════════════╧══════════════════════════╧══════════════════╝ - * - * - * @param string $outside Outside border char (see #1 of example) - * @param string|null $inside Inside border char (see #2 of example), equals $outside if null - */ - public function setHorizontalBorderChars(string $outside, string $inside = null): self - { - $this->horizontalOutsideBorderChar = $outside; - $this->horizontalInsideBorderChar = $inside ?? $outside; - - return $this; - } - - /** - * Sets horizontal border character. - * - * @param string $horizontalBorderChar - * - * @return $this - * - * @deprecated since Symfony 4.1, use {@link setHorizontalBorderChars()} instead. - */ - public function setHorizontalBorderChar($horizontalBorderChar) - { - @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use setHorizontalBorderChars() instead.', __METHOD__), \E_USER_DEPRECATED); - - return $this->setHorizontalBorderChars($horizontalBorderChar, $horizontalBorderChar); - } - - /** - * Gets horizontal border character. - * - * @return string - * - * @deprecated since Symfony 4.1, use {@link getBorderChars()} instead. - */ - public function getHorizontalBorderChar() - { - @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use getBorderChars() instead.', __METHOD__), \E_USER_DEPRECATED); - - return $this->horizontalOutsideBorderChar; - } - - /** - * Sets vertical border characters. - * - * - * ╔═══════════════╤══════════════════════════╤══════════════════╗ - * ║ ISBN │ Title │ Author ║ - * ╠═══════1═══════╪══════════════════════════╪══════════════════╣ - * ║ 99921-58-10-7 │ Divine Comedy │ Dante Alighieri ║ - * ║ 9971-5-0210-0 │ A Tale of Two Cities │ Charles Dickens ║ - * ╟───────2───────┼──────────────────────────┼──────────────────╢ - * ║ 960-425-059-0 │ The Lord of the Rings │ J. R. R. Tolkien ║ - * ║ 80-902734-1-6 │ And Then There Were None │ Agatha Christie ║ - * ╚═══════════════╧══════════════════════════╧══════════════════╝ - * - * - * @param string $outside Outside border char (see #1 of example) - * @param string|null $inside Inside border char (see #2 of example), equals $outside if null - */ - public function setVerticalBorderChars(string $outside, string $inside = null): self - { - $this->verticalOutsideBorderChar = $outside; - $this->verticalInsideBorderChar = $inside ?? $outside; - - return $this; - } - - /** - * Sets vertical border character. - * - * @param string $verticalBorderChar - * - * @return $this - * - * @deprecated since Symfony 4.1, use {@link setVerticalBorderChars()} instead. - */ - public function setVerticalBorderChar($verticalBorderChar) - { - @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use setVerticalBorderChars() instead.', __METHOD__), \E_USER_DEPRECATED); - - return $this->setVerticalBorderChars($verticalBorderChar, $verticalBorderChar); - } - - /** - * Gets vertical border character. - * - * @return string - * - * @deprecated since Symfony 4.1, use {@link getBorderChars()} instead. - */ - public function getVerticalBorderChar() - { - @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use getBorderChars() instead.', __METHOD__), \E_USER_DEPRECATED); - - return $this->verticalOutsideBorderChar; - } - - /** - * Gets border characters. - * - * @internal - */ - public function getBorderChars(): array - { - return [ - $this->horizontalOutsideBorderChar, - $this->verticalOutsideBorderChar, - $this->horizontalInsideBorderChar, - $this->verticalInsideBorderChar, - ]; - } - - /** - * Sets crossing characters. - * - * Example: - * - * 1═══════════════2══════════════════════════2══════════════════3 - * ║ ISBN │ Title │ Author ║ - * 8'══════════════0'═════════════════════════0'═════════════════4' - * ║ 99921-58-10-7 │ Divine Comedy │ Dante Alighieri ║ - * ║ 9971-5-0210-0 │ A Tale of Two Cities │ Charles Dickens ║ - * 8───────────────0──────────────────────────0──────────────────4 - * ║ 960-425-059-0 │ The Lord of the Rings │ J. R. R. Tolkien ║ - * ║ 80-902734-1-6 │ And Then There Were None │ Agatha Christie ║ - * 7═══════════════6══════════════════════════6══════════════════5 - * - * - * @param string $cross Crossing char (see #0 of example) - * @param string $topLeft Top left char (see #1 of example) - * @param string $topMid Top mid char (see #2 of example) - * @param string $topRight Top right char (see #3 of example) - * @param string $midRight Mid right char (see #4 of example) - * @param string $bottomRight Bottom right char (see #5 of example) - * @param string $bottomMid Bottom mid char (see #6 of example) - * @param string $bottomLeft Bottom left char (see #7 of example) - * @param string $midLeft Mid left char (see #8 of example) - * @param string|null $topLeftBottom Top left bottom char (see #8' of example), equals to $midLeft if null - * @param string|null $topMidBottom Top mid bottom char (see #0' of example), equals to $cross if null - * @param string|null $topRightBottom Top right bottom char (see #4' of example), equals to $midRight if null - */ - public function setCrossingChars(string $cross, string $topLeft, string $topMid, string $topRight, string $midRight, string $bottomRight, string $bottomMid, string $bottomLeft, string $midLeft, string $topLeftBottom = null, string $topMidBottom = null, string $topRightBottom = null): self - { - $this->crossingChar = $cross; - $this->crossingTopLeftChar = $topLeft; - $this->crossingTopMidChar = $topMid; - $this->crossingTopRightChar = $topRight; - $this->crossingMidRightChar = $midRight; - $this->crossingBottomRightChar = $bottomRight; - $this->crossingBottomMidChar = $bottomMid; - $this->crossingBottomLeftChar = $bottomLeft; - $this->crossingMidLeftChar = $midLeft; - $this->crossingTopLeftBottomChar = $topLeftBottom ?? $midLeft; - $this->crossingTopMidBottomChar = $topMidBottom ?? $cross; - $this->crossingTopRightBottomChar = $topRightBottom ?? $midRight; - - return $this; - } - - /** - * Sets default crossing character used for each cross. - * - * @see {@link setCrossingChars()} for setting each crossing individually. - */ - public function setDefaultCrossingChar(string $char): self - { - return $this->setCrossingChars($char, $char, $char, $char, $char, $char, $char, $char, $char); - } - - /** - * Sets crossing character. - * - * @param string $crossingChar - * - * @return $this - * - * @deprecated since Symfony 4.1. Use {@link setDefaultCrossingChar()} instead. - */ - public function setCrossingChar($crossingChar) - { - @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1. Use setDefaultCrossingChar() instead.', __METHOD__), \E_USER_DEPRECATED); - - return $this->setDefaultCrossingChar($crossingChar); - } - - /** - * Gets crossing character. - * - * @return string - */ - public function getCrossingChar() - { - return $this->crossingChar; - } - - /** - * Gets crossing characters. - * - * @internal - */ - public function getCrossingChars(): array - { - return [ - $this->crossingChar, - $this->crossingTopLeftChar, - $this->crossingTopMidChar, - $this->crossingTopRightChar, - $this->crossingMidRightChar, - $this->crossingBottomRightChar, - $this->crossingBottomMidChar, - $this->crossingBottomLeftChar, - $this->crossingMidLeftChar, - $this->crossingTopLeftBottomChar, - $this->crossingTopMidBottomChar, - $this->crossingTopRightBottomChar, - ]; - } - - /** - * Sets header cell format. - * - * @param string $cellHeaderFormat - * - * @return $this - */ - public function setCellHeaderFormat($cellHeaderFormat) - { - $this->cellHeaderFormat = $cellHeaderFormat; - - return $this; - } - - /** - * Gets header cell format. - * - * @return string - */ - public function getCellHeaderFormat() - { - return $this->cellHeaderFormat; - } - - /** - * Sets row cell format. - * - * @param string $cellRowFormat - * - * @return $this - */ - public function setCellRowFormat($cellRowFormat) - { - $this->cellRowFormat = $cellRowFormat; - - return $this; - } - - /** - * Gets row cell format. - * - * @return string - */ - public function getCellRowFormat() - { - return $this->cellRowFormat; - } - - /** - * Sets row cell content format. - * - * @param string $cellRowContentFormat - * - * @return $this - */ - public function setCellRowContentFormat($cellRowContentFormat) - { - $this->cellRowContentFormat = $cellRowContentFormat; - - return $this; - } - - /** - * Gets row cell content format. - * - * @return string - */ - public function getCellRowContentFormat() - { - return $this->cellRowContentFormat; - } - - /** - * Sets table border format. - * - * @param string $borderFormat - * - * @return $this - */ - public function setBorderFormat($borderFormat) - { - $this->borderFormat = $borderFormat; - - return $this; - } - - /** - * Gets table border format. - * - * @return string - */ - public function getBorderFormat() - { - return $this->borderFormat; - } - - /** - * Sets cell padding type. - * - * @param int $padType STR_PAD_* - * - * @return $this - */ - public function setPadType($padType) - { - if (!\in_array($padType, [\STR_PAD_LEFT, \STR_PAD_RIGHT, \STR_PAD_BOTH], true)) { - throw new InvalidArgumentException('Invalid padding type. Expected one of (STR_PAD_LEFT, STR_PAD_RIGHT, STR_PAD_BOTH).'); - } - - $this->padType = $padType; - - return $this; - } - - /** - * Gets cell padding type. - * - * @return int - */ - public function getPadType() - { - return $this->padType; - } - - public function getHeaderTitleFormat(): string - { - return $this->headerTitleFormat; - } - - public function setHeaderTitleFormat(string $format): self - { - $this->headerTitleFormat = $format; - - return $this; - } - - public function getFooterTitleFormat(): string - { - return $this->footerTitleFormat; - } - - public function setFooterTitleFormat(string $format): self - { - $this->footerTitleFormat = $format; - - return $this; - } -} diff --git a/source/vendor/symfony/console/Input/ArgvInput.php b/source/vendor/symfony/console/Input/ArgvInput.php deleted file mode 100644 index b635295..0000000 --- a/source/vendor/symfony/console/Input/ArgvInput.php +++ /dev/null @@ -1,350 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Input; - -use Symfony\Component\Console\Exception\RuntimeException; - -/** - * ArgvInput represents an input coming from the CLI arguments. - * - * Usage: - * - * $input = new ArgvInput(); - * - * By default, the `$_SERVER['argv']` array is used for the input values. - * - * This can be overridden by explicitly passing the input values in the constructor: - * - * $input = new ArgvInput($_SERVER['argv']); - * - * If you pass it yourself, don't forget that the first element of the array - * is the name of the running application. - * - * When passing an argument to the constructor, be sure that it respects - * the same rules as the argv one. It's almost always better to use the - * `StringInput` when you want to provide your own input. - * - * @author Fabien Potencier - * - * @see http://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html - * @see http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap12.html#tag_12_02 - */ -class ArgvInput extends Input -{ - private $tokens; - private $parsed; - - /** - * @param array|null $argv An array of parameters from the CLI (in the argv format) - */ - public function __construct(array $argv = null, InputDefinition $definition = null) - { - $argv = $argv ?? $_SERVER['argv'] ?? []; - - // strip the application name - array_shift($argv); - - $this->tokens = $argv; - - parent::__construct($definition); - } - - protected function setTokens(array $tokens) - { - $this->tokens = $tokens; - } - - /** - * {@inheritdoc} - */ - protected function parse() - { - $parseOptions = true; - $this->parsed = $this->tokens; - while (null !== $token = array_shift($this->parsed)) { - if ($parseOptions && '' == $token) { - $this->parseArgument($token); - } elseif ($parseOptions && '--' == $token) { - $parseOptions = false; - } elseif ($parseOptions && str_starts_with($token, '--')) { - $this->parseLongOption($token); - } elseif ($parseOptions && '-' === $token[0] && '-' !== $token) { - $this->parseShortOption($token); - } else { - $this->parseArgument($token); - } - } - } - - /** - * Parses a short option. - */ - private function parseShortOption(string $token) - { - $name = substr($token, 1); - - if (\strlen($name) > 1) { - if ($this->definition->hasShortcut($name[0]) && $this->definition->getOptionForShortcut($name[0])->acceptValue()) { - // an option with a value (with no space) - $this->addShortOption($name[0], substr($name, 1)); - } else { - $this->parseShortOptionSet($name); - } - } else { - $this->addShortOption($name, null); - } - } - - /** - * Parses a short option set. - * - * @throws RuntimeException When option given doesn't exist - */ - private function parseShortOptionSet(string $name) - { - $len = \strlen($name); - for ($i = 0; $i < $len; ++$i) { - if (!$this->definition->hasShortcut($name[$i])) { - $encoding = mb_detect_encoding($name, null, true); - throw new RuntimeException(sprintf('The "-%s" option does not exist.', false === $encoding ? $name[$i] : mb_substr($name, $i, 1, $encoding))); - } - - $option = $this->definition->getOptionForShortcut($name[$i]); - if ($option->acceptValue()) { - $this->addLongOption($option->getName(), $i === $len - 1 ? null : substr($name, $i + 1)); - - break; - } else { - $this->addLongOption($option->getName(), null); - } - } - } - - /** - * Parses a long option. - */ - private function parseLongOption(string $token) - { - $name = substr($token, 2); - - if (false !== $pos = strpos($name, '=')) { - if (0 === \strlen($value = substr($name, $pos + 1))) { - array_unshift($this->parsed, $value); - } - $this->addLongOption(substr($name, 0, $pos), $value); - } else { - $this->addLongOption($name, null); - } - } - - /** - * Parses an argument. - * - * @throws RuntimeException When too many arguments are given - */ - private function parseArgument(string $token) - { - $c = \count($this->arguments); - - // if input is expecting another argument, add it - if ($this->definition->hasArgument($c)) { - $arg = $this->definition->getArgument($c); - $this->arguments[$arg->getName()] = $arg->isArray() ? [$token] : $token; - - // if last argument isArray(), append token to last argument - } elseif ($this->definition->hasArgument($c - 1) && $this->definition->getArgument($c - 1)->isArray()) { - $arg = $this->definition->getArgument($c - 1); - $this->arguments[$arg->getName()][] = $token; - - // unexpected argument - } else { - $all = $this->definition->getArguments(); - if (\count($all)) { - throw new RuntimeException(sprintf('Too many arguments, expected arguments "%s".', implode('" "', array_keys($all)))); - } - - throw new RuntimeException(sprintf('No arguments expected, got "%s".', $token)); - } - } - - /** - * Adds a short option value. - * - * @throws RuntimeException When option given doesn't exist - */ - private function addShortOption(string $shortcut, $value) - { - if (!$this->definition->hasShortcut($shortcut)) { - throw new RuntimeException(sprintf('The "-%s" option does not exist.', $shortcut)); - } - - $this->addLongOption($this->definition->getOptionForShortcut($shortcut)->getName(), $value); - } - - /** - * Adds a long option value. - * - * @throws RuntimeException When option given doesn't exist - */ - private function addLongOption(string $name, $value) - { - if (!$this->definition->hasOption($name)) { - throw new RuntimeException(sprintf('The "--%s" option does not exist.', $name)); - } - - $option = $this->definition->getOption($name); - - if (null !== $value && !$option->acceptValue()) { - throw new RuntimeException(sprintf('The "--%s" option does not accept a value.', $name)); - } - - if (\in_array($value, ['', null], true) && $option->acceptValue() && \count($this->parsed)) { - // if option accepts an optional or mandatory argument - // let's see if there is one provided - $next = array_shift($this->parsed); - if ((isset($next[0]) && '-' !== $next[0]) || \in_array($next, ['', null], true)) { - $value = $next; - } else { - array_unshift($this->parsed, $next); - } - } - - if (null === $value) { - if ($option->isValueRequired()) { - throw new RuntimeException(sprintf('The "--%s" option requires a value.', $name)); - } - - if (!$option->isArray() && !$option->isValueOptional()) { - $value = true; - } - } - - if ($option->isArray()) { - $this->options[$name][] = $value; - } else { - $this->options[$name] = $value; - } - } - - /** - * {@inheritdoc} - */ - public function getFirstArgument() - { - $isOption = false; - foreach ($this->tokens as $i => $token) { - if ($token && '-' === $token[0]) { - if (str_contains($token, '=') || !isset($this->tokens[$i + 1])) { - continue; - } - - // If it's a long option, consider that everything after "--" is the option name. - // Otherwise, use the last char (if it's a short option set, only the last one can take a value with space separator) - $name = '-' === $token[1] ? substr($token, 2) : substr($token, -1); - if (!isset($this->options[$name]) && !$this->definition->hasShortcut($name)) { - // noop - } elseif ((isset($this->options[$name]) || isset($this->options[$name = $this->definition->shortcutToName($name)])) && $this->tokens[$i + 1] === $this->options[$name]) { - $isOption = true; - } - - continue; - } - - if ($isOption) { - $isOption = false; - continue; - } - - return $token; - } - - return null; - } - - /** - * {@inheritdoc} - */ - public function hasParameterOption($values, $onlyParams = false) - { - $values = (array) $values; - - foreach ($this->tokens as $token) { - if ($onlyParams && '--' === $token) { - return false; - } - foreach ($values as $value) { - // Options with values: - // For long options, test for '--option=' at beginning - // For short options, test for '-o' at beginning - $leading = str_starts_with($value, '--') ? $value.'=' : $value; - if ($token === $value || '' !== $leading && str_starts_with($token, $leading)) { - return true; - } - } - } - - return false; - } - - /** - * {@inheritdoc} - */ - public function getParameterOption($values, $default = false, $onlyParams = false) - { - $values = (array) $values; - $tokens = $this->tokens; - - while (0 < \count($tokens)) { - $token = array_shift($tokens); - if ($onlyParams && '--' === $token) { - return $default; - } - - foreach ($values as $value) { - if ($token === $value) { - return array_shift($tokens); - } - // Options with values: - // For long options, test for '--option=' at beginning - // For short options, test for '-o' at beginning - $leading = str_starts_with($value, '--') ? $value.'=' : $value; - if ('' !== $leading && str_starts_with($token, $leading)) { - return substr($token, \strlen($leading)); - } - } - } - - return $default; - } - - /** - * Returns a stringified representation of the args passed to the command. - * - * @return string - */ - public function __toString() - { - $tokens = array_map(function ($token) { - if (preg_match('{^(-[^=]+=)(.+)}', $token, $match)) { - return $match[1].$this->escapeToken($match[2]); - } - - if ($token && '-' !== $token[0]) { - return $this->escapeToken($token); - } - - return $token; - }, $this->tokens); - - return implode(' ', $tokens); - } -} diff --git a/source/vendor/symfony/console/Input/ArrayInput.php b/source/vendor/symfony/console/Input/ArrayInput.php deleted file mode 100644 index 30bd205..0000000 --- a/source/vendor/symfony/console/Input/ArrayInput.php +++ /dev/null @@ -1,203 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Input; - -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Exception\InvalidOptionException; - -/** - * ArrayInput represents an input provided as an array. - * - * Usage: - * - * $input = new ArrayInput(['command' => 'foo:bar', 'foo' => 'bar', '--bar' => 'foobar']); - * - * @author Fabien Potencier - */ -class ArrayInput extends Input -{ - private $parameters; - - public function __construct(array $parameters, InputDefinition $definition = null) - { - $this->parameters = $parameters; - - parent::__construct($definition); - } - - /** - * {@inheritdoc} - */ - public function getFirstArgument() - { - foreach ($this->parameters as $param => $value) { - if ($param && \is_string($param) && '-' === $param[0]) { - continue; - } - - return $value; - } - - return null; - } - - /** - * {@inheritdoc} - */ - public function hasParameterOption($values, $onlyParams = false) - { - $values = (array) $values; - - foreach ($this->parameters as $k => $v) { - if (!\is_int($k)) { - $v = $k; - } - - if ($onlyParams && '--' === $v) { - return false; - } - - if (\in_array($v, $values)) { - return true; - } - } - - return false; - } - - /** - * {@inheritdoc} - */ - public function getParameterOption($values, $default = false, $onlyParams = false) - { - $values = (array) $values; - - foreach ($this->parameters as $k => $v) { - if ($onlyParams && ('--' === $k || (\is_int($k) && '--' === $v))) { - return $default; - } - - if (\is_int($k)) { - if (\in_array($v, $values)) { - return true; - } - } elseif (\in_array($k, $values)) { - return $v; - } - } - - return $default; - } - - /** - * Returns a stringified representation of the args passed to the command. - * - * @return string - */ - public function __toString() - { - $params = []; - foreach ($this->parameters as $param => $val) { - if ($param && \is_string($param) && '-' === $param[0]) { - $glue = ('-' === $param[1]) ? '=' : ' '; - if (\is_array($val)) { - foreach ($val as $v) { - $params[] = $param.('' != $v ? $glue.$this->escapeToken($v) : ''); - } - } else { - $params[] = $param.('' != $val ? $glue.$this->escapeToken($val) : ''); - } - } else { - $params[] = \is_array($val) ? implode(' ', array_map([$this, 'escapeToken'], $val)) : $this->escapeToken($val); - } - } - - return implode(' ', $params); - } - - /** - * {@inheritdoc} - */ - protected function parse() - { - foreach ($this->parameters as $key => $value) { - if ('--' === $key) { - return; - } - if (str_starts_with($key, '--')) { - $this->addLongOption(substr($key, 2), $value); - } elseif (str_starts_with($key, '-')) { - $this->addShortOption(substr($key, 1), $value); - } else { - $this->addArgument($key, $value); - } - } - } - - /** - * Adds a short option value. - * - * @throws InvalidOptionException When option given doesn't exist - */ - private function addShortOption(string $shortcut, $value) - { - if (!$this->definition->hasShortcut($shortcut)) { - throw new InvalidOptionException(sprintf('The "-%s" option does not exist.', $shortcut)); - } - - $this->addLongOption($this->definition->getOptionForShortcut($shortcut)->getName(), $value); - } - - /** - * Adds a long option value. - * - * @throws InvalidOptionException When option given doesn't exist - * @throws InvalidOptionException When a required value is missing - */ - private function addLongOption(string $name, $value) - { - if (!$this->definition->hasOption($name)) { - throw new InvalidOptionException(sprintf('The "--%s" option does not exist.', $name)); - } - - $option = $this->definition->getOption($name); - - if (null === $value) { - if ($option->isValueRequired()) { - throw new InvalidOptionException(sprintf('The "--%s" option requires a value.', $name)); - } - - if (!$option->isValueOptional()) { - $value = true; - } - } - - $this->options[$name] = $value; - } - - /** - * Adds an argument value. - * - * @param string|int $name The argument name - * @param mixed $value The value for the argument - * - * @throws InvalidArgumentException When argument given doesn't exist - */ - private function addArgument($name, $value) - { - if (!$this->definition->hasArgument($name)) { - throw new InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name)); - } - - $this->arguments[$name] = $value; - } -} diff --git a/source/vendor/symfony/console/Input/Input.php b/source/vendor/symfony/console/Input/Input.php deleted file mode 100644 index d7f2907..0000000 --- a/source/vendor/symfony/console/Input/Input.php +++ /dev/null @@ -1,203 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Input; - -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Exception\RuntimeException; - -/** - * Input is the base class for all concrete Input classes. - * - * Three concrete classes are provided by default: - * - * * `ArgvInput`: The input comes from the CLI arguments (argv) - * * `StringInput`: The input is provided as a string - * * `ArrayInput`: The input is provided as an array - * - * @author Fabien Potencier - */ -abstract class Input implements InputInterface, StreamableInputInterface -{ - protected $definition; - protected $stream; - protected $options = []; - protected $arguments = []; - protected $interactive = true; - - public function __construct(InputDefinition $definition = null) - { - if (null === $definition) { - $this->definition = new InputDefinition(); - } else { - $this->bind($definition); - $this->validate(); - } - } - - /** - * {@inheritdoc} - */ - public function bind(InputDefinition $definition) - { - $this->arguments = []; - $this->options = []; - $this->definition = $definition; - - $this->parse(); - } - - /** - * Processes command line arguments. - */ - abstract protected function parse(); - - /** - * {@inheritdoc} - */ - public function validate() - { - $definition = $this->definition; - $givenArguments = $this->arguments; - - $missingArguments = array_filter(array_keys($definition->getArguments()), function ($argument) use ($definition, $givenArguments) { - return !\array_key_exists($argument, $givenArguments) && $definition->getArgument($argument)->isRequired(); - }); - - if (\count($missingArguments) > 0) { - throw new RuntimeException(sprintf('Not enough arguments (missing: "%s").', implode(', ', $missingArguments))); - } - } - - /** - * {@inheritdoc} - */ - public function isInteractive() - { - return $this->interactive; - } - - /** - * {@inheritdoc} - */ - public function setInteractive($interactive) - { - $this->interactive = (bool) $interactive; - } - - /** - * {@inheritdoc} - */ - public function getArguments() - { - return array_merge($this->definition->getArgumentDefaults(), $this->arguments); - } - - /** - * {@inheritdoc} - */ - public function getArgument($name) - { - if (!$this->definition->hasArgument((string) $name)) { - throw new InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name)); - } - - return $this->arguments[$name] ?? $this->definition->getArgument($name)->getDefault(); - } - - /** - * {@inheritdoc} - */ - public function setArgument($name, $value) - { - if (!$this->definition->hasArgument((string) $name)) { - throw new InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name)); - } - - $this->arguments[$name] = $value; - } - - /** - * {@inheritdoc} - */ - public function hasArgument($name) - { - return $this->definition->hasArgument((string) $name); - } - - /** - * {@inheritdoc} - */ - public function getOptions() - { - return array_merge($this->definition->getOptionDefaults(), $this->options); - } - - /** - * {@inheritdoc} - */ - public function getOption($name) - { - if (!$this->definition->hasOption($name)) { - throw new InvalidArgumentException(sprintf('The "%s" option does not exist.', $name)); - } - - return \array_key_exists($name, $this->options) ? $this->options[$name] : $this->definition->getOption($name)->getDefault(); - } - - /** - * {@inheritdoc} - */ - public function setOption($name, $value) - { - if (!$this->definition->hasOption($name)) { - throw new InvalidArgumentException(sprintf('The "%s" option does not exist.', $name)); - } - - $this->options[$name] = $value; - } - - /** - * {@inheritdoc} - */ - public function hasOption($name) - { - return $this->definition->hasOption($name); - } - - /** - * Escapes a token through escapeshellarg if it contains unsafe chars. - * - * @param string $token - * - * @return string - */ - public function escapeToken($token) - { - return preg_match('{^[\w-]+$}', $token) ? $token : escapeshellarg($token); - } - - /** - * {@inheritdoc} - */ - public function setStream($stream) - { - $this->stream = $stream; - } - - /** - * {@inheritdoc} - */ - public function getStream() - { - return $this->stream; - } -} diff --git a/source/vendor/symfony/console/Input/InputArgument.php b/source/vendor/symfony/console/Input/InputArgument.php deleted file mode 100644 index 085aca5..0000000 --- a/source/vendor/symfony/console/Input/InputArgument.php +++ /dev/null @@ -1,129 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Input; - -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Exception\LogicException; - -/** - * Represents a command line argument. - * - * @author Fabien Potencier - */ -class InputArgument -{ - public const REQUIRED = 1; - public const OPTIONAL = 2; - public const IS_ARRAY = 4; - - private $name; - private $mode; - private $default; - private $description; - - /** - * @param string $name The argument name - * @param int|null $mode The argument mode: self::REQUIRED or self::OPTIONAL - * @param string $description A description text - * @param string|bool|int|float|array|null $default The default value (for self::OPTIONAL mode only) - * - * @throws InvalidArgumentException When argument mode is not valid - */ - public function __construct(string $name, int $mode = null, string $description = '', $default = null) - { - if (null === $mode) { - $mode = self::OPTIONAL; - } elseif ($mode > 7 || $mode < 1) { - throw new InvalidArgumentException(sprintf('Argument mode "%s" is not valid.', $mode)); - } - - $this->name = $name; - $this->mode = $mode; - $this->description = $description; - - $this->setDefault($default); - } - - /** - * Returns the argument name. - * - * @return string The argument name - */ - public function getName() - { - return $this->name; - } - - /** - * Returns true if the argument is required. - * - * @return bool true if parameter mode is self::REQUIRED, false otherwise - */ - public function isRequired() - { - return self::REQUIRED === (self::REQUIRED & $this->mode); - } - - /** - * Returns true if the argument can take multiple values. - * - * @return bool true if mode is self::IS_ARRAY, false otherwise - */ - public function isArray() - { - return self::IS_ARRAY === (self::IS_ARRAY & $this->mode); - } - - /** - * Sets the default value. - * - * @param string|bool|int|float|array|null $default - * - * @throws LogicException When incorrect default value is given - */ - public function setDefault($default = null) - { - if (self::REQUIRED === $this->mode && null !== $default) { - throw new LogicException('Cannot set a default value except for InputArgument::OPTIONAL mode.'); - } - - if ($this->isArray()) { - if (null === $default) { - $default = []; - } elseif (!\is_array($default)) { - throw new LogicException('A default value for an array argument must be an array.'); - } - } - - $this->default = $default; - } - - /** - * Returns the default value. - * - * @return string|bool|int|float|array|null - */ - public function getDefault() - { - return $this->default; - } - - /** - * Returns the description text. - * - * @return string The description text - */ - public function getDescription() - { - return $this->description; - } -} diff --git a/source/vendor/symfony/console/Input/InputAwareInterface.php b/source/vendor/symfony/console/Input/InputAwareInterface.php deleted file mode 100644 index 5a288de..0000000 --- a/source/vendor/symfony/console/Input/InputAwareInterface.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Input; - -/** - * InputAwareInterface should be implemented by classes that depends on the - * Console Input. - * - * @author Wouter J - */ -interface InputAwareInterface -{ - /** - * Sets the Console Input. - */ - public function setInput(InputInterface $input); -} diff --git a/source/vendor/symfony/console/Input/InputDefinition.php b/source/vendor/symfony/console/Input/InputDefinition.php deleted file mode 100644 index e2cd6d7..0000000 --- a/source/vendor/symfony/console/Input/InputDefinition.php +++ /dev/null @@ -1,396 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Input; - -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Exception\LogicException; - -/** - * A InputDefinition represents a set of valid command line arguments and options. - * - * Usage: - * - * $definition = new InputDefinition([ - * new InputArgument('name', InputArgument::REQUIRED), - * new InputOption('foo', 'f', InputOption::VALUE_REQUIRED), - * ]); - * - * @author Fabien Potencier - */ -class InputDefinition -{ - private $arguments; - private $requiredCount; - private $hasAnArrayArgument = false; - private $hasOptional; - private $options; - private $shortcuts; - - /** - * @param array $definition An array of InputArgument and InputOption instance - */ - public function __construct(array $definition = []) - { - $this->setDefinition($definition); - } - - /** - * Sets the definition of the input. - */ - public function setDefinition(array $definition) - { - $arguments = []; - $options = []; - foreach ($definition as $item) { - if ($item instanceof InputOption) { - $options[] = $item; - } else { - $arguments[] = $item; - } - } - - $this->setArguments($arguments); - $this->setOptions($options); - } - - /** - * Sets the InputArgument objects. - * - * @param InputArgument[] $arguments An array of InputArgument objects - */ - public function setArguments($arguments = []) - { - $this->arguments = []; - $this->requiredCount = 0; - $this->hasOptional = false; - $this->hasAnArrayArgument = false; - $this->addArguments($arguments); - } - - /** - * Adds an array of InputArgument objects. - * - * @param InputArgument[] $arguments An array of InputArgument objects - */ - public function addArguments($arguments = []) - { - if (null !== $arguments) { - foreach ($arguments as $argument) { - $this->addArgument($argument); - } - } - } - - /** - * @throws LogicException When incorrect argument is given - */ - public function addArgument(InputArgument $argument) - { - if (isset($this->arguments[$argument->getName()])) { - throw new LogicException(sprintf('An argument with name "%s" already exists.', $argument->getName())); - } - - if ($this->hasAnArrayArgument) { - throw new LogicException('Cannot add an argument after an array argument.'); - } - - if ($argument->isRequired() && $this->hasOptional) { - throw new LogicException('Cannot add a required argument after an optional one.'); - } - - if ($argument->isArray()) { - $this->hasAnArrayArgument = true; - } - - if ($argument->isRequired()) { - ++$this->requiredCount; - } else { - $this->hasOptional = true; - } - - $this->arguments[$argument->getName()] = $argument; - } - - /** - * Returns an InputArgument by name or by position. - * - * @param string|int $name The InputArgument name or position - * - * @return InputArgument An InputArgument object - * - * @throws InvalidArgumentException When argument given doesn't exist - */ - public function getArgument($name) - { - if (!$this->hasArgument($name)) { - throw new InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name)); - } - - $arguments = \is_int($name) ? array_values($this->arguments) : $this->arguments; - - return $arguments[$name]; - } - - /** - * Returns true if an InputArgument object exists by name or position. - * - * @param string|int $name The InputArgument name or position - * - * @return bool true if the InputArgument object exists, false otherwise - */ - public function hasArgument($name) - { - $arguments = \is_int($name) ? array_values($this->arguments) : $this->arguments; - - return isset($arguments[$name]); - } - - /** - * Gets the array of InputArgument objects. - * - * @return InputArgument[] An array of InputArgument objects - */ - public function getArguments() - { - return $this->arguments; - } - - /** - * Returns the number of InputArguments. - * - * @return int The number of InputArguments - */ - public function getArgumentCount() - { - return $this->hasAnArrayArgument ? \PHP_INT_MAX : \count($this->arguments); - } - - /** - * Returns the number of required InputArguments. - * - * @return int The number of required InputArguments - */ - public function getArgumentRequiredCount() - { - return $this->requiredCount; - } - - /** - * @return array - */ - public function getArgumentDefaults() - { - $values = []; - foreach ($this->arguments as $argument) { - $values[$argument->getName()] = $argument->getDefault(); - } - - return $values; - } - - /** - * Sets the InputOption objects. - * - * @param InputOption[] $options An array of InputOption objects - */ - public function setOptions($options = []) - { - $this->options = []; - $this->shortcuts = []; - $this->addOptions($options); - } - - /** - * Adds an array of InputOption objects. - * - * @param InputOption[] $options An array of InputOption objects - */ - public function addOptions($options = []) - { - foreach ($options as $option) { - $this->addOption($option); - } - } - - /** - * @throws LogicException When option given already exist - */ - public function addOption(InputOption $option) - { - if (isset($this->options[$option->getName()]) && !$option->equals($this->options[$option->getName()])) { - throw new LogicException(sprintf('An option named "%s" already exists.', $option->getName())); - } - - if ($option->getShortcut()) { - foreach (explode('|', $option->getShortcut()) as $shortcut) { - if (isset($this->shortcuts[$shortcut]) && !$option->equals($this->options[$this->shortcuts[$shortcut]])) { - throw new LogicException(sprintf('An option with shortcut "%s" already exists.', $shortcut)); - } - } - } - - $this->options[$option->getName()] = $option; - if ($option->getShortcut()) { - foreach (explode('|', $option->getShortcut()) as $shortcut) { - $this->shortcuts[$shortcut] = $option->getName(); - } - } - } - - /** - * Returns an InputOption by name. - * - * @param string $name The InputOption name - * - * @return InputOption A InputOption object - * - * @throws InvalidArgumentException When option given doesn't exist - */ - public function getOption($name) - { - if (!$this->hasOption($name)) { - throw new InvalidArgumentException(sprintf('The "--%s" option does not exist.', $name)); - } - - return $this->options[$name]; - } - - /** - * Returns true if an InputOption object exists by name. - * - * This method can't be used to check if the user included the option when - * executing the command (use getOption() instead). - * - * @param string $name The InputOption name - * - * @return bool true if the InputOption object exists, false otherwise - */ - public function hasOption($name) - { - return isset($this->options[$name]); - } - - /** - * Gets the array of InputOption objects. - * - * @return InputOption[] An array of InputOption objects - */ - public function getOptions() - { - return $this->options; - } - - /** - * Returns true if an InputOption object exists by shortcut. - * - * @param string $name The InputOption shortcut - * - * @return bool true if the InputOption object exists, false otherwise - */ - public function hasShortcut($name) - { - return isset($this->shortcuts[$name]); - } - - /** - * Gets an InputOption by shortcut. - * - * @param string $shortcut The Shortcut name - * - * @return InputOption An InputOption object - */ - public function getOptionForShortcut($shortcut) - { - return $this->getOption($this->shortcutToName($shortcut)); - } - - /** - * @return array - */ - public function getOptionDefaults() - { - $values = []; - foreach ($this->options as $option) { - $values[$option->getName()] = $option->getDefault(); - } - - return $values; - } - - /** - * Returns the InputOption name given a shortcut. - * - * @throws InvalidArgumentException When option given does not exist - * - * @internal - */ - public function shortcutToName(string $shortcut): string - { - if (!isset($this->shortcuts[$shortcut])) { - throw new InvalidArgumentException(sprintf('The "-%s" option does not exist.', $shortcut)); - } - - return $this->shortcuts[$shortcut]; - } - - /** - * Gets the synopsis. - * - * @param bool $short Whether to return the short version (with options folded) or not - * - * @return string The synopsis - */ - public function getSynopsis($short = false) - { - $elements = []; - - if ($short && $this->getOptions()) { - $elements[] = '[options]'; - } elseif (!$short) { - foreach ($this->getOptions() as $option) { - $value = ''; - if ($option->acceptValue()) { - $value = sprintf( - ' %s%s%s', - $option->isValueOptional() ? '[' : '', - strtoupper($option->getName()), - $option->isValueOptional() ? ']' : '' - ); - } - - $shortcut = $option->getShortcut() ? sprintf('-%s|', $option->getShortcut()) : ''; - $elements[] = sprintf('[%s--%s%s]', $shortcut, $option->getName(), $value); - } - } - - if (\count($elements) && $this->getArguments()) { - $elements[] = '[--]'; - } - - $tail = ''; - foreach ($this->getArguments() as $argument) { - $element = '<'.$argument->getName().'>'; - if ($argument->isArray()) { - $element .= '...'; - } - - if (!$argument->isRequired()) { - $element = '['.$element; - $tail .= ']'; - } - - $elements[] = $element; - } - - return implode(' ', $elements).$tail; - } -} diff --git a/source/vendor/symfony/console/Input/InputInterface.php b/source/vendor/symfony/console/Input/InputInterface.php deleted file mode 100644 index 8efc623..0000000 --- a/source/vendor/symfony/console/Input/InputInterface.php +++ /dev/null @@ -1,163 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Input; - -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Exception\RuntimeException; - -/** - * InputInterface is the interface implemented by all input classes. - * - * @author Fabien Potencier - */ -interface InputInterface -{ - /** - * Returns the first argument from the raw parameters (not parsed). - * - * @return string|null The value of the first argument or null otherwise - */ - public function getFirstArgument(); - - /** - * Returns true if the raw parameters (not parsed) contain a value. - * - * This method is to be used to introspect the input parameters - * before they have been validated. It must be used carefully. - * Does not necessarily return the correct result for short options - * when multiple flags are combined in the same option. - * - * @param string|array $values The values to look for in the raw parameters (can be an array) - * @param bool $onlyParams Only check real parameters, skip those following an end of options (--) signal - * - * @return bool true if the value is contained in the raw parameters - */ - public function hasParameterOption($values, $onlyParams = false); - - /** - * Returns the value of a raw option (not parsed). - * - * This method is to be used to introspect the input parameters - * before they have been validated. It must be used carefully. - * Does not necessarily return the correct result for short options - * when multiple flags are combined in the same option. - * - * @param string|array $values The value(s) to look for in the raw parameters (can be an array) - * @param string|bool|int|float|array|null $default The default value to return if no result is found - * @param bool $onlyParams Only check real parameters, skip those following an end of options (--) signal - * - * @return mixed The option value - */ - public function getParameterOption($values, $default = false, $onlyParams = false); - - /** - * Binds the current Input instance with the given arguments and options. - * - * @throws RuntimeException - */ - public function bind(InputDefinition $definition); - - /** - * Validates the input. - * - * @throws RuntimeException When not enough arguments are given - */ - public function validate(); - - /** - * Returns all the given arguments merged with the default values. - * - * @return array - */ - public function getArguments(); - - /** - * Returns the argument value for a given argument name. - * - * @param string $name The argument name - * - * @return mixed - * - * @throws InvalidArgumentException When argument given doesn't exist - */ - public function getArgument($name); - - /** - * Sets an argument value by name. - * - * @param string $name The argument name - * @param mixed $value The argument value - * - * @throws InvalidArgumentException When argument given doesn't exist - */ - public function setArgument($name, $value); - - /** - * Returns true if an InputArgument object exists by name or position. - * - * @param string $name The argument name - * - * @return bool true if the InputArgument object exists, false otherwise - */ - public function hasArgument($name); - - /** - * Returns all the given options merged with the default values. - * - * @return array - */ - public function getOptions(); - - /** - * Returns the option value for a given option name. - * - * @param string $name The option name - * - * @return mixed - * - * @throws InvalidArgumentException When option given doesn't exist - */ - public function getOption($name); - - /** - * Sets an option value by name. - * - * @param string $name The option name - * @param mixed $value The option value - * - * @throws InvalidArgumentException When option given doesn't exist - */ - public function setOption($name, $value); - - /** - * Returns true if an InputOption object exists by name. - * - * @param string $name The InputOption name - * - * @return bool true if the InputOption object exists, false otherwise - */ - public function hasOption($name); - - /** - * Is this input means interactive? - * - * @return bool - */ - public function isInteractive(); - - /** - * Sets the input interactivity. - * - * @param bool $interactive If the input should be interactive - */ - public function setInteractive($interactive); -} diff --git a/source/vendor/symfony/console/Input/InputOption.php b/source/vendor/symfony/console/Input/InputOption.php deleted file mode 100644 index c7729db..0000000 --- a/source/vendor/symfony/console/Input/InputOption.php +++ /dev/null @@ -1,219 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Input; - -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Exception\LogicException; - -/** - * Represents a command line option. - * - * @author Fabien Potencier - */ -class InputOption -{ - /** - * Do not accept input for the option (e.g. --yell). This is the default behavior of options. - */ - public const VALUE_NONE = 1; - - /** - * A value must be passed when the option is used (e.g. --iterations=5 or -i5). - */ - public const VALUE_REQUIRED = 2; - - /** - * The option may or may not have a value (e.g. --yell or --yell=loud). - */ - public const VALUE_OPTIONAL = 4; - - /** - * The option accepts multiple values (e.g. --dir=/foo --dir=/bar). - */ - public const VALUE_IS_ARRAY = 8; - - private $name; - private $shortcut; - private $mode; - private $default; - private $description; - - /** - * @param string $name The option name - * @param string|array|null $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts - * @param int|null $mode The option mode: One of the VALUE_* constants - * @param string $description A description text - * @param string|bool|int|float|array|null $default The default value (must be null for self::VALUE_NONE) - * - * @throws InvalidArgumentException If option mode is invalid or incompatible - */ - public function __construct(string $name, $shortcut = null, int $mode = null, string $description = '', $default = null) - { - if (str_starts_with($name, '--')) { - $name = substr($name, 2); - } - - if (empty($name)) { - throw new InvalidArgumentException('An option name cannot be empty.'); - } - - if (empty($shortcut)) { - $shortcut = null; - } - - if (null !== $shortcut) { - if (\is_array($shortcut)) { - $shortcut = implode('|', $shortcut); - } - $shortcuts = preg_split('{(\|)-?}', ltrim($shortcut, '-')); - $shortcuts = array_filter($shortcuts); - $shortcut = implode('|', $shortcuts); - - if (empty($shortcut)) { - throw new InvalidArgumentException('An option shortcut cannot be empty.'); - } - } - - if (null === $mode) { - $mode = self::VALUE_NONE; - } elseif ($mode > 15 || $mode < 1) { - throw new InvalidArgumentException(sprintf('Option mode "%s" is not valid.', $mode)); - } - - $this->name = $name; - $this->shortcut = $shortcut; - $this->mode = $mode; - $this->description = $description; - - if ($this->isArray() && !$this->acceptValue()) { - throw new InvalidArgumentException('Impossible to have an option mode VALUE_IS_ARRAY if the option does not accept a value.'); - } - - $this->setDefault($default); - } - - /** - * Returns the option shortcut. - * - * @return string|null The shortcut - */ - public function getShortcut() - { - return $this->shortcut; - } - - /** - * Returns the option name. - * - * @return string The name - */ - public function getName() - { - return $this->name; - } - - /** - * Returns true if the option accepts a value. - * - * @return bool true if value mode is not self::VALUE_NONE, false otherwise - */ - public function acceptValue() - { - return $this->isValueRequired() || $this->isValueOptional(); - } - - /** - * Returns true if the option requires a value. - * - * @return bool true if value mode is self::VALUE_REQUIRED, false otherwise - */ - public function isValueRequired() - { - return self::VALUE_REQUIRED === (self::VALUE_REQUIRED & $this->mode); - } - - /** - * Returns true if the option takes an optional value. - * - * @return bool true if value mode is self::VALUE_OPTIONAL, false otherwise - */ - public function isValueOptional() - { - return self::VALUE_OPTIONAL === (self::VALUE_OPTIONAL & $this->mode); - } - - /** - * Returns true if the option can take multiple values. - * - * @return bool true if mode is self::VALUE_IS_ARRAY, false otherwise - */ - public function isArray() - { - return self::VALUE_IS_ARRAY === (self::VALUE_IS_ARRAY & $this->mode); - } - - /** - * @param string|bool|int|float|array|null $default - */ - public function setDefault($default = null) - { - if (self::VALUE_NONE === (self::VALUE_NONE & $this->mode) && null !== $default) { - throw new LogicException('Cannot set a default value when using InputOption::VALUE_NONE mode.'); - } - - if ($this->isArray()) { - if (null === $default) { - $default = []; - } elseif (!\is_array($default)) { - throw new LogicException('A default value for an array option must be an array.'); - } - } - - $this->default = $this->acceptValue() ? $default : false; - } - - /** - * Returns the default value. - * - * @return string|bool|int|float|array|null - */ - public function getDefault() - { - return $this->default; - } - - /** - * Returns the description text. - * - * @return string The description text - */ - public function getDescription() - { - return $this->description; - } - - /** - * Checks whether the given option equals this one. - * - * @return bool - */ - public function equals(self $option) - { - return $option->getName() === $this->getName() - && $option->getShortcut() === $this->getShortcut() - && $option->getDefault() === $this->getDefault() - && $option->isArray() === $this->isArray() - && $option->isValueRequired() === $this->isValueRequired() - && $option->isValueOptional() === $this->isValueOptional() - ; - } -} diff --git a/source/vendor/symfony/console/Input/StreamableInputInterface.php b/source/vendor/symfony/console/Input/StreamableInputInterface.php deleted file mode 100644 index d7e462f..0000000 --- a/source/vendor/symfony/console/Input/StreamableInputInterface.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Input; - -/** - * StreamableInputInterface is the interface implemented by all input classes - * that have an input stream. - * - * @author Robin Chalas - */ -interface StreamableInputInterface extends InputInterface -{ - /** - * Sets the input stream to read from when interacting with the user. - * - * This is mainly useful for testing purpose. - * - * @param resource $stream The input stream - */ - public function setStream($stream); - - /** - * Returns the input stream. - * - * @return resource|null - */ - public function getStream(); -} diff --git a/source/vendor/symfony/console/Input/StringInput.php b/source/vendor/symfony/console/Input/StringInput.php deleted file mode 100644 index eb5c07f..0000000 --- a/source/vendor/symfony/console/Input/StringInput.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Input; - -use Symfony\Component\Console\Exception\InvalidArgumentException; - -/** - * StringInput represents an input provided as a string. - * - * Usage: - * - * $input = new StringInput('foo --bar="foobar"'); - * - * @author Fabien Potencier - */ -class StringInput extends ArgvInput -{ - public const REGEX_STRING = '([^\s]+?)(?:\s|(?setTokens($this->tokenize($input)); - } - - /** - * Tokenizes a string. - * - * @throws InvalidArgumentException When unable to parse input (should never happen) - */ - private function tokenize(string $input): array - { - $tokens = []; - $length = \strlen($input); - $cursor = 0; - while ($cursor < $length) { - if (preg_match('/\s+/A', $input, $match, 0, $cursor)) { - } elseif (preg_match('/([^="\'\s]+?)(=?)('.self::REGEX_QUOTED_STRING.'+)/A', $input, $match, 0, $cursor)) { - $tokens[] = $match[1].$match[2].stripcslashes(str_replace(['"\'', '\'"', '\'\'', '""'], '', substr($match[3], 1, -1))); - } elseif (preg_match('/'.self::REGEX_QUOTED_STRING.'/A', $input, $match, 0, $cursor)) { - $tokens[] = stripcslashes(substr($match[0], 1, -1)); - } elseif (preg_match('/'.self::REGEX_STRING.'/A', $input, $match, 0, $cursor)) { - $tokens[] = stripcslashes($match[1]); - } else { - // should never happen - throw new InvalidArgumentException(sprintf('Unable to parse input near "... %s ...".', substr($input, $cursor, 10))); - } - - $cursor += \strlen($match[0]); - } - - return $tokens; - } -} diff --git a/source/vendor/symfony/console/LICENSE b/source/vendor/symfony/console/LICENSE deleted file mode 100644 index 9ff2d0d..0000000 --- a/source/vendor/symfony/console/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2021 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/source/vendor/symfony/console/Logger/ConsoleLogger.php b/source/vendor/symfony/console/Logger/ConsoleLogger.php deleted file mode 100644 index c9ee035..0000000 --- a/source/vendor/symfony/console/Logger/ConsoleLogger.php +++ /dev/null @@ -1,126 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Logger; - -use Psr\Log\AbstractLogger; -use Psr\Log\InvalidArgumentException; -use Psr\Log\LogLevel; -use Symfony\Component\Console\Output\ConsoleOutputInterface; -use Symfony\Component\Console\Output\OutputInterface; - -/** - * PSR-3 compliant console logger. - * - * @author Kévin Dunglas - * - * @see https://www.php-fig.org/psr/psr-3/ - */ -class ConsoleLogger extends AbstractLogger -{ - public const INFO = 'info'; - public const ERROR = 'error'; - - private $output; - private $verbosityLevelMap = [ - LogLevel::EMERGENCY => OutputInterface::VERBOSITY_NORMAL, - LogLevel::ALERT => OutputInterface::VERBOSITY_NORMAL, - LogLevel::CRITICAL => OutputInterface::VERBOSITY_NORMAL, - LogLevel::ERROR => OutputInterface::VERBOSITY_NORMAL, - LogLevel::WARNING => OutputInterface::VERBOSITY_NORMAL, - LogLevel::NOTICE => OutputInterface::VERBOSITY_VERBOSE, - LogLevel::INFO => OutputInterface::VERBOSITY_VERY_VERBOSE, - LogLevel::DEBUG => OutputInterface::VERBOSITY_DEBUG, - ]; - private $formatLevelMap = [ - LogLevel::EMERGENCY => self::ERROR, - LogLevel::ALERT => self::ERROR, - LogLevel::CRITICAL => self::ERROR, - LogLevel::ERROR => self::ERROR, - LogLevel::WARNING => self::INFO, - LogLevel::NOTICE => self::INFO, - LogLevel::INFO => self::INFO, - LogLevel::DEBUG => self::INFO, - ]; - private $errored = false; - - public function __construct(OutputInterface $output, array $verbosityLevelMap = [], array $formatLevelMap = []) - { - $this->output = $output; - $this->verbosityLevelMap = $verbosityLevelMap + $this->verbosityLevelMap; - $this->formatLevelMap = $formatLevelMap + $this->formatLevelMap; - } - - /** - * {@inheritdoc} - * - * @return void - */ - public function log($level, $message, array $context = []) - { - if (!isset($this->verbosityLevelMap[$level])) { - throw new InvalidArgumentException(sprintf('The log level "%s" does not exist.', $level)); - } - - $output = $this->output; - - // Write to the error output if necessary and available - if (self::ERROR === $this->formatLevelMap[$level]) { - if ($this->output instanceof ConsoleOutputInterface) { - $output = $output->getErrorOutput(); - } - $this->errored = true; - } - - // the if condition check isn't necessary -- it's the same one that $output will do internally anyway. - // We only do it for efficiency here as the message formatting is relatively expensive. - if ($output->getVerbosity() >= $this->verbosityLevelMap[$level]) { - $output->writeln(sprintf('<%1$s>[%2$s] %3$s', $this->formatLevelMap[$level], $level, $this->interpolate($message, $context)), $this->verbosityLevelMap[$level]); - } - } - - /** - * Returns true when any messages have been logged at error levels. - * - * @return bool - */ - public function hasErrored() - { - return $this->errored; - } - - /** - * Interpolates context values into the message placeholders. - * - * @author PHP Framework Interoperability Group - */ - private function interpolate(string $message, array $context): string - { - if (!str_contains($message, '{')) { - return $message; - } - - $replacements = []; - foreach ($context as $key => $val) { - if (null === $val || is_scalar($val) || (\is_object($val) && method_exists($val, '__toString'))) { - $replacements["{{$key}}"] = $val; - } elseif ($val instanceof \DateTimeInterface) { - $replacements["{{$key}}"] = $val->format(\DateTime::RFC3339); - } elseif (\is_object($val)) { - $replacements["{{$key}}"] = '[object '.\get_class($val).']'; - } else { - $replacements["{{$key}}"] = '['.\gettype($val).']'; - } - } - - return strtr($message, $replacements); - } -} diff --git a/source/vendor/symfony/console/Output/BufferedOutput.php b/source/vendor/symfony/console/Output/BufferedOutput.php deleted file mode 100644 index fefaac2..0000000 --- a/source/vendor/symfony/console/Output/BufferedOutput.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Output; - -/** - * @author Jean-François Simon - */ -class BufferedOutput extends Output -{ - private $buffer = ''; - - /** - * Empties buffer and returns its content. - * - * @return string - */ - public function fetch() - { - $content = $this->buffer; - $this->buffer = ''; - - return $content; - } - - /** - * {@inheritdoc} - */ - protected function doWrite($message, $newline) - { - $this->buffer .= $message; - - if ($newline) { - $this->buffer .= \PHP_EOL; - } - } -} diff --git a/source/vendor/symfony/console/Output/ConsoleOutput.php b/source/vendor/symfony/console/Output/ConsoleOutput.php deleted file mode 100644 index 966fca0..0000000 --- a/source/vendor/symfony/console/Output/ConsoleOutput.php +++ /dev/null @@ -1,166 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Output; - -use Symfony\Component\Console\Formatter\OutputFormatterInterface; - -/** - * ConsoleOutput is the default class for all CLI output. It uses STDOUT and STDERR. - * - * This class is a convenient wrapper around `StreamOutput` for both STDOUT and STDERR. - * - * $output = new ConsoleOutput(); - * - * This is equivalent to: - * - * $output = new StreamOutput(fopen('php://stdout', 'w')); - * $stdErr = new StreamOutput(fopen('php://stderr', 'w')); - * - * @author Fabien Potencier - */ -class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface -{ - private $stderr; - private $consoleSectionOutputs = []; - - /** - * @param int $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface) - * @param bool|null $decorated Whether to decorate messages (null for auto-guessing) - * @param OutputFormatterInterface|null $formatter Output formatter instance (null to use default OutputFormatter) - */ - public function __construct(int $verbosity = self::VERBOSITY_NORMAL, bool $decorated = null, OutputFormatterInterface $formatter = null) - { - parent::__construct($this->openOutputStream(), $verbosity, $decorated, $formatter); - - if (null === $formatter) { - // for BC reasons, stdErr has it own Formatter only when user don't inject a specific formatter. - $this->stderr = new StreamOutput($this->openErrorStream(), $verbosity, $decorated); - - return; - } - - $actualDecorated = $this->isDecorated(); - $this->stderr = new StreamOutput($this->openErrorStream(), $verbosity, $decorated, $this->getFormatter()); - - if (null === $decorated) { - $this->setDecorated($actualDecorated && $this->stderr->isDecorated()); - } - } - - /** - * Creates a new output section. - */ - public function section(): ConsoleSectionOutput - { - return new ConsoleSectionOutput($this->getStream(), $this->consoleSectionOutputs, $this->getVerbosity(), $this->isDecorated(), $this->getFormatter()); - } - - /** - * {@inheritdoc} - */ - public function setDecorated($decorated) - { - parent::setDecorated($decorated); - $this->stderr->setDecorated($decorated); - } - - /** - * {@inheritdoc} - */ - public function setFormatter(OutputFormatterInterface $formatter) - { - parent::setFormatter($formatter); - $this->stderr->setFormatter($formatter); - } - - /** - * {@inheritdoc} - */ - public function setVerbosity($level) - { - parent::setVerbosity($level); - $this->stderr->setVerbosity($level); - } - - /** - * {@inheritdoc} - */ - public function getErrorOutput() - { - return $this->stderr; - } - - /** - * {@inheritdoc} - */ - public function setErrorOutput(OutputInterface $error) - { - $this->stderr = $error; - } - - /** - * Returns true if current environment supports writing console output to - * STDOUT. - * - * @return bool - */ - protected function hasStdoutSupport() - { - return false === $this->isRunningOS400(); - } - - /** - * Returns true if current environment supports writing console output to - * STDERR. - * - * @return bool - */ - protected function hasStderrSupport() - { - return false === $this->isRunningOS400(); - } - - /** - * Checks if current executing environment is IBM iSeries (OS400), which - * doesn't properly convert character-encodings between ASCII to EBCDIC. - */ - private function isRunningOS400(): bool - { - $checks = [ - \function_exists('php_uname') ? php_uname('s') : '', - getenv('OSTYPE'), - \PHP_OS, - ]; - - return false !== stripos(implode(';', $checks), 'OS400'); - } - - /** - * @return resource - */ - private function openOutputStream() - { - if (!$this->hasStdoutSupport()) { - return fopen('php://output', 'w'); - } - - return @fopen('php://stdout', 'w') ?: fopen('php://output', 'w'); - } - - /** - * @return resource - */ - private function openErrorStream() - { - return fopen($this->hasStderrSupport() ? 'php://stderr' : 'php://output', 'w'); - } -} diff --git a/source/vendor/symfony/console/Output/ConsoleOutputInterface.php b/source/vendor/symfony/console/Output/ConsoleOutputInterface.php deleted file mode 100644 index f4c2fa6..0000000 --- a/source/vendor/symfony/console/Output/ConsoleOutputInterface.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Output; - -/** - * ConsoleOutputInterface is the interface implemented by ConsoleOutput class. - * This adds information about stderr and section output stream. - * - * @author Dariusz Górecki - * - * @method ConsoleSectionOutput section() Creates a new output section - */ -interface ConsoleOutputInterface extends OutputInterface -{ - /** - * Gets the OutputInterface for errors. - * - * @return OutputInterface - */ - public function getErrorOutput(); - - public function setErrorOutput(OutputInterface $error); -} diff --git a/source/vendor/symfony/console/Output/ConsoleSectionOutput.php b/source/vendor/symfony/console/Output/ConsoleSectionOutput.php deleted file mode 100644 index c19edbf..0000000 --- a/source/vendor/symfony/console/Output/ConsoleSectionOutput.php +++ /dev/null @@ -1,143 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Output; - -use Symfony\Component\Console\Formatter\OutputFormatterInterface; -use Symfony\Component\Console\Helper\Helper; -use Symfony\Component\Console\Terminal; - -/** - * @author Pierre du Plessis - * @author Gabriel Ostrolucký - */ -class ConsoleSectionOutput extends StreamOutput -{ - private $content = []; - private $lines = 0; - private $sections; - private $terminal; - - /** - * @param resource $stream - * @param ConsoleSectionOutput[] $sections - */ - public function __construct($stream, array &$sections, int $verbosity, bool $decorated, OutputFormatterInterface $formatter) - { - parent::__construct($stream, $verbosity, $decorated, $formatter); - array_unshift($sections, $this); - $this->sections = &$sections; - $this->terminal = new Terminal(); - } - - /** - * Clears previous output for this section. - * - * @param int $lines Number of lines to clear. If null, then the entire output of this section is cleared - */ - public function clear(int $lines = null) - { - if (empty($this->content) || !$this->isDecorated()) { - return; - } - - if ($lines) { - array_splice($this->content, -($lines * 2)); // Multiply lines by 2 to cater for each new line added between content - } else { - $lines = $this->lines; - $this->content = []; - } - - $this->lines -= $lines; - - parent::doWrite($this->popStreamContentUntilCurrentSection($lines), false); - } - - /** - * Overwrites the previous output with a new message. - * - * @param array|string $message - */ - public function overwrite($message) - { - $this->clear(); - $this->writeln($message); - } - - public function getContent(): string - { - return implode('', $this->content); - } - - /** - * @internal - */ - public function addContent(string $input) - { - foreach (explode(\PHP_EOL, $input) as $lineContent) { - $this->lines += ceil($this->getDisplayLength($lineContent) / $this->terminal->getWidth()) ?: 1; - $this->content[] = $lineContent; - $this->content[] = \PHP_EOL; - } - } - - /** - * {@inheritdoc} - */ - protected function doWrite($message, $newline) - { - if (!$this->isDecorated()) { - parent::doWrite($message, $newline); - - return; - } - - $erasedContent = $this->popStreamContentUntilCurrentSection(); - - $this->addContent($message); - - parent::doWrite($message, true); - parent::doWrite($erasedContent, false); - } - - /** - * At initial stage, cursor is at the end of stream output. This method makes cursor crawl upwards until it hits - * current section. Then it erases content it crawled through. Optionally, it erases part of current section too. - */ - private function popStreamContentUntilCurrentSection(int $numberOfLinesToClearFromCurrentSection = 0): string - { - $numberOfLinesToClear = $numberOfLinesToClearFromCurrentSection; - $erasedContent = []; - - foreach ($this->sections as $section) { - if ($section === $this) { - break; - } - - $numberOfLinesToClear += $section->lines; - $erasedContent[] = $section->getContent(); - } - - if ($numberOfLinesToClear > 0) { - // move cursor up n lines - parent::doWrite(sprintf("\x1b[%dA", $numberOfLinesToClear), false); - // erase to end of screen - parent::doWrite("\x1b[0J", false); - } - - return implode('', array_reverse($erasedContent)); - } - - private function getDisplayLength(string $text): string - { - return Helper::strlenWithoutDecoration($this->getFormatter(), str_replace("\t", ' ', $text)); - } -} diff --git a/source/vendor/symfony/console/Output/NullOutput.php b/source/vendor/symfony/console/Output/NullOutput.php deleted file mode 100644 index 218f285..0000000 --- a/source/vendor/symfony/console/Output/NullOutput.php +++ /dev/null @@ -1,123 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Output; - -use Symfony\Component\Console\Formatter\OutputFormatter; -use Symfony\Component\Console\Formatter\OutputFormatterInterface; - -/** - * NullOutput suppresses all output. - * - * $output = new NullOutput(); - * - * @author Fabien Potencier - * @author Tobias Schultze - */ -class NullOutput implements OutputInterface -{ - /** - * {@inheritdoc} - */ - public function setFormatter(OutputFormatterInterface $formatter) - { - // do nothing - } - - /** - * {@inheritdoc} - */ - public function getFormatter() - { - // to comply with the interface we must return a OutputFormatterInterface - return new OutputFormatter(); - } - - /** - * {@inheritdoc} - */ - public function setDecorated($decorated) - { - // do nothing - } - - /** - * {@inheritdoc} - */ - public function isDecorated() - { - return false; - } - - /** - * {@inheritdoc} - */ - public function setVerbosity($level) - { - // do nothing - } - - /** - * {@inheritdoc} - */ - public function getVerbosity() - { - return self::VERBOSITY_QUIET; - } - - /** - * {@inheritdoc} - */ - public function isQuiet() - { - return true; - } - - /** - * {@inheritdoc} - */ - public function isVerbose() - { - return false; - } - - /** - * {@inheritdoc} - */ - public function isVeryVerbose() - { - return false; - } - - /** - * {@inheritdoc} - */ - public function isDebug() - { - return false; - } - - /** - * {@inheritdoc} - */ - public function writeln($messages, $options = self::OUTPUT_NORMAL) - { - // do nothing - } - - /** - * {@inheritdoc} - */ - public function write($messages, $newline = false, $options = self::OUTPUT_NORMAL) - { - // do nothing - } -} diff --git a/source/vendor/symfony/console/Output/Output.php b/source/vendor/symfony/console/Output/Output.php deleted file mode 100644 index fb838f0..0000000 --- a/source/vendor/symfony/console/Output/Output.php +++ /dev/null @@ -1,177 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Output; - -use Symfony\Component\Console\Formatter\OutputFormatter; -use Symfony\Component\Console\Formatter\OutputFormatterInterface; - -/** - * Base class for output classes. - * - * There are five levels of verbosity: - * - * * normal: no option passed (normal output) - * * verbose: -v (more output) - * * very verbose: -vv (highly extended output) - * * debug: -vvv (all debug output) - * * quiet: -q (no output) - * - * @author Fabien Potencier - */ -abstract class Output implements OutputInterface -{ - private $verbosity; - private $formatter; - - /** - * @param int $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface) - * @param bool $decorated Whether to decorate messages - * @param OutputFormatterInterface|null $formatter Output formatter instance (null to use default OutputFormatter) - */ - public function __construct(?int $verbosity = self::VERBOSITY_NORMAL, bool $decorated = false, OutputFormatterInterface $formatter = null) - { - $this->verbosity = null === $verbosity ? self::VERBOSITY_NORMAL : $verbosity; - $this->formatter = $formatter ?? new OutputFormatter(); - $this->formatter->setDecorated($decorated); - } - - /** - * {@inheritdoc} - */ - public function setFormatter(OutputFormatterInterface $formatter) - { - $this->formatter = $formatter; - } - - /** - * {@inheritdoc} - */ - public function getFormatter() - { - return $this->formatter; - } - - /** - * {@inheritdoc} - */ - public function setDecorated($decorated) - { - $this->formatter->setDecorated($decorated); - } - - /** - * {@inheritdoc} - */ - public function isDecorated() - { - return $this->formatter->isDecorated(); - } - - /** - * {@inheritdoc} - */ - public function setVerbosity($level) - { - $this->verbosity = (int) $level; - } - - /** - * {@inheritdoc} - */ - public function getVerbosity() - { - return $this->verbosity; - } - - /** - * {@inheritdoc} - */ - public function isQuiet() - { - return self::VERBOSITY_QUIET === $this->verbosity; - } - - /** - * {@inheritdoc} - */ - public function isVerbose() - { - return self::VERBOSITY_VERBOSE <= $this->verbosity; - } - - /** - * {@inheritdoc} - */ - public function isVeryVerbose() - { - return self::VERBOSITY_VERY_VERBOSE <= $this->verbosity; - } - - /** - * {@inheritdoc} - */ - public function isDebug() - { - return self::VERBOSITY_DEBUG <= $this->verbosity; - } - - /** - * {@inheritdoc} - */ - public function writeln($messages, $options = self::OUTPUT_NORMAL) - { - $this->write($messages, true, $options); - } - - /** - * {@inheritdoc} - */ - public function write($messages, $newline = false, $options = self::OUTPUT_NORMAL) - { - if (!is_iterable($messages)) { - $messages = [$messages]; - } - - $types = self::OUTPUT_NORMAL | self::OUTPUT_RAW | self::OUTPUT_PLAIN; - $type = $types & $options ?: self::OUTPUT_NORMAL; - - $verbosities = self::VERBOSITY_QUIET | self::VERBOSITY_NORMAL | self::VERBOSITY_VERBOSE | self::VERBOSITY_VERY_VERBOSE | self::VERBOSITY_DEBUG; - $verbosity = $verbosities & $options ?: self::VERBOSITY_NORMAL; - - if ($verbosity > $this->getVerbosity()) { - return; - } - - foreach ($messages as $message) { - switch ($type) { - case OutputInterface::OUTPUT_NORMAL: - $message = $this->formatter->format($message); - break; - case OutputInterface::OUTPUT_RAW: - break; - case OutputInterface::OUTPUT_PLAIN: - $message = strip_tags($this->formatter->format($message)); - break; - } - - $this->doWrite($message ?? '', $newline); - } - } - - /** - * Writes a message to the output. - * - * @param string $message A message to write to the output - * @param bool $newline Whether to add a newline or not - */ - abstract protected function doWrite($message, $newline); -} diff --git a/source/vendor/symfony/console/Output/OutputInterface.php b/source/vendor/symfony/console/Output/OutputInterface.php deleted file mode 100644 index 671d5bd..0000000 --- a/source/vendor/symfony/console/Output/OutputInterface.php +++ /dev/null @@ -1,114 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Output; - -use Symfony\Component\Console\Formatter\OutputFormatterInterface; - -/** - * OutputInterface is the interface implemented by all Output classes. - * - * @author Fabien Potencier - */ -interface OutputInterface -{ - public const VERBOSITY_QUIET = 16; - public const VERBOSITY_NORMAL = 32; - public const VERBOSITY_VERBOSE = 64; - public const VERBOSITY_VERY_VERBOSE = 128; - public const VERBOSITY_DEBUG = 256; - - public const OUTPUT_NORMAL = 1; - public const OUTPUT_RAW = 2; - public const OUTPUT_PLAIN = 4; - - /** - * Writes a message to the output. - * - * @param string|iterable $messages The message as an iterable of strings or a single string - * @param bool $newline Whether to add a newline - * @param int $options A bitmask of options (one of the OUTPUT or VERBOSITY constants), 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL - */ - public function write($messages, $newline = false, $options = 0); - - /** - * Writes a message to the output and adds a newline at the end. - * - * @param string|iterable $messages The message as an iterable of strings or a single string - * @param int $options A bitmask of options (one of the OUTPUT or VERBOSITY constants), 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL - */ - public function writeln($messages, $options = 0); - - /** - * Sets the verbosity of the output. - * - * @param int $level The level of verbosity (one of the VERBOSITY constants) - */ - public function setVerbosity($level); - - /** - * Gets the current verbosity of the output. - * - * @return int The current level of verbosity (one of the VERBOSITY constants) - */ - public function getVerbosity(); - - /** - * Returns whether verbosity is quiet (-q). - * - * @return bool true if verbosity is set to VERBOSITY_QUIET, false otherwise - */ - public function isQuiet(); - - /** - * Returns whether verbosity is verbose (-v). - * - * @return bool true if verbosity is set to VERBOSITY_VERBOSE, false otherwise - */ - public function isVerbose(); - - /** - * Returns whether verbosity is very verbose (-vv). - * - * @return bool true if verbosity is set to VERBOSITY_VERY_VERBOSE, false otherwise - */ - public function isVeryVerbose(); - - /** - * Returns whether verbosity is debug (-vvv). - * - * @return bool true if verbosity is set to VERBOSITY_DEBUG, false otherwise - */ - public function isDebug(); - - /** - * Sets the decorated flag. - * - * @param bool $decorated Whether to decorate the messages - */ - public function setDecorated($decorated); - - /** - * Gets the decorated flag. - * - * @return bool true if the output will decorate messages, false otherwise - */ - public function isDecorated(); - - public function setFormatter(OutputFormatterInterface $formatter); - - /** - * Returns current output formatter instance. - * - * @return OutputFormatterInterface - */ - public function getFormatter(); -} diff --git a/source/vendor/symfony/console/Output/StreamOutput.php b/source/vendor/symfony/console/Output/StreamOutput.php deleted file mode 100644 index 9c22436..0000000 --- a/source/vendor/symfony/console/Output/StreamOutput.php +++ /dev/null @@ -1,125 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Output; - -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Formatter\OutputFormatterInterface; - -/** - * StreamOutput writes the output to a given stream. - * - * Usage: - * - * $output = new StreamOutput(fopen('php://stdout', 'w')); - * - * As `StreamOutput` can use any stream, you can also use a file: - * - * $output = new StreamOutput(fopen('/path/to/output.log', 'a', false)); - * - * @author Fabien Potencier - */ -class StreamOutput extends Output -{ - private $stream; - - /** - * @param resource $stream A stream resource - * @param int $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface) - * @param bool|null $decorated Whether to decorate messages (null for auto-guessing) - * @param OutputFormatterInterface|null $formatter Output formatter instance (null to use default OutputFormatter) - * - * @throws InvalidArgumentException When first argument is not a real stream - */ - public function __construct($stream, int $verbosity = self::VERBOSITY_NORMAL, bool $decorated = null, OutputFormatterInterface $formatter = null) - { - if (!\is_resource($stream) || 'stream' !== get_resource_type($stream)) { - throw new InvalidArgumentException('The StreamOutput class needs a stream as its first argument.'); - } - - $this->stream = $stream; - - if (null === $decorated) { - $decorated = $this->hasColorSupport(); - } - - parent::__construct($verbosity, $decorated, $formatter); - } - - /** - * Gets the stream attached to this StreamOutput instance. - * - * @return resource A stream resource - */ - public function getStream() - { - return $this->stream; - } - - /** - * {@inheritdoc} - */ - protected function doWrite($message, $newline) - { - if ($newline) { - $message .= \PHP_EOL; - } - - @fwrite($this->stream, $message); - - fflush($this->stream); - } - - /** - * Returns true if the stream supports colorization. - * - * Colorization is disabled if not supported by the stream: - * - * This is tricky on Windows, because Cygwin, Msys2 etc emulate pseudo - * terminals via named pipes, so we can only check the environment. - * - * Reference: Composer\XdebugHandler\Process::supportsColor - * https://github.com/composer/xdebug-handler - * - * @return bool true if the stream supports colorization, false otherwise - */ - protected function hasColorSupport() - { - // Follow https://no-color.org/ - if (isset($_SERVER['NO_COLOR']) || false !== getenv('NO_COLOR')) { - return false; - } - - if ('Hyper' === getenv('TERM_PROGRAM')) { - return true; - } - - if (\DIRECTORY_SEPARATOR === '\\') { - return (\function_exists('sapi_windows_vt100_support') - && @sapi_windows_vt100_support($this->stream)) - || false !== getenv('ANSICON') - || 'ON' === getenv('ConEmuANSI') - || 'xterm' === getenv('TERM'); - } - - if (\function_exists('stream_isatty')) { - return @stream_isatty($this->stream); - } - - if (\function_exists('posix_isatty')) { - return @posix_isatty($this->stream); - } - - $stat = @fstat($this->stream); - // Check if formatted mode is S_IFCHR - return $stat ? 0020000 === ($stat['mode'] & 0170000) : false; - } -} diff --git a/source/vendor/symfony/console/Output/TrimmedBufferOutput.php b/source/vendor/symfony/console/Output/TrimmedBufferOutput.php deleted file mode 100644 index 4ca63c4..0000000 --- a/source/vendor/symfony/console/Output/TrimmedBufferOutput.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Output; - -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Formatter\OutputFormatterInterface; - -/** - * A BufferedOutput that keeps only the last N chars. - * - * @author Jérémy Derussé - */ -class TrimmedBufferOutput extends Output -{ - private $maxLength; - private $buffer = ''; - - public function __construct(int $maxLength, ?int $verbosity = self::VERBOSITY_NORMAL, bool $decorated = false, OutputFormatterInterface $formatter = null) { - if ($maxLength <= 0) { - throw new InvalidArgumentException(sprintf('"%s()" expects a strictly positive maxLength. Got %d.', __METHOD__, $maxLength)); - } - - parent::__construct($verbosity, $decorated, $formatter); - $this->maxLength = $maxLength; - } - - /** - * Empties buffer and returns its content. - * - * @return string - */ - public function fetch() - { - $content = $this->buffer; - $this->buffer = ''; - - return $content; - } - - /** - * {@inheritdoc} - */ - protected function doWrite($message, $newline) - { - $this->buffer .= $message; - - if ($newline) { - $this->buffer .= \PHP_EOL; - } - - $this->buffer = substr($this->buffer, 0 - $this->maxLength); - } -} diff --git a/source/vendor/symfony/console/Question/ChoiceQuestion.php b/source/vendor/symfony/console/Question/ChoiceQuestion.php deleted file mode 100644 index 72703fb..0000000 --- a/source/vendor/symfony/console/Question/ChoiceQuestion.php +++ /dev/null @@ -1,188 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Question; - -use Symfony\Component\Console\Exception\InvalidArgumentException; - -/** - * Represents a choice question. - * - * @author Fabien Potencier - */ -class ChoiceQuestion extends Question -{ - private $choices; - private $multiselect = false; - private $prompt = ' > '; - private $errorMessage = 'Value "%s" is invalid'; - - /** - * @param string $question The question to ask to the user - * @param array $choices The list of available choices - * @param mixed $default The default answer to return - */ - public function __construct(string $question, array $choices, $default = null) - { - if (!$choices) { - throw new \LogicException('Choice question must have at least 1 choice available.'); - } - - parent::__construct($question, $default); - - $this->choices = $choices; - $this->setValidator($this->getDefaultValidator()); - $this->setAutocompleterValues($choices); - } - - /** - * Returns available choices. - * - * @return array - */ - public function getChoices() - { - return $this->choices; - } - - /** - * Sets multiselect option. - * - * When multiselect is set to true, multiple choices can be answered. - * - * @param bool $multiselect - * - * @return $this - */ - public function setMultiselect($multiselect) - { - $this->multiselect = $multiselect; - $this->setValidator($this->getDefaultValidator()); - - return $this; - } - - /** - * Returns whether the choices are multiselect. - * - * @return bool - */ - public function isMultiselect() - { - return $this->multiselect; - } - - /** - * Gets the prompt for choices. - * - * @return string - */ - public function getPrompt() - { - return $this->prompt; - } - - /** - * Sets the prompt for choices. - * - * @param string $prompt - * - * @return $this - */ - public function setPrompt($prompt) - { - $this->prompt = $prompt; - - return $this; - } - - /** - * Sets the error message for invalid values. - * - * The error message has a string placeholder (%s) for the invalid value. - * - * @param string $errorMessage - * - * @return $this - */ - public function setErrorMessage($errorMessage) - { - $this->errorMessage = $errorMessage; - $this->setValidator($this->getDefaultValidator()); - - return $this; - } - - private function getDefaultValidator(): callable - { - $choices = $this->choices; - $errorMessage = $this->errorMessage; - $multiselect = $this->multiselect; - $isAssoc = $this->isAssoc($choices); - - return function ($selected) use ($choices, $errorMessage, $multiselect, $isAssoc) { - if ($multiselect) { - // Check for a separated comma values - if (!preg_match('/^[^,]+(?:,[^,]+)*$/', $selected, $matches)) { - throw new InvalidArgumentException(sprintf($errorMessage, $selected)); - } - - $selectedChoices = explode(',', $selected); - } else { - $selectedChoices = [$selected]; - } - - if ($this->isTrimmable()) { - foreach ($selectedChoices as $k => $v) { - $selectedChoices[$k] = trim($v); - } - } - - $multiselectChoices = []; - foreach ($selectedChoices as $value) { - $results = []; - foreach ($choices as $key => $choice) { - if ($choice === $value) { - $results[] = $key; - } - } - - if (\count($results) > 1) { - throw new InvalidArgumentException(sprintf('The provided answer is ambiguous. Value should be one of "%s".', implode('" or "', $results))); - } - - $result = array_search($value, $choices); - - if (!$isAssoc) { - if (false !== $result) { - $result = $choices[$result]; - } elseif (isset($choices[$value])) { - $result = $choices[$value]; - } - } elseif (false === $result && isset($choices[$value])) { - $result = $value; - } - - if (false === $result) { - throw new InvalidArgumentException(sprintf($errorMessage, $value)); - } - - $multiselectChoices[] = (string) $result; - } - - if ($multiselect) { - return $multiselectChoices; - } - - return current($multiselectChoices); - }; - } -} diff --git a/source/vendor/symfony/console/Question/ConfirmationQuestion.php b/source/vendor/symfony/console/Question/ConfirmationQuestion.php deleted file mode 100644 index 4228521..0000000 --- a/source/vendor/symfony/console/Question/ConfirmationQuestion.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Question; - -/** - * Represents a yes/no question. - * - * @author Fabien Potencier - */ -class ConfirmationQuestion extends Question -{ - private $trueAnswerRegex; - - /** - * @param string $question The question to ask to the user - * @param bool $default The default answer to return, true or false - * @param string $trueAnswerRegex A regex to match the "yes" answer - */ - public function __construct(string $question, bool $default = true, string $trueAnswerRegex = '/^y/i') - { - parent::__construct($question, $default); - - $this->trueAnswerRegex = $trueAnswerRegex; - $this->setNormalizer($this->getDefaultNormalizer()); - } - - /** - * Returns the default answer normalizer. - */ - private function getDefaultNormalizer(): callable - { - $default = $this->getDefault(); - $regex = $this->trueAnswerRegex; - - return function ($answer) use ($default, $regex) { - if (\is_bool($answer)) { - return $answer; - } - - $answerIsTrue = (bool) preg_match($regex, $answer); - if (false === $default) { - return $answer && $answerIsTrue; - } - - return '' === $answer || $answerIsTrue; - }; - } -} diff --git a/source/vendor/symfony/console/Question/Question.php b/source/vendor/symfony/console/Question/Question.php deleted file mode 100644 index cc10801..0000000 --- a/source/vendor/symfony/console/Question/Question.php +++ /dev/null @@ -1,292 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Question; - -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Exception\LogicException; - -/** - * Represents a Question. - * - * @author Fabien Potencier - */ -class Question -{ - private $question; - private $attempts; - private $hidden = false; - private $hiddenFallback = true; - private $autocompleterCallback; - private $validator; - private $default; - private $normalizer; - private $trimmable = true; - - /** - * @param string $question The question to ask to the user - * @param string|bool|int|float|null $default The default answer to return if the user enters nothing - */ - public function __construct(string $question, $default = null) - { - $this->question = $question; - $this->default = $default; - } - - /** - * Returns the question. - * - * @return string - */ - public function getQuestion() - { - return $this->question; - } - - /** - * Returns the default answer. - * - * @return string|bool|int|float|null - */ - public function getDefault() - { - return $this->default; - } - - /** - * Returns whether the user response must be hidden. - * - * @return bool - */ - public function isHidden() - { - return $this->hidden; - } - - /** - * Sets whether the user response must be hidden or not. - * - * @param bool $hidden - * - * @return $this - * - * @throws LogicException In case the autocompleter is also used - */ - public function setHidden($hidden) - { - if ($this->autocompleterCallback) { - throw new LogicException('A hidden question cannot use the autocompleter.'); - } - - $this->hidden = (bool) $hidden; - - return $this; - } - - /** - * In case the response can not be hidden, whether to fallback on non-hidden question or not. - * - * @return bool - */ - public function isHiddenFallback() - { - return $this->hiddenFallback; - } - - /** - * Sets whether to fallback on non-hidden question if the response can not be hidden. - * - * @param bool $fallback - * - * @return $this - */ - public function setHiddenFallback($fallback) - { - $this->hiddenFallback = (bool) $fallback; - - return $this; - } - - /** - * Gets values for the autocompleter. - * - * @return iterable|null - */ - public function getAutocompleterValues() - { - $callback = $this->getAutocompleterCallback(); - - return $callback ? $callback('') : null; - } - - /** - * Sets values for the autocompleter. - * - * @param iterable|null $values - * - * @return $this - * - * @throws InvalidArgumentException - * @throws LogicException - */ - public function setAutocompleterValues($values) - { - if (\is_array($values)) { - $values = $this->isAssoc($values) ? array_merge(array_keys($values), array_values($values)) : array_values($values); - - $callback = static function () use ($values) { - return $values; - }; - } elseif ($values instanceof \Traversable) { - $valueCache = null; - $callback = static function () use ($values, &$valueCache) { - return $valueCache ?? $valueCache = iterator_to_array($values, false); - }; - } elseif (null === $values) { - $callback = null; - } else { - throw new InvalidArgumentException('Autocompleter values can be either an array, "null" or a "Traversable" object.'); - } - - return $this->setAutocompleterCallback($callback); - } - - /** - * Gets the callback function used for the autocompleter. - */ - public function getAutocompleterCallback(): ?callable - { - return $this->autocompleterCallback; - } - - /** - * Sets the callback function used for the autocompleter. - * - * The callback is passed the user input as argument and should return an iterable of corresponding suggestions. - * - * @return $this - */ - public function setAutocompleterCallback(callable $callback = null): self - { - if ($this->hidden && null !== $callback) { - throw new LogicException('A hidden question cannot use the autocompleter.'); - } - - $this->autocompleterCallback = $callback; - - return $this; - } - - /** - * Sets a validator for the question. - * - * @return $this - */ - public function setValidator(callable $validator = null) - { - $this->validator = $validator; - - return $this; - } - - /** - * Gets the validator for the question. - * - * @return callable|null - */ - public function getValidator() - { - return $this->validator; - } - - /** - * Sets the maximum number of attempts. - * - * Null means an unlimited number of attempts. - * - * @param int|null $attempts - * - * @return $this - * - * @throws InvalidArgumentException in case the number of attempts is invalid - */ - public function setMaxAttempts($attempts) - { - if (null !== $attempts) { - $attempts = (int) $attempts; - if ($attempts < 1) { - throw new InvalidArgumentException('Maximum number of attempts must be a positive value.'); - } - } - - $this->attempts = $attempts; - - return $this; - } - - /** - * Gets the maximum number of attempts. - * - * Null means an unlimited number of attempts. - * - * @return int|null - */ - public function getMaxAttempts() - { - return $this->attempts; - } - - /** - * Sets a normalizer for the response. - * - * The normalizer can be a callable (a string), a closure or a class implementing __invoke. - * - * @return $this - */ - public function setNormalizer(callable $normalizer) - { - $this->normalizer = $normalizer; - - return $this; - } - - /** - * Gets the normalizer for the response. - * - * The normalizer can ba a callable (a string), a closure or a class implementing __invoke. - * - * @return callable|null - */ - public function getNormalizer() - { - return $this->normalizer; - } - - protected function isAssoc($array) - { - return (bool) \count(array_filter(array_keys($array), 'is_string')); - } - - public function isTrimmable(): bool - { - return $this->trimmable; - } - - /** - * @return $this - */ - public function setTrimmable(bool $trimmable): self - { - $this->trimmable = $trimmable; - - return $this; - } -} diff --git a/source/vendor/symfony/console/README.md b/source/vendor/symfony/console/README.md deleted file mode 100644 index c89b4a1..0000000 --- a/source/vendor/symfony/console/README.md +++ /dev/null @@ -1,20 +0,0 @@ -Console Component -================= - -The Console component eases the creation of beautiful and testable command line -interfaces. - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/console.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) - -Credits -------- - -`Resources/bin/hiddeninput.exe` is a third party binary provided within this -component. Find sources and license at https://github.com/Seldaek/hidden-input. diff --git a/source/vendor/symfony/console/Resources/bin/hiddeninput.exe b/source/vendor/symfony/console/Resources/bin/hiddeninput.exe deleted file mode 100644 index c8cf65e..0000000 Binary files a/source/vendor/symfony/console/Resources/bin/hiddeninput.exe and /dev/null differ diff --git a/source/vendor/symfony/console/Style/OutputStyle.php b/source/vendor/symfony/console/Style/OutputStyle.php deleted file mode 100644 index 14d2d60..0000000 --- a/source/vendor/symfony/console/Style/OutputStyle.php +++ /dev/null @@ -1,155 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Style; - -use Symfony\Component\Console\Formatter\OutputFormatterInterface; -use Symfony\Component\Console\Helper\ProgressBar; -use Symfony\Component\Console\Output\ConsoleOutputInterface; -use Symfony\Component\Console\Output\OutputInterface; - -/** - * Decorates output to add console style guide helpers. - * - * @author Kevin Bond - */ -abstract class OutputStyle implements OutputInterface, StyleInterface -{ - private $output; - - public function __construct(OutputInterface $output) - { - $this->output = $output; - } - - /** - * {@inheritdoc} - */ - public function newLine($count = 1) - { - $this->output->write(str_repeat(\PHP_EOL, $count)); - } - - /** - * @param int $max - * - * @return ProgressBar - */ - public function createProgressBar($max = 0) - { - return new ProgressBar($this->output, $max); - } - - /** - * {@inheritdoc} - */ - public function write($messages, $newline = false, $type = self::OUTPUT_NORMAL) - { - $this->output->write($messages, $newline, $type); - } - - /** - * {@inheritdoc} - */ - public function writeln($messages, $type = self::OUTPUT_NORMAL) - { - $this->output->writeln($messages, $type); - } - - /** - * {@inheritdoc} - */ - public function setVerbosity($level) - { - $this->output->setVerbosity($level); - } - - /** - * {@inheritdoc} - */ - public function getVerbosity() - { - return $this->output->getVerbosity(); - } - - /** - * {@inheritdoc} - */ - public function setDecorated($decorated) - { - $this->output->setDecorated($decorated); - } - - /** - * {@inheritdoc} - */ - public function isDecorated() - { - return $this->output->isDecorated(); - } - - /** - * {@inheritdoc} - */ - public function setFormatter(OutputFormatterInterface $formatter) - { - $this->output->setFormatter($formatter); - } - - /** - * {@inheritdoc} - */ - public function getFormatter() - { - return $this->output->getFormatter(); - } - - /** - * {@inheritdoc} - */ - public function isQuiet() - { - return $this->output->isQuiet(); - } - - /** - * {@inheritdoc} - */ - public function isVerbose() - { - return $this->output->isVerbose(); - } - - /** - * {@inheritdoc} - */ - public function isVeryVerbose() - { - return $this->output->isVeryVerbose(); - } - - /** - * {@inheritdoc} - */ - public function isDebug() - { - return $this->output->isDebug(); - } - - protected function getErrorOutput() - { - if (!$this->output instanceof ConsoleOutputInterface) { - return $this->output; - } - - return $this->output->getErrorOutput(); - } -} diff --git a/source/vendor/symfony/console/Style/StyleInterface.php b/source/vendor/symfony/console/Style/StyleInterface.php deleted file mode 100644 index 3b5b8af..0000000 --- a/source/vendor/symfony/console/Style/StyleInterface.php +++ /dev/null @@ -1,153 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Style; - -/** - * Output style helpers. - * - * @author Kevin Bond - */ -interface StyleInterface -{ - /** - * Formats a command title. - * - * @param string $message - */ - public function title($message); - - /** - * Formats a section title. - * - * @param string $message - */ - public function section($message); - - /** - * Formats a list. - */ - public function listing(array $elements); - - /** - * Formats informational text. - * - * @param string|array $message - */ - public function text($message); - - /** - * Formats a success result bar. - * - * @param string|array $message - */ - public function success($message); - - /** - * Formats an error result bar. - * - * @param string|array $message - */ - public function error($message); - - /** - * Formats an warning result bar. - * - * @param string|array $message - */ - public function warning($message); - - /** - * Formats a note admonition. - * - * @param string|array $message - */ - public function note($message); - - /** - * Formats a caution admonition. - * - * @param string|array $message - */ - public function caution($message); - - /** - * Formats a table. - */ - public function table(array $headers, array $rows); - - /** - * Asks a question. - * - * @param string $question - * @param string|null $default - * @param callable|null $validator - * - * @return mixed - */ - public function ask($question, $default = null, $validator = null); - - /** - * Asks a question with the user input hidden. - * - * @param string $question - * @param callable|null $validator - * - * @return mixed - */ - public function askHidden($question, $validator = null); - - /** - * Asks for confirmation. - * - * @param string $question - * @param bool $default - * - * @return bool - */ - public function confirm($question, $default = true); - - /** - * Asks a choice question. - * - * @param string $question - * @param string|int|null $default - * - * @return mixed - */ - public function choice($question, array $choices, $default = null); - - /** - * Add newline(s). - * - * @param int $count The number of newlines - */ - public function newLine($count = 1); - - /** - * Starts the progress output. - * - * @param int $max Maximum steps (0 if unknown) - */ - public function progressStart($max = 0); - - /** - * Advances the progress output X steps. - * - * @param int $step Number of steps to advance - */ - public function progressAdvance($step = 1); - - /** - * Finishes the progress output. - */ - public function progressFinish(); -} diff --git a/source/vendor/symfony/console/Style/SymfonyStyle.php b/source/vendor/symfony/console/Style/SymfonyStyle.php deleted file mode 100644 index 66db3ad..0000000 --- a/source/vendor/symfony/console/Style/SymfonyStyle.php +++ /dev/null @@ -1,508 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Style; - -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Exception\RuntimeException; -use Symfony\Component\Console\Formatter\OutputFormatter; -use Symfony\Component\Console\Helper\Helper; -use Symfony\Component\Console\Helper\ProgressBar; -use Symfony\Component\Console\Helper\SymfonyQuestionHelper; -use Symfony\Component\Console\Helper\Table; -use Symfony\Component\Console\Helper\TableCell; -use Symfony\Component\Console\Helper\TableSeparator; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Output\TrimmedBufferOutput; -use Symfony\Component\Console\Question\ChoiceQuestion; -use Symfony\Component\Console\Question\ConfirmationQuestion; -use Symfony\Component\Console\Question\Question; -use Symfony\Component\Console\Terminal; - -/** - * Output decorator helpers for the Symfony Style Guide. - * - * @author Kevin Bond - */ -class SymfonyStyle extends OutputStyle -{ - public const MAX_LINE_LENGTH = 120; - - private $input; - private $questionHelper; - private $progressBar; - private $lineLength; - private $bufferedOutput; - - public function __construct(InputInterface $input, OutputInterface $output) - { - $this->input = $input; - $this->bufferedOutput = new TrimmedBufferOutput(\DIRECTORY_SEPARATOR === '\\' ? 4 : 2, $output->getVerbosity(), false, clone $output->getFormatter()); - // Windows cmd wraps lines as soon as the terminal width is reached, whether there are following chars or not. - $width = (new Terminal())->getWidth() ?: self::MAX_LINE_LENGTH; - $this->lineLength = min($width - (int) (\DIRECTORY_SEPARATOR === '\\'), self::MAX_LINE_LENGTH); - - parent::__construct($output); - } - - /** - * Formats a message as a block of text. - * - * @param string|array $messages The message to write in the block - * @param string|null $type The block type (added in [] on first line) - * @param string|null $style The style to apply to the whole block - * @param string $prefix The prefix for the block - * @param bool $padding Whether to add vertical padding - * @param bool $escape Whether to escape the message - */ - public function block($messages, $type = null, $style = null, $prefix = ' ', $padding = false, $escape = true) - { - $messages = \is_array($messages) ? array_values($messages) : [$messages]; - - $this->autoPrependBlock(); - $this->writeln($this->createBlock($messages, $type, $style, $prefix, $padding, $escape)); - $this->newLine(); - } - - /** - * {@inheritdoc} - */ - public function title($message) - { - $this->autoPrependBlock(); - $this->writeln([ - sprintf('%s', OutputFormatter::escapeTrailingBackslash($message)), - sprintf('%s', str_repeat('=', Helper::strlenWithoutDecoration($this->getFormatter(), $message))), - ]); - $this->newLine(); - } - - /** - * {@inheritdoc} - */ - public function section($message) - { - $this->autoPrependBlock(); - $this->writeln([ - sprintf('%s', OutputFormatter::escapeTrailingBackslash($message)), - sprintf('%s', str_repeat('-', Helper::strlenWithoutDecoration($this->getFormatter(), $message))), - ]); - $this->newLine(); - } - - /** - * {@inheritdoc} - */ - public function listing(array $elements) - { - $this->autoPrependText(); - $elements = array_map(function ($element) { - return sprintf(' * %s', $element); - }, $elements); - - $this->writeln($elements); - $this->newLine(); - } - - /** - * {@inheritdoc} - */ - public function text($message) - { - $this->autoPrependText(); - - $messages = \is_array($message) ? array_values($message) : [$message]; - foreach ($messages as $message) { - $this->writeln(sprintf(' %s', $message)); - } - } - - /** - * Formats a command comment. - * - * @param string|array $message - */ - public function comment($message) - { - $this->block($message, null, null, ' // ', false, false); - } - - /** - * {@inheritdoc} - */ - public function success($message) - { - $this->block($message, 'OK', 'fg=black;bg=green', ' ', true); - } - - /** - * {@inheritdoc} - */ - public function error($message) - { - $this->block($message, 'ERROR', 'fg=white;bg=red', ' ', true); - } - - /** - * {@inheritdoc} - */ - public function warning($message) - { - $this->block($message, 'WARNING', 'fg=black;bg=yellow', ' ', true); - } - - /** - * {@inheritdoc} - */ - public function note($message) - { - $this->block($message, 'NOTE', 'fg=yellow', ' ! '); - } - - /** - * {@inheritdoc} - */ - public function caution($message) - { - $this->block($message, 'CAUTION', 'fg=white;bg=red', ' ! ', true); - } - - /** - * {@inheritdoc} - */ - public function table(array $headers, array $rows) - { - $style = clone Table::getStyleDefinition('symfony-style-guide'); - $style->setCellHeaderFormat('%s'); - - $table = new Table($this); - $table->setHeaders($headers); - $table->setRows($rows); - $table->setStyle($style); - - $table->render(); - $this->newLine(); - } - - /** - * Formats a horizontal table. - */ - public function horizontalTable(array $headers, array $rows) - { - $style = clone Table::getStyleDefinition('symfony-style-guide'); - $style->setCellHeaderFormat('%s'); - - $table = new Table($this); - $table->setHeaders($headers); - $table->setRows($rows); - $table->setStyle($style); - $table->setHorizontal(true); - - $table->render(); - $this->newLine(); - } - - /** - * Formats a list of key/value horizontally. - * - * Each row can be one of: - * * 'A title' - * * ['key' => 'value'] - * * new TableSeparator() - * - * @param string|array|TableSeparator ...$list - */ - public function definitionList(...$list) - { - $style = clone Table::getStyleDefinition('symfony-style-guide'); - $style->setCellHeaderFormat('%s'); - - $table = new Table($this); - $headers = []; - $row = []; - foreach ($list as $value) { - if ($value instanceof TableSeparator) { - $headers[] = $value; - $row[] = $value; - continue; - } - if (\is_string($value)) { - $headers[] = new TableCell($value, ['colspan' => 2]); - $row[] = null; - continue; - } - if (!\is_array($value)) { - throw new InvalidArgumentException('Value should be an array, string, or an instance of TableSeparator.'); - } - $headers[] = key($value); - $row[] = current($value); - } - - $table->setHeaders($headers); - $table->setRows([$row]); - $table->setHorizontal(); - $table->setStyle($style); - - $table->render(); - $this->newLine(); - } - - /** - * {@inheritdoc} - */ - public function ask($question, $default = null, $validator = null) - { - $question = new Question($question, $default); - $question->setValidator($validator); - - return $this->askQuestion($question); - } - - /** - * {@inheritdoc} - */ - public function askHidden($question, $validator = null) - { - $question = new Question($question); - - $question->setHidden(true); - $question->setValidator($validator); - - return $this->askQuestion($question); - } - - /** - * {@inheritdoc} - */ - public function confirm($question, $default = true) - { - return $this->askQuestion(new ConfirmationQuestion($question, $default)); - } - - /** - * {@inheritdoc} - */ - public function choice($question, array $choices, $default = null) - { - if (null !== $default) { - $values = array_flip($choices); - $default = $values[$default] ?? $default; - } - - return $this->askQuestion(new ChoiceQuestion($question, $choices, $default)); - } - - /** - * {@inheritdoc} - */ - public function progressStart($max = 0) - { - $this->progressBar = $this->createProgressBar($max); - $this->progressBar->start(); - } - - /** - * {@inheritdoc} - */ - public function progressAdvance($step = 1) - { - $this->getProgressBar()->advance($step); - } - - /** - * {@inheritdoc} - */ - public function progressFinish() - { - $this->getProgressBar()->finish(); - $this->newLine(2); - $this->progressBar = null; - } - - /** - * {@inheritdoc} - */ - public function createProgressBar($max = 0) - { - $progressBar = parent::createProgressBar($max); - - if ('\\' !== \DIRECTORY_SEPARATOR || 'Hyper' === getenv('TERM_PROGRAM')) { - $progressBar->setEmptyBarCharacter('░'); // light shade character \u2591 - $progressBar->setProgressCharacter(''); - $progressBar->setBarCharacter('▓'); // dark shade character \u2593 - } - - return $progressBar; - } - - /** - * @return mixed - */ - public function askQuestion(Question $question) - { - if ($this->input->isInteractive()) { - $this->autoPrependBlock(); - } - - if (!$this->questionHelper) { - $this->questionHelper = new SymfonyQuestionHelper(); - } - - $answer = $this->questionHelper->ask($this->input, $this, $question); - - if ($this->input->isInteractive()) { - $this->newLine(); - $this->bufferedOutput->write("\n"); - } - - return $answer; - } - - /** - * {@inheritdoc} - */ - public function writeln($messages, $type = self::OUTPUT_NORMAL) - { - if (!is_iterable($messages)) { - $messages = [$messages]; - } - - foreach ($messages as $message) { - parent::writeln($message, $type); - $this->writeBuffer($message, true, $type); - } - } - - /** - * {@inheritdoc} - */ - public function write($messages, $newline = false, $type = self::OUTPUT_NORMAL) - { - if (!is_iterable($messages)) { - $messages = [$messages]; - } - - foreach ($messages as $message) { - parent::write($message, $newline, $type); - $this->writeBuffer($message, $newline, $type); - } - } - - /** - * {@inheritdoc} - */ - public function newLine($count = 1) - { - parent::newLine($count); - $this->bufferedOutput->write(str_repeat("\n", $count)); - } - - /** - * Returns a new instance which makes use of stderr if available. - * - * @return self - */ - public function getErrorStyle() - { - return new self($this->input, $this->getErrorOutput()); - } - - private function getProgressBar(): ProgressBar - { - if (!$this->progressBar) { - throw new RuntimeException('The ProgressBar is not started.'); - } - - return $this->progressBar; - } - - private function autoPrependBlock(): void - { - $chars = substr(str_replace(\PHP_EOL, "\n", $this->bufferedOutput->fetch()), -2); - - if (!isset($chars[0])) { - $this->newLine(); //empty history, so we should start with a new line. - - return; - } - //Prepend new line for each non LF chars (This means no blank line was output before) - $this->newLine(2 - substr_count($chars, "\n")); - } - - private function autoPrependText(): void - { - $fetched = $this->bufferedOutput->fetch(); - //Prepend new line if last char isn't EOL: - if (!str_ends_with($fetched, "\n")) { - $this->newLine(); - } - } - - private function writeBuffer(string $message, bool $newLine, int $type): void - { - // We need to know if the last chars are PHP_EOL - $this->bufferedOutput->write($message, $newLine, $type); - } - - private function createBlock(iterable $messages, string $type = null, string $style = null, string $prefix = ' ', bool $padding = false, bool $escape = false): array - { - $indentLength = 0; - $prefixLength = Helper::strlenWithoutDecoration($this->getFormatter(), $prefix); - $lines = []; - - if (null !== $type) { - $type = sprintf('[%s] ', $type); - $indentLength = \strlen($type); - $lineIndentation = str_repeat(' ', $indentLength); - } - - // wrap and add newlines for each element - foreach ($messages as $key => $message) { - if ($escape) { - $message = OutputFormatter::escape($message); - } - - $decorationLength = Helper::strlen($message) - Helper::strlenWithoutDecoration($this->getFormatter(), $message); - $messageLineLength = min($this->lineLength - $prefixLength - $indentLength + $decorationLength, $this->lineLength); - $messageLines = explode(\PHP_EOL, wordwrap($message, $messageLineLength, \PHP_EOL, true)); - foreach ($messageLines as $messageLine) { - $lines[] = $messageLine; - } - - if (\count($messages) > 1 && $key < \count($messages) - 1) { - $lines[] = ''; - } - } - - $firstLineIndex = 0; - if ($padding && $this->isDecorated()) { - $firstLineIndex = 1; - array_unshift($lines, ''); - $lines[] = ''; - } - - foreach ($lines as $i => &$line) { - if (null !== $type) { - $line = $firstLineIndex === $i ? $type.$line : $lineIndentation.$line; - } - - $line = $prefix.$line; - $line .= str_repeat(' ', max($this->lineLength - Helper::strlenWithoutDecoration($this->getFormatter(), $line), 0)); - - if ($style) { - $line = sprintf('<%s>%s', $style, $line); - } - } - - return $lines; - } -} diff --git a/source/vendor/symfony/console/Terminal.php b/source/vendor/symfony/console/Terminal.php deleted file mode 100644 index 5e5a3c2..0000000 --- a/source/vendor/symfony/console/Terminal.php +++ /dev/null @@ -1,174 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console; - -class Terminal -{ - private static $width; - private static $height; - private static $stty; - - /** - * Gets the terminal width. - * - * @return int - */ - public function getWidth() - { - $width = getenv('COLUMNS'); - if (false !== $width) { - return (int) trim($width); - } - - if (null === self::$width) { - self::initDimensions(); - } - - return self::$width ?: 80; - } - - /** - * Gets the terminal height. - * - * @return int - */ - public function getHeight() - { - $height = getenv('LINES'); - if (false !== $height) { - return (int) trim($height); - } - - if (null === self::$height) { - self::initDimensions(); - } - - return self::$height ?: 50; - } - - /** - * @internal - * - * @return bool - */ - public static function hasSttyAvailable() - { - if (null !== self::$stty) { - return self::$stty; - } - - // skip check if exec function is disabled - if (!\function_exists('exec')) { - return false; - } - - exec('stty 2>&1', $output, $exitcode); - - return self::$stty = 0 === $exitcode; - } - - private static function initDimensions() - { - if ('\\' === \DIRECTORY_SEPARATOR) { - if (preg_match('/^(\d+)x(\d+)(?: \((\d+)x(\d+)\))?$/', trim(getenv('ANSICON')), $matches)) { - // extract [w, H] from "wxh (WxH)" - // or [w, h] from "wxh" - self::$width = (int) $matches[1]; - self::$height = isset($matches[4]) ? (int) $matches[4] : (int) $matches[2]; - } elseif (!self::hasVt100Support() && self::hasSttyAvailable()) { - // only use stty on Windows if the terminal does not support vt100 (e.g. Windows 7 + git-bash) - // testing for stty in a Windows 10 vt100-enabled console will implicitly disable vt100 support on STDOUT - self::initDimensionsUsingStty(); - } elseif (null !== $dimensions = self::getConsoleMode()) { - // extract [w, h] from "wxh" - self::$width = (int) $dimensions[0]; - self::$height = (int) $dimensions[1]; - } - } else { - self::initDimensionsUsingStty(); - } - } - - /** - * Returns whether STDOUT has vt100 support (some Windows 10+ configurations). - */ - private static function hasVt100Support(): bool - { - return \function_exists('sapi_windows_vt100_support') && sapi_windows_vt100_support(fopen('php://stdout', 'w')); - } - - /** - * Initializes dimensions using the output of an stty columns line. - */ - private static function initDimensionsUsingStty() - { - if ($sttyString = self::getSttyColumns()) { - if (preg_match('/rows.(\d+);.columns.(\d+);/i', $sttyString, $matches)) { - // extract [w, h] from "rows h; columns w;" - self::$width = (int) $matches[2]; - self::$height = (int) $matches[1]; - } elseif (preg_match('/;.(\d+).rows;.(\d+).columns/i', $sttyString, $matches)) { - // extract [w, h] from "; h rows; w columns" - self::$width = (int) $matches[2]; - self::$height = (int) $matches[1]; - } - } - } - - /** - * Runs and parses mode CON if it's available, suppressing any error output. - * - * @return int[]|null An array composed of the width and the height or null if it could not be parsed - */ - private static function getConsoleMode(): ?array - { - $info = self::readFromProcess('mode CON'); - - if (null === $info || !preg_match('/--------+\r?\n.+?(\d+)\r?\n.+?(\d+)\r?\n/', $info, $matches)) { - return null; - } - - return [(int) $matches[2], (int) $matches[1]]; - } - - /** - * Runs and parses stty -a if it's available, suppressing any error output. - */ - private static function getSttyColumns(): ?string - { - return self::readFromProcess('stty -a | grep columns'); - } - - private static function readFromProcess(string $command): ?string - { - if (!\function_exists('proc_open')) { - return null; - } - - $descriptorspec = [ - 1 => ['pipe', 'w'], - 2 => ['pipe', 'w'], - ]; - - $process = proc_open($command, $descriptorspec, $pipes, null, null, ['suppress_errors' => true]); - if (!\is_resource($process)) { - return null; - } - - $info = stream_get_contents($pipes[1]); - fclose($pipes[1]); - fclose($pipes[2]); - proc_close($process); - - return $info; - } -} diff --git a/source/vendor/symfony/contracts/CHANGELOG.md b/source/vendor/symfony/contracts/CHANGELOG.md deleted file mode 100644 index f3e2797..0000000 --- a/source/vendor/symfony/contracts/CHANGELOG.md +++ /dev/null @@ -1,24 +0,0 @@ -CHANGELOG -========= - -1.1.9 ------ - - * fixed compat with PHP 8 - -1.1.0 ------ - - * added `HttpClient` namespace with contracts for implementing flexible HTTP clients - * added `EventDispatcherInterface` and `Event` in namespace `EventDispatcher` - * added `ServiceProviderInterface` in namespace `Service` - -1.0.0 ------ - - * added `Service\ResetInterface` to provide a way to reset an object to its initial state - * added `Translation\TranslatorInterface` and `Translation\TranslatorTrait` - * added `Cache` contract to extend PSR-6 with tag invalidation, callback-based computation and stampede protection - * added `Service\ServiceSubscriberInterface` to declare the dependencies of a class that consumes a service locator - * added `Service\ServiceSubscriberTrait` to implement `Service\ServiceSubscriberInterface` using methods' return types - * added `Service\ServiceLocatorTrait` to help implement PSR-11 service locators diff --git a/source/vendor/symfony/contracts/Cache/CacheInterface.php b/source/vendor/symfony/contracts/Cache/CacheInterface.php deleted file mode 100644 index 4b1686b..0000000 --- a/source/vendor/symfony/contracts/Cache/CacheInterface.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Cache; - -use Psr\Cache\CacheItemInterface; -use Psr\Cache\InvalidArgumentException; - -/** - * Covers most simple to advanced caching needs. - * - * @author Nicolas Grekas - */ -interface CacheInterface -{ - /** - * Fetches a value from the pool or computes it if not found. - * - * On cache misses, a callback is called that should return the missing value. - * This callback is given a PSR-6 CacheItemInterface instance corresponding to the - * requested key, that could be used e.g. for expiration control. It could also - * be an ItemInterface instance when its additional features are needed. - * - * @param string $key The key of the item to retrieve from the cache - * @param callable|CallbackInterface $callback Should return the computed value for the given key/item - * @param float|null $beta A float that, as it grows, controls the likeliness of triggering - * early expiration. 0 disables it, INF forces immediate expiration. - * The default (or providing null) is implementation dependent but should - * typically be 1.0, which should provide optimal stampede protection. - * See https://en.wikipedia.org/wiki/Cache_stampede#Probabilistic_early_expiration - * @param array &$metadata The metadata of the cached item {@see ItemInterface::getMetadata()} - * - * @return mixed The value corresponding to the provided key - * - * @throws InvalidArgumentException When $key is not valid or when $beta is negative - */ - public function get(string $key, callable $callback, float $beta = null, array &$metadata = null); - - /** - * Removes an item from the pool. - * - * @param string $key The key to delete - * - * @throws InvalidArgumentException When $key is not valid - * - * @return bool True if the item was successfully removed, false if there was any error - */ - public function delete(string $key): bool; -} diff --git a/source/vendor/symfony/contracts/Cache/CacheTrait.php b/source/vendor/symfony/contracts/Cache/CacheTrait.php deleted file mode 100644 index 0374e1d..0000000 --- a/source/vendor/symfony/contracts/Cache/CacheTrait.php +++ /dev/null @@ -1,78 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Cache; - -use Psr\Cache\CacheItemPoolInterface; -use Psr\Cache\InvalidArgumentException; -use Psr\Log\LoggerInterface; - -// Help opcache.preload discover always-needed symbols -class_exists(InvalidArgumentException::class); - -/** - * An implementation of CacheInterface for PSR-6 CacheItemPoolInterface classes. - * - * @author Nicolas Grekas - */ -trait CacheTrait -{ - /** - * {@inheritdoc} - */ - public function get(string $key, callable $callback, float $beta = null, array &$metadata = null) - { - return $this->doGet($this, $key, $callback, $beta, $metadata); - } - - /** - * {@inheritdoc} - */ - public function delete(string $key): bool - { - return $this->deleteItem($key); - } - - private function doGet(CacheItemPoolInterface $pool, string $key, callable $callback, ?float $beta, array &$metadata = null, LoggerInterface $logger = null) - { - if (0 > $beta = $beta ?? 1.0) { - throw new class(sprintf('Argument "$beta" provided to "%s::get()" must be a positive number, %f given.', static::class, $beta)) extends \InvalidArgumentException implements InvalidArgumentException { }; - } - - $item = $pool->getItem($key); - $recompute = !$item->isHit() || \INF === $beta; - $metadata = $item instanceof ItemInterface ? $item->getMetadata() : []; - - if (!$recompute && $metadata) { - $expiry = $metadata[ItemInterface::METADATA_EXPIRY] ?? false; - $ctime = $metadata[ItemInterface::METADATA_CTIME] ?? false; - - if ($recompute = $ctime && $expiry && $expiry <= ($now = microtime(true)) - $ctime / 1000 * $beta * log(random_int(1, \PHP_INT_MAX) / \PHP_INT_MAX)) { - // force applying defaultLifetime to expiry - $item->expiresAt(null); - $logger && $logger->info('Item "{key}" elected for early recomputation {delta}s before its expiration', [ - 'key' => $key, - 'delta' => sprintf('%.1f', $expiry - $now), - ]); - } - } - - if ($recompute) { - $save = true; - $item->set($callback($item, $save)); - if ($save) { - $pool->save($item); - } - } - - return $item->get(); - } -} diff --git a/source/vendor/symfony/contracts/Cache/CallbackInterface.php b/source/vendor/symfony/contracts/Cache/CallbackInterface.php deleted file mode 100644 index 7dae2aa..0000000 --- a/source/vendor/symfony/contracts/Cache/CallbackInterface.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Cache; - -use Psr\Cache\CacheItemInterface; - -/** - * Computes and returns the cached value of an item. - * - * @author Nicolas Grekas - */ -interface CallbackInterface -{ - /** - * @param CacheItemInterface|ItemInterface $item The item to compute the value for - * @param bool &$save Should be set to false when the value should not be saved in the pool - * - * @return mixed The computed value for the passed item - */ - public function __invoke(CacheItemInterface $item, bool &$save); -} diff --git a/source/vendor/symfony/contracts/Cache/ItemInterface.php b/source/vendor/symfony/contracts/Cache/ItemInterface.php deleted file mode 100644 index cbd7226..0000000 --- a/source/vendor/symfony/contracts/Cache/ItemInterface.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Cache; - -use Psr\Cache\CacheException; -use Psr\Cache\CacheItemInterface; -use Psr\Cache\InvalidArgumentException; - -/** - * Augments PSR-6's CacheItemInterface with support for tags and metadata. - * - * @author Nicolas Grekas - */ -interface ItemInterface extends CacheItemInterface -{ - /** - * References the Unix timestamp stating when the item will expire. - */ - const METADATA_EXPIRY = 'expiry'; - - /** - * References the time the item took to be created, in milliseconds. - */ - const METADATA_CTIME = 'ctime'; - - /** - * References the list of tags that were assigned to the item, as string[]. - */ - const METADATA_TAGS = 'tags'; - - /** - * Reserved characters that cannot be used in a key or tag. - */ - const RESERVED_CHARACTERS = '{}()/\@:'; - - /** - * Adds a tag to a cache item. - * - * Tags are strings that follow the same validation rules as keys. - * - * @param string|string[] $tags A tag or array of tags - * - * @return $this - * - * @throws InvalidArgumentException When $tag is not valid - * @throws CacheException When the item comes from a pool that is not tag-aware - */ - public function tag($tags): self; - - /** - * Returns a list of metadata info that were saved alongside with the cached value. - * - * See ItemInterface::METADATA_* consts for keys potentially found in the returned array. - */ - public function getMetadata(): array; -} diff --git a/source/vendor/symfony/contracts/Cache/LICENSE b/source/vendor/symfony/contracts/Cache/LICENSE deleted file mode 100644 index 69d925b..0000000 --- a/source/vendor/symfony/contracts/Cache/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2018-2020 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/source/vendor/symfony/contracts/Cache/README.md b/source/vendor/symfony/contracts/Cache/README.md deleted file mode 100644 index 58c589e..0000000 --- a/source/vendor/symfony/contracts/Cache/README.md +++ /dev/null @@ -1,9 +0,0 @@ -Symfony Cache Contracts -======================= - -A set of abstractions extracted out of the Symfony components. - -Can be used to build on semantics that the Symfony components proved useful - and -that already have battle tested implementations. - -See https://github.com/symfony/contracts/blob/master/README.md for more information. diff --git a/source/vendor/symfony/contracts/Cache/TagAwareCacheInterface.php b/source/vendor/symfony/contracts/Cache/TagAwareCacheInterface.php deleted file mode 100644 index 7c4cf11..0000000 --- a/source/vendor/symfony/contracts/Cache/TagAwareCacheInterface.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Cache; - -use Psr\Cache\InvalidArgumentException; - -/** - * Allows invalidating cached items using tags. - * - * @author Nicolas Grekas - */ -interface TagAwareCacheInterface extends CacheInterface -{ - /** - * Invalidates cached items using tags. - * - * When implemented on a PSR-6 pool, invalidation should not apply - * to deferred items. Instead, they should be committed as usual. - * This allows replacing old tagged values by new ones without - * race conditions. - * - * @param string[] $tags An array of tags to invalidate - * - * @return bool True on success - * - * @throws InvalidArgumentException When $tags is not valid - */ - public function invalidateTags(array $tags); -} diff --git a/source/vendor/symfony/contracts/EventDispatcher/Event.php b/source/vendor/symfony/contracts/EventDispatcher/Event.php deleted file mode 100644 index 84f60f3..0000000 --- a/source/vendor/symfony/contracts/EventDispatcher/Event.php +++ /dev/null @@ -1,96 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\EventDispatcher; - -use Psr\EventDispatcher\StoppableEventInterface; - -if (interface_exists(StoppableEventInterface::class)) { - /** - * Event is the base class for classes containing event data. - * - * This class contains no event data. It is used by events that do not pass - * state information to an event handler when an event is raised. - * - * You can call the method stopPropagation() to abort the execution of - * further listeners in your event listener. - * - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - * @author Bernhard Schussek - * @author Nicolas Grekas - */ - class Event implements StoppableEventInterface - { - private $propagationStopped = false; - - /** - * Returns whether further event listeners should be triggered. - */ - public function isPropagationStopped(): bool - { - return $this->propagationStopped; - } - - /** - * Stops the propagation of the event to further event listeners. - * - * If multiple event listeners are connected to the same event, no - * further event listener will be triggered once any trigger calls - * stopPropagation(). - */ - public function stopPropagation(): void - { - $this->propagationStopped = true; - } - } -} else { - /** - * Event is the base class for classes containing event data. - * - * This class contains no event data. It is used by events that do not pass - * state information to an event handler when an event is raised. - * - * You can call the method stopPropagation() to abort the execution of - * further listeners in your event listener. - * - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - * @author Bernhard Schussek - * @author Nicolas Grekas - */ - class Event - { - private $propagationStopped = false; - - /** - * Returns whether further event listeners should be triggered. - */ - public function isPropagationStopped(): bool - { - return $this->propagationStopped; - } - - /** - * Stops the propagation of the event to further event listeners. - * - * If multiple event listeners are connected to the same event, no - * further event listener will be triggered once any trigger calls - * stopPropagation(). - */ - public function stopPropagation(): void - { - $this->propagationStopped = true; - } - } -} diff --git a/source/vendor/symfony/contracts/EventDispatcher/EventDispatcherInterface.php b/source/vendor/symfony/contracts/EventDispatcher/EventDispatcherInterface.php deleted file mode 100644 index 2d470af..0000000 --- a/source/vendor/symfony/contracts/EventDispatcher/EventDispatcherInterface.php +++ /dev/null @@ -1,58 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\EventDispatcher; - -use Psr\EventDispatcher\EventDispatcherInterface as PsrEventDispatcherInterface; - -if (interface_exists(PsrEventDispatcherInterface::class)) { - /** - * Allows providing hooks on domain-specific lifecycles by dispatching events. - */ - interface EventDispatcherInterface extends PsrEventDispatcherInterface - { - /** - * Dispatches an event to all registered listeners. - * - * For BC with Symfony 4, the $eventName argument is not declared explicitly on the - * signature of the method. Implementations that are not bound by this BC constraint - * MUST declare it explicitly, as allowed by PHP. - * - * @param object $event The event to pass to the event handlers/listeners - * @param string|null $eventName The name of the event to dispatch. If not supplied, - * the class of $event should be used instead. - * - * @return object The passed $event MUST be returned - */ - public function dispatch($event/*, string $eventName = null*/); - } -} else { - /** - * Allows providing hooks on domain-specific lifecycles by dispatching events. - */ - interface EventDispatcherInterface - { - /** - * Dispatches an event to all registered listeners. - * - * For BC with Symfony 4, the $eventName argument is not declared explicitly on the - * signature of the method. Implementations that are not bound by this BC constraint - * MUST declare it explicitly, as allowed by PHP. - * - * @param object $event The event to pass to the event handlers/listeners - * @param string|null $eventName The name of the event to dispatch. If not supplied, - * the class of $event should be used instead. - * - * @return object The passed $event MUST be returned - */ - public function dispatch($event/*, string $eventName = null*/); - } -} diff --git a/source/vendor/symfony/contracts/EventDispatcher/LICENSE b/source/vendor/symfony/contracts/EventDispatcher/LICENSE deleted file mode 100644 index 69d925b..0000000 --- a/source/vendor/symfony/contracts/EventDispatcher/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2018-2020 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/source/vendor/symfony/contracts/EventDispatcher/README.md b/source/vendor/symfony/contracts/EventDispatcher/README.md deleted file mode 100644 index fb051c7..0000000 --- a/source/vendor/symfony/contracts/EventDispatcher/README.md +++ /dev/null @@ -1,9 +0,0 @@ -Symfony EventDispatcher Contracts -================================= - -A set of abstractions extracted out of the Symfony components. - -Can be used to build on semantics that the Symfony components proved useful - and -that already have battle tested implementations. - -See https://github.com/symfony/contracts/blob/master/README.md for more information. diff --git a/source/vendor/symfony/contracts/HttpClient/ChunkInterface.php b/source/vendor/symfony/contracts/HttpClient/ChunkInterface.php deleted file mode 100644 index ad5efca..0000000 --- a/source/vendor/symfony/contracts/HttpClient/ChunkInterface.php +++ /dev/null @@ -1,73 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\HttpClient; - -use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface; - -/** - * The interface of chunks returned by ResponseStreamInterface::current(). - * - * When the chunk is first, last or timeout, the content MUST be empty. - * When an unchecked timeout or a network error occurs, a TransportExceptionInterface - * MUST be thrown by the destructor unless one was already thrown by another method. - * - * @author Nicolas Grekas - * - * @experimental in 1.1 - */ -interface ChunkInterface -{ - /** - * Tells when the idle timeout has been reached. - * - * @throws TransportExceptionInterface on a network error - */ - public function isTimeout(): bool; - - /** - * Tells when headers just arrived. - * - * @throws TransportExceptionInterface on a network error or when the idle timeout is reached - */ - public function isFirst(): bool; - - /** - * Tells when the body just completed. - * - * @throws TransportExceptionInterface on a network error or when the idle timeout is reached - */ - public function isLast(): bool; - - /** - * Returns a [status code, headers] tuple when a 1xx status code was just received. - * - * @throws TransportExceptionInterface on a network error or when the idle timeout is reached - */ - public function getInformationalStatus(): ?array; - - /** - * Returns the content of the response chunk. - * - * @throws TransportExceptionInterface on a network error or when the idle timeout is reached - */ - public function getContent(): string; - - /** - * Returns the offset of the chunk in the response body. - */ - public function getOffset(): int; - - /** - * In case of error, returns the message that describes it. - */ - public function getError(): ?string; -} diff --git a/source/vendor/symfony/contracts/HttpClient/Exception/ClientExceptionInterface.php b/source/vendor/symfony/contracts/HttpClient/Exception/ClientExceptionInterface.php deleted file mode 100644 index 5b5fa50..0000000 --- a/source/vendor/symfony/contracts/HttpClient/Exception/ClientExceptionInterface.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\HttpClient\Exception; - -/** - * When a 4xx response is returned. - * - * @author Nicolas Grekas - * - * @experimental in 1.1 - */ -interface ClientExceptionInterface extends HttpExceptionInterface -{ -} diff --git a/source/vendor/symfony/contracts/HttpClient/Exception/DecodingExceptionInterface.php b/source/vendor/symfony/contracts/HttpClient/Exception/DecodingExceptionInterface.php deleted file mode 100644 index 709db21..0000000 --- a/source/vendor/symfony/contracts/HttpClient/Exception/DecodingExceptionInterface.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\HttpClient\Exception; - -/** - * When a content-type cannot be decoded to the expected representation. - * - * @author Nicolas Grekas - * - * @experimental in 1.1 - */ -interface DecodingExceptionInterface extends ExceptionInterface -{ -} diff --git a/source/vendor/symfony/contracts/HttpClient/Exception/ExceptionInterface.php b/source/vendor/symfony/contracts/HttpClient/Exception/ExceptionInterface.php deleted file mode 100644 index 6d59715..0000000 --- a/source/vendor/symfony/contracts/HttpClient/Exception/ExceptionInterface.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\HttpClient\Exception; - -/** - * The base interface for all exceptions in the contract. - * - * @author Nicolas Grekas - * - * @experimental in 1.1 - */ -interface ExceptionInterface extends \Throwable -{ -} diff --git a/source/vendor/symfony/contracts/HttpClient/Exception/HttpExceptionInterface.php b/source/vendor/symfony/contracts/HttpClient/Exception/HttpExceptionInterface.php deleted file mode 100644 index 0e9f39f..0000000 --- a/source/vendor/symfony/contracts/HttpClient/Exception/HttpExceptionInterface.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\HttpClient\Exception; - -use Symfony\Contracts\HttpClient\ResponseInterface; - -/** - * Base interface for HTTP-related exceptions. - * - * @author Anton Chernikov - * - * @experimental in 1.1 - */ -interface HttpExceptionInterface extends ExceptionInterface -{ - public function getResponse(): ResponseInterface; -} diff --git a/source/vendor/symfony/contracts/HttpClient/Exception/RedirectionExceptionInterface.php b/source/vendor/symfony/contracts/HttpClient/Exception/RedirectionExceptionInterface.php deleted file mode 100644 index 8cdd3e7..0000000 --- a/source/vendor/symfony/contracts/HttpClient/Exception/RedirectionExceptionInterface.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\HttpClient\Exception; - -/** - * When a 3xx response is returned and the "max_redirects" option has been reached. - * - * @author Nicolas Grekas - * - * @experimental in 1.1 - */ -interface RedirectionExceptionInterface extends HttpExceptionInterface -{ -} diff --git a/source/vendor/symfony/contracts/HttpClient/Exception/ServerExceptionInterface.php b/source/vendor/symfony/contracts/HttpClient/Exception/ServerExceptionInterface.php deleted file mode 100644 index f994ba2..0000000 --- a/source/vendor/symfony/contracts/HttpClient/Exception/ServerExceptionInterface.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\HttpClient\Exception; - -/** - * When a 5xx response is returned. - * - * @author Nicolas Grekas - * - * @experimental in 1.1 - */ -interface ServerExceptionInterface extends HttpExceptionInterface -{ -} diff --git a/source/vendor/symfony/contracts/HttpClient/Exception/TransportExceptionInterface.php b/source/vendor/symfony/contracts/HttpClient/Exception/TransportExceptionInterface.php deleted file mode 100644 index 1cdc30a..0000000 --- a/source/vendor/symfony/contracts/HttpClient/Exception/TransportExceptionInterface.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\HttpClient\Exception; - -/** - * When any error happens at the transport level. - * - * @author Nicolas Grekas - * - * @experimental in 1.1 - */ -interface TransportExceptionInterface extends ExceptionInterface -{ -} diff --git a/source/vendor/symfony/contracts/HttpClient/HttpClientInterface.php b/source/vendor/symfony/contracts/HttpClient/HttpClientInterface.php deleted file mode 100644 index 68afa78..0000000 --- a/source/vendor/symfony/contracts/HttpClient/HttpClientInterface.php +++ /dev/null @@ -1,95 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\HttpClient; - -use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface; -use Symfony\Contracts\HttpClient\Test\HttpClientTestCase; - -/** - * Provides flexible methods for requesting HTTP resources synchronously or asynchronously. - * - * @see HttpClientTestCase for a reference test suite - * - * @author Nicolas Grekas - * - * @experimental in 1.1 - */ -interface HttpClientInterface -{ - public const OPTIONS_DEFAULTS = [ - 'auth_basic' => null, // array|string - an array containing the username as first value, and optionally the - // password as the second one; or string like username:password - enabling HTTP Basic - // authentication (RFC 7617) - 'auth_bearer' => null, // string - a token enabling HTTP Bearer authorization (RFC 6750) - 'query' => [], // string[] - associative array of query string values to merge with the request's URL - 'headers' => [], // iterable|string[]|string[][] - headers names provided as keys or as part of values - 'body' => '', // array|string|resource|\Traversable|\Closure - the callback SHOULD yield a string - // smaller than the amount requested as argument; the empty string signals EOF; if - // an array is passed, it is meant as a form payload of field names and values - 'json' => null, // mixed - if set, implementations MUST set the "body" option to the JSON-encoded - // value and set the "content-type" header to a JSON-compatible value if it is not - // explicitly defined in the headers option - typically "application/json" - 'user_data' => null, // mixed - any extra data to attach to the request (scalar, callable, object...) that - // MUST be available via $response->getInfo('user_data') - not used internally - 'max_redirects' => 20, // int - the maximum number of redirects to follow; a value lower than or equal to 0 - // means redirects should not be followed; "Authorization" and "Cookie" headers MUST - // NOT follow except for the initial host name - 'http_version' => null, // string - defaults to the best supported version, typically 1.1 or 2.0 - 'base_uri' => null, // string - the URI to resolve relative URLs, following rules in RFC 3986, section 2 - 'buffer' => true, // bool|resource|\Closure - whether the content of the response should be buffered or not, - // or a stream resource where the response body should be written, - // or a closure telling if/where the response should be buffered based on its headers - 'on_progress' => null, // callable(int $dlNow, int $dlSize, array $info) - throwing any exceptions MUST abort - // the request; it MUST be called on DNS resolution, on arrival of headers and on - // completion; it SHOULD be called on upload/download of data and at least 1/s - 'resolve' => [], // string[] - a map of host to IP address that SHOULD replace DNS resolution - 'proxy' => null, // string - by default, the proxy-related env vars handled by curl SHOULD be honored - 'no_proxy' => null, // string - a comma separated list of hosts that do not require a proxy to be reached - 'timeout' => null, // float - the idle timeout - defaults to ini_get('default_socket_timeout') - 'max_duration' => 0, // float - the maximum execution time for the request+response as a whole; - // a value lower than or equal to 0 means it is unlimited - 'bindto' => '0', // string - the interface or the local socket to bind to - 'verify_peer' => true, // see https://php.net/context.ssl for the following options - 'verify_host' => true, - 'cafile' => null, - 'capath' => null, - 'local_cert' => null, - 'local_pk' => null, - 'passphrase' => null, - 'ciphers' => null, - 'peer_fingerprint' => null, - 'capture_peer_cert_chain' => false, - 'extra' => [], // array - additional options that can be ignored if unsupported, unlike regular options - ]; - - /** - * Requests an HTTP resource. - * - * Responses MUST be lazy, but their status code MUST be - * checked even if none of their public methods are called. - * - * Implementations are not required to support all options described above; they can also - * support more custom options; but in any case, they MUST throw a TransportExceptionInterface - * when an unsupported option is passed. - * - * @throws TransportExceptionInterface When an unsupported option is passed - */ - public function request(string $method, string $url, array $options = []): ResponseInterface; - - /** - * Yields responses chunk by chunk as they complete. - * - * @param ResponseInterface|ResponseInterface[]|iterable $responses One or more responses created by the current HTTP client - * @param float|null $timeout The idle timeout before yielding timeout chunks - */ - public function stream($responses, float $timeout = null): ResponseStreamInterface; -} diff --git a/source/vendor/symfony/contracts/HttpClient/LICENSE b/source/vendor/symfony/contracts/HttpClient/LICENSE deleted file mode 100644 index 69d925b..0000000 --- a/source/vendor/symfony/contracts/HttpClient/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2018-2020 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/source/vendor/symfony/contracts/HttpClient/README.md b/source/vendor/symfony/contracts/HttpClient/README.md deleted file mode 100644 index 01f8118..0000000 --- a/source/vendor/symfony/contracts/HttpClient/README.md +++ /dev/null @@ -1,9 +0,0 @@ -Symfony HttpClient Contracts -============================ - -A set of abstractions extracted out of the Symfony components. - -Can be used to build on semantics that the Symfony components proved useful - and -that already have battle tested implementations. - -See https://github.com/symfony/contracts/blob/master/README.md for more information. diff --git a/source/vendor/symfony/contracts/HttpClient/ResponseInterface.php b/source/vendor/symfony/contracts/HttpClient/ResponseInterface.php deleted file mode 100644 index b9917ac..0000000 --- a/source/vendor/symfony/contracts/HttpClient/ResponseInterface.php +++ /dev/null @@ -1,111 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\HttpClient; - -use Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface; -use Symfony\Contracts\HttpClient\Exception\DecodingExceptionInterface; -use Symfony\Contracts\HttpClient\Exception\ExceptionInterface; -use Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface; -use Symfony\Contracts\HttpClient\Exception\ServerExceptionInterface; -use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface; - -/** - * A (lazily retrieved) HTTP response. - * - * @author Nicolas Grekas - * - * @experimental in 1.1 - */ -interface ResponseInterface -{ - /** - * Gets the HTTP status code of the response. - * - * @throws TransportExceptionInterface when a network error occurs - */ - public function getStatusCode(): int; - - /** - * Gets the HTTP headers of the response. - * - * @param bool $throw Whether an exception should be thrown on 3/4/5xx status codes - * - * @return string[][] The headers of the response keyed by header names in lowercase - * - * @throws TransportExceptionInterface When a network error occurs - * @throws RedirectionExceptionInterface On a 3xx when $throw is true and the "max_redirects" option has been reached - * @throws ClientExceptionInterface On a 4xx when $throw is true - * @throws ServerExceptionInterface On a 5xx when $throw is true - */ - public function getHeaders(bool $throw = true): array; - - /** - * Gets the response body as a string. - * - * @param bool $throw Whether an exception should be thrown on 3/4/5xx status codes - * - * @throws TransportExceptionInterface When a network error occurs - * @throws RedirectionExceptionInterface On a 3xx when $throw is true and the "max_redirects" option has been reached - * @throws ClientExceptionInterface On a 4xx when $throw is true - * @throws ServerExceptionInterface On a 5xx when $throw is true - */ - public function getContent(bool $throw = true): string; - - /** - * Gets the response body decoded as array, typically from a JSON payload. - * - * @param bool $throw Whether an exception should be thrown on 3/4/5xx status codes - * - * @throws DecodingExceptionInterface When the body cannot be decoded to an array - * @throws TransportExceptionInterface When a network error occurs - * @throws RedirectionExceptionInterface On a 3xx when $throw is true and the "max_redirects" option has been reached - * @throws ClientExceptionInterface On a 4xx when $throw is true - * @throws ServerExceptionInterface On a 5xx when $throw is true - */ - public function toArray(bool $throw = true): array; - - /** - * Closes the response stream and all related buffers. - * - * No further chunk will be yielded after this method has been called. - */ - public function cancel(): void; - - /** - * Returns info coming from the transport layer. - * - * This method SHOULD NOT throw any ExceptionInterface and SHOULD be non-blocking. - * The returned info is "live": it can be empty and can change from one call to - * another, as the request/response progresses. - * - * The following info MUST be returned: - * - canceled (bool) - true if the response was canceled using ResponseInterface::cancel(), false otherwise - * - error (string|null) - the error message when the transfer was aborted, null otherwise - * - http_code (int) - the last response code or 0 when it is not known yet - * - http_method (string) - the HTTP verb of the last request - * - redirect_count (int) - the number of redirects followed while executing the request - * - redirect_url (string|null) - the resolved location of redirect responses, null otherwise - * - response_headers (array) - an array modelled after the special $http_response_header variable - * - start_time (float) - the time when the request was sent or 0.0 when it's pending - * - url (string) - the last effective URL of the request - * - user_data (mixed|null) - the value of the "user_data" request option, null if not set - * - * When the "capture_peer_cert_chain" option is true, the "peer_certificate_chain" - * attribute SHOULD list the peer certificates as an array of OpenSSL X.509 resources. - * - * Other info SHOULD be named after curl_getinfo()'s associative return value. - * - * @return array|mixed|null An array of all available info, or one of them when $type is - * provided, or null when an unsupported type is requested - */ - public function getInfo(string $type = null); -} diff --git a/source/vendor/symfony/contracts/HttpClient/ResponseStreamInterface.php b/source/vendor/symfony/contracts/HttpClient/ResponseStreamInterface.php deleted file mode 100644 index dfff554..0000000 --- a/source/vendor/symfony/contracts/HttpClient/ResponseStreamInterface.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\HttpClient; - -/** - * Yields response chunks, returned by HttpClientInterface::stream(). - * - * @author Nicolas Grekas - * - * @experimental in 1.1 - */ -interface ResponseStreamInterface extends \Iterator -{ - public function key(): ResponseInterface; - - public function current(): ChunkInterface; -} diff --git a/source/vendor/symfony/contracts/LICENSE b/source/vendor/symfony/contracts/LICENSE deleted file mode 100644 index 69d925b..0000000 --- a/source/vendor/symfony/contracts/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2018-2020 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/source/vendor/symfony/contracts/README.md b/source/vendor/symfony/contracts/README.md deleted file mode 100644 index 480c2a9..0000000 --- a/source/vendor/symfony/contracts/README.md +++ /dev/null @@ -1,54 +0,0 @@ -Symfony Contracts -================= - -A set of abstractions extracted out of the Symfony components. - -Can be used to build on semantics that the Symfony components proved useful - and -that already have battle tested implementations. - -Design Principles ------------------ - - * contracts are split by domain, each into their own sub-namespaces; - * contracts are small and consistent sets of PHP interfaces, traits, normative - docblocks and reference test suites when applicable, ...; - * all contracts must have a proven implementation to enter this repository; - * they must be backward compatible with existing Symfony components. - -Packages that implement specific contracts should list them in the "provide" -section of their "composer.json" file, using the `symfony/*-implementation` -convention (e.g. `"provide": { "symfony/cache-implementation": "1.0" }`). - -FAQ ---- - -### How to use this package? - -The abstractions in this package are useful to achieve loose coupling and -interoperability. By using the provided interfaces as type hints, you are able -to reuse any implementations that match their contracts. It could be a Symfony -component, or another one provided by the PHP community at large. - -Depending on their semantics, some interfaces can be combined with autowiring to -seamlessly inject a service in your classes. - -Others might be useful as labeling interfaces, to hint about a specific behavior -that could be enabled when using autoconfiguration or manual service tagging (or -any other means provided by your framework.) - -### How is this different from PHP-FIG's PSRs? - -When applicable, the provided contracts are built on top of PHP-FIG's PSRs. But -the group has different goals and different processes. Here, we're focusing on -providing abstractions that are useful on their own while still compatible with -implementations provided by Symfony. Although not the main target, we hope that -the declared contracts will directly or indirectly contribute to the PHP-FIG. - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/contracts.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/source/vendor/symfony/contracts/Service/LICENSE b/source/vendor/symfony/contracts/Service/LICENSE deleted file mode 100644 index 69d925b..0000000 --- a/source/vendor/symfony/contracts/Service/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2018-2020 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/source/vendor/symfony/contracts/Service/README.md b/source/vendor/symfony/contracts/Service/README.md deleted file mode 100644 index d033a43..0000000 --- a/source/vendor/symfony/contracts/Service/README.md +++ /dev/null @@ -1,9 +0,0 @@ -Symfony Service Contracts -========================= - -A set of abstractions extracted out of the Symfony components. - -Can be used to build on semantics that the Symfony components proved useful - and -that already have battle tested implementations. - -See https://github.com/symfony/contracts/blob/master/README.md for more information. diff --git a/source/vendor/symfony/contracts/Service/ResetInterface.php b/source/vendor/symfony/contracts/Service/ResetInterface.php deleted file mode 100644 index 1af1075..0000000 --- a/source/vendor/symfony/contracts/Service/ResetInterface.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Service; - -/** - * Provides a way to reset an object to its initial state. - * - * When calling the "reset()" method on an object, it should be put back to its - * initial state. This usually means clearing any internal buffers and forwarding - * the call to internal dependencies. All properties of the object should be put - * back to the same state it had when it was first ready to use. - * - * This method could be called, for example, to recycle objects that are used as - * services, so that they can be used to handle several requests in the same - * process loop (note that we advise making your services stateless instead of - * implementing this interface when possible.) - */ -interface ResetInterface -{ - public function reset(); -} diff --git a/source/vendor/symfony/contracts/Service/ServiceLocatorTrait.php b/source/vendor/symfony/contracts/Service/ServiceLocatorTrait.php deleted file mode 100644 index 1737f50..0000000 --- a/source/vendor/symfony/contracts/Service/ServiceLocatorTrait.php +++ /dev/null @@ -1,126 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Service; - -use Psr\Container\ContainerExceptionInterface; -use Psr\Container\NotFoundExceptionInterface; - -// Help opcache.preload discover always-needed symbols -class_exists(ContainerExceptionInterface::class); -class_exists(NotFoundExceptionInterface::class); - -/** - * A trait to help implement ServiceProviderInterface. - * - * @author Robin Chalas - * @author Nicolas Grekas - */ -trait ServiceLocatorTrait -{ - private $factories; - private $loading = []; - private $providedTypes; - - /** - * @param callable[] $factories - */ - public function __construct(array $factories) - { - $this->factories = $factories; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function has($id) - { - return isset($this->factories[$id]); - } - - /** - * {@inheritdoc} - */ - public function get($id) - { - if (!isset($this->factories[$id])) { - throw $this->createNotFoundException($id); - } - - if (isset($this->loading[$id])) { - $ids = array_values($this->loading); - $ids = \array_slice($this->loading, array_search($id, $ids)); - $ids[] = $id; - - throw $this->createCircularReferenceException($id, $ids); - } - - $this->loading[$id] = $id; - try { - return $this->factories[$id]($this); - } finally { - unset($this->loading[$id]); - } - } - - /** - * {@inheritdoc} - */ - public function getProvidedServices(): array - { - if (null === $this->providedTypes) { - $this->providedTypes = []; - - foreach ($this->factories as $name => $factory) { - if (!\is_callable($factory)) { - $this->providedTypes[$name] = '?'; - } else { - $type = (new \ReflectionFunction($factory))->getReturnType(); - - $this->providedTypes[$name] = $type ? ($type->allowsNull() ? '?' : '').($type instanceof \ReflectionNamedType ? $type->getName() : $type) : '?'; - } - } - } - - return $this->providedTypes; - } - - private function createNotFoundException(string $id): NotFoundExceptionInterface - { - if (!$alternatives = array_keys($this->factories)) { - $message = 'is empty...'; - } else { - $last = array_pop($alternatives); - if ($alternatives) { - $message = sprintf('only knows about the "%s" and "%s" services.', implode('", "', $alternatives), $last); - } else { - $message = sprintf('only knows about the "%s" service.', $last); - } - } - - if ($this->loading) { - $message = sprintf('The service "%s" has a dependency on a non-existent service "%s". This locator %s', end($this->loading), $id, $message); - } else { - $message = sprintf('Service "%s" not found: the current service locator %s', $id, $message); - } - - return new class($message) extends \InvalidArgumentException implements NotFoundExceptionInterface { - }; - } - - private function createCircularReferenceException(string $id, array $path): ContainerExceptionInterface - { - return new class(sprintf('Circular reference detected for service "%s", path: "%s".', $id, implode(' -> ', $path))) extends \RuntimeException implements ContainerExceptionInterface { - }; - } -} diff --git a/source/vendor/symfony/contracts/Service/ServiceProviderInterface.php b/source/vendor/symfony/contracts/Service/ServiceProviderInterface.php deleted file mode 100644 index c60ad0b..0000000 --- a/source/vendor/symfony/contracts/Service/ServiceProviderInterface.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Service; - -use Psr\Container\ContainerInterface; - -/** - * A ServiceProviderInterface exposes the identifiers and the types of services provided by a container. - * - * @author Nicolas Grekas - * @author Mateusz Sip - */ -interface ServiceProviderInterface extends ContainerInterface -{ - /** - * Returns an associative array of service types keyed by the identifiers provided by the current container. - * - * Examples: - * - * * ['logger' => 'Psr\Log\LoggerInterface'] means the object provides a service named "logger" that implements Psr\Log\LoggerInterface - * * ['foo' => '?'] means the container provides service name "foo" of unspecified type - * * ['bar' => '?Bar\Baz'] means the container provides a service "bar" of type Bar\Baz|null - * - * @return string[] The provided service types, keyed by service names - */ - public function getProvidedServices(): array; -} diff --git a/source/vendor/symfony/contracts/Service/ServiceSubscriberInterface.php b/source/vendor/symfony/contracts/Service/ServiceSubscriberInterface.php deleted file mode 100644 index 8bb320f..0000000 --- a/source/vendor/symfony/contracts/Service/ServiceSubscriberInterface.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Service; - -/** - * A ServiceSubscriber exposes its dependencies via the static {@link getSubscribedServices} method. - * - * The getSubscribedServices method returns an array of service types required by such instances, - * optionally keyed by the service names used internally. Service types that start with an interrogation - * mark "?" are optional, while the other ones are mandatory service dependencies. - * - * The injected service locators SHOULD NOT allow access to any other services not specified by the method. - * - * It is expected that ServiceSubscriber instances consume PSR-11-based service locators internally. - * This interface does not dictate any injection method for these service locators, although constructor - * injection is recommended. - * - * @author Nicolas Grekas - */ -interface ServiceSubscriberInterface -{ - /** - * Returns an array of service types required by such instances, optionally keyed by the service names used internally. - * - * For mandatory dependencies: - * - * * ['logger' => 'Psr\Log\LoggerInterface'] means the objects use the "logger" name - * internally to fetch a service which must implement Psr\Log\LoggerInterface. - * * ['loggers' => 'Psr\Log\LoggerInterface[]'] means the objects use the "loggers" name - * internally to fetch an iterable of Psr\Log\LoggerInterface instances. - * * ['Psr\Log\LoggerInterface'] is a shortcut for - * * ['Psr\Log\LoggerInterface' => 'Psr\Log\LoggerInterface'] - * - * otherwise: - * - * * ['logger' => '?Psr\Log\LoggerInterface'] denotes an optional dependency - * * ['loggers' => '?Psr\Log\LoggerInterface[]'] denotes an optional iterable dependency - * * ['?Psr\Log\LoggerInterface'] is a shortcut for - * * ['Psr\Log\LoggerInterface' => '?Psr\Log\LoggerInterface'] - * - * @return array The required service types, optionally keyed by service names - */ - public static function getSubscribedServices(); -} diff --git a/source/vendor/symfony/contracts/Service/ServiceSubscriberTrait.php b/source/vendor/symfony/contracts/Service/ServiceSubscriberTrait.php deleted file mode 100644 index 82fb5ab..0000000 --- a/source/vendor/symfony/contracts/Service/ServiceSubscriberTrait.php +++ /dev/null @@ -1,63 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Service; - -use Psr\Container\ContainerInterface; - -/** - * Implementation of ServiceSubscriberInterface that determines subscribed services from - * private method return types. Service ids are available as "ClassName::methodName". - * - * @author Kevin Bond - */ -trait ServiceSubscriberTrait -{ - /** @var ContainerInterface */ - protected $container; - - public static function getSubscribedServices(): array - { - static $services; - - if (null !== $services) { - return $services; - } - - $services = \is_callable(['parent', __FUNCTION__]) ? parent::getSubscribedServices() : []; - - foreach ((new \ReflectionClass(self::class))->getMethods() as $method) { - if ($method->isStatic() || $method->isAbstract() || $method->isGenerator() || $method->isInternal() || $method->getNumberOfRequiredParameters()) { - continue; - } - - if (self::class === $method->getDeclaringClass()->name && ($returnType = $method->getReturnType()) && !$returnType->isBuiltin()) { - $services[self::class.'::'.$method->name] = '?'.($returnType instanceof \ReflectionNamedType ? $returnType->getName() : $type); - } - } - - return $services; - } - - /** - * @required - */ - public function setContainer(ContainerInterface $container) - { - $this->container = $container; - - if (\is_callable(['parent', __FUNCTION__])) { - return parent::setContainer($container); - } - - return null; - } -} diff --git a/source/vendor/symfony/contracts/Translation/LICENSE b/source/vendor/symfony/contracts/Translation/LICENSE deleted file mode 100644 index 69d925b..0000000 --- a/source/vendor/symfony/contracts/Translation/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2018-2020 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/source/vendor/symfony/contracts/Translation/LocaleAwareInterface.php b/source/vendor/symfony/contracts/Translation/LocaleAwareInterface.php deleted file mode 100644 index dbd8894..0000000 --- a/source/vendor/symfony/contracts/Translation/LocaleAwareInterface.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Translation; - -interface LocaleAwareInterface -{ - /** - * Sets the current locale. - * - * @param string $locale The locale - * - * @throws \InvalidArgumentException If the locale contains invalid characters - */ - public function setLocale($locale); - - /** - * Returns the current locale. - * - * @return string The locale - */ - public function getLocale(); -} diff --git a/source/vendor/symfony/contracts/Translation/README.md b/source/vendor/symfony/contracts/Translation/README.md deleted file mode 100644 index 6c693ce..0000000 --- a/source/vendor/symfony/contracts/Translation/README.md +++ /dev/null @@ -1,9 +0,0 @@ -Symfony Translation Contracts -============================= - -A set of abstractions extracted out of the Symfony components. - -Can be used to build on semantics that the Symfony components proved useful - and -that already have battle tested implementations. - -See https://github.com/symfony/contracts/blob/master/README.md for more information. diff --git a/source/vendor/symfony/contracts/Translation/TranslatorInterface.php b/source/vendor/symfony/contracts/Translation/TranslatorInterface.php deleted file mode 100644 index d867637..0000000 --- a/source/vendor/symfony/contracts/Translation/TranslatorInterface.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Translation; - -/** - * @author Fabien Potencier - */ -interface TranslatorInterface -{ - /** - * Translates the given message. - * - * When a number is provided as a parameter named "%count%", the message is parsed for plural - * forms and a translation is chosen according to this number using the following rules: - * - * Given a message with different plural translations separated by a - * pipe (|), this method returns the correct portion of the message based - * on the given number, locale and the pluralization rules in the message - * itself. - * - * The message supports two different types of pluralization rules: - * - * interval: {0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples - * indexed: There is one apple|There are %count% apples - * - * The indexed solution can also contain labels (e.g. one: There is one apple). - * This is purely for making the translations more clear - it does not - * affect the functionality. - * - * The two methods can also be mixed: - * {0} There are no apples|one: There is one apple|more: There are %count% apples - * - * An interval can represent a finite set of numbers: - * {1,2,3,4} - * - * An interval can represent numbers between two numbers: - * [1, +Inf] - * ]-1,2[ - * - * The left delimiter can be [ (inclusive) or ] (exclusive). - * The right delimiter can be [ (exclusive) or ] (inclusive). - * Beside numbers, you can use -Inf and +Inf for the infinite. - * - * @see https://en.wikipedia.org/wiki/ISO_31-11 - * - * @param string $id The message id (may also be an object that can be cast to string) - * @param array $parameters An array of parameters for the message - * @param string|null $domain The domain for the message or null to use the default - * @param string|null $locale The locale or null to use the default - * - * @return string The translated string - * - * @throws \InvalidArgumentException If the locale contains invalid characters - */ - public function trans($id, array $parameters = [], $domain = null, $locale = null); -} diff --git a/source/vendor/symfony/contracts/Translation/TranslatorTrait.php b/source/vendor/symfony/contracts/Translation/TranslatorTrait.php deleted file mode 100644 index ee026e2..0000000 --- a/source/vendor/symfony/contracts/Translation/TranslatorTrait.php +++ /dev/null @@ -1,257 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Translation; - -use Symfony\Component\Translation\Exception\InvalidArgumentException; - -/** - * A trait to help implement TranslatorInterface and LocaleAwareInterface. - * - * @author Fabien Potencier - */ -trait TranslatorTrait -{ - private $locale; - - /** - * {@inheritdoc} - */ - public function setLocale($locale) - { - $this->locale = (string) $locale; - } - - /** - * {@inheritdoc} - */ - public function getLocale() - { - return $this->locale ?: \Locale::getDefault(); - } - - /** - * {@inheritdoc} - */ - public function trans($id, array $parameters = [], $domain = null, $locale = null) - { - if ('' === $id = (string) $id) { - return ''; - } - - if (!isset($parameters['%count%']) || !is_numeric($parameters['%count%'])) { - return strtr($id, $parameters); - } - - $number = (float) $parameters['%count%']; - $locale = (string) $locale ?: $this->getLocale(); - - $parts = []; - if (preg_match('/^\|++$/', $id)) { - $parts = explode('|', $id); - } elseif (preg_match_all('/(?:\|\||[^\|])++/', $id, $matches)) { - $parts = $matches[0]; - } - - $intervalRegexp = <<<'EOF' -/^(?P - ({\s* - (\-?\d+(\.\d+)?[\s*,\s*\-?\d+(\.\d+)?]*) - \s*}) - - | - - (?P[\[\]]) - \s* - (?P-Inf|\-?\d+(\.\d+)?) - \s*,\s* - (?P\+?Inf|\-?\d+(\.\d+)?) - \s* - (?P[\[\]]) -)\s*(?P.*?)$/xs -EOF; - - $standardRules = []; - foreach ($parts as $part) { - $part = trim(str_replace('||', '|', $part)); - - // try to match an explicit rule, then fallback to the standard ones - if (preg_match($intervalRegexp, $part, $matches)) { - if ($matches[2]) { - foreach (explode(',', $matches[3]) as $n) { - if ($number == $n) { - return strtr($matches['message'], $parameters); - } - } - } else { - $leftNumber = '-Inf' === $matches['left'] ? -\INF : (float) $matches['left']; - $rightNumber = is_numeric($matches['right']) ? (float) $matches['right'] : \INF; - - if (('[' === $matches['left_delimiter'] ? $number >= $leftNumber : $number > $leftNumber) - && (']' === $matches['right_delimiter'] ? $number <= $rightNumber : $number < $rightNumber) - ) { - return strtr($matches['message'], $parameters); - } - } - } elseif (preg_match('/^\w+\:\s*(.*?)$/', $part, $matches)) { - $standardRules[] = $matches[1]; - } else { - $standardRules[] = $part; - } - } - - $position = $this->getPluralizationRule($number, $locale); - - if (!isset($standardRules[$position])) { - // when there's exactly one rule given, and that rule is a standard - // rule, use this rule - if (1 === \count($parts) && isset($standardRules[0])) { - return strtr($standardRules[0], $parameters); - } - - $message = sprintf('Unable to choose a translation for "%s" with locale "%s" for value "%d". Double check that this translation has the correct plural options (e.g. "There is one apple|There are %%count%% apples").', $id, $locale, $number); - - if (class_exists(InvalidArgumentException::class)) { - throw new InvalidArgumentException($message); - } - - throw new \InvalidArgumentException($message); - } - - return strtr($standardRules[$position], $parameters); - } - - /** - * Returns the plural position to use for the given locale and number. - * - * The plural rules are derived from code of the Zend Framework (2010-09-25), - * which is subject to the new BSD license (http://framework.zend.com/license/new-bsd). - * Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) - */ - private function getPluralizationRule(int $number, string $locale): int - { - switch ('pt_BR' !== $locale && \strlen($locale) > 3 ? substr($locale, 0, strrpos($locale, '_')) : $locale) { - case 'af': - case 'bn': - case 'bg': - case 'ca': - case 'da': - case 'de': - case 'el': - case 'en': - case 'eo': - case 'es': - case 'et': - case 'eu': - case 'fa': - case 'fi': - case 'fo': - case 'fur': - case 'fy': - case 'gl': - case 'gu': - case 'ha': - case 'he': - case 'hu': - case 'is': - case 'it': - case 'ku': - case 'lb': - case 'ml': - case 'mn': - case 'mr': - case 'nah': - case 'nb': - case 'ne': - case 'nl': - case 'nn': - case 'no': - case 'oc': - case 'om': - case 'or': - case 'pa': - case 'pap': - case 'ps': - case 'pt': - case 'so': - case 'sq': - case 'sv': - case 'sw': - case 'ta': - case 'te': - case 'tk': - case 'ur': - case 'zu': - return (1 == $number) ? 0 : 1; - - case 'am': - case 'bh': - case 'fil': - case 'fr': - case 'gun': - case 'hi': - case 'hy': - case 'ln': - case 'mg': - case 'nso': - case 'pt_BR': - case 'ti': - case 'wa': - return ((0 == $number) || (1 == $number)) ? 0 : 1; - - case 'be': - case 'bs': - case 'hr': - case 'ru': - case 'sh': - case 'sr': - case 'uk': - return ((1 == $number % 10) && (11 != $number % 100)) ? 0 : ((($number % 10 >= 2) && ($number % 10 <= 4) && (($number % 100 < 10) || ($number % 100 >= 20))) ? 1 : 2); - - case 'cs': - case 'sk': - return (1 == $number) ? 0 : ((($number >= 2) && ($number <= 4)) ? 1 : 2); - - case 'ga': - return (1 == $number) ? 0 : ((2 == $number) ? 1 : 2); - - case 'lt': - return ((1 == $number % 10) && (11 != $number % 100)) ? 0 : ((($number % 10 >= 2) && (($number % 100 < 10) || ($number % 100 >= 20))) ? 1 : 2); - - case 'sl': - return (1 == $number % 100) ? 0 : ((2 == $number % 100) ? 1 : (((3 == $number % 100) || (4 == $number % 100)) ? 2 : 3)); - - case 'mk': - return (1 == $number % 10) ? 0 : 1; - - case 'mt': - return (1 == $number) ? 0 : (((0 == $number) || (($number % 100 > 1) && ($number % 100 < 11))) ? 1 : ((($number % 100 > 10) && ($number % 100 < 20)) ? 2 : 3)); - - case 'lv': - return (0 == $number) ? 0 : (((1 == $number % 10) && (11 != $number % 100)) ? 1 : 2); - - case 'pl': - return (1 == $number) ? 0 : ((($number % 10 >= 2) && ($number % 10 <= 4) && (($number % 100 < 12) || ($number % 100 > 14))) ? 1 : 2); - - case 'cy': - return (1 == $number) ? 0 : ((2 == $number) ? 1 : (((8 == $number) || (11 == $number)) ? 2 : 3)); - - case 'ro': - return (1 == $number) ? 0 : (((0 == $number) || (($number % 100 > 0) && ($number % 100 < 20))) ? 1 : 2); - - case 'ar': - return (0 == $number) ? 0 : ((1 == $number) ? 1 : ((2 == $number) ? 2 : ((($number % 100 >= 3) && ($number % 100 <= 10)) ? 3 : ((($number % 100 >= 11) && ($number % 100 <= 99)) ? 4 : 5)))); - - default: - return 0; - } - } -} diff --git a/source/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php b/source/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php deleted file mode 100644 index e79d1a8..0000000 --- a/source/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php +++ /dev/null @@ -1,407 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\EventDispatcher\Debug; - -use Psr\EventDispatcher\StoppableEventInterface; -use Psr\Log\LoggerInterface; -use Symfony\Component\EventDispatcher\Event; -use Symfony\Component\EventDispatcher\EventDispatcherInterface; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\EventDispatcher\LegacyEventDispatcherProxy; -use Symfony\Component\EventDispatcher\LegacyEventProxy; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\Stopwatch\Stopwatch; -use Symfony\Contracts\EventDispatcher\Event as ContractsEvent; - -/** - * Collects some data about event listeners. - * - * This event dispatcher delegates the dispatching to another one. - * - * @author Fabien Potencier - */ -class TraceableEventDispatcher implements TraceableEventDispatcherInterface -{ - protected $logger; - protected $stopwatch; - - private $callStack; - private $dispatcher; - private $wrappedListeners; - private $orphanedEvents; - private $requestStack; - private $currentRequestHash = ''; - - public function __construct(EventDispatcherInterface $dispatcher, Stopwatch $stopwatch, LoggerInterface $logger = null, RequestStack $requestStack = null) - { - $this->dispatcher = LegacyEventDispatcherProxy::decorate($dispatcher); - $this->stopwatch = $stopwatch; - $this->logger = $logger; - $this->wrappedListeners = []; - $this->orphanedEvents = []; - $this->requestStack = $requestStack; - } - - /** - * {@inheritdoc} - */ - public function addListener($eventName, $listener, $priority = 0) - { - $this->dispatcher->addListener($eventName, $listener, $priority); - } - - /** - * {@inheritdoc} - */ - public function addSubscriber(EventSubscriberInterface $subscriber) - { - $this->dispatcher->addSubscriber($subscriber); - } - - /** - * {@inheritdoc} - */ - public function removeListener($eventName, $listener) - { - if (isset($this->wrappedListeners[$eventName])) { - foreach ($this->wrappedListeners[$eventName] as $index => $wrappedListener) { - if ($wrappedListener->getWrappedListener() === $listener) { - $listener = $wrappedListener; - unset($this->wrappedListeners[$eventName][$index]); - break; - } - } - } - - return $this->dispatcher->removeListener($eventName, $listener); - } - - /** - * {@inheritdoc} - */ - public function removeSubscriber(EventSubscriberInterface $subscriber) - { - return $this->dispatcher->removeSubscriber($subscriber); - } - - /** - * {@inheritdoc} - */ - public function getListeners($eventName = null) - { - return $this->dispatcher->getListeners($eventName); - } - - /** - * {@inheritdoc} - */ - public function getListenerPriority($eventName, $listener) - { - // we might have wrapped listeners for the event (if called while dispatching) - // in that case get the priority by wrapper - if (isset($this->wrappedListeners[$eventName])) { - foreach ($this->wrappedListeners[$eventName] as $index => $wrappedListener) { - if ($wrappedListener->getWrappedListener() === $listener) { - return $this->dispatcher->getListenerPriority($eventName, $wrappedListener); - } - } - } - - return $this->dispatcher->getListenerPriority($eventName, $listener); - } - - /** - * {@inheritdoc} - */ - public function hasListeners($eventName = null) - { - return $this->dispatcher->hasListeners($eventName); - } - - /** - * {@inheritdoc} - * - * @param string|null $eventName - */ - public function dispatch($event/*, string $eventName = null*/) - { - if (null === $this->callStack) { - $this->callStack = new \SplObjectStorage(); - } - - $currentRequestHash = $this->currentRequestHash = $this->requestStack && ($request = $this->requestStack->getCurrentRequest()) ? spl_object_hash($request) : ''; - $eventName = 1 < \func_num_args() ? func_get_arg(1) : null; - - if (\is_object($event)) { - $eventName = $eventName ?? \get_class($event); - } else { - @trigger_error(sprintf('Calling the "%s::dispatch()" method with the event name as first argument is deprecated since Symfony 4.3, pass it second and provide the event object first instead.', EventDispatcherInterface::class), \E_USER_DEPRECATED); - $swap = $event; - $event = $eventName ?? new Event(); - $eventName = $swap; - - if (!$event instanceof Event) { - throw new \TypeError(sprintf('Argument 1 passed to "%s::dispatch()" must be an instance of "%s", "%s" given.', EventDispatcherInterface::class, Event::class, \is_object($event) ? \get_class($event) : \gettype($event))); - } - } - - if (null !== $this->logger && ($event instanceof Event || $event instanceof ContractsEvent || $event instanceof StoppableEventInterface) && $event->isPropagationStopped()) { - $this->logger->debug(sprintf('The "%s" event is already stopped. No listeners have been called.', $eventName)); - } - - $this->preProcess($eventName); - try { - $this->beforeDispatch($eventName, $event); - try { - $e = $this->stopwatch->start($eventName, 'section'); - try { - $this->dispatcher->dispatch($event, $eventName); - } finally { - if ($e->isStarted()) { - $e->stop(); - } - } - } finally { - $this->afterDispatch($eventName, $event); - } - } finally { - $this->currentRequestHash = $currentRequestHash; - $this->postProcess($eventName); - } - - return $event; - } - - /** - * {@inheritdoc} - * - * @param Request|null $request The request to get listeners for - */ - public function getCalledListeners(/* Request $request = null */) - { - if (null === $this->callStack) { - return []; - } - - $hash = 1 <= \func_num_args() && null !== ($request = func_get_arg(0)) ? spl_object_hash($request) : null; - $called = []; - foreach ($this->callStack as $listener) { - [$eventName, $requestHash] = $this->callStack->getInfo(); - if (null === $hash || $hash === $requestHash) { - $called[] = $listener->getInfo($eventName); - } - } - - return $called; - } - - /** - * {@inheritdoc} - * - * @param Request|null $request The request to get listeners for - */ - public function getNotCalledListeners(/* Request $request = null */) - { - try { - $allListeners = $this->getListeners(); - } catch (\Exception $e) { - if (null !== $this->logger) { - $this->logger->info('An exception was thrown while getting the uncalled listeners.', ['exception' => $e]); - } - - // unable to retrieve the uncalled listeners - return []; - } - - $hash = 1 <= \func_num_args() && null !== ($request = func_get_arg(0)) ? spl_object_hash($request) : null; - $calledListeners = []; - - if (null !== $this->callStack) { - foreach ($this->callStack as $calledListener) { - [, $requestHash] = $this->callStack->getInfo(); - - if (null === $hash || $hash === $requestHash) { - $calledListeners[] = $calledListener->getWrappedListener(); - } - } - } - - $notCalled = []; - foreach ($allListeners as $eventName => $listeners) { - foreach ($listeners as $listener) { - if (!\in_array($listener, $calledListeners, true)) { - if (!$listener instanceof WrappedListener) { - $listener = new WrappedListener($listener, null, $this->stopwatch, $this); - } - $notCalled[] = $listener->getInfo($eventName); - } - } - } - - uasort($notCalled, [$this, 'sortNotCalledListeners']); - - return $notCalled; - } - - /** - * @param Request|null $request The request to get orphaned events for - */ - public function getOrphanedEvents(/* Request $request = null */): array - { - if (1 <= \func_num_args() && null !== $request = func_get_arg(0)) { - return $this->orphanedEvents[spl_object_hash($request)] ?? []; - } - - if (!$this->orphanedEvents) { - return []; - } - - return array_merge(...array_values($this->orphanedEvents)); - } - - public function reset() - { - $this->callStack = null; - $this->orphanedEvents = []; - $this->currentRequestHash = ''; - } - - /** - * Proxies all method calls to the original event dispatcher. - * - * @param string $method The method name - * @param array $arguments The method arguments - * - * @return mixed - */ - public function __call($method, $arguments) - { - return $this->dispatcher->{$method}(...$arguments); - } - - /** - * Called before dispatching the event. - * - * @param object $event - */ - protected function beforeDispatch(string $eventName, $event) - { - $this->preDispatch($eventName, $event instanceof Event ? $event : new LegacyEventProxy($event)); - } - - /** - * Called after dispatching the event. - * - * @param object $event - */ - protected function afterDispatch(string $eventName, $event) - { - $this->postDispatch($eventName, $event instanceof Event ? $event : new LegacyEventProxy($event)); - } - - /** - * @deprecated since Symfony 4.3, will be removed in 5.0, use beforeDispatch instead - */ - protected function preDispatch($eventName, Event $event) - { - } - - /** - * @deprecated since Symfony 4.3, will be removed in 5.0, use afterDispatch instead - */ - protected function postDispatch($eventName, Event $event) - { - } - - private function preProcess(string $eventName) - { - if (!$this->dispatcher->hasListeners($eventName)) { - $this->orphanedEvents[$this->currentRequestHash][] = $eventName; - - return; - } - - foreach ($this->dispatcher->getListeners($eventName) as $listener) { - $priority = $this->getListenerPriority($eventName, $listener); - $wrappedListener = new WrappedListener($listener instanceof WrappedListener ? $listener->getWrappedListener() : $listener, null, $this->stopwatch, $this); - $this->wrappedListeners[$eventName][] = $wrappedListener; - $this->dispatcher->removeListener($eventName, $listener); - $this->dispatcher->addListener($eventName, $wrappedListener, $priority); - $this->callStack->attach($wrappedListener, [$eventName, $this->currentRequestHash]); - } - } - - private function postProcess(string $eventName) - { - unset($this->wrappedListeners[$eventName]); - $skipped = false; - foreach ($this->dispatcher->getListeners($eventName) as $listener) { - if (!$listener instanceof WrappedListener) { // #12845: a new listener was added during dispatch. - continue; - } - // Unwrap listener - $priority = $this->getListenerPriority($eventName, $listener); - $this->dispatcher->removeListener($eventName, $listener); - $this->dispatcher->addListener($eventName, $listener->getWrappedListener(), $priority); - - if (null !== $this->logger) { - $context = ['event' => $eventName, 'listener' => $listener->getPretty()]; - } - - if ($listener->wasCalled()) { - if (null !== $this->logger) { - $this->logger->debug('Notified event "{event}" to listener "{listener}".', $context); - } - } else { - $this->callStack->detach($listener); - } - - if (null !== $this->logger && $skipped) { - $this->logger->debug('Listener "{listener}" was not called for event "{event}".', $context); - } - - if ($listener->stoppedPropagation()) { - if (null !== $this->logger) { - $this->logger->debug('Listener "{listener}" stopped propagation of the event "{event}".', $context); - } - - $skipped = true; - } - } - } - - private function sortNotCalledListeners(array $a, array $b) - { - if (0 !== $cmp = strcmp($a['event'], $b['event'])) { - return $cmp; - } - - if (\is_int($a['priority']) && !\is_int($b['priority'])) { - return 1; - } - - if (!\is_int($a['priority']) && \is_int($b['priority'])) { - return -1; - } - - if ($a['priority'] === $b['priority']) { - return 0; - } - - if ($a['priority'] > $b['priority']) { - return -1; - } - - return 1; - } -} diff --git a/source/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcherInterface.php b/source/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcherInterface.php deleted file mode 100644 index 4fedb9a..0000000 --- a/source/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcherInterface.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\EventDispatcher\Debug; - -use Symfony\Component\EventDispatcher\EventDispatcherInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Contracts\Service\ResetInterface; - -/** - * @deprecated since Symfony 4.1 - * - * @author Fabien Potencier - */ -interface TraceableEventDispatcherInterface extends EventDispatcherInterface, ResetInterface -{ - /** - * Gets the called listeners. - * - * @param Request|null $request The request to get listeners for - * - * @return array An array of called listeners - */ - public function getCalledListeners(/* Request $request = null */); - - /** - * Gets the not called listeners. - * - * @param Request|null $request The request to get listeners for - * - * @return array An array of not called listeners - */ - public function getNotCalledListeners(/* Request $request = null */); -} diff --git a/source/vendor/symfony/event-dispatcher/Debug/WrappedListener.php b/source/vendor/symfony/event-dispatcher/Debug/WrappedListener.php deleted file mode 100644 index 9b910e6..0000000 --- a/source/vendor/symfony/event-dispatcher/Debug/WrappedListener.php +++ /dev/null @@ -1,136 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\EventDispatcher\Debug; - -use Psr\EventDispatcher\StoppableEventInterface; -use Symfony\Component\EventDispatcher\Event; -use Symfony\Component\EventDispatcher\EventDispatcherInterface; -use Symfony\Component\EventDispatcher\LegacyEventProxy; -use Symfony\Component\Stopwatch\Stopwatch; -use Symfony\Component\VarDumper\Caster\ClassStub; -use Symfony\Contracts\EventDispatcher\Event as ContractsEvent; - -/** - * @author Fabien Potencier - * - * @final since Symfony 4.3: the "Event" type-hint on __invoke() will be replaced by "object" in 5.0 - */ -class WrappedListener -{ - private $listener; - private $optimizedListener; - private $name; - private $called; - private $stoppedPropagation; - private $stopwatch; - private $dispatcher; - private $pretty; - private $stub; - private $priority; - private static $hasClassStub; - - public function __construct($listener, ?string $name, Stopwatch $stopwatch, EventDispatcherInterface $dispatcher = null) - { - $this->listener = $listener; - $this->optimizedListener = $listener instanceof \Closure ? $listener : (\is_callable($listener) ? \Closure::fromCallable($listener) : null); - $this->stopwatch = $stopwatch; - $this->dispatcher = $dispatcher; - $this->called = false; - $this->stoppedPropagation = false; - - if (\is_array($listener)) { - $this->name = \is_object($listener[0]) ? \get_class($listener[0]) : $listener[0]; - $this->pretty = $this->name.'::'.$listener[1]; - } elseif ($listener instanceof \Closure) { - $r = new \ReflectionFunction($listener); - if (str_contains($r->name, '{closure}')) { - $this->pretty = $this->name = 'closure'; - } elseif ($class = $r->getClosureScopeClass()) { - $this->name = $class->name; - $this->pretty = $this->name.'::'.$r->name; - } else { - $this->pretty = $this->name = $r->name; - } - } elseif (\is_string($listener)) { - $this->pretty = $this->name = $listener; - } else { - $this->name = \get_class($listener); - $this->pretty = $this->name.'::__invoke'; - } - - if (null !== $name) { - $this->name = $name; - } - - if (null === self::$hasClassStub) { - self::$hasClassStub = class_exists(ClassStub::class); - } - } - - public function getWrappedListener() - { - return $this->listener; - } - - public function wasCalled() - { - return $this->called; - } - - public function stoppedPropagation() - { - return $this->stoppedPropagation; - } - - public function getPretty() - { - return $this->pretty; - } - - public function getInfo($eventName) - { - if (null === $this->stub) { - $this->stub = self::$hasClassStub ? new ClassStub($this->pretty.'()', $this->listener) : $this->pretty.'()'; - } - - return [ - 'event' => $eventName, - 'priority' => null !== $this->priority ? $this->priority : (null !== $this->dispatcher ? $this->dispatcher->getListenerPriority($eventName, $this->listener) : null), - 'pretty' => $this->pretty, - 'stub' => $this->stub, - ]; - } - - public function __invoke(Event $event, $eventName, EventDispatcherInterface $dispatcher) - { - if ($event instanceof LegacyEventProxy) { - $event = $event->getEvent(); - } - - $dispatcher = $this->dispatcher ?: $dispatcher; - - $this->called = true; - $this->priority = $dispatcher->getListenerPriority($eventName, $this->listener); - - $e = $this->stopwatch->start($this->name, 'event_listener'); - - ($this->optimizedListener ?? $this->listener)($event, $eventName, $dispatcher); - - if ($e->isStarted()) { - $e->stop(); - } - - if (($event instanceof Event || $event instanceof ContractsEvent || $event instanceof StoppableEventInterface) && $event->isPropagationStopped()) { - $this->stoppedPropagation = true; - } - } -} diff --git a/source/vendor/symfony/event-dispatcher/DependencyInjection/AddEventAliasesPass.php b/source/vendor/symfony/event-dispatcher/DependencyInjection/AddEventAliasesPass.php deleted file mode 100644 index c4ea50f..0000000 --- a/source/vendor/symfony/event-dispatcher/DependencyInjection/AddEventAliasesPass.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\EventDispatcher\DependencyInjection; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * This pass allows bundles to extend the list of event aliases. - * - * @author Alexander M. Turek - */ -class AddEventAliasesPass implements CompilerPassInterface -{ - private $eventAliases; - private $eventAliasesParameter; - - public function __construct(array $eventAliases, string $eventAliasesParameter = 'event_dispatcher.event_aliases') - { - $this->eventAliases = $eventAliases; - $this->eventAliasesParameter = $eventAliasesParameter; - } - - public function process(ContainerBuilder $container): void - { - $eventAliases = $container->hasParameter($this->eventAliasesParameter) ? $container->getParameter($this->eventAliasesParameter) : []; - - $container->setParameter( - $this->eventAliasesParameter, - array_merge($eventAliases, $this->eventAliases) - ); - } -} diff --git a/source/vendor/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php b/source/vendor/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php deleted file mode 100644 index 1c4e12e..0000000 --- a/source/vendor/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php +++ /dev/null @@ -1,178 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\EventDispatcher\DependencyInjection; - -use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\EventDispatcher\Event as LegacyEvent; -use Symfony\Component\EventDispatcher\EventDispatcher; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Contracts\EventDispatcher\Event; - -/** - * Compiler pass to register tagged services for an event dispatcher. - */ -class RegisterListenersPass implements CompilerPassInterface -{ - protected $dispatcherService; - protected $listenerTag; - protected $subscriberTag; - protected $eventAliasesParameter; - - private $hotPathEvents = []; - private $hotPathTagName; - - public function __construct(string $dispatcherService = 'event_dispatcher', string $listenerTag = 'kernel.event_listener', string $subscriberTag = 'kernel.event_subscriber', string $eventAliasesParameter = 'event_dispatcher.event_aliases') - { - $this->dispatcherService = $dispatcherService; - $this->listenerTag = $listenerTag; - $this->subscriberTag = $subscriberTag; - $this->eventAliasesParameter = $eventAliasesParameter; - } - - public function setHotPathEvents(array $hotPathEvents, $tagName = 'container.hot_path') - { - $this->hotPathEvents = array_flip($hotPathEvents); - $this->hotPathTagName = $tagName; - - return $this; - } - - public function process(ContainerBuilder $container) - { - if (!$container->hasDefinition($this->dispatcherService) && !$container->hasAlias($this->dispatcherService)) { - return; - } - - $aliases = []; - - if ($container->hasParameter($this->eventAliasesParameter)) { - $aliases = $container->getParameter($this->eventAliasesParameter); - } - - $definition = $container->findDefinition($this->dispatcherService); - - foreach ($container->findTaggedServiceIds($this->listenerTag, true) as $id => $events) { - foreach ($events as $event) { - $priority = $event['priority'] ?? 0; - - if (!isset($event['event'])) { - if ($container->getDefinition($id)->hasTag($this->subscriberTag)) { - continue; - } - - $event['method'] = $event['method'] ?? '__invoke'; - $event['event'] = $this->getEventFromTypeDeclaration($container, $id, $event['method']); - } - - $event['event'] = $aliases[$event['event']] ?? $event['event']; - - if (!isset($event['method'])) { - $event['method'] = 'on'.preg_replace_callback([ - '/(?<=\b|_)[a-z]/i', - '/[^a-z0-9]/i', - ], function ($matches) { return strtoupper($matches[0]); }, $event['event']); - $event['method'] = preg_replace('/[^a-z0-9]/i', '', $event['method']); - - if (null !== ($class = $container->getDefinition($id)->getClass()) && ($r = $container->getReflectionClass($class, false)) && !$r->hasMethod($event['method']) && $r->hasMethod('__invoke')) { - $event['method'] = '__invoke'; - } - } - - $definition->addMethodCall('addListener', [$event['event'], [new ServiceClosureArgument(new Reference($id)), $event['method']], $priority]); - - if (isset($this->hotPathEvents[$event['event']])) { - $container->getDefinition($id)->addTag($this->hotPathTagName); - } - } - } - - $extractingDispatcher = new ExtractingEventDispatcher(); - - foreach ($container->findTaggedServiceIds($this->subscriberTag, true) as $id => $attributes) { - $def = $container->getDefinition($id); - - // We must assume that the class value has been correctly filled, even if the service is created by a factory - $class = $def->getClass(); - - if (!$r = $container->getReflectionClass($class)) { - throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id)); - } - if (!$r->isSubclassOf(EventSubscriberInterface::class)) { - throw new InvalidArgumentException(sprintf('Service "%s" must implement interface "%s".', $id, EventSubscriberInterface::class)); - } - $class = $r->name; - - ExtractingEventDispatcher::$aliases = $aliases; - ExtractingEventDispatcher::$subscriber = $class; - $extractingDispatcher->addSubscriber($extractingDispatcher); - foreach ($extractingDispatcher->listeners as $args) { - $args[1] = [new ServiceClosureArgument(new Reference($id)), $args[1]]; - $definition->addMethodCall('addListener', $args); - - if (isset($this->hotPathEvents[$args[0]])) { - $container->getDefinition($id)->addTag($this->hotPathTagName); - } - } - $extractingDispatcher->listeners = []; - ExtractingEventDispatcher::$aliases = []; - } - } - - private function getEventFromTypeDeclaration(ContainerBuilder $container, string $id, string $method): string - { - if ( - null === ($class = $container->getDefinition($id)->getClass()) - || !($r = $container->getReflectionClass($class, false)) - || !$r->hasMethod($method) - || 1 > ($m = $r->getMethod($method))->getNumberOfParameters() - || !($type = $m->getParameters()[0]->getType()) instanceof \ReflectionNamedType - || $type->isBuiltin() - || Event::class === ($name = $type->getName()) - || LegacyEvent::class === $name - ) { - throw new InvalidArgumentException(sprintf('Service "%s" must define the "event" attribute on "%s" tags.', $id, $this->listenerTag)); - } - - return $name; - } -} - -/** - * @internal - */ -class ExtractingEventDispatcher extends EventDispatcher implements EventSubscriberInterface -{ - public $listeners = []; - - public static $aliases = []; - public static $subscriber; - - public function addListener($eventName, $listener, $priority = 0) - { - $this->listeners[] = [$eventName, $listener[1], $priority]; - } - - public static function getSubscribedEvents(): array - { - $events = []; - - foreach ([self::$subscriber, 'getSubscribedEvents']() as $eventName => $params) { - $events[self::$aliases[$eventName] ?? $eventName] = $params; - } - - return $events; - } -} diff --git a/source/vendor/symfony/event-dispatcher/Event.php b/source/vendor/symfony/event-dispatcher/Event.php deleted file mode 100644 index 307c4be..0000000 --- a/source/vendor/symfony/event-dispatcher/Event.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\EventDispatcher; - -/** - * @deprecated since Symfony 4.3, use "Symfony\Contracts\EventDispatcher\Event" instead - */ -class Event -{ - private $propagationStopped = false; - - /** - * @return bool Whether propagation was already stopped for this event - * - * @deprecated since Symfony 4.3, use "Symfony\Contracts\EventDispatcher\Event" instead - */ - public function isPropagationStopped() - { - return $this->propagationStopped; - } - - /** - * @deprecated since Symfony 4.3, use "Symfony\Contracts\EventDispatcher\Event" instead - */ - public function stopPropagation() - { - $this->propagationStopped = true; - } -} diff --git a/source/vendor/symfony/event-dispatcher/EventDispatcher.php b/source/vendor/symfony/event-dispatcher/EventDispatcher.php deleted file mode 100644 index 8b62227..0000000 --- a/source/vendor/symfony/event-dispatcher/EventDispatcher.php +++ /dev/null @@ -1,314 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\EventDispatcher; - -use Psr\EventDispatcher\StoppableEventInterface; -use Symfony\Component\EventDispatcher\Debug\WrappedListener; -use Symfony\Contracts\EventDispatcher\Event as ContractsEvent; - -/** - * The EventDispatcherInterface is the central point of Symfony's event listener system. - * - * Listeners are registered on the manager and events are dispatched through the - * manager. - * - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - * @author Bernhard Schussek - * @author Fabien Potencier - * @author Jordi Boggiano - * @author Jordan Alliot - * @author Nicolas Grekas - */ -class EventDispatcher implements EventDispatcherInterface -{ - private $listeners = []; - private $sorted = []; - private $optimized; - - public function __construct() - { - if (__CLASS__ === static::class) { - $this->optimized = []; - } - } - - /** - * {@inheritdoc} - * - * @param string|null $eventName - */ - public function dispatch($event/*, string $eventName = null*/) - { - $eventName = 1 < \func_num_args() ? func_get_arg(1) : null; - - if (\is_object($event)) { - $eventName = $eventName ?? \get_class($event); - } elseif (\is_string($event) && (null === $eventName || $eventName instanceof ContractsEvent || $eventName instanceof Event)) { - @trigger_error(sprintf('Calling the "%s::dispatch()" method with the event name as the first argument is deprecated since Symfony 4.3, pass it as the second argument and provide the event object as the first argument instead.', EventDispatcherInterface::class), \E_USER_DEPRECATED); - $swap = $event; - $event = $eventName ?? new Event(); - $eventName = $swap; - } else { - throw new \TypeError(sprintf('Argument 1 passed to "%s::dispatch()" must be an object, "%s" given.', EventDispatcherInterface::class, \is_object($event) ? \get_class($event) : \gettype($event))); - } - - if (null !== $this->optimized && null !== $eventName) { - $listeners = $this->optimized[$eventName] ?? (empty($this->listeners[$eventName]) ? [] : $this->optimizeListeners($eventName)); - } else { - $listeners = $this->getListeners($eventName); - } - - if ($listeners) { - $this->callListeners($listeners, $eventName, $event); - } - - return $event; - } - - /** - * {@inheritdoc} - */ - public function getListeners($eventName = null) - { - if (null !== $eventName) { - if (empty($this->listeners[$eventName])) { - return []; - } - - if (!isset($this->sorted[$eventName])) { - $this->sortListeners($eventName); - } - - return $this->sorted[$eventName]; - } - - foreach ($this->listeners as $eventName => $eventListeners) { - if (!isset($this->sorted[$eventName])) { - $this->sortListeners($eventName); - } - } - - return array_filter($this->sorted); - } - - /** - * {@inheritdoc} - */ - public function getListenerPriority($eventName, $listener) - { - if (empty($this->listeners[$eventName])) { - return null; - } - - if (\is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure && 2 >= \count($listener)) { - $listener[0] = $listener[0](); - $listener[1] = $listener[1] ?? '__invoke'; - } - - foreach ($this->listeners[$eventName] as $priority => &$listeners) { - foreach ($listeners as &$v) { - if ($v !== $listener && \is_array($v) && isset($v[0]) && $v[0] instanceof \Closure && 2 >= \count($v)) { - $v[0] = $v[0](); - $v[1] = $v[1] ?? '__invoke'; - } - if ($v === $listener) { - return $priority; - } - } - } - - return null; - } - - /** - * {@inheritdoc} - */ - public function hasListeners($eventName = null) - { - if (null !== $eventName) { - return !empty($this->listeners[$eventName]); - } - - foreach ($this->listeners as $eventListeners) { - if ($eventListeners) { - return true; - } - } - - return false; - } - - /** - * {@inheritdoc} - */ - public function addListener($eventName, $listener, $priority = 0) - { - $this->listeners[$eventName][$priority][] = $listener; - unset($this->sorted[$eventName], $this->optimized[$eventName]); - } - - /** - * {@inheritdoc} - */ - public function removeListener($eventName, $listener) - { - if (empty($this->listeners[$eventName])) { - return; - } - - if (\is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure && 2 >= \count($listener)) { - $listener[0] = $listener[0](); - $listener[1] = $listener[1] ?? '__invoke'; - } - - foreach ($this->listeners[$eventName] as $priority => &$listeners) { - foreach ($listeners as $k => &$v) { - if ($v !== $listener && \is_array($v) && isset($v[0]) && $v[0] instanceof \Closure && 2 >= \count($v)) { - $v[0] = $v[0](); - $v[1] = $v[1] ?? '__invoke'; - } - if ($v === $listener) { - unset($listeners[$k], $this->sorted[$eventName], $this->optimized[$eventName]); - } - } - - if (!$listeners) { - unset($this->listeners[$eventName][$priority]); - } - } - } - - /** - * {@inheritdoc} - */ - public function addSubscriber(EventSubscriberInterface $subscriber) - { - foreach ($subscriber->getSubscribedEvents() as $eventName => $params) { - if (\is_string($params)) { - $this->addListener($eventName, [$subscriber, $params]); - } elseif (\is_string($params[0])) { - $this->addListener($eventName, [$subscriber, $params[0]], $params[1] ?? 0); - } else { - foreach ($params as $listener) { - $this->addListener($eventName, [$subscriber, $listener[0]], $listener[1] ?? 0); - } - } - } - } - - /** - * {@inheritdoc} - */ - public function removeSubscriber(EventSubscriberInterface $subscriber) - { - foreach ($subscriber->getSubscribedEvents() as $eventName => $params) { - if (\is_array($params) && \is_array($params[0])) { - foreach ($params as $listener) { - $this->removeListener($eventName, [$subscriber, $listener[0]]); - } - } else { - $this->removeListener($eventName, [$subscriber, \is_string($params) ? $params : $params[0]]); - } - } - } - - /** - * Triggers the listeners of an event. - * - * This method can be overridden to add functionality that is executed - * for each listener. - * - * @param callable[] $listeners The event listeners - * @param string $eventName The name of the event to dispatch - * @param object $event The event object to pass to the event handlers/listeners - */ - protected function callListeners(iterable $listeners, string $eventName, $event) - { - if ($event instanceof Event) { - $this->doDispatch($listeners, $eventName, $event); - - return; - } - - $stoppable = $event instanceof ContractsEvent || $event instanceof StoppableEventInterface; - - foreach ($listeners as $listener) { - if ($stoppable && $event->isPropagationStopped()) { - break; - } - // @deprecated: the ternary operator is part of a BC layer and should be removed in 5.0 - $listener($listener instanceof WrappedListener ? new LegacyEventProxy($event) : $event, $eventName, $this); - } - } - - /** - * @deprecated since Symfony 4.3, use callListeners() instead - */ - protected function doDispatch($listeners, $eventName, Event $event) - { - foreach ($listeners as $listener) { - if ($event->isPropagationStopped()) { - break; - } - $listener($event, $eventName, $this); - } - } - - /** - * Sorts the internal list of listeners for the given event by priority. - */ - private function sortListeners(string $eventName) - { - krsort($this->listeners[$eventName]); - $this->sorted[$eventName] = []; - - foreach ($this->listeners[$eventName] as &$listeners) { - foreach ($listeners as $k => &$listener) { - if (\is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure && 2 >= \count($listener)) { - $listener[0] = $listener[0](); - $listener[1] = $listener[1] ?? '__invoke'; - } - $this->sorted[$eventName][] = $listener; - } - } - } - - /** - * Optimizes the internal list of listeners for the given event by priority. - */ - private function optimizeListeners(string $eventName): array - { - krsort($this->listeners[$eventName]); - $this->optimized[$eventName] = []; - - foreach ($this->listeners[$eventName] as &$listeners) { - foreach ($listeners as &$listener) { - $closure = &$this->optimized[$eventName][]; - if (\is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure && 2 >= \count($listener)) { - $closure = static function (...$args) use (&$listener, &$closure) { - if ($listener[0] instanceof \Closure) { - $listener[0] = $listener[0](); - $listener[1] = $listener[1] ?? '__invoke'; - } - ($closure = \Closure::fromCallable($listener))(...$args); - }; - } else { - $closure = $listener instanceof \Closure || $listener instanceof WrappedListener ? $listener : \Closure::fromCallable($listener); - } - } - } - - return $this->optimized[$eventName]; - } -} diff --git a/source/vendor/symfony/event-dispatcher/EventDispatcherInterface.php b/source/vendor/symfony/event-dispatcher/EventDispatcherInterface.php deleted file mode 100644 index ceaa62a..0000000 --- a/source/vendor/symfony/event-dispatcher/EventDispatcherInterface.php +++ /dev/null @@ -1,82 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\EventDispatcher; - -use Symfony\Contracts\EventDispatcher\EventDispatcherInterface as ContractsEventDispatcherInterface; - -/** - * The EventDispatcherInterface is the central point of Symfony's event listener system. - * Listeners are registered on the manager and events are dispatched through the - * manager. - * - * @author Bernhard Schussek - */ -interface EventDispatcherInterface extends ContractsEventDispatcherInterface -{ - /** - * Adds an event listener that listens on the specified events. - * - * @param string $eventName The event to listen on - * @param callable $listener The listener - * @param int $priority The higher this value, the earlier an event - * listener will be triggered in the chain (defaults to 0) - */ - public function addListener($eventName, $listener, $priority = 0); - - /** - * Adds an event subscriber. - * - * The subscriber is asked for all the events it is - * interested in and added as a listener for these events. - */ - public function addSubscriber(EventSubscriberInterface $subscriber); - - /** - * Removes an event listener from the specified events. - * - * @param string $eventName The event to remove a listener from - * @param callable $listener The listener to remove - */ - public function removeListener($eventName, $listener); - - public function removeSubscriber(EventSubscriberInterface $subscriber); - - /** - * Gets the listeners of a specific event or all listeners sorted by descending priority. - * - * @param string|null $eventName The name of the event - * - * @return array The event listeners for the specified event, or all event listeners by event name - */ - public function getListeners($eventName = null); - - /** - * Gets the listener priority for a specific event. - * - * Returns null if the event or the listener does not exist. - * - * @param string $eventName The name of the event - * @param callable $listener The listener - * - * @return int|null The event listener priority - */ - public function getListenerPriority($eventName, $listener); - - /** - * Checks whether an event has any registered listeners. - * - * @param string|null $eventName The name of the event - * - * @return bool true if the specified event has any listeners, false otherwise - */ - public function hasListeners($eventName = null); -} diff --git a/source/vendor/symfony/event-dispatcher/EventSubscriberInterface.php b/source/vendor/symfony/event-dispatcher/EventSubscriberInterface.php deleted file mode 100644 index a0fc96d..0000000 --- a/source/vendor/symfony/event-dispatcher/EventSubscriberInterface.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\EventDispatcher; - -/** - * An EventSubscriber knows itself what events it is interested in. - * If an EventSubscriber is added to an EventDispatcherInterface, the manager invokes - * {@link getSubscribedEvents} and registers the subscriber as a listener for all - * returned events. - * - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - * @author Bernhard Schussek - */ -interface EventSubscriberInterface -{ - /** - * Returns an array of event names this subscriber wants to listen to. - * - * The array keys are event names and the value can be: - * - * * The method name to call (priority defaults to 0) - * * An array composed of the method name to call and the priority - * * An array of arrays composed of the method names to call and respective - * priorities, or 0 if unset - * - * For instance: - * - * * ['eventName' => 'methodName'] - * * ['eventName' => ['methodName', $priority]] - * * ['eventName' => [['methodName1', $priority], ['methodName2']]] - * - * The code must not depend on runtime state as it will only be called at compile time. - * All logic depending on runtime state must be put into the individual methods handling the events. - * - * @return array The event names to listen to - */ - public static function getSubscribedEvents(); -} diff --git a/source/vendor/symfony/event-dispatcher/GenericEvent.php b/source/vendor/symfony/event-dispatcher/GenericEvent.php deleted file mode 100644 index 23333bc..0000000 --- a/source/vendor/symfony/event-dispatcher/GenericEvent.php +++ /dev/null @@ -1,184 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\EventDispatcher; - -/** - * Event encapsulation class. - * - * Encapsulates events thus decoupling the observer from the subject they encapsulate. - * - * @author Drak - */ -class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate -{ - protected $subject; - protected $arguments; - - /** - * Encapsulate an event with $subject and $args. - * - * @param mixed $subject The subject of the event, usually an object or a callable - * @param array $arguments Arguments to store in the event - */ - public function __construct($subject = null, array $arguments = []) - { - $this->subject = $subject; - $this->arguments = $arguments; - } - - /** - * Getter for subject property. - * - * @return mixed The observer subject - */ - public function getSubject() - { - return $this->subject; - } - - /** - * Get argument by key. - * - * @param string $key Key - * - * @return mixed Contents of array key - * - * @throws \InvalidArgumentException if key is not found - */ - public function getArgument($key) - { - if ($this->hasArgument($key)) { - return $this->arguments[$key]; - } - - throw new \InvalidArgumentException(sprintf('Argument "%s" not found.', $key)); - } - - /** - * Add argument to event. - * - * @param string $key Argument name - * @param mixed $value Value - * - * @return $this - */ - public function setArgument($key, $value) - { - $this->arguments[$key] = $value; - - return $this; - } - - /** - * Getter for all arguments. - * - * @return array - */ - public function getArguments() - { - return $this->arguments; - } - - /** - * Set args property. - * - * @param array $args Arguments - * - * @return $this - */ - public function setArguments(array $args = []) - { - $this->arguments = $args; - - return $this; - } - - /** - * Has argument. - * - * @param string $key Key of arguments array - * - * @return bool - */ - public function hasArgument($key) - { - return \array_key_exists($key, $this->arguments); - } - - /** - * ArrayAccess for argument getter. - * - * @param string $key Array key - * - * @return mixed - * - * @throws \InvalidArgumentException if key does not exist in $this->args - */ - #[\ReturnTypeWillChange] - public function offsetGet($key) - { - return $this->getArgument($key); - } - - /** - * ArrayAccess for argument setter. - * - * @param string $key Array key to set - * @param mixed $value Value - * - * @return void - */ - #[\ReturnTypeWillChange] - public function offsetSet($key, $value) - { - $this->setArgument($key, $value); - } - - /** - * ArrayAccess for unset argument. - * - * @param string $key Array key - * - * @return void - */ - #[\ReturnTypeWillChange] - public function offsetUnset($key) - { - if ($this->hasArgument($key)) { - unset($this->arguments[$key]); - } - } - - /** - * ArrayAccess has argument. - * - * @param string $key Array key - * - * @return bool - */ - #[\ReturnTypeWillChange] - public function offsetExists($key) - { - return $this->hasArgument($key); - } - - /** - * IteratorAggregate for iterating over the object like an array. - * - * @return \ArrayIterator - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - return new \ArrayIterator($this->arguments); - } -} diff --git a/source/vendor/symfony/event-dispatcher/ImmutableEventDispatcher.php b/source/vendor/symfony/event-dispatcher/ImmutableEventDispatcher.php deleted file mode 100644 index 75a7d73..0000000 --- a/source/vendor/symfony/event-dispatcher/ImmutableEventDispatcher.php +++ /dev/null @@ -1,102 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\EventDispatcher; - -/** - * A read-only proxy for an event dispatcher. - * - * @author Bernhard Schussek - */ -class ImmutableEventDispatcher implements EventDispatcherInterface -{ - private $dispatcher; - - public function __construct(EventDispatcherInterface $dispatcher) - { - $this->dispatcher = LegacyEventDispatcherProxy::decorate($dispatcher); - } - - /** - * {@inheritdoc} - * - * @param string|null $eventName - */ - public function dispatch($event/*, string $eventName = null*/) - { - $eventName = 1 < \func_num_args() ? func_get_arg(1) : null; - - if (is_scalar($event)) { - // deprecated - $swap = $event; - $event = $eventName ?? new Event(); - $eventName = $swap; - } - - return $this->dispatcher->dispatch($event, $eventName); - } - - /** - * {@inheritdoc} - */ - public function addListener($eventName, $listener, $priority = 0) - { - throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.'); - } - - /** - * {@inheritdoc} - */ - public function addSubscriber(EventSubscriberInterface $subscriber) - { - throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.'); - } - - /** - * {@inheritdoc} - */ - public function removeListener($eventName, $listener) - { - throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.'); - } - - /** - * {@inheritdoc} - */ - public function removeSubscriber(EventSubscriberInterface $subscriber) - { - throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.'); - } - - /** - * {@inheritdoc} - */ - public function getListeners($eventName = null) - { - return $this->dispatcher->getListeners($eventName); - } - - /** - * {@inheritdoc} - */ - public function getListenerPriority($eventName, $listener) - { - return $this->dispatcher->getListenerPriority($eventName, $listener); - } - - /** - * {@inheritdoc} - */ - public function hasListeners($eventName = null) - { - return $this->dispatcher->hasListeners($eventName); - } -} diff --git a/source/vendor/symfony/event-dispatcher/LICENSE b/source/vendor/symfony/event-dispatcher/LICENSE deleted file mode 100644 index 9ff2d0d..0000000 --- a/source/vendor/symfony/event-dispatcher/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2021 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/source/vendor/symfony/event-dispatcher/LegacyEventDispatcherProxy.php b/source/vendor/symfony/event-dispatcher/LegacyEventDispatcherProxy.php deleted file mode 100644 index 8ee6cba..0000000 --- a/source/vendor/symfony/event-dispatcher/LegacyEventDispatcherProxy.php +++ /dev/null @@ -1,147 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\EventDispatcher; - -use Psr\EventDispatcher\StoppableEventInterface; -use Symfony\Contracts\EventDispatcher\Event as ContractsEvent; -use Symfony\Contracts\EventDispatcher\EventDispatcherInterface as ContractsEventDispatcherInterface; - -/** - * A helper class to provide BC/FC with the legacy signature of EventDispatcherInterface::dispatch(). - * - * This class should be deprecated in Symfony 5.1 - * - * @author Nicolas Grekas - */ -final class LegacyEventDispatcherProxy implements EventDispatcherInterface -{ - private $dispatcher; - - public static function decorate(?ContractsEventDispatcherInterface $dispatcher): ?ContractsEventDispatcherInterface - { - if (null === $dispatcher) { - return null; - } - $r = new \ReflectionMethod($dispatcher, 'dispatch'); - $param2 = $r->getParameters()[1] ?? null; - - if (!$param2 || !$param2->hasType() || $param2->getType()->isBuiltin()) { - return $dispatcher; - } - - @trigger_error(sprintf('The signature of the "%s::dispatch()" method should be updated to "dispatch($event, string $eventName = null)", not doing so is deprecated since Symfony 4.3.', $r->class), \E_USER_DEPRECATED); - - $self = new self(); - $self->dispatcher = $dispatcher; - - return $self; - } - - /** - * {@inheritdoc} - * - * @param string|null $eventName - * - * @return object - */ - public function dispatch($event/*, string $eventName = null*/) - { - $eventName = 1 < \func_num_args() ? func_get_arg(1) : null; - - if (\is_object($event)) { - $eventName = $eventName ?? \get_class($event); - } elseif (\is_string($event) && (null === $eventName || $eventName instanceof ContractsEvent || $eventName instanceof Event)) { - @trigger_error(sprintf('Calling the "%s::dispatch()" method with the event name as the first argument is deprecated since Symfony 4.3, pass it as the second argument and provide the event object as the first argument instead.', ContractsEventDispatcherInterface::class), \E_USER_DEPRECATED); - $swap = $event; - $event = $eventName ?? new Event(); - $eventName = $swap; - } else { - throw new \TypeError(sprintf('Argument 1 passed to "%s::dispatch()" must be an object, "%s" given.', ContractsEventDispatcherInterface::class, \is_object($event) ? \get_class($event) : \gettype($event))); - } - - $listeners = $this->getListeners($eventName); - $stoppable = $event instanceof Event || $event instanceof ContractsEvent || $event instanceof StoppableEventInterface; - - foreach ($listeners as $listener) { - if ($stoppable && $event->isPropagationStopped()) { - break; - } - $listener($event, $eventName, $this); - } - - return $event; - } - - /** - * {@inheritdoc} - */ - public function addListener($eventName, $listener, $priority = 0) - { - return $this->dispatcher->addListener($eventName, $listener, $priority); - } - - /** - * {@inheritdoc} - */ - public function addSubscriber(EventSubscriberInterface $subscriber) - { - return $this->dispatcher->addSubscriber($subscriber); - } - - /** - * {@inheritdoc} - */ - public function removeListener($eventName, $listener) - { - return $this->dispatcher->removeListener($eventName, $listener); - } - - /** - * {@inheritdoc} - */ - public function removeSubscriber(EventSubscriberInterface $subscriber) - { - return $this->dispatcher->removeSubscriber($subscriber); - } - - /** - * {@inheritdoc} - */ - public function getListeners($eventName = null): array - { - return $this->dispatcher->getListeners($eventName); - } - - /** - * {@inheritdoc} - */ - public function getListenerPriority($eventName, $listener): ?int - { - return $this->dispatcher->getListenerPriority($eventName, $listener); - } - - /** - * {@inheritdoc} - */ - public function hasListeners($eventName = null): bool - { - return $this->dispatcher->hasListeners($eventName); - } - - /** - * Proxies all method calls to the original event dispatcher. - */ - public function __call($method, $arguments) - { - return $this->dispatcher->{$method}(...$arguments); - } -} diff --git a/source/vendor/symfony/event-dispatcher/LegacyEventProxy.php b/source/vendor/symfony/event-dispatcher/LegacyEventProxy.php deleted file mode 100644 index 45ee251..0000000 --- a/source/vendor/symfony/event-dispatcher/LegacyEventProxy.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\EventDispatcher; - -use Psr\EventDispatcher\StoppableEventInterface; -use Symfony\Contracts\EventDispatcher\Event as ContractsEvent; - -/** - * @internal to be removed in 5.0. - */ -final class LegacyEventProxy extends Event -{ - private $event; - - /** - * @param object $event - */ - public function __construct($event) - { - $this->event = $event; - } - - /** - * @return object $event - */ - public function getEvent() - { - return $this->event; - } - - public function isPropagationStopped(): bool - { - if (!$this->event instanceof ContractsEvent && !$this->event instanceof StoppableEventInterface) { - return false; - } - - return $this->event->isPropagationStopped(); - } - - public function stopPropagation() - { - if (!$this->event instanceof ContractsEvent) { - return; - } - - $this->event->stopPropagation(); - } - - public function __call($name, $args) - { - return $this->event->{$name}(...$args); - } -} diff --git a/source/vendor/symfony/event-dispatcher/README.md b/source/vendor/symfony/event-dispatcher/README.md deleted file mode 100644 index dcdb68d..0000000 --- a/source/vendor/symfony/event-dispatcher/README.md +++ /dev/null @@ -1,15 +0,0 @@ -EventDispatcher Component -========================= - -The EventDispatcher component provides tools that allow your application -components to communicate with each other by dispatching events and listening to -them. - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/event_dispatcher.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/source/vendor/symfony/http-client/CachingHttpClient.php b/source/vendor/symfony/http-client/CachingHttpClient.php deleted file mode 100644 index 0327791..0000000 --- a/source/vendor/symfony/http-client/CachingHttpClient.php +++ /dev/null @@ -1,144 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient; - -use Symfony\Component\HttpClient\Response\MockResponse; -use Symfony\Component\HttpClient\Response\ResponseStream; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\HttpCache\HttpCache; -use Symfony\Component\HttpKernel\HttpCache\StoreInterface; -use Symfony\Component\HttpKernel\HttpClientKernel; -use Symfony\Contracts\HttpClient\HttpClientInterface; -use Symfony\Contracts\HttpClient\ResponseInterface; -use Symfony\Contracts\HttpClient\ResponseStreamInterface; - -/** - * Adds caching on top of an HTTP client. - * - * The implementation buffers responses in memory and doesn't stream directly from the network. - * You can disable/enable this layer by setting option "no_cache" under "extra" to true/false. - * By default, caching is enabled unless the "buffer" option is set to false. - * - * @author Nicolas Grekas - */ -class CachingHttpClient implements HttpClientInterface -{ - use HttpClientTrait; - - private $client; - private $cache; - private $defaultOptions = self::OPTIONS_DEFAULTS; - - public function __construct(HttpClientInterface $client, StoreInterface $store, array $defaultOptions = []) - { - if (!class_exists(HttpClientKernel::class)) { - throw new \LogicException(sprintf('Using "%s" requires that the HttpKernel component version 4.3 or higher is installed, try running "composer require symfony/http-kernel:^4.3".', __CLASS__)); - } - - $this->client = $client; - $kernel = new HttpClientKernel($client); - $this->cache = new HttpCache($kernel, $store, null, $defaultOptions); - - unset($defaultOptions['debug']); - unset($defaultOptions['default_ttl']); - unset($defaultOptions['private_headers']); - unset($defaultOptions['allow_reload']); - unset($defaultOptions['allow_revalidate']); - unset($defaultOptions['stale_while_revalidate']); - unset($defaultOptions['stale_if_error']); - unset($defaultOptions['trace_level']); - unset($defaultOptions['trace_header']); - - if ($defaultOptions) { - [, $this->defaultOptions] = self::prepareRequest(null, null, $defaultOptions, $this->defaultOptions); - } - } - - /** - * {@inheritdoc} - */ - public function request(string $method, string $url, array $options = []): ResponseInterface - { - [$url, $options] = $this->prepareRequest($method, $url, $options, $this->defaultOptions, true); - $url = implode('', $url); - - if (!empty($options['body']) || !empty($options['extra']['no_cache']) || !\in_array($method, ['GET', 'HEAD', 'OPTIONS'])) { - return $this->client->request($method, $url, $options); - } - - $request = Request::create($url, $method); - $request->attributes->set('http_client_options', $options); - - foreach ($options['normalized_headers'] as $name => $values) { - if ('cookie' !== $name) { - foreach ($values as $value) { - $request->headers->set($name, substr($value, 2 + \strlen($name)), false); - } - - continue; - } - - foreach ($values as $cookies) { - foreach (explode('; ', substr($cookies, \strlen('Cookie: '))) as $cookie) { - if ('' !== $cookie) { - $cookie = explode('=', $cookie, 2); - $request->cookies->set($cookie[0], $cookie[1] ?? ''); - } - } - } - } - - $response = $this->cache->handle($request); - $response = new MockResponse($response->getContent(), [ - 'http_code' => $response->getStatusCode(), - 'response_headers' => $response->headers->allPreserveCase(), - ]); - - return MockResponse::fromRequest($method, $url, $options, $response); - } - - /** - * {@inheritdoc} - */ - public function stream($responses, float $timeout = null): ResponseStreamInterface - { - if ($responses instanceof ResponseInterface) { - $responses = [$responses]; - } elseif (!is_iterable($responses)) { - throw new \TypeError(sprintf('"%s()" expects parameter 1 to be an iterable of ResponseInterface objects, "%s" given.', __METHOD__, \is_object($responses) ? \get_class($responses) : \gettype($responses))); - } - - $mockResponses = []; - $clientResponses = []; - - foreach ($responses as $response) { - if ($response instanceof MockResponse) { - $mockResponses[] = $response; - } else { - $clientResponses[] = $response; - } - } - - if (!$mockResponses) { - return $this->client->stream($clientResponses, $timeout); - } - - if (!$clientResponses) { - return new ResponseStream(MockResponse::stream($mockResponses, $timeout)); - } - - return new ResponseStream((function () use ($mockResponses, $clientResponses, $timeout) { - yield from MockResponse::stream($mockResponses, $timeout); - yield $this->client->stream($clientResponses, $timeout); - })()); - } -} diff --git a/source/vendor/symfony/http-client/Chunk/DataChunk.php b/source/vendor/symfony/http-client/Chunk/DataChunk.php deleted file mode 100644 index 37ca848..0000000 --- a/source/vendor/symfony/http-client/Chunk/DataChunk.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Chunk; - -use Symfony\Contracts\HttpClient\ChunkInterface; - -/** - * @author Nicolas Grekas - * - * @internal - */ -class DataChunk implements ChunkInterface -{ - private $offset = 0; - private $content = ''; - - public function __construct(int $offset = 0, string $content = '') - { - $this->offset = $offset; - $this->content = $content; - } - - /** - * {@inheritdoc} - */ - public function isTimeout(): bool - { - return false; - } - - /** - * {@inheritdoc} - */ - public function isFirst(): bool - { - return false; - } - - /** - * {@inheritdoc} - */ - public function isLast(): bool - { - return false; - } - - /** - * {@inheritdoc} - */ - public function getInformationalStatus(): ?array - { - return null; - } - - /** - * {@inheritdoc} - */ - public function getContent(): string - { - return $this->content; - } - - /** - * {@inheritdoc} - */ - public function getOffset(): int - { - return $this->offset; - } - - /** - * {@inheritdoc} - */ - public function getError(): ?string - { - return null; - } -} diff --git a/source/vendor/symfony/http-client/Chunk/ErrorChunk.php b/source/vendor/symfony/http-client/Chunk/ErrorChunk.php deleted file mode 100644 index 7ea5510..0000000 --- a/source/vendor/symfony/http-client/Chunk/ErrorChunk.php +++ /dev/null @@ -1,138 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Chunk; - -use Symfony\Component\HttpClient\Exception\TransportException; -use Symfony\Contracts\HttpClient\ChunkInterface; - -/** - * @author Nicolas Grekas - * - * @internal - */ -class ErrorChunk implements ChunkInterface -{ - private $didThrow = false; - private $offset; - private $errorMessage; - private $error; - - /** - * @param \Throwable|string $error - */ - public function __construct(int $offset, $error) - { - $this->offset = $offset; - - if (\is_string($error)) { - $this->errorMessage = $error; - } else { - $this->error = $error; - $this->errorMessage = $error->getMessage(); - } - } - - /** - * {@inheritdoc} - */ - public function isTimeout(): bool - { - $this->didThrow = true; - - if (null !== $this->error) { - throw new TransportException($this->errorMessage, 0, $this->error); - } - - return true; - } - - /** - * {@inheritdoc} - */ - public function isFirst(): bool - { - $this->didThrow = true; - throw new TransportException($this->errorMessage, 0, $this->error); - } - - /** - * {@inheritdoc} - */ - public function isLast(): bool - { - $this->didThrow = true; - throw new TransportException($this->errorMessage, 0, $this->error); - } - - /** - * {@inheritdoc} - */ - public function getInformationalStatus(): ?array - { - $this->didThrow = true; - throw new TransportException($this->errorMessage, 0, $this->error); - } - - /** - * {@inheritdoc} - */ - public function getContent(): string - { - $this->didThrow = true; - throw new TransportException($this->errorMessage, 0, $this->error); - } - - /** - * {@inheritdoc} - */ - public function getOffset(): int - { - return $this->offset; - } - - /** - * {@inheritdoc} - */ - public function getError(): ?string - { - return $this->errorMessage; - } - - /** - * @return bool Whether the wrapped error has been thrown or not - */ - public function didThrow(): bool - { - return $this->didThrow; - } - - /** - * @return array - */ - public function __sleep() - { - throw new \BadMethodCallException('Cannot serialize '.__CLASS__); - } - - public function __wakeup() - { - throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); - } - - public function __destruct() - { - if (!$this->didThrow) { - $this->didThrow = true; - throw new TransportException($this->errorMessage, 0, $this->error); - } - } -} diff --git a/source/vendor/symfony/http-client/Chunk/FirstChunk.php b/source/vendor/symfony/http-client/Chunk/FirstChunk.php deleted file mode 100644 index d891ca8..0000000 --- a/source/vendor/symfony/http-client/Chunk/FirstChunk.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Chunk; - -/** - * @author Nicolas Grekas - * - * @internal - */ -class FirstChunk extends DataChunk -{ - /** - * {@inheritdoc} - */ - public function isFirst(): bool - { - return true; - } -} diff --git a/source/vendor/symfony/http-client/Chunk/InformationalChunk.php b/source/vendor/symfony/http-client/Chunk/InformationalChunk.php deleted file mode 100644 index c4452f1..0000000 --- a/source/vendor/symfony/http-client/Chunk/InformationalChunk.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Chunk; - -/** - * @author Nicolas Grekas - * - * @internal - */ -class InformationalChunk extends DataChunk -{ - private $status; - - public function __construct(int $statusCode, array $headers) - { - $this->status = [$statusCode, $headers]; - } - - /** - * {@inheritdoc} - */ - public function getInformationalStatus(): ?array - { - return $this->status; - } -} diff --git a/source/vendor/symfony/http-client/Chunk/LastChunk.php b/source/vendor/symfony/http-client/Chunk/LastChunk.php deleted file mode 100644 index 84095d3..0000000 --- a/source/vendor/symfony/http-client/Chunk/LastChunk.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Chunk; - -/** - * @author Nicolas Grekas - * - * @internal - */ -class LastChunk extends DataChunk -{ - /** - * {@inheritdoc} - */ - public function isLast(): bool - { - return true; - } -} diff --git a/source/vendor/symfony/http-client/CurlHttpClient.php b/source/vendor/symfony/http-client/CurlHttpClient.php deleted file mode 100644 index c682854..0000000 --- a/source/vendor/symfony/http-client/CurlHttpClient.php +++ /dev/null @@ -1,512 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient; - -use Psr\Log\LoggerAwareInterface; -use Psr\Log\LoggerAwareTrait; -use Symfony\Component\HttpClient\Exception\InvalidArgumentException; -use Symfony\Component\HttpClient\Exception\TransportException; -use Symfony\Component\HttpClient\Internal\CurlClientState; -use Symfony\Component\HttpClient\Internal\PushedResponse; -use Symfony\Component\HttpClient\Response\CurlResponse; -use Symfony\Component\HttpClient\Response\ResponseStream; -use Symfony\Contracts\HttpClient\HttpClientInterface; -use Symfony\Contracts\HttpClient\ResponseInterface; -use Symfony\Contracts\HttpClient\ResponseStreamInterface; -use Symfony\Contracts\Service\ResetInterface; - -/** - * A performant implementation of the HttpClientInterface contracts based on the curl extension. - * - * This provides fully concurrent HTTP requests, with transparent - * HTTP/2 push when a curl version that supports it is installed. - * - * @author Nicolas Grekas - */ -final class CurlHttpClient implements HttpClientInterface, LoggerAwareInterface, ResetInterface -{ - use HttpClientTrait; - use LoggerAwareTrait; - - private $defaultOptions = self::OPTIONS_DEFAULTS + [ - 'auth_ntlm' => null, // array|string - an array containing the username as first value, and optionally the - // password as the second one; or string like username:password - enabling NTLM auth - ]; - - /** - * An internal object to share state between the client and its responses. - * - * @var CurlClientState - */ - private $multi; - - private static $curlVersion; - - /** - * @param array $defaultOptions Default request's options - * @param int $maxHostConnections The maximum number of connections to a single host - * @param int $maxPendingPushes The maximum number of pushed responses to accept in the queue - * - * @see HttpClientInterface::OPTIONS_DEFAULTS for available options - */ - public function __construct(array $defaultOptions = [], int $maxHostConnections = 6, int $maxPendingPushes = 50) - { - if (!\extension_loaded('curl')) { - throw new \LogicException('You cannot use the "Symfony\Component\HttpClient\CurlHttpClient" as the "curl" extension is not installed.'); - } - - $this->defaultOptions['buffer'] = $this->defaultOptions['buffer'] ?? \Closure::fromCallable([__CLASS__, 'shouldBuffer']); - - if ($defaultOptions) { - [, $this->defaultOptions] = self::prepareRequest(null, null, $defaultOptions, $this->defaultOptions); - } - - $this->multi = new CurlClientState(); - self::$curlVersion = self::$curlVersion ?? curl_version(); - - // Don't enable HTTP/1.1 pipelining: it forces responses to be sent in order - if (\defined('CURLPIPE_MULTIPLEX')) { - curl_multi_setopt($this->multi->handle, \CURLMOPT_PIPELINING, \CURLPIPE_MULTIPLEX); - } - if (\defined('CURLMOPT_MAX_HOST_CONNECTIONS')) { - $maxHostConnections = curl_multi_setopt($this->multi->handle, \CURLMOPT_MAX_HOST_CONNECTIONS, 0 < $maxHostConnections ? $maxHostConnections : \PHP_INT_MAX) ? 0 : $maxHostConnections; - } - if (\defined('CURLMOPT_MAXCONNECTS') && 0 < $maxHostConnections) { - curl_multi_setopt($this->multi->handle, \CURLMOPT_MAXCONNECTS, $maxHostConnections); - } - - // Skip configuring HTTP/2 push when it's unsupported or buggy, see https://bugs.php.net/77535 - if (0 >= $maxPendingPushes || \PHP_VERSION_ID < 70217 || (\PHP_VERSION_ID >= 70300 && \PHP_VERSION_ID < 70304)) { - return; - } - - // HTTP/2 push crashes before curl 7.61 - if (!\defined('CURLMOPT_PUSHFUNCTION') || 0x073d00 > self::$curlVersion['version_number'] || !(\CURL_VERSION_HTTP2 & self::$curlVersion['features'])) { - return; - } - - curl_multi_setopt($this->multi->handle, \CURLMOPT_PUSHFUNCTION, function ($parent, $pushed, array $requestHeaders) use ($maxPendingPushes) { - return $this->handlePush($parent, $pushed, $requestHeaders, $maxPendingPushes); - }); - } - - /** - * @see HttpClientInterface::OPTIONS_DEFAULTS for available options - * - * {@inheritdoc} - */ - public function request(string $method, string $url, array $options = []): ResponseInterface - { - [$url, $options] = self::prepareRequest($method, $url, $options, $this->defaultOptions); - $scheme = $url['scheme']; - $authority = $url['authority']; - $host = parse_url($authority, \PHP_URL_HOST); - $url = implode('', $url); - - if (!isset($options['normalized_headers']['user-agent'])) { - $options['headers'][] = 'User-Agent: Symfony HttpClient/Curl'; - } - - $curlopts = [ - \CURLOPT_URL => $url, - \CURLOPT_TCP_NODELAY => true, - \CURLOPT_PROTOCOLS => \CURLPROTO_HTTP | \CURLPROTO_HTTPS, - \CURLOPT_REDIR_PROTOCOLS => \CURLPROTO_HTTP | \CURLPROTO_HTTPS, - \CURLOPT_FOLLOWLOCATION => true, - \CURLOPT_MAXREDIRS => 0 < $options['max_redirects'] ? $options['max_redirects'] : 0, - \CURLOPT_COOKIEFILE => '', // Keep track of cookies during redirects - \CURLOPT_TIMEOUT => 0, - \CURLOPT_PROXY => $options['proxy'], - \CURLOPT_NOPROXY => $options['no_proxy'] ?? $_SERVER['no_proxy'] ?? $_SERVER['NO_PROXY'] ?? '', - \CURLOPT_SSL_VERIFYPEER => $options['verify_peer'], - \CURLOPT_SSL_VERIFYHOST => $options['verify_host'] ? 2 : 0, - \CURLOPT_CAINFO => $options['cafile'], - \CURLOPT_CAPATH => $options['capath'], - \CURLOPT_SSL_CIPHER_LIST => $options['ciphers'], - \CURLOPT_SSLCERT => $options['local_cert'], - \CURLOPT_SSLKEY => $options['local_pk'], - \CURLOPT_KEYPASSWD => $options['passphrase'], - \CURLOPT_CERTINFO => $options['capture_peer_cert_chain'], - ]; - - if (1.0 === (float) $options['http_version']) { - $curlopts[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_1_0; - } elseif (1.1 === (float) $options['http_version']) { - $curlopts[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_1_1; - } elseif (\defined('CURL_VERSION_HTTP2') && (\CURL_VERSION_HTTP2 & self::$curlVersion['features']) && ('https:' === $scheme || 2.0 === (float) $options['http_version'])) { - $curlopts[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_2_0; - } - - if (isset($options['auth_ntlm'])) { - $curlopts[\CURLOPT_HTTPAUTH] = \CURLAUTH_NTLM; - $curlopts[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_1_1; - - if (\is_array($options['auth_ntlm'])) { - $count = \count($options['auth_ntlm']); - if ($count <= 0 || $count > 2) { - throw new InvalidArgumentException(sprintf('Option "auth_ntlm" must contain 1 or 2 elements, %d given.', $count)); - } - - $options['auth_ntlm'] = implode(':', $options['auth_ntlm']); - } - - if (!\is_string($options['auth_ntlm'])) { - throw new InvalidArgumentException(sprintf('Option "auth_ntlm" must be a string or an array, "%s" given.', \gettype($options['auth_ntlm']))); - } - - $curlopts[\CURLOPT_USERPWD] = $options['auth_ntlm']; - } - - if (!\ZEND_THREAD_SAFE) { - $curlopts[\CURLOPT_DNS_USE_GLOBAL_CACHE] = false; - } - - if (\defined('CURLOPT_HEADEROPT') && \defined('CURLHEADER_SEPARATE')) { - $curlopts[\CURLOPT_HEADEROPT] = \CURLHEADER_SEPARATE; - } - - // curl's resolve feature varies by host:port but ours varies by host only, let's handle this with our own DNS map - if (isset($this->multi->dnsCache->hostnames[$host])) { - $options['resolve'] += [$host => $this->multi->dnsCache->hostnames[$host]]; - } - - if ($options['resolve'] || $this->multi->dnsCache->evictions) { - // First reset any old DNS cache entries then add the new ones - $resolve = $this->multi->dnsCache->evictions; - $this->multi->dnsCache->evictions = []; - $port = parse_url($authority, \PHP_URL_PORT) ?: ('http:' === $scheme ? 80 : 443); - - if ($resolve && 0x072a00 > self::$curlVersion['version_number']) { - // DNS cache removals require curl 7.42 or higher - // On lower versions, we have to create a new multi handle - curl_multi_close($this->multi->handle); - $this->multi->handle = (new self())->multi->handle; - } - - foreach ($options['resolve'] as $host => $ip) { - $resolve[] = null === $ip ? "-$host:$port" : "$host:$port:$ip"; - $this->multi->dnsCache->hostnames[$host] = $ip; - $this->multi->dnsCache->removals["-$host:$port"] = "-$host:$port"; - } - - $curlopts[\CURLOPT_RESOLVE] = $resolve; - } - - if ('POST' === $method) { - // Use CURLOPT_POST to have browser-like POST-to-GET redirects for 301, 302 and 303 - $curlopts[\CURLOPT_POST] = true; - } elseif ('HEAD' === $method) { - $curlopts[\CURLOPT_NOBODY] = true; - } else { - $curlopts[\CURLOPT_CUSTOMREQUEST] = $method; - } - - if ('\\' !== \DIRECTORY_SEPARATOR && $options['timeout'] < 1) { - $curlopts[\CURLOPT_NOSIGNAL] = true; - } - - if (\extension_loaded('zlib') && !isset($options['normalized_headers']['accept-encoding'])) { - $options['headers'][] = 'Accept-Encoding: gzip'; // Expose only one encoding, some servers mess up when more are provided - } - - foreach ($options['headers'] as $header) { - if (':' === $header[-2] && \strlen($header) - 2 === strpos($header, ': ')) { - // curl requires a special syntax to send empty headers - $curlopts[\CURLOPT_HTTPHEADER][] = substr_replace($header, ';', -2); - } else { - $curlopts[\CURLOPT_HTTPHEADER][] = $header; - } - } - - // Prevent curl from sending its default Accept and Expect headers - foreach (['accept', 'expect'] as $header) { - if (!isset($options['normalized_headers'][$header][0])) { - $curlopts[\CURLOPT_HTTPHEADER][] = $header.':'; - } - } - - if (!\is_string($body = $options['body'])) { - if (\is_resource($body)) { - $curlopts[\CURLOPT_INFILE] = $body; - } else { - $eof = false; - $buffer = ''; - $curlopts[\CURLOPT_READFUNCTION] = static function ($ch, $fd, $length) use ($body, &$buffer, &$eof) { - return self::readRequestBody($length, $body, $buffer, $eof); - }; - } - - if (isset($options['normalized_headers']['content-length'][0])) { - $curlopts[\CURLOPT_INFILESIZE] = substr($options['normalized_headers']['content-length'][0], \strlen('Content-Length: ')); - } elseif (!isset($options['normalized_headers']['transfer-encoding'])) { - $curlopts[\CURLOPT_HTTPHEADER][] = 'Transfer-Encoding: chunked'; // Enable chunked request bodies - } - - if ('POST' !== $method) { - $curlopts[\CURLOPT_UPLOAD] = true; - } - } elseif ('' !== $body || 'POST' === $method) { - $curlopts[\CURLOPT_POSTFIELDS] = $body; - } - - if ($options['peer_fingerprint']) { - if (!isset($options['peer_fingerprint']['pin-sha256'])) { - throw new TransportException(__CLASS__.' supports only "pin-sha256" fingerprints.'); - } - - $curlopts[\CURLOPT_PINNEDPUBLICKEY] = 'sha256//'.implode(';sha256//', $options['peer_fingerprint']['pin-sha256']); - } - - if ($options['bindto']) { - if (file_exists($options['bindto'])) { - $curlopts[\CURLOPT_UNIX_SOCKET_PATH] = $options['bindto']; - } elseif (!str_starts_with($options['bindto'], 'if!') && preg_match('/^(.*):(\d+)$/', $options['bindto'], $matches)) { - $curlopts[\CURLOPT_INTERFACE] = $matches[1]; - $curlopts[\CURLOPT_LOCALPORT] = $matches[2]; - } else { - $curlopts[\CURLOPT_INTERFACE] = $options['bindto']; - } - } - - if (0 < $options['max_duration']) { - $curlopts[\CURLOPT_TIMEOUT_MS] = 1000 * $options['max_duration']; - } - - if ($pushedResponse = $this->multi->pushedResponses[$url] ?? null) { - unset($this->multi->pushedResponses[$url]); - - if (self::acceptPushForRequest($method, $options, $pushedResponse)) { - $this->logger && $this->logger->debug(sprintf('Accepting pushed response: "%s %s"', $method, $url)); - - // Reinitialize the pushed response with request's options - $ch = $pushedResponse->handle; - $pushedResponse = $pushedResponse->response; - $pushedResponse->__construct($this->multi, $url, $options, $this->logger); - } else { - $this->logger && $this->logger->debug(sprintf('Rejecting pushed response: "%s"', $url)); - $pushedResponse = null; - } - } - - if (!$pushedResponse) { - $ch = curl_init(); - $this->logger && $this->logger->info(sprintf('Request: "%s %s"', $method, $url)); - } - - foreach ($curlopts as $opt => $value) { - if (null !== $value && !curl_setopt($ch, $opt, $value) && \CURLOPT_CERTINFO !== $opt) { - $constants = array_filter(get_defined_constants(), static function ($v, $k) use ($opt) { - return $v === $opt && 'C' === $k[0] && (str_starts_with($k, 'CURLOPT_') || str_starts_with($k, 'CURLINFO_')); - }, \ARRAY_FILTER_USE_BOTH); - - throw new TransportException(sprintf('Curl option "%s" is not supported.', key($constants) ?? $opt)); - } - } - - return $pushedResponse ?? new CurlResponse($this->multi, $ch, $options, $this->logger, $method, self::createRedirectResolver($options, $host), self::$curlVersion['version_number']); - } - - /** - * {@inheritdoc} - */ - public function stream($responses, float $timeout = null): ResponseStreamInterface - { - if ($responses instanceof CurlResponse) { - $responses = [$responses]; - } elseif (!is_iterable($responses)) { - throw new \TypeError(sprintf('"%s()" expects parameter 1 to be an iterable of CurlResponse objects, "%s" given.', __METHOD__, \is_object($responses) ? \get_class($responses) : \gettype($responses))); - } - - if (\is_resource($this->multi->handle) || $this->multi->handle instanceof \CurlMultiHandle) { - $active = 0; - while (\CURLM_CALL_MULTI_PERFORM === curl_multi_exec($this->multi->handle, $active)); - } - - return new ResponseStream(CurlResponse::stream($responses, $timeout)); - } - - public function reset() - { - if ($this->logger) { - foreach ($this->multi->pushedResponses as $url => $response) { - $this->logger->debug(sprintf('Unused pushed response: "%s"', $url)); - } - } - - $this->multi->pushedResponses = []; - $this->multi->dnsCache->evictions = $this->multi->dnsCache->evictions ?: $this->multi->dnsCache->removals; - $this->multi->dnsCache->removals = $this->multi->dnsCache->hostnames = []; - - if (\is_resource($this->multi->handle) || $this->multi->handle instanceof \CurlMultiHandle) { - if (\defined('CURLMOPT_PUSHFUNCTION')) { - curl_multi_setopt($this->multi->handle, \CURLMOPT_PUSHFUNCTION, null); - } - - $active = 0; - while (\CURLM_CALL_MULTI_PERFORM === curl_multi_exec($this->multi->handle, $active)); - } - - foreach ($this->multi->openHandles as [$ch]) { - if (\is_resource($ch) || $ch instanceof \CurlHandle) { - curl_setopt($ch, \CURLOPT_VERBOSE, false); - } - } - } - - /** - * @return array - */ - public function __sleep() - { - throw new \BadMethodCallException('Cannot serialize '.__CLASS__); - } - - public function __wakeup() - { - throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); - } - - public function __destruct() - { - $this->reset(); - } - - private function handlePush($parent, $pushed, array $requestHeaders, int $maxPendingPushes): int - { - $headers = []; - $origin = curl_getinfo($parent, \CURLINFO_EFFECTIVE_URL); - - foreach ($requestHeaders as $h) { - if (false !== $i = strpos($h, ':', 1)) { - $headers[substr($h, 0, $i)][] = substr($h, 1 + $i); - } - } - - if (!isset($headers[':method']) || !isset($headers[':scheme']) || !isset($headers[':authority']) || !isset($headers[':path'])) { - $this->logger && $this->logger->debug(sprintf('Rejecting pushed response from "%s": pushed headers are invalid', $origin)); - - return \CURL_PUSH_DENY; - } - - $url = $headers[':scheme'][0].'://'.$headers[':authority'][0]; - - // curl before 7.65 doesn't validate the pushed ":authority" header, - // but this is a MUST in the HTTP/2 RFC; let's restrict pushes to the original host, - // ignoring domains mentioned as alt-name in the certificate for now (same as curl). - if (!str_starts_with($origin, $url.'/')) { - $this->logger && $this->logger->debug(sprintf('Rejecting pushed response from "%s": server is not authoritative for "%s"', $origin, $url)); - - return \CURL_PUSH_DENY; - } - - if ($maxPendingPushes <= \count($this->multi->pushedResponses)) { - $fifoUrl = key($this->multi->pushedResponses); - unset($this->multi->pushedResponses[$fifoUrl]); - $this->logger && $this->logger->debug(sprintf('Evicting oldest pushed response: "%s"', $fifoUrl)); - } - - $url .= $headers[':path'][0]; - $this->logger && $this->logger->debug(sprintf('Queueing pushed response: "%s"', $url)); - - $this->multi->pushedResponses[$url] = new PushedResponse(new CurlResponse($this->multi, $pushed), $headers, $this->multi->openHandles[(int) $parent][1] ?? [], $pushed); - - return \CURL_PUSH_OK; - } - - /** - * Accepts pushed responses only if their headers related to authentication match the request. - */ - private static function acceptPushForRequest(string $method, array $options, PushedResponse $pushedResponse): bool - { - if ('' !== $options['body'] || $method !== $pushedResponse->requestHeaders[':method'][0]) { - return false; - } - - foreach (['proxy', 'no_proxy', 'bindto', 'local_cert', 'local_pk'] as $k) { - if ($options[$k] !== $pushedResponse->parentOptions[$k]) { - return false; - } - } - - foreach (['authorization', 'cookie', 'range', 'proxy-authorization'] as $k) { - $normalizedHeaders = $options['normalized_headers'][$k] ?? []; - foreach ($normalizedHeaders as $i => $v) { - $normalizedHeaders[$i] = substr($v, \strlen($k) + 2); - } - - if (($pushedResponse->requestHeaders[$k] ?? []) !== $normalizedHeaders) { - return false; - } - } - - return true; - } - - /** - * Wraps the request's body callback to allow it to return strings longer than curl requested. - */ - private static function readRequestBody(int $length, \Closure $body, string &$buffer, bool &$eof): string - { - if (!$eof && \strlen($buffer) < $length) { - if (!\is_string($data = $body($length))) { - throw new TransportException(sprintf('The return value of the "body" option callback must be a string, "%s" returned.', \gettype($data))); - } - - $buffer .= $data; - $eof = '' === $data; - } - - $data = substr($buffer, 0, $length); - $buffer = substr($buffer, $length); - - return $data; - } - - /** - * Resolves relative URLs on redirects and deals with authentication headers. - * - * Work around CVE-2018-1000007: Authorization and Cookie headers should not follow redirects - fixed in Curl 7.64 - */ - private static function createRedirectResolver(array $options, string $host): \Closure - { - $redirectHeaders = []; - if (0 < $options['max_redirects']) { - $redirectHeaders['host'] = $host; - $redirectHeaders['with_auth'] = $redirectHeaders['no_auth'] = array_filter($options['headers'], static function ($h) { - return 0 !== stripos($h, 'Host:'); - }); - - if (isset($options['normalized_headers']['authorization'][0]) || isset($options['normalized_headers']['cookie'][0])) { - $redirectHeaders['no_auth'] = array_filter($options['headers'], static function ($h) { - return 0 !== stripos($h, 'Authorization:') && 0 !== stripos($h, 'Cookie:'); - }); - } - } - - return static function ($ch, string $location) use ($redirectHeaders) { - try { - $location = self::parseUrl($location); - } catch (InvalidArgumentException $e) { - return null; - } - - if ($redirectHeaders && $host = parse_url('http:'.$location['authority'], \PHP_URL_HOST)) { - $requestHeaders = $redirectHeaders['host'] === $host ? $redirectHeaders['with_auth'] : $redirectHeaders['no_auth']; - curl_setopt($ch, \CURLOPT_HTTPHEADER, $requestHeaders); - } - - $url = self::parseUrl(curl_getinfo($ch, \CURLINFO_EFFECTIVE_URL)); - - return implode('', self::resolveUrl($location, $url)); - }; - } -} diff --git a/source/vendor/symfony/http-client/DataCollector/HttpClientDataCollector.php b/source/vendor/symfony/http-client/DataCollector/HttpClientDataCollector.php deleted file mode 100644 index 9247b74..0000000 --- a/source/vendor/symfony/http-client/DataCollector/HttpClientDataCollector.php +++ /dev/null @@ -1,142 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\DataCollector; - -use Symfony\Component\HttpClient\TraceableHttpClient; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\DataCollector\DataCollector; -use Symfony\Component\HttpKernel\DataCollector\LateDataCollectorInterface; - -/** - * @author Jérémy Romey - */ -final class HttpClientDataCollector extends DataCollector implements LateDataCollectorInterface -{ - /** - * @var TraceableHttpClient[] - */ - private $clients = []; - - public function registerClient(string $name, TraceableHttpClient $client) - { - $this->clients[$name] = $client; - } - - /** - * {@inheritdoc} - * - * @param \Throwable|null $exception - */ - public function collect(Request $request, Response $response/*, \Throwable $exception = null*/) - { - $this->reset(); - - foreach ($this->clients as $name => $client) { - [$errorCount, $traces] = $this->collectOnClient($client); - - $this->data['clients'][$name] = [ - 'traces' => $traces, - 'error_count' => $errorCount, - ]; - - $this->data['request_count'] += \count($traces); - $this->data['error_count'] += $errorCount; - } - } - - public function lateCollect() - { - foreach ($this->clients as $client) { - $client->reset(); - } - } - - public function getClients(): array - { - return $this->data['clients'] ?? []; - } - - public function getRequestCount(): int - { - return $this->data['request_count'] ?? 0; - } - - public function getErrorCount(): int - { - return $this->data['error_count'] ?? 0; - } - - /** - * {@inheritdoc} - */ - public function getName(): string - { - return 'http_client'; - } - - public function reset() - { - $this->data = [ - 'clients' => [], - 'request_count' => 0, - 'error_count' => 0, - ]; - } - - private function collectOnClient(TraceableHttpClient $client): array - { - $traces = $client->getTracedRequests(); - $errorCount = 0; - $baseInfo = [ - 'response_headers' => 1, - 'redirect_count' => 1, - 'redirect_url' => 1, - 'user_data' => 1, - 'error' => 1, - 'url' => 1, - ]; - - foreach ($traces as $i => $trace) { - if (400 <= ($trace['info']['http_code'] ?? 0)) { - ++$errorCount; - } - - $info = $trace['info']; - $traces[$i]['http_code'] = $info['http_code'] ?? 0; - - unset($info['filetime'], $info['http_code'], $info['ssl_verify_result'], $info['content_type']); - - if (($info['http_method'] ?? null) === $trace['method']) { - unset($info['http_method']); - } - - if (($info['url'] ?? null) === $trace['url']) { - unset($info['url']); - } - - foreach ($info as $k => $v) { - if (!$v || (is_numeric($v) && 0 > $v)) { - unset($info[$k]); - } - } - - $debugInfo = array_diff_key($info, $baseInfo); - $info = array_diff_key($info, $debugInfo) + ['debug_info' => $debugInfo]; - unset($traces[$i]['info']); // break PHP reference used by TraceableHttpClient - $traces[$i]['info'] = $this->cloneVar($info); - $traces[$i]['options'] = $this->cloneVar($trace['options']); - } - - return [$errorCount, $traces]; - } -} diff --git a/source/vendor/symfony/http-client/DependencyInjection/HttpClientPass.php b/source/vendor/symfony/http-client/DependencyInjection/HttpClientPass.php deleted file mode 100644 index e197797..0000000 --- a/source/vendor/symfony/http-client/DependencyInjection/HttpClientPass.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\DependencyInjection; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\HttpClient\TraceableHttpClient; - -final class HttpClientPass implements CompilerPassInterface -{ - private $clientTag; - - public function __construct(string $clientTag = 'http_client.client') - { - $this->clientTag = $clientTag; - } - - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - if (!$container->hasDefinition('data_collector.http_client')) { - return; - } - - foreach ($container->findTaggedServiceIds($this->clientTag) as $id => $tags) { - $container->register('.debug.'.$id, TraceableHttpClient::class) - ->setArguments([new Reference('.debug.'.$id.'.inner')]) - ->setDecoratedService($id); - $container->getDefinition('data_collector.http_client') - ->addMethodCall('registerClient', [$id, new Reference('.debug.'.$id)]); - } - } -} diff --git a/source/vendor/symfony/http-client/Exception/ClientException.php b/source/vendor/symfony/http-client/Exception/ClientException.php deleted file mode 100644 index 4264534..0000000 --- a/source/vendor/symfony/http-client/Exception/ClientException.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Exception; - -use Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface; - -/** - * Represents a 4xx response. - * - * @author Nicolas Grekas - */ -final class ClientException extends \RuntimeException implements ClientExceptionInterface -{ - use HttpExceptionTrait; -} diff --git a/source/vendor/symfony/http-client/Exception/HttpExceptionTrait.php b/source/vendor/symfony/http-client/Exception/HttpExceptionTrait.php deleted file mode 100644 index 7ab2752..0000000 --- a/source/vendor/symfony/http-client/Exception/HttpExceptionTrait.php +++ /dev/null @@ -1,78 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Exception; - -use Symfony\Contracts\HttpClient\ResponseInterface; - -/** - * @author Nicolas Grekas - * - * @internal - */ -trait HttpExceptionTrait -{ - private $response; - - public function __construct(ResponseInterface $response) - { - $this->response = $response; - $code = $response->getInfo('http_code'); - $url = $response->getInfo('url'); - $message = sprintf('HTTP %d returned for "%s".', $code, $url); - - $httpCodeFound = false; - $isJson = false; - foreach (array_reverse($response->getInfo('response_headers')) as $h) { - if (str_starts_with($h, 'HTTP/')) { - if ($httpCodeFound) { - break; - } - - $message = sprintf('%s returned for "%s".', $h, $url); - $httpCodeFound = true; - } - - if (0 === stripos($h, 'content-type:')) { - if (preg_match('/\bjson\b/i', $h)) { - $isJson = true; - } - - if ($httpCodeFound) { - break; - } - } - } - - // Try to guess a better error message using common API error formats - // The MIME type isn't explicitly checked because some formats inherit from others - // Ex: JSON:API follows RFC 7807 semantics, Hydra can be used in any JSON-LD-compatible format - if ($isJson && $body = json_decode($response->getContent(false), true)) { - if (isset($body['hydra:title']) || isset($body['hydra:description'])) { - // see http://www.hydra-cg.com/spec/latest/core/#description-of-http-status-codes-and-errors - $separator = isset($body['hydra:title'], $body['hydra:description']) ? "\n\n" : ''; - $message = ($body['hydra:title'] ?? '').$separator.($body['hydra:description'] ?? ''); - } elseif ((isset($body['title']) || isset($body['detail'])) - && (is_scalar($body['title'] ?? '') && is_scalar($body['detail'] ?? ''))) { - // see RFC 7807 and https://jsonapi.org/format/#error-objects - $separator = isset($body['title'], $body['detail']) ? "\n\n" : ''; - $message = ($body['title'] ?? '').$separator.($body['detail'] ?? ''); - } - } - - parent::__construct($message, $code); - } - - public function getResponse(): ResponseInterface - { - return $this->response; - } -} diff --git a/source/vendor/symfony/http-client/Exception/InvalidArgumentException.php b/source/vendor/symfony/http-client/Exception/InvalidArgumentException.php deleted file mode 100644 index 6c2fae7..0000000 --- a/source/vendor/symfony/http-client/Exception/InvalidArgumentException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Exception; - -use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface; - -/** - * @author Nicolas Grekas - */ -final class InvalidArgumentException extends \InvalidArgumentException implements TransportExceptionInterface -{ -} diff --git a/source/vendor/symfony/http-client/Exception/JsonException.php b/source/vendor/symfony/http-client/Exception/JsonException.php deleted file mode 100644 index 54502e6..0000000 --- a/source/vendor/symfony/http-client/Exception/JsonException.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Exception; - -use Symfony\Contracts\HttpClient\Exception\DecodingExceptionInterface; - -/** - * Thrown by responses' toArray() method when their content cannot be JSON-decoded. - * - * @author Nicolas Grekas - */ -final class JsonException extends \JsonException implements DecodingExceptionInterface -{ -} diff --git a/source/vendor/symfony/http-client/Exception/RedirectionException.php b/source/vendor/symfony/http-client/Exception/RedirectionException.php deleted file mode 100644 index 5b93670..0000000 --- a/source/vendor/symfony/http-client/Exception/RedirectionException.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Exception; - -use Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface; - -/** - * Represents a 3xx response. - * - * @author Nicolas Grekas - */ -final class RedirectionException extends \RuntimeException implements RedirectionExceptionInterface -{ - use HttpExceptionTrait; -} diff --git a/source/vendor/symfony/http-client/Exception/ServerException.php b/source/vendor/symfony/http-client/Exception/ServerException.php deleted file mode 100644 index c6f8273..0000000 --- a/source/vendor/symfony/http-client/Exception/ServerException.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Exception; - -use Symfony\Contracts\HttpClient\Exception\ServerExceptionInterface; - -/** - * Represents a 5xx response. - * - * @author Nicolas Grekas - */ -final class ServerException extends \RuntimeException implements ServerExceptionInterface -{ - use HttpExceptionTrait; -} diff --git a/source/vendor/symfony/http-client/Exception/TransportException.php b/source/vendor/symfony/http-client/Exception/TransportException.php deleted file mode 100644 index 117e297..0000000 --- a/source/vendor/symfony/http-client/Exception/TransportException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Exception; - -use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface; - -/** - * @author Nicolas Grekas - */ -final class TransportException extends \RuntimeException implements TransportExceptionInterface -{ -} diff --git a/source/vendor/symfony/http-client/HttpClient.php b/source/vendor/symfony/http-client/HttpClient.php deleted file mode 100644 index 1828413..0000000 --- a/source/vendor/symfony/http-client/HttpClient.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient; - -use Symfony\Contracts\HttpClient\HttpClientInterface; - -/** - * A factory to instantiate the best possible HTTP client for the runtime. - * - * @author Nicolas Grekas - */ -final class HttpClient -{ - /** - * @param array $defaultOptions Default request's options - * @param int $maxHostConnections The maximum number of connections to a single host - * @param int $maxPendingPushes The maximum number of pushed responses to accept in the queue - * - * @see HttpClientInterface::OPTIONS_DEFAULTS for available options - */ - public static function create(array $defaultOptions = [], int $maxHostConnections = 6, int $maxPendingPushes = 50): HttpClientInterface - { - if (\extension_loaded('curl')) { - if ('\\' !== \DIRECTORY_SEPARATOR || isset($defaultOptions['cafile']) || isset($defaultOptions['capath']) || ini_get('curl.cainfo') || ini_get('openssl.cafile') || ini_get('openssl.capath')) { - return new CurlHttpClient($defaultOptions, $maxHostConnections, $maxPendingPushes); - } - - @trigger_error('Configure the "curl.cainfo", "openssl.cafile" or "openssl.capath" php.ini setting to enable the CurlHttpClient', \E_USER_WARNING); - } - - return new NativeHttpClient($defaultOptions, $maxHostConnections); - } - - /** - * Creates a client that adds options (e.g. authentication headers) only when the request URL matches the provided base URI. - */ - public static function createForBaseUri(string $baseUri, array $defaultOptions = [], int $maxHostConnections = 6, int $maxPendingPushes = 50): HttpClientInterface - { - $client = self::create([], $maxHostConnections, $maxPendingPushes); - - return ScopingHttpClient::forBaseUri($client, $baseUri, $defaultOptions); - } -} diff --git a/source/vendor/symfony/http-client/HttpClientTrait.php b/source/vendor/symfony/http-client/HttpClientTrait.php deleted file mode 100644 index 70df925..0000000 --- a/source/vendor/symfony/http-client/HttpClientTrait.php +++ /dev/null @@ -1,568 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient; - -use Symfony\Component\HttpClient\Exception\InvalidArgumentException; - -/** - * Provides the common logic from writing HttpClientInterface implementations. - * - * All methods are static to prevent implementers from creating memory leaks via circular references. - * - * @author Nicolas Grekas - */ -trait HttpClientTrait -{ - private static $CHUNK_SIZE = 16372; - - /** - * Validates and normalizes method, URL and options, and merges them with defaults. - * - * @throws InvalidArgumentException When a not-supported option is found - */ - private static function prepareRequest(?string $method, ?string $url, array $options, array $defaultOptions = [], bool $allowExtraOptions = false): array - { - if (null !== $method) { - if (\strlen($method) !== strspn($method, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')) { - throw new InvalidArgumentException(sprintf('Invalid HTTP method "%s", only uppercase letters are accepted.', $method)); - } - if (!$method) { - throw new InvalidArgumentException('The HTTP method can not be empty.'); - } - } - - $options = self::mergeDefaultOptions($options, $defaultOptions, $allowExtraOptions); - - $buffer = $options['buffer'] ?? true; - - if ($buffer instanceof \Closure) { - $options['buffer'] = static function (array $headers) use ($buffer) { - if (!\is_bool($buffer = $buffer($headers))) { - if (!\is_array($bufferInfo = @stream_get_meta_data($buffer))) { - throw new \LogicException(sprintf('The closure passed as option "buffer" must return bool or stream resource, got "%s".', \is_resource($buffer) ? get_resource_type($buffer).' resource' : \gettype($buffer))); - } - - if (false === strpbrk($bufferInfo['mode'], 'acew+')) { - throw new \LogicException(sprintf('The stream returned by the closure passed as option "buffer" must be writeable, got mode "%s".', $bufferInfo['mode'])); - } - } - - return $buffer; - }; - } elseif (!\is_bool($buffer)) { - if (!\is_array($bufferInfo = @stream_get_meta_data($buffer))) { - throw new InvalidArgumentException(sprintf('Option "buffer" must be bool, stream resource or Closure, "%s" given.', \is_resource($buffer) ? get_resource_type($buffer).' resource' : \gettype($buffer))); - } - - if (false === strpbrk($bufferInfo['mode'], 'acew+')) { - throw new InvalidArgumentException(sprintf('The stream in option "buffer" must be writeable, mode "%s" given.', $bufferInfo['mode'])); - } - } - - if (isset($options['json'])) { - if (isset($options['body']) && '' !== $options['body']) { - throw new InvalidArgumentException('Define either the "json" or the "body" option, setting both is not supported.'); - } - $options['body'] = self::jsonEncode($options['json']); - unset($options['json']); - - if (!isset($options['normalized_headers']['content-type'])) { - $options['normalized_headers']['content-type'] = [$options['headers'][] = 'Content-Type: application/json']; - } - } - - if (!isset($options['normalized_headers']['accept'])) { - $options['normalized_headers']['accept'] = [$options['headers'][] = 'Accept: */*']; - } - - if (isset($options['body'])) { - $options['body'] = self::normalizeBody($options['body']); - } - - if (isset($options['peer_fingerprint'])) { - $options['peer_fingerprint'] = self::normalizePeerFingerprint($options['peer_fingerprint']); - } - - // Validate on_progress - if (!\is_callable($onProgress = $options['on_progress'] ?? 'var_dump')) { - throw new InvalidArgumentException(sprintf('Option "on_progress" must be callable, "%s" given.', \is_object($onProgress) ? \get_class($onProgress) : \gettype($onProgress))); - } - - if (\is_array($options['auth_basic'] ?? null)) { - $count = \count($options['auth_basic']); - if ($count <= 0 || $count > 2) { - throw new InvalidArgumentException(sprintf('Option "auth_basic" must contain 1 or 2 elements, "%s" given.', $count)); - } - - $options['auth_basic'] = implode(':', $options['auth_basic']); - } - - if (!\is_string($options['auth_basic'] ?? '')) { - throw new InvalidArgumentException(sprintf('Option "auth_basic" must be string or an array, "%s" given.', \gettype($options['auth_basic']))); - } - - if (isset($options['auth_bearer'])) { - if (!\is_string($options['auth_bearer'])) { - throw new InvalidArgumentException(sprintf('Option "auth_bearer" must be a string, "%s" given.', \gettype($options['auth_bearer']))); - } - if (preg_match('{[^\x21-\x7E]}', $options['auth_bearer'])) { - throw new InvalidArgumentException('Invalid character found in option "auth_bearer": '.json_encode($options['auth_bearer']).'.'); - } - } - - if (isset($options['auth_basic'], $options['auth_bearer'])) { - throw new InvalidArgumentException('Define either the "auth_basic" or the "auth_bearer" option, setting both is not supported.'); - } - - if (null !== $url) { - // Merge auth with headers - if (($options['auth_basic'] ?? false) && !($options['normalized_headers']['authorization'] ?? false)) { - $options['normalized_headers']['authorization'] = [$options['headers'][] = 'Authorization: Basic '.base64_encode($options['auth_basic'])]; - } - // Merge bearer with headers - if (($options['auth_bearer'] ?? false) && !($options['normalized_headers']['authorization'] ?? false)) { - $options['normalized_headers']['authorization'] = [$options['headers'][] = 'Authorization: Bearer '.$options['auth_bearer']]; - } - - unset($options['auth_basic'], $options['auth_bearer']); - - // Parse base URI - if (\is_string($options['base_uri'])) { - $options['base_uri'] = self::parseUrl($options['base_uri']); - } - - // Validate and resolve URL - $url = self::parseUrl($url, $options['query']); - $url = self::resolveUrl($url, $options['base_uri'], $defaultOptions['query'] ?? []); - } - - // Finalize normalization of options - $options['http_version'] = (string) ($options['http_version'] ?? '') ?: null; - $options['timeout'] = (float) ($options['timeout'] ?? ini_get('default_socket_timeout')); - $options['max_duration'] = isset($options['max_duration']) ? (float) $options['max_duration'] : 0; - - return [$url, $options]; - } - - /** - * @throws InvalidArgumentException When an invalid option is found - */ - private static function mergeDefaultOptions(array $options, array $defaultOptions, bool $allowExtraOptions = false): array - { - $options['normalized_headers'] = self::normalizeHeaders($options['headers'] ?? []); - - if ($defaultOptions['headers'] ?? false) { - $options['normalized_headers'] += self::normalizeHeaders($defaultOptions['headers']); - } - - $options['headers'] = array_merge(...array_values($options['normalized_headers']) ?: [[]]); - - if ($resolve = $options['resolve'] ?? false) { - $options['resolve'] = []; - foreach ($resolve as $k => $v) { - $options['resolve'][substr(self::parseUrl('http://'.$k)['authority'], 2)] = (string) $v; - } - } - - // Option "query" is never inherited from defaults - $options['query'] = $options['query'] ?? []; - - foreach ($defaultOptions as $k => $v) { - if ('normalized_headers' !== $k && !isset($options[$k])) { - $options[$k] = $v; - } - } - - if (isset($defaultOptions['extra'])) { - $options['extra'] += $defaultOptions['extra']; - } - - if ($resolve = $defaultOptions['resolve'] ?? false) { - foreach ($resolve as $k => $v) { - $options['resolve'] += [substr(self::parseUrl('http://'.$k)['authority'], 2) => (string) $v]; - } - } - - if ($allowExtraOptions || !$defaultOptions) { - return $options; - } - - // Look for unsupported options - foreach ($options as $name => $v) { - if (\array_key_exists($name, $defaultOptions) || 'normalized_headers' === $name) { - continue; - } - - if ('auth_ntlm' === $name) { - if (!\extension_loaded('curl')) { - $msg = 'try installing the "curl" extension to use "%s" instead.'; - } else { - $msg = 'try using "%s" instead.'; - } - - throw new InvalidArgumentException(sprintf('Option "auth_ntlm" is not supported by "%s", '.$msg, __CLASS__, CurlHttpClient::class)); - } - - $alternatives = []; - - foreach ($defaultOptions as $key => $v) { - if (levenshtein($name, $key) <= \strlen($name) / 3 || str_contains($key, $name)) { - $alternatives[] = $key; - } - } - - throw new InvalidArgumentException(sprintf('Unsupported option "%s" passed to "%s", did you mean "%s"?', $name, __CLASS__, implode('", "', $alternatives ?: array_keys($defaultOptions)))); - } - - return $options; - } - - /** - * @return string[][] - * - * @throws InvalidArgumentException When an invalid header is found - */ - private static function normalizeHeaders(array $headers): array - { - $normalizedHeaders = []; - - foreach ($headers as $name => $values) { - if (\is_object($values) && method_exists($values, '__toString')) { - $values = (string) $values; - } - - if (\is_int($name)) { - if (!\is_string($values)) { - throw new InvalidArgumentException(sprintf('Invalid value for header "%s": expected string, "%s" given.', $name, \gettype($values))); - } - [$name, $values] = explode(':', $values, 2); - $values = [ltrim($values)]; - } elseif (!is_iterable($values)) { - if (\is_object($values)) { - throw new InvalidArgumentException(sprintf('Invalid value for header "%s": expected string, "%s" given.', $name, \get_class($values))); - } - - $values = (array) $values; - } - - $lcName = strtolower($name); - $normalizedHeaders[$lcName] = []; - - foreach ($values as $value) { - $normalizedHeaders[$lcName][] = $value = $name.': '.$value; - - if (\strlen($value) !== strcspn($value, "\r\n\0")) { - throw new InvalidArgumentException(sprintf('Invalid header: CR/LF/NUL found in "%s".', $value)); - } - } - } - - return $normalizedHeaders; - } - - /** - * @param array|string|resource|\Traversable|\Closure $body - * - * @return string|resource|\Closure - * - * @throws InvalidArgumentException When an invalid body is passed - */ - private static function normalizeBody($body) - { - if (\is_array($body)) { - return http_build_query($body, '', '&', \PHP_QUERY_RFC1738); - } - - if ($body instanceof \Traversable) { - $body = function () use ($body) { yield from $body; }; - } - - if ($body instanceof \Closure) { - $r = new \ReflectionFunction($body); - $body = $r->getClosure(); - - if ($r->isGenerator()) { - $body = $body(self::$CHUNK_SIZE); - $body = function () use ($body) { - while ($body->valid()) { - $chunk = $body->current(); - $body->next(); - - if ('' !== $chunk) { - return $chunk; - } - } - - return ''; - }; - } - - return $body; - } - - if (!\is_string($body) && !\is_array(@stream_get_meta_data($body))) { - throw new InvalidArgumentException(sprintf('Option "body" must be string, stream resource, iterable or callable, "%s" given.', \is_resource($body) ? get_resource_type($body) : \gettype($body))); - } - - return $body; - } - - /** - * @param string|string[] $fingerprint - * - * @throws InvalidArgumentException When an invalid fingerprint is passed - */ - private static function normalizePeerFingerprint($fingerprint): array - { - if (\is_string($fingerprint)) { - switch (\strlen($fingerprint = str_replace(':', '', $fingerprint))) { - case 32: $fingerprint = ['md5' => $fingerprint]; break; - case 40: $fingerprint = ['sha1' => $fingerprint]; break; - case 44: $fingerprint = ['pin-sha256' => [$fingerprint]]; break; - case 64: $fingerprint = ['sha256' => $fingerprint]; break; - default: throw new InvalidArgumentException(sprintf('Cannot auto-detect fingerprint algorithm for "%s".', $fingerprint)); - } - } elseif (\is_array($fingerprint)) { - foreach ($fingerprint as $algo => $hash) { - $fingerprint[$algo] = 'pin-sha256' === $algo ? (array) $hash : str_replace(':', '', $hash); - } - } else { - throw new InvalidArgumentException(sprintf('Option "peer_fingerprint" must be string or array, "%s" given.', \gettype($fingerprint))); - } - - return $fingerprint; - } - - /** - * @param mixed $value - * - * @throws InvalidArgumentException When the value cannot be json-encoded - */ - private static function jsonEncode($value, int $flags = null, int $maxDepth = 512): string - { - $flags = $flags ?? (\JSON_HEX_TAG | \JSON_HEX_APOS | \JSON_HEX_AMP | \JSON_HEX_QUOT | \JSON_PRESERVE_ZERO_FRACTION); - - try { - $value = json_encode($value, $flags | (\PHP_VERSION_ID >= 70300 ? \JSON_THROW_ON_ERROR : 0), $maxDepth); - } catch (\JsonException $e) { - throw new InvalidArgumentException('Invalid value for "json" option: '.$e->getMessage()); - } - - if (\PHP_VERSION_ID < 70300 && \JSON_ERROR_NONE !== json_last_error() && (false === $value || !($flags & \JSON_PARTIAL_OUTPUT_ON_ERROR))) { - throw new InvalidArgumentException('Invalid value for "json" option: '.json_last_error_msg()); - } - - return $value; - } - - /** - * Resolves a URL against a base URI. - * - * @see https://tools.ietf.org/html/rfc3986#section-5.2.2 - * - * @throws InvalidArgumentException When an invalid URL is passed - */ - private static function resolveUrl(array $url, ?array $base, array $queryDefaults = []): array - { - if (null !== $base && '' === ($base['scheme'] ?? '').($base['authority'] ?? '')) { - throw new InvalidArgumentException(sprintf('Invalid "base_uri" option: host or scheme is missing in "%s".', implode('', $base))); - } - - if (null === $url['scheme'] && (null === $base || null === $base['scheme'])) { - throw new InvalidArgumentException(sprintf('Invalid URL: scheme is missing in "%s". Did you forget to add "http(s)://"?', implode('', $base ?? $url))); - } - - if (null === $base && '' === $url['scheme'].$url['authority']) { - throw new InvalidArgumentException(sprintf('Invalid URL: no "base_uri" option was provided and host or scheme is missing in "%s".', implode('', $url))); - } - - if (null !== $url['scheme']) { - $url['path'] = self::removeDotSegments($url['path'] ?? ''); - } else { - if (null !== $url['authority']) { - $url['path'] = self::removeDotSegments($url['path'] ?? ''); - } else { - if (null === $url['path']) { - $url['path'] = $base['path']; - $url['query'] = $url['query'] ?? $base['query']; - } else { - if ('/' !== $url['path'][0]) { - if (null === $base['path']) { - $url['path'] = '/'.$url['path']; - } else { - $segments = explode('/', $base['path']); - array_splice($segments, -1, 1, [$url['path']]); - $url['path'] = implode('/', $segments); - } - } - - $url['path'] = self::removeDotSegments($url['path']); - } - - $url['authority'] = $base['authority']; - - if ($queryDefaults) { - $url['query'] = '?'.self::mergeQueryString(substr($url['query'] ?? '', 1), $queryDefaults, false); - } - } - - $url['scheme'] = $base['scheme']; - } - - if ('' === ($url['path'] ?? '')) { - $url['path'] = '/'; - } - - return $url; - } - - /** - * Parses a URL and fixes its encoding if needed. - * - * @throws InvalidArgumentException When an invalid URL is passed - */ - private static function parseUrl(string $url, array $query = [], array $allowedSchemes = ['http' => 80, 'https' => 443]): array - { - if (false === $parts = parse_url($url)) { - throw new InvalidArgumentException(sprintf('Malformed URL "%s".', $url)); - } - - if ($query) { - $parts['query'] = self::mergeQueryString($parts['query'] ?? null, $query, true); - } - - $port = $parts['port'] ?? 0; - - if (null !== $scheme = $parts['scheme'] ?? null) { - if (!isset($allowedSchemes[$scheme = strtolower($scheme)])) { - throw new InvalidArgumentException(sprintf('Unsupported scheme in "%s".', $url)); - } - - $port = $allowedSchemes[$scheme] === $port ? 0 : $port; - $scheme .= ':'; - } - - if (null !== $host = $parts['host'] ?? null) { - if (!\defined('INTL_IDNA_VARIANT_UTS46') && preg_match('/[\x80-\xFF]/', $host)) { - throw new InvalidArgumentException(sprintf('Unsupported IDN "%s", try enabling the "intl" PHP extension or running "composer require symfony/polyfill-intl-idn".', $host)); - } - - $host = \defined('INTL_IDNA_VARIANT_UTS46') ? idn_to_ascii($host, \IDNA_DEFAULT, \INTL_IDNA_VARIANT_UTS46) ?: strtolower($host) : strtolower($host); - $host .= $port ? ':'.$port : ''; - } - - foreach (['user', 'pass', 'path', 'query', 'fragment'] as $part) { - if (!isset($parts[$part])) { - continue; - } - - if (str_contains($parts[$part], '%')) { - // https://tools.ietf.org/html/rfc3986#section-2.3 - $parts[$part] = preg_replace_callback('/%(?:2[DE]|3[0-9]|[46][1-9A-F]|5F|[57][0-9A]|7E)++/i', function ($m) { return rawurldecode($m[0]); }, $parts[$part]); - } - - // https://tools.ietf.org/html/rfc3986#section-3.3 - $parts[$part] = preg_replace_callback("#[^-A-Za-z0-9._~!$&/'()*+,;=:@%]++#", function ($m) { return rawurlencode($m[0]); }, $parts[$part]); - } - - return [ - 'scheme' => $scheme, - 'authority' => null !== $host ? '//'.(isset($parts['user']) ? $parts['user'].(isset($parts['pass']) ? ':'.$parts['pass'] : '').'@' : '').$host : null, - 'path' => isset($parts['path'][0]) ? $parts['path'] : null, - 'query' => isset($parts['query']) ? '?'.$parts['query'] : null, - 'fragment' => isset($parts['fragment']) ? '#'.$parts['fragment'] : null, - ]; - } - - /** - * Removes dot-segments from a path. - * - * @see https://tools.ietf.org/html/rfc3986#section-5.2.4 - */ - private static function removeDotSegments(string $path) - { - $result = ''; - - while (!\in_array($path, ['', '.', '..'], true)) { - if ('.' === $path[0] && (str_starts_with($path, $p = '../') || str_starts_with($path, $p = './'))) { - $path = substr($path, \strlen($p)); - } elseif ('/.' === $path || str_starts_with($path, '/./')) { - $path = substr_replace($path, '/', 0, 3); - } elseif ('/..' === $path || str_starts_with($path, '/../')) { - $i = strrpos($result, '/'); - $result = $i ? substr($result, 0, $i) : ''; - $path = substr_replace($path, '/', 0, 4); - } else { - $i = strpos($path, '/', 1) ?: \strlen($path); - $result .= substr($path, 0, $i); - $path = substr($path, $i); - } - } - - return $result; - } - - /** - * Merges and encodes a query array with a query string. - * - * @throws InvalidArgumentException When an invalid query-string value is passed - */ - private static function mergeQueryString(?string $queryString, array $queryArray, bool $replace): ?string - { - if (!$queryArray) { - return $queryString; - } - - $query = []; - - if (null !== $queryString) { - foreach (explode('&', $queryString) as $v) { - if ('' !== $v) { - $k = urldecode(explode('=', $v, 2)[0]); - $query[$k] = (isset($query[$k]) ? $query[$k].'&' : '').$v; - } - } - } - - if ($replace) { - foreach ($queryArray as $k => $v) { - if (null === $v) { - unset($query[$k]); - } - } - } - - $queryString = http_build_query($queryArray, '', '&', \PHP_QUERY_RFC3986); - $queryArray = []; - - if ($queryString) { - foreach (explode('&', $queryString) as $v) { - $queryArray[rawurldecode(explode('=', $v, 2)[0])] = $v; - } - } - - return implode('&', $replace ? array_replace($query, $queryArray) : ($query + $queryArray)); - } - - private static function shouldBuffer(array $headers): bool - { - if (null === $contentType = $headers['content-type'][0] ?? null) { - return false; - } - - if (false !== $i = strpos($contentType, ';')) { - $contentType = substr($contentType, 0, $i); - } - - return $contentType && preg_match('#^(?:text/|application/(?:.+\+)?(?:json|xml)$)#i', $contentType); - } -} diff --git a/source/vendor/symfony/http-client/HttpOptions.php b/source/vendor/symfony/http-client/HttpOptions.php deleted file mode 100644 index 1638189..0000000 --- a/source/vendor/symfony/http-client/HttpOptions.php +++ /dev/null @@ -1,321 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient; - -use Symfony\Contracts\HttpClient\HttpClientInterface; - -/** - * A helper providing autocompletion for available options. - * - * @see HttpClientInterface for a description of each options. - * - * @author Nicolas Grekas - */ -class HttpOptions -{ - private $options = []; - - public function toArray(): array - { - return $this->options; - } - - /** - * @return $this - */ - public function setAuthBasic(string $user, string $password = '') - { - $this->options['auth_basic'] = $user; - - if ('' !== $password) { - $this->options['auth_basic'] .= ':'.$password; - } - - return $this; - } - - /** - * @return $this - */ - public function setAuthBearer(string $token) - { - $this->options['auth_bearer'] = $token; - - return $this; - } - - /** - * @return $this - */ - public function setQuery(array $query) - { - $this->options['query'] = $query; - - return $this; - } - - /** - * @return $this - */ - public function setHeaders(iterable $headers) - { - $this->options['headers'] = $headers; - - return $this; - } - - /** - * @param array|string|resource|\Traversable|\Closure $body - * - * @return $this - */ - public function setBody($body) - { - $this->options['body'] = $body; - - return $this; - } - - /** - * @param mixed $json - * - * @return $this - */ - public function setJson($json) - { - $this->options['json'] = $json; - - return $this; - } - - /** - * @return $this - */ - public function setUserData($data) - { - $this->options['user_data'] = $data; - - return $this; - } - - /** - * @return $this - */ - public function setMaxRedirects(int $max) - { - $this->options['max_redirects'] = $max; - - return $this; - } - - /** - * @return $this - */ - public function setHttpVersion(string $version) - { - $this->options['http_version'] = $version; - - return $this; - } - - /** - * @return $this - */ - public function setBaseUri(string $uri) - { - $this->options['base_uri'] = $uri; - - return $this; - } - - /** - * @return $this - */ - public function buffer(bool $buffer) - { - $this->options['buffer'] = $buffer; - - return $this; - } - - /** - * @return $this - */ - public function setOnProgress(callable $callback) - { - $this->options['on_progress'] = $callback; - - return $this; - } - - /** - * @return $this - */ - public function resolve(array $hostIps) - { - $this->options['resolve'] = $hostIps; - - return $this; - } - - /** - * @return $this - */ - public function setProxy(string $proxy) - { - $this->options['proxy'] = $proxy; - - return $this; - } - - /** - * @return $this - */ - public function setNoProxy(string $noProxy) - { - $this->options['no_proxy'] = $noProxy; - - return $this; - } - - /** - * @return $this - */ - public function setTimeout(float $timeout) - { - $this->options['timeout'] = $timeout; - - return $this; - } - - /** - * @return $this - */ - public function bindTo(string $bindto) - { - $this->options['bindto'] = $bindto; - - return $this; - } - - /** - * @return $this - */ - public function verifyPeer(bool $verify) - { - $this->options['verify_peer'] = $verify; - - return $this; - } - - /** - * @return $this - */ - public function verifyHost(bool $verify) - { - $this->options['verify_host'] = $verify; - - return $this; - } - - /** - * @return $this - */ - public function setCaFile(string $cafile) - { - $this->options['cafile'] = $cafile; - - return $this; - } - - /** - * @return $this - */ - public function setCaPath(string $capath) - { - $this->options['capath'] = $capath; - - return $this; - } - - /** - * @return $this - */ - public function setLocalCert(string $cert) - { - $this->options['local_cert'] = $cert; - - return $this; - } - - /** - * @return $this - */ - public function setLocalPk(string $pk) - { - $this->options['local_pk'] = $pk; - - return $this; - } - - /** - * @return $this - */ - public function setPassphrase(string $passphrase) - { - $this->options['passphrase'] = $passphrase; - - return $this; - } - - /** - * @return $this - */ - public function setCiphers(string $ciphers) - { - $this->options['ciphers'] = $ciphers; - - return $this; - } - - /** - * @param string|array $fingerprint - * - * @return $this - */ - public function setPeerFingerprint($fingerprint) - { - $this->options['peer_fingerprint'] = $fingerprint; - - return $this; - } - - /** - * @return $this - */ - public function capturePeerCertChain(bool $capture) - { - $this->options['capture_peer_cert_chain'] = $capture; - - return $this; - } - - /** - * @return $this - */ - public function setExtra(string $name, $value) - { - $this->options['extra'][$name] = $value; - - return $this; - } -} diff --git a/source/vendor/symfony/http-client/HttplugClient.php b/source/vendor/symfony/http-client/HttplugClient.php deleted file mode 100644 index d6f53be..0000000 --- a/source/vendor/symfony/http-client/HttplugClient.php +++ /dev/null @@ -1,260 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient; - -use GuzzleHttp\Promise\Promise as GuzzlePromise; -use GuzzleHttp\Promise\RejectedPromise; -use Http\Client\Exception\NetworkException; -use Http\Client\Exception\RequestException; -use Http\Client\HttpAsyncClient; -use Http\Client\HttpClient as HttplugInterface; -use Http\Discovery\Exception\NotFoundException; -use Http\Discovery\Psr17FactoryDiscovery; -use Http\Message\RequestFactory; -use Http\Message\StreamFactory; -use Http\Message\UriFactory; -use Http\Promise\Promise; -use Nyholm\Psr7\Factory\Psr17Factory; -use Nyholm\Psr7\Request; -use Nyholm\Psr7\Uri; -use Psr\Http\Message\RequestFactoryInterface; -use Psr\Http\Message\RequestInterface; -use Psr\Http\Message\ResponseFactoryInterface; -use Psr\Http\Message\ResponseInterface as Psr7ResponseInterface; -use Psr\Http\Message\StreamFactoryInterface; -use Psr\Http\Message\StreamInterface; -use Psr\Http\Message\UriFactoryInterface; -use Psr\Http\Message\UriInterface; -use Symfony\Component\HttpClient\Internal\HttplugWaitLoop; -use Symfony\Component\HttpClient\Response\HttplugPromise; -use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface; -use Symfony\Contracts\HttpClient\HttpClientInterface; -use Symfony\Contracts\HttpClient\ResponseInterface; - -if (!interface_exists(HttplugInterface::class)) { - throw new \LogicException('You cannot use "Symfony\Component\HttpClient\HttplugClient" as the "php-http/httplug" package is not installed. Try running "composer require php-http/httplug".'); -} - -if (!interface_exists(RequestFactory::class)) { - throw new \LogicException('You cannot use "Symfony\Component\HttpClient\HttplugClient" as the "php-http/message-factory" package is not installed. Try running "composer require nyholm/psr7".'); -} - -/** - * An adapter to turn a Symfony HttpClientInterface into an Httplug client. - * - * Run "composer require nyholm/psr7" to install an efficient implementation of response - * and stream factories with flex-provided autowiring aliases. - * - * @author Nicolas Grekas - */ -final class HttplugClient implements HttplugInterface, HttpAsyncClient, RequestFactory, StreamFactory, UriFactory -{ - private $client; - private $responseFactory; - private $streamFactory; - private $promisePool; - private $waitLoop; - - public function __construct(HttpClientInterface $client = null, ResponseFactoryInterface $responseFactory = null, StreamFactoryInterface $streamFactory = null) - { - $this->client = $client ?? HttpClient::create(); - $this->responseFactory = $responseFactory; - $this->streamFactory = $streamFactory ?? ($responseFactory instanceof StreamFactoryInterface ? $responseFactory : null); - $this->promisePool = \function_exists('GuzzleHttp\Promise\queue') ? new \SplObjectStorage() : null; - - if (null === $this->responseFactory || null === $this->streamFactory) { - if (!class_exists(Psr17Factory::class) && !class_exists(Psr17FactoryDiscovery::class)) { - throw new \LogicException('You cannot use the "Symfony\Component\HttpClient\HttplugClient" as no PSR-17 factories have been provided. Try running "composer require nyholm/psr7".'); - } - - try { - $psr17Factory = class_exists(Psr17Factory::class, false) ? new Psr17Factory() : null; - $this->responseFactory = $this->responseFactory ?? $psr17Factory ?? Psr17FactoryDiscovery::findResponseFactory(); - $this->streamFactory = $this->streamFactory ?? $psr17Factory ?? Psr17FactoryDiscovery::findStreamFactory(); - } catch (NotFoundException $e) { - throw new \LogicException('You cannot use the "Symfony\Component\HttpClient\HttplugClient" as no PSR-17 factories have been found. Try running "composer require nyholm/psr7".', 0, $e); - } - } - - $this->waitLoop = new HttplugWaitLoop($this->client, $this->promisePool, $this->responseFactory, $this->streamFactory); - } - - /** - * {@inheritdoc} - */ - public function sendRequest(RequestInterface $request): Psr7ResponseInterface - { - try { - return $this->waitLoop->createPsr7Response($this->sendPsr7Request($request)); - } catch (TransportExceptionInterface $e) { - throw new NetworkException($e->getMessage(), $request, $e); - } - } - - /** - * {@inheritdoc} - * - * @return HttplugPromise - */ - public function sendAsyncRequest(RequestInterface $request): Promise - { - if (!$promisePool = $this->promisePool) { - throw new \LogicException(sprintf('You cannot use "%s()" as the "guzzlehttp/promises" package is not installed. Try running "composer require guzzlehttp/promises".', __METHOD__)); - } - - try { - $response = $this->sendPsr7Request($request, true); - } catch (NetworkException $e) { - return new HttplugPromise(new RejectedPromise($e)); - } - - $waitLoop = $this->waitLoop; - - $promise = new GuzzlePromise(static function () use ($response, $waitLoop) { - $waitLoop->wait($response); - }, static function () use ($response, $promisePool) { - $response->cancel(); - unset($promisePool[$response]); - }); - - $promisePool[$response] = [$request, $promise]; - - return new HttplugPromise($promise); - } - - /** - * Resolves pending promises that complete before the timeouts are reached. - * - * When $maxDuration is null and $idleTimeout is reached, promises are rejected. - * - * @return int The number of remaining pending promises - */ - public function wait(float $maxDuration = null, float $idleTimeout = null): int - { - return $this->waitLoop->wait(null, $maxDuration, $idleTimeout); - } - - /** - * {@inheritdoc} - */ - public function createRequest($method, $uri, array $headers = [], $body = null, $protocolVersion = '1.1'): RequestInterface - { - if ($this->responseFactory instanceof RequestFactoryInterface) { - $request = $this->responseFactory->createRequest($method, $uri); - } elseif (class_exists(Request::class)) { - $request = new Request($method, $uri); - } elseif (class_exists(Psr17FactoryDiscovery::class)) { - $request = Psr17FactoryDiscovery::findRequestFactory()->createRequest($method, $uri); - } else { - throw new \LogicException(sprintf('You cannot use "%s()" as the "nyholm/psr7" package is not installed. Try running "composer require nyholm/psr7".', __METHOD__)); - } - - $request = $request - ->withProtocolVersion($protocolVersion) - ->withBody($this->createStream($body)) - ; - - foreach ($headers as $name => $value) { - $request = $request->withAddedHeader($name, $value); - } - - return $request; - } - - /** - * {@inheritdoc} - */ - public function createStream($body = null): StreamInterface - { - if ($body instanceof StreamInterface) { - return $body; - } - - if (\is_string($body ?? '')) { - $stream = $this->streamFactory->createStream($body ?? ''); - } elseif (\is_resource($body)) { - $stream = $this->streamFactory->createStreamFromResource($body); - } else { - throw new \InvalidArgumentException(sprintf('"%s()" expects string, resource or StreamInterface, "%s" given.', __METHOD__, \gettype($body))); - } - - if ($stream->isSeekable()) { - $stream->seek(0); - } - - return $stream; - } - - /** - * {@inheritdoc} - */ - public function createUri($uri): UriInterface - { - if ($uri instanceof UriInterface) { - return $uri; - } - - if ($this->responseFactory instanceof UriFactoryInterface) { - return $this->responseFactory->createUri($uri); - } - - if (class_exists(Uri::class)) { - return new Uri($uri); - } - - if (class_exists(Psr17FactoryDiscovery::class)) { - return Psr17FactoryDiscovery::findUrlFactory()->createUri($uri); - } - - throw new \LogicException(sprintf('You cannot use "%s()" as the "nyholm/psr7" package is not installed. Try running "composer require nyholm/psr7".', __METHOD__)); - } - - /** - * @return array - */ - public function __sleep() - { - throw new \BadMethodCallException('Cannot serialize '.__CLASS__); - } - - public function __wakeup() - { - throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); - } - - public function __destruct() - { - $this->wait(); - } - - private function sendPsr7Request(RequestInterface $request, bool $buffer = null): ResponseInterface - { - try { - $body = $request->getBody(); - - if ($body->isSeekable()) { - $body->seek(0); - } - - return $this->client->request($request->getMethod(), (string) $request->getUri(), [ - 'headers' => $request->getHeaders(), - 'body' => $body->getContents(), - 'http_version' => '1.0' === $request->getProtocolVersion() ? '1.0' : null, - 'buffer' => $buffer, - ]); - } catch (\InvalidArgumentException $e) { - throw new RequestException($e->getMessage(), $request, $e); - } catch (TransportExceptionInterface $e) { - throw new NetworkException($e->getMessage(), $request, $e); - } - } -} diff --git a/source/vendor/symfony/http-client/Internal/Canary.php b/source/vendor/symfony/http-client/Internal/Canary.php deleted file mode 100644 index 3d14b5f..0000000 --- a/source/vendor/symfony/http-client/Internal/Canary.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Internal; - -/** - * @author Nicolas Grekas - * - * @internal - */ -final class Canary -{ - private $canceller; - - public function __construct(\Closure $canceller) - { - $this->canceller = $canceller; - } - - public function cancel() - { - if (($canceller = $this->canceller) instanceof \Closure) { - $this->canceller = null; - $canceller(); - } - } - - public function __destruct() - { - $this->cancel(); - } -} diff --git a/source/vendor/symfony/http-client/Internal/ClientState.php b/source/vendor/symfony/http-client/Internal/ClientState.php deleted file mode 100644 index c316e7b..0000000 --- a/source/vendor/symfony/http-client/Internal/ClientState.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Internal; - -/** - * Internal representation of the client state. - * - * @author Alexander M. Turek - * - * @internal - */ -class ClientState -{ - public $handlesActivity = []; - public $openHandles = []; -} diff --git a/source/vendor/symfony/http-client/Internal/CurlClientState.php b/source/vendor/symfony/http-client/Internal/CurlClientState.php deleted file mode 100644 index af2e686..0000000 --- a/source/vendor/symfony/http-client/Internal/CurlClientState.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Internal; - -/** - * Internal representation of the cURL client's state. - * - * @author Alexander M. Turek - * - * @internal - */ -final class CurlClientState extends ClientState -{ - /** @var \CurlMultiHandle|resource */ - public $handle; - /** @var PushedResponse[] */ - public $pushedResponses = []; - /** @var DnsCache */ - public $dnsCache; - - public function __construct() - { - $this->handle = curl_multi_init(); - $this->dnsCache = new DnsCache(); - } -} diff --git a/source/vendor/symfony/http-client/Internal/DnsCache.php b/source/vendor/symfony/http-client/Internal/DnsCache.php deleted file mode 100644 index bd23f77..0000000 --- a/source/vendor/symfony/http-client/Internal/DnsCache.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Internal; - -/** - * Cache for resolved DNS queries. - * - * @author Alexander M. Turek - * - * @internal - */ -final class DnsCache -{ - /** - * Resolved hostnames (hostname => IP address). - * - * @var string[] - */ - public $hostnames = []; - - /** - * @var string[] - */ - public $removals = []; - - /** - * @var string[] - */ - public $evictions = []; -} diff --git a/source/vendor/symfony/http-client/Internal/HttplugWaitLoop.php b/source/vendor/symfony/http-client/Internal/HttplugWaitLoop.php deleted file mode 100644 index 3f287fe..0000000 --- a/source/vendor/symfony/http-client/Internal/HttplugWaitLoop.php +++ /dev/null @@ -1,136 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Internal; - -use Http\Client\Exception\NetworkException; -use Psr\Http\Message\ResponseFactoryInterface; -use Psr\Http\Message\ResponseInterface as Psr7ResponseInterface; -use Psr\Http\Message\StreamFactoryInterface; -use Symfony\Component\HttpClient\Response\ResponseTrait; -use Symfony\Component\HttpClient\Response\StreamWrapper; -use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface; -use Symfony\Contracts\HttpClient\HttpClientInterface; -use Symfony\Contracts\HttpClient\ResponseInterface; - -/** - * @author Nicolas Grekas - * - * @internal - */ -final class HttplugWaitLoop -{ - private $client; - private $promisePool; - private $responseFactory; - private $streamFactory; - - public function __construct(HttpClientInterface $client, ?\SplObjectStorage $promisePool, ResponseFactoryInterface $responseFactory, StreamFactoryInterface $streamFactory) - { - $this->client = $client; - $this->promisePool = $promisePool; - $this->responseFactory = $responseFactory; - $this->streamFactory = $streamFactory; - } - - public function wait(?ResponseInterface $pendingResponse, float $maxDuration = null, float $idleTimeout = null): int - { - if (!$this->promisePool) { - return 0; - } - - $guzzleQueue = \GuzzleHttp\Promise\queue(); - - if (0.0 === $remainingDuration = $maxDuration) { - $idleTimeout = 0.0; - } elseif (null !== $maxDuration) { - $startTime = microtime(true); - $idleTimeout = max(0.0, min($maxDuration / 5, $idleTimeout ?? $maxDuration)); - } - - do { - foreach ($this->client->stream($this->promisePool, $idleTimeout) as $response => $chunk) { - try { - if (null !== $maxDuration && $chunk->isTimeout()) { - goto check_duration; - } - - if ($chunk->isFirst()) { - // Deactivate throwing on 3/4/5xx - $response->getStatusCode(); - } - - if (!$chunk->isLast()) { - goto check_duration; - } - - if ([$request, $promise] = $this->promisePool[$response] ?? null) { - unset($this->promisePool[$response]); - $promise->resolve($this->createPsr7Response($response, true)); - } - } catch (\Exception $e) { - if ([$request, $promise] = $this->promisePool[$response] ?? null) { - unset($this->promisePool[$response]); - - if ($e instanceof TransportExceptionInterface) { - $e = new NetworkException($e->getMessage(), $request, $e); - } - - $promise->reject($e); - } - } - - $guzzleQueue->run(); - - if ($pendingResponse === $response) { - return $this->promisePool->count(); - } - - check_duration: - if (null !== $maxDuration && $idleTimeout && $idleTimeout > $remainingDuration = max(0.0, $maxDuration - microtime(true) + $startTime)) { - $idleTimeout = $remainingDuration / 5; - break; - } - } - - if (!$count = $this->promisePool->count()) { - return 0; - } - } while (null === $maxDuration || 0 < $remainingDuration); - - return $count; - } - - public function createPsr7Response(ResponseInterface $response, bool $buffer = false): Psr7ResponseInterface - { - $psrResponse = $this->responseFactory->createResponse($response->getStatusCode()); - - foreach ($response->getHeaders(false) as $name => $values) { - foreach ($values as $value) { - $psrResponse = $psrResponse->withAddedHeader($name, $value); - } - } - - if (isset(class_uses($response)[ResponseTrait::class])) { - $body = $this->streamFactory->createStreamFromResource($response->toStream(false)); - } elseif (!$buffer) { - $body = $this->streamFactory->createStreamFromResource(StreamWrapper::createResource($response, $this->client)); - } else { - $body = $this->streamFactory->createStream($response->getContent(false)); - } - - if ($body->isSeekable()) { - $body->seek(0); - } - - return $psrResponse->withBody($body); - } -} diff --git a/source/vendor/symfony/http-client/Internal/NativeClientState.php b/source/vendor/symfony/http-client/Internal/NativeClientState.php deleted file mode 100644 index 0d765b7..0000000 --- a/source/vendor/symfony/http-client/Internal/NativeClientState.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Internal; - -/** - * Internal representation of the native client's state. - * - * @author Alexander M. Turek - * - * @internal - */ -final class NativeClientState extends ClientState -{ - /** @var int */ - public $id; - /** @var int */ - public $maxHostConnections = \PHP_INT_MAX; - /** @var int */ - public $responseCount = 0; - /** @var string[] */ - public $dnsCache = []; - /** @var bool */ - public $sleep = false; - - public function __construct() - { - $this->id = random_int(\PHP_INT_MIN, \PHP_INT_MAX); - } -} diff --git a/source/vendor/symfony/http-client/Internal/PushedResponse.php b/source/vendor/symfony/http-client/Internal/PushedResponse.php deleted file mode 100644 index 08fca60..0000000 --- a/source/vendor/symfony/http-client/Internal/PushedResponse.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Internal; - -use Symfony\Component\HttpClient\Response\CurlResponse; - -/** - * A pushed response with its request headers. - * - * @author Alexander M. Turek - * - * @internal - */ -final class PushedResponse -{ - public $response; - - /** @var string[] */ - public $requestHeaders; - - public $parentOptions = []; - - public $handle; - - public function __construct(CurlResponse $response, array $requestHeaders, array $parentOptions, $handle) - { - $this->response = $response; - $this->requestHeaders = $requestHeaders; - $this->parentOptions = $parentOptions; - $this->handle = $handle; - } -} diff --git a/source/vendor/symfony/http-client/LICENSE b/source/vendor/symfony/http-client/LICENSE deleted file mode 100644 index 2358414..0000000 --- a/source/vendor/symfony/http-client/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2018-2021 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/source/vendor/symfony/http-client/MockHttpClient.php b/source/vendor/symfony/http-client/MockHttpClient.php deleted file mode 100644 index ae419bc..0000000 --- a/source/vendor/symfony/http-client/MockHttpClient.php +++ /dev/null @@ -1,91 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient; - -use Symfony\Component\HttpClient\Exception\TransportException; -use Symfony\Component\HttpClient\Response\MockResponse; -use Symfony\Component\HttpClient\Response\ResponseStream; -use Symfony\Contracts\HttpClient\HttpClientInterface; -use Symfony\Contracts\HttpClient\ResponseInterface; -use Symfony\Contracts\HttpClient\ResponseStreamInterface; - -/** - * A test-friendly HttpClient that doesn't make actual HTTP requests. - * - * @author Nicolas Grekas - */ -class MockHttpClient implements HttpClientInterface -{ - use HttpClientTrait; - - private $responseFactory; - private $baseUri; - - /** - * @param callable|ResponseInterface|ResponseInterface[]|iterable|null $responseFactory - */ - public function __construct($responseFactory = null, string $baseUri = null) - { - if ($responseFactory instanceof ResponseInterface) { - $responseFactory = [$responseFactory]; - } - - if (!$responseFactory instanceof \Iterator && null !== $responseFactory && !\is_callable($responseFactory)) { - $responseFactory = (static function () use ($responseFactory) { - yield from $responseFactory; - })(); - } - - $this->responseFactory = $responseFactory; - $this->baseUri = $baseUri; - } - - /** - * {@inheritdoc} - */ - public function request(string $method, string $url, array $options = []): ResponseInterface - { - [$url, $options] = $this->prepareRequest($method, $url, $options, ['base_uri' => $this->baseUri], true); - $url = implode('', $url); - - if (null === $this->responseFactory) { - $response = new MockResponse(); - } elseif (\is_callable($this->responseFactory)) { - $response = ($this->responseFactory)($method, $url, $options); - } elseif (!$this->responseFactory->valid()) { - throw new TransportException('The response factory iterator passed to MockHttpClient is empty.'); - } else { - $response = $this->responseFactory->current(); - $this->responseFactory->next(); - } - - if (!$response instanceof ResponseInterface) { - throw new TransportException(sprintf('The response factory passed to MockHttpClient must return/yield an instance of ResponseInterface, "%s" given.', \is_object($response) ? \get_class($response) : \gettype($response))); - } - - return MockResponse::fromRequest($method, $url, $options, $response); - } - - /** - * {@inheritdoc} - */ - public function stream($responses, float $timeout = null): ResponseStreamInterface - { - if ($responses instanceof ResponseInterface) { - $responses = [$responses]; - } elseif (!is_iterable($responses)) { - throw new \TypeError(sprintf('"%s()" expects parameter 1 to be an iterable of MockResponse objects, "%s" given.', __METHOD__, \is_object($responses) ? \get_class($responses) : \gettype($responses))); - } - - return new ResponseStream(MockResponse::stream($responses, $timeout)); - } -} diff --git a/source/vendor/symfony/http-client/NativeHttpClient.php b/source/vendor/symfony/http-client/NativeHttpClient.php deleted file mode 100644 index f74e773..0000000 --- a/source/vendor/symfony/http-client/NativeHttpClient.php +++ /dev/null @@ -1,484 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient; - -use Psr\Log\LoggerAwareInterface; -use Psr\Log\LoggerAwareTrait; -use Symfony\Component\HttpClient\Exception\InvalidArgumentException; -use Symfony\Component\HttpClient\Exception\TransportException; -use Symfony\Component\HttpClient\Internal\NativeClientState; -use Symfony\Component\HttpClient\Response\NativeResponse; -use Symfony\Component\HttpClient\Response\ResponseStream; -use Symfony\Contracts\HttpClient\HttpClientInterface; -use Symfony\Contracts\HttpClient\ResponseInterface; -use Symfony\Contracts\HttpClient\ResponseStreamInterface; - -/** - * A portable implementation of the HttpClientInterface contracts based on PHP stream wrappers. - * - * PHP stream wrappers are able to fetch response bodies concurrently, - * but each request is opened synchronously. - * - * @author Nicolas Grekas - */ -final class NativeHttpClient implements HttpClientInterface, LoggerAwareInterface -{ - use HttpClientTrait; - use LoggerAwareTrait; - - private $defaultOptions = self::OPTIONS_DEFAULTS; - - /** @var NativeClientState */ - private $multi; - - /** - * @param array $defaultOptions Default request's options - * @param int $maxHostConnections The maximum number of connections to open - * - * @see HttpClientInterface::OPTIONS_DEFAULTS for available options - */ - public function __construct(array $defaultOptions = [], int $maxHostConnections = 6) - { - $this->defaultOptions['buffer'] = $this->defaultOptions['buffer'] ?? \Closure::fromCallable([__CLASS__, 'shouldBuffer']); - - if ($defaultOptions) { - [, $this->defaultOptions] = self::prepareRequest(null, null, $defaultOptions, $this->defaultOptions); - } - - $this->multi = new NativeClientState(); - $this->multi->maxHostConnections = 0 < $maxHostConnections ? $maxHostConnections : \PHP_INT_MAX; - } - - /** - * @see HttpClientInterface::OPTIONS_DEFAULTS for available options - * - * {@inheritdoc} - */ - public function request(string $method, string $url, array $options = []): ResponseInterface - { - [$url, $options] = self::prepareRequest($method, $url, $options, $this->defaultOptions); - - if ($options['bindto']) { - if (file_exists($options['bindto'])) { - throw new TransportException(__CLASS__.' cannot bind to local Unix sockets, use e.g. CurlHttpClient instead.'); - } - if (str_starts_with($options['bindto'], 'if!')) { - throw new TransportException(__CLASS__.' cannot bind to network interfaces, use e.g. CurlHttpClient instead.'); - } - if (str_starts_with($options['bindto'], 'host!')) { - $options['bindto'] = substr($options['bindto'], 5); - } - } - - $options['body'] = self::getBodyAsString($options['body']); - - if ('' !== $options['body'] && 'POST' === $method && !isset($options['normalized_headers']['content-type'])) { - $options['headers'][] = 'Content-Type: application/x-www-form-urlencoded'; - } - - if (\extension_loaded('zlib') && !isset($options['normalized_headers']['accept-encoding'])) { - // gzip is the most widely available algo, no need to deal with deflate - $options['headers'][] = 'Accept-Encoding: gzip'; - } - - if ($options['peer_fingerprint']) { - if (isset($options['peer_fingerprint']['pin-sha256']) && 1 === \count($options['peer_fingerprint'])) { - throw new TransportException(__CLASS__.' cannot verify "pin-sha256" fingerprints, please provide a "sha256" one.'); - } - - unset($options['peer_fingerprint']['pin-sha256']); - } - - $info = [ - 'response_headers' => [], - 'url' => $url, - 'error' => null, - 'canceled' => false, - 'http_method' => $method, - 'http_code' => 0, - 'redirect_count' => 0, - 'start_time' => 0.0, - 'connect_time' => 0.0, - 'redirect_time' => 0.0, - 'pretransfer_time' => 0.0, - 'starttransfer_time' => 0.0, - 'total_time' => 0.0, - 'namelookup_time' => 0.0, - 'size_upload' => 0, - 'size_download' => 0, - 'size_body' => \strlen($options['body']), - 'primary_ip' => '', - 'primary_port' => 'http:' === $url['scheme'] ? 80 : 443, - 'debug' => \extension_loaded('curl') ? '' : "* Enable the curl extension for better performance\n", - ]; - - if ($onProgress = $options['on_progress']) { - // Memoize the last progress to ease calling the callback periodically when no network transfer happens - $lastProgress = [0, 0]; - $maxDuration = 0 < $options['max_duration'] ? $options['max_duration'] : \INF; - $onProgress = static function (...$progress) use ($onProgress, &$lastProgress, &$info, $maxDuration) { - if ($info['total_time'] >= $maxDuration) { - throw new TransportException(sprintf('Max duration was reached for "%s".', implode('', $info['url']))); - } - - $progressInfo = $info; - $progressInfo['url'] = implode('', $info['url']); - unset($progressInfo['size_body']); - - if ($progress && -1 === $progress[0]) { - // Response completed - $lastProgress[0] = max($lastProgress); - } else { - $lastProgress = $progress ?: $lastProgress; - } - - $onProgress($lastProgress[0], $lastProgress[1], $progressInfo); - }; - } elseif (0 < $options['max_duration']) { - $maxDuration = $options['max_duration']; - $onProgress = static function () use (&$info, $maxDuration): void { - if ($info['total_time'] >= $maxDuration) { - throw new TransportException(sprintf('Max duration was reached for "%s".', implode('', $info['url']))); - } - }; - } - - // Always register a notification callback to compute live stats about the response - $notification = static function (int $code, int $severity, ?string $msg, int $msgCode, int $dlNow, int $dlSize) use ($onProgress, &$info) { - $info['total_time'] = microtime(true) - $info['start_time']; - - if (\STREAM_NOTIFY_PROGRESS === $code) { - $info['starttransfer_time'] = $info['starttransfer_time'] ?: $info['total_time']; - $info['size_upload'] += $dlNow ? 0 : $info['size_body']; - $info['size_download'] = $dlNow; - } elseif (\STREAM_NOTIFY_CONNECT === $code) { - $info['connect_time'] = $info['total_time']; - $info['debug'] .= $info['request_header']; - unset($info['request_header']); - } else { - return; - } - - if ($onProgress) { - $onProgress($dlNow, $dlSize); - } - }; - - if ($options['resolve']) { - $this->multi->dnsCache = $options['resolve'] + $this->multi->dnsCache; - } - - $this->logger && $this->logger->info(sprintf('Request: "%s %s"', $method, implode('', $url))); - - [$host, $port] = self::parseHostPort($url, $info); - - if (!isset($options['normalized_headers']['host'])) { - $options['headers'][] = 'Host: '.$host.$port; - } - - if (!isset($options['normalized_headers']['user-agent'])) { - $options['headers'][] = 'User-Agent: Symfony HttpClient/Native'; - } - - if (0 < $options['max_duration']) { - $options['timeout'] = min($options['max_duration'], $options['timeout']); - } - - $bindto = $options['bindto']; - if (!$bindto && (70322 === \PHP_VERSION_ID || 70410 === \PHP_VERSION_ID)) { - $bindto = '0:0'; - } - - $context = [ - 'http' => [ - 'protocol_version' => min($options['http_version'] ?: '1.1', '1.1'), - 'method' => $method, - 'content' => $options['body'], - 'ignore_errors' => true, - 'curl_verify_ssl_peer' => $options['verify_peer'], - 'curl_verify_ssl_host' => $options['verify_host'], - 'auto_decode' => false, // Disable dechunk filter, it's incompatible with stream_select() - 'timeout' => $options['timeout'], - 'follow_location' => false, // We follow redirects ourselves - the native logic is too limited - ], - 'ssl' => array_filter([ - 'verify_peer' => $options['verify_peer'], - 'verify_peer_name' => $options['verify_host'], - 'cafile' => $options['cafile'], - 'capath' => $options['capath'], - 'local_cert' => $options['local_cert'], - 'local_pk' => $options['local_pk'], - 'passphrase' => $options['passphrase'], - 'ciphers' => $options['ciphers'], - 'peer_fingerprint' => $options['peer_fingerprint'], - 'capture_peer_cert_chain' => $options['capture_peer_cert_chain'], - 'allow_self_signed' => (bool) $options['peer_fingerprint'], - 'SNI_enabled' => true, - 'disable_compression' => true, - ], static function ($v) { return null !== $v; }), - 'socket' => [ - 'bindto' => $bindto, - 'tcp_nodelay' => true, - ], - ]; - - $proxy = self::getProxy($options['proxy'], $url); - $noProxy = $options['no_proxy'] ?? $_SERVER['no_proxy'] ?? $_SERVER['NO_PROXY'] ?? ''; - $noProxy = $noProxy ? preg_split('/[\s,]+/', $noProxy) : []; - - $resolveRedirect = self::createRedirectResolver($options, $host, $proxy, $noProxy, $info, $onProgress); - $context = stream_context_create($context, ['notification' => $notification]); - - if (!self::configureHeadersAndProxy($context, $host, $options['headers'], $proxy, $noProxy, 'https:' === $url['scheme'])) { - $ip = self::dnsResolve($host, $this->multi, $info, $onProgress); - $url['authority'] = substr_replace($url['authority'], $ip, -\strlen($host) - \strlen($port), \strlen($host)); - } - - return new NativeResponse($this->multi, $context, implode('', $url), $options, $info, $resolveRedirect, $onProgress, $this->logger); - } - - /** - * {@inheritdoc} - */ - public function stream($responses, float $timeout = null): ResponseStreamInterface - { - if ($responses instanceof NativeResponse) { - $responses = [$responses]; - } elseif (!is_iterable($responses)) { - throw new \TypeError(sprintf('"%s()" expects parameter 1 to be an iterable of NativeResponse objects, "%s" given.', __METHOD__, \is_object($responses) ? \get_class($responses) : \gettype($responses))); - } - - return new ResponseStream(NativeResponse::stream($responses, $timeout)); - } - - private static function getBodyAsString($body): string - { - if (\is_resource($body)) { - return stream_get_contents($body); - } - - if (!$body instanceof \Closure) { - return $body; - } - - $result = ''; - - while ('' !== $data = $body(self::$CHUNK_SIZE)) { - if (!\is_string($data)) { - throw new TransportException(sprintf('Return value of the "body" option callback must be string, "%s" returned.', \gettype($data))); - } - - $result .= $data; - } - - return $result; - } - - /** - * Loads proxy configuration from the same environment variables as curl when no proxy is explicitly set. - */ - private static function getProxy(?string $proxy, array $url): ?array - { - if (null === $proxy) { - // Ignore HTTP_PROXY except on the CLI to work around httpoxy set of vulnerabilities - $proxy = $_SERVER['http_proxy'] ?? (\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) ? $_SERVER['HTTP_PROXY'] ?? null : null) ?? $_SERVER['all_proxy'] ?? $_SERVER['ALL_PROXY'] ?? null; - - if ('https:' === $url['scheme']) { - $proxy = $_SERVER['https_proxy'] ?? $_SERVER['HTTPS_PROXY'] ?? $proxy; - } - } - - if (null === $proxy) { - return null; - } - - $proxy = (parse_url($proxy) ?: []) + ['scheme' => 'http']; - - if (!isset($proxy['host'])) { - throw new TransportException('Invalid HTTP proxy: host is missing.'); - } - - if ('http' === $proxy['scheme']) { - $proxyUrl = 'tcp://'.$proxy['host'].':'.($proxy['port'] ?? '80'); - } elseif ('https' === $proxy['scheme']) { - $proxyUrl = 'ssl://'.$proxy['host'].':'.($proxy['port'] ?? '443'); - } else { - throw new TransportException(sprintf('Unsupported proxy scheme "%s": "http" or "https" expected.', $proxy['scheme'])); - } - - return [ - 'url' => $proxyUrl, - 'auth' => isset($proxy['user']) ? 'Basic '.base64_encode(rawurldecode($proxy['user']).':'.rawurldecode($proxy['pass'] ?? '')) : null, - ]; - } - - /** - * Extracts the host and the port from the URL. - */ - private static function parseHostPort(array $url, array &$info): array - { - if ($port = parse_url($url['authority'], \PHP_URL_PORT) ?: '') { - $info['primary_port'] = $port; - $port = ':'.$port; - } else { - $info['primary_port'] = 'http:' === $url['scheme'] ? 80 : 443; - } - - return [parse_url($url['authority'], \PHP_URL_HOST), $port]; - } - - /** - * Resolves the IP of the host using the local DNS cache if possible. - */ - private static function dnsResolve($host, NativeClientState $multi, array &$info, ?\Closure $onProgress): string - { - if (null === $ip = $multi->dnsCache[$host] ?? null) { - $info['debug'] .= "* Hostname was NOT found in DNS cache\n"; - $now = microtime(true); - - if (!$ip = gethostbynamel($host)) { - throw new TransportException(sprintf('Could not resolve host "%s".', $host)); - } - - $info['namelookup_time'] = microtime(true) - ($info['start_time'] ?: $now); - $multi->dnsCache[$host] = $ip = $ip[0]; - $info['debug'] .= "* Added {$host}:0:{$ip} to DNS cache\n"; - } else { - $info['debug'] .= "* Hostname was found in DNS cache\n"; - } - - $info['primary_ip'] = $ip; - - if ($onProgress) { - // Notify DNS resolution - $onProgress(); - } - - return $ip; - } - - /** - * Handles redirects - the native logic is too buggy to be used. - */ - private static function createRedirectResolver(array $options, string $host, ?array $proxy, array $noProxy, array &$info, ?\Closure $onProgress): \Closure - { - $redirectHeaders = []; - if (0 < $maxRedirects = $options['max_redirects']) { - $redirectHeaders = ['host' => $host]; - $redirectHeaders['with_auth'] = $redirectHeaders['no_auth'] = array_filter($options['headers'], static function ($h) { - return 0 !== stripos($h, 'Host:'); - }); - - if (isset($options['normalized_headers']['authorization']) || isset($options['normalized_headers']['cookie'])) { - $redirectHeaders['no_auth'] = array_filter($redirectHeaders['no_auth'], static function ($h) { - return 0 !== stripos($h, 'Authorization:') && 0 !== stripos($h, 'Cookie:'); - }); - } - } - - return static function (NativeClientState $multi, ?string $location, $context) use ($redirectHeaders, $proxy, $noProxy, &$info, $maxRedirects, $onProgress): ?string { - if (null === $location || $info['http_code'] < 300 || 400 <= $info['http_code']) { - $info['redirect_url'] = null; - - return null; - } - - try { - $url = self::parseUrl($location); - } catch (InvalidArgumentException $e) { - $info['redirect_url'] = null; - - return null; - } - - $url = self::resolveUrl($url, $info['url']); - $info['redirect_url'] = implode('', $url); - - if ($info['redirect_count'] >= $maxRedirects) { - return null; - } - - $info['url'] = $url; - ++$info['redirect_count']; - $info['redirect_time'] = microtime(true) - $info['start_time']; - - // Do like curl and browsers: turn POST to GET on 301, 302 and 303 - if (\in_array($info['http_code'], [301, 302, 303], true)) { - $options = stream_context_get_options($context)['http']; - - if ('POST' === $options['method'] || 303 === $info['http_code']) { - $info['http_method'] = $options['method'] = 'HEAD' === $options['method'] ? 'HEAD' : 'GET'; - $options['content'] = ''; - $options['header'] = array_filter($options['header'], static function ($h) { - return 0 !== stripos($h, 'Content-Length:') && 0 !== stripos($h, 'Content-Type:'); - }); - - stream_context_set_option($context, ['http' => $options]); - } - } - - [$host, $port] = self::parseHostPort($url, $info); - - if (false !== (parse_url($location, \PHP_URL_HOST) ?? false)) { - // Authorization and Cookie headers MUST NOT follow except for the initial host name - $requestHeaders = $redirectHeaders['host'] === $host ? $redirectHeaders['with_auth'] : $redirectHeaders['no_auth']; - $requestHeaders[] = 'Host: '.$host.$port; - $dnsResolve = !self::configureHeadersAndProxy($context, $host, $requestHeaders, $proxy, $noProxy, 'https:' === $url['scheme']); - } else { - $dnsResolve = isset(stream_context_get_options($context)['ssl']['peer_name']); - } - - if ($dnsResolve) { - $ip = self::dnsResolve($host, $multi, $info, $onProgress); - $url['authority'] = substr_replace($url['authority'], $ip, -\strlen($host) - \strlen($port), \strlen($host)); - } - - return implode('', $url); - }; - } - - private static function configureHeadersAndProxy($context, string $host, array $requestHeaders, ?array $proxy, array $noProxy, bool $isSsl): bool - { - if (null === $proxy) { - stream_context_set_option($context, 'http', 'header', $requestHeaders); - stream_context_set_option($context, 'ssl', 'peer_name', $host); - - return false; - } - - // Matching "no_proxy" should follow the behavior of curl - - foreach ($noProxy as $rule) { - $dotRule = '.'.ltrim($rule, '.'); - - if ('*' === $rule || $host === $rule || str_ends_with($host, $dotRule)) { - stream_context_set_option($context, 'http', 'proxy', null); - stream_context_set_option($context, 'http', 'request_fulluri', false); - stream_context_set_option($context, 'http', 'header', $requestHeaders); - stream_context_set_option($context, 'ssl', 'peer_name', $host); - - return false; - } - } - - if (null !== $proxy['auth']) { - $requestHeaders[] = 'Proxy-Authorization: '.$proxy['auth']; - } - - stream_context_set_option($context, 'http', 'proxy', $proxy['url']); - stream_context_set_option($context, 'http', 'request_fulluri', !$isSsl); - stream_context_set_option($context, 'http', 'header', $requestHeaders); - stream_context_set_option($context, 'ssl', 'peer_name', null); - - return true; - } -} diff --git a/source/vendor/symfony/http-client/Psr18Client.php b/source/vendor/symfony/http-client/Psr18Client.php deleted file mode 100644 index 67c2fdb..0000000 --- a/source/vendor/symfony/http-client/Psr18Client.php +++ /dev/null @@ -1,231 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient; - -use Http\Discovery\Exception\NotFoundException; -use Http\Discovery\Psr17FactoryDiscovery; -use Nyholm\Psr7\Factory\Psr17Factory; -use Nyholm\Psr7\Request; -use Nyholm\Psr7\Uri; -use Psr\Http\Client\ClientInterface; -use Psr\Http\Client\NetworkExceptionInterface; -use Psr\Http\Client\RequestExceptionInterface; -use Psr\Http\Message\RequestFactoryInterface; -use Psr\Http\Message\RequestInterface; -use Psr\Http\Message\ResponseFactoryInterface; -use Psr\Http\Message\ResponseInterface; -use Psr\Http\Message\StreamFactoryInterface; -use Psr\Http\Message\StreamInterface; -use Psr\Http\Message\UriFactoryInterface; -use Psr\Http\Message\UriInterface; -use Symfony\Component\HttpClient\Response\ResponseTrait; -use Symfony\Component\HttpClient\Response\StreamWrapper; -use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface; -use Symfony\Contracts\HttpClient\HttpClientInterface; - -if (!interface_exists(RequestFactoryInterface::class)) { - throw new \LogicException('You cannot use the "Symfony\Component\HttpClient\Psr18Client" as the "psr/http-factory" package is not installed. Try running "composer require nyholm/psr7".'); -} - -if (!interface_exists(ClientInterface::class)) { - throw new \LogicException('You cannot use the "Symfony\Component\HttpClient\Psr18Client" as the "psr/http-client" package is not installed. Try running "composer require psr/http-client".'); -} - -/** - * An adapter to turn a Symfony HttpClientInterface into a PSR-18 ClientInterface. - * - * Run "composer require psr/http-client" to install the base ClientInterface. Run - * "composer require nyholm/psr7" to install an efficient implementation of response - * and stream factories with flex-provided autowiring aliases. - * - * @author Nicolas Grekas - */ -final class Psr18Client implements ClientInterface, RequestFactoryInterface, StreamFactoryInterface, UriFactoryInterface -{ - private $client; - private $responseFactory; - private $streamFactory; - - public function __construct(HttpClientInterface $client = null, ResponseFactoryInterface $responseFactory = null, StreamFactoryInterface $streamFactory = null) - { - $this->client = $client ?? HttpClient::create(); - $this->responseFactory = $responseFactory; - $this->streamFactory = $streamFactory ?? ($responseFactory instanceof StreamFactoryInterface ? $responseFactory : null); - - if (null !== $this->responseFactory && null !== $this->streamFactory) { - return; - } - - if (!class_exists(Psr17Factory::class) && !class_exists(Psr17FactoryDiscovery::class)) { - throw new \LogicException('You cannot use the "Symfony\Component\HttpClient\Psr18Client" as no PSR-17 factories have been provided. Try running "composer require nyholm/psr7".'); - } - - try { - $psr17Factory = class_exists(Psr17Factory::class, false) ? new Psr17Factory() : null; - $this->responseFactory = $this->responseFactory ?? $psr17Factory ?? Psr17FactoryDiscovery::findResponseFactory(); - $this->streamFactory = $this->streamFactory ?? $psr17Factory ?? Psr17FactoryDiscovery::findStreamFactory(); - } catch (NotFoundException $e) { - throw new \LogicException('You cannot use the "Symfony\Component\HttpClient\HttplugClient" as no PSR-17 factories have been found. Try running "composer require nyholm/psr7".', 0, $e); - } - } - - /** - * {@inheritdoc} - */ - public function sendRequest(RequestInterface $request): ResponseInterface - { - try { - $body = $request->getBody(); - - if ($body->isSeekable()) { - $body->seek(0); - } - - $response = $this->client->request($request->getMethod(), (string) $request->getUri(), [ - 'headers' => $request->getHeaders(), - 'body' => $body->getContents(), - 'http_version' => '1.0' === $request->getProtocolVersion() ? '1.0' : null, - ]); - - $psrResponse = $this->responseFactory->createResponse($response->getStatusCode()); - - foreach ($response->getHeaders(false) as $name => $values) { - foreach ($values as $value) { - $psrResponse = $psrResponse->withAddedHeader($name, $value); - } - } - - $body = isset(class_uses($response)[ResponseTrait::class]) ? $response->toStream(false) : StreamWrapper::createResource($response, $this->client); - $body = $this->streamFactory->createStreamFromResource($body); - - if ($body->isSeekable()) { - $body->seek(0); - } - - return $psrResponse->withBody($body); - } catch (TransportExceptionInterface $e) { - if ($e instanceof \InvalidArgumentException) { - throw new Psr18RequestException($e, $request); - } - - throw new Psr18NetworkException($e, $request); - } - } - - /** - * {@inheritdoc} - */ - public function createRequest(string $method, $uri): RequestInterface - { - if ($this->responseFactory instanceof RequestFactoryInterface) { - return $this->responseFactory->createRequest($method, $uri); - } - - if (class_exists(Request::class)) { - return new Request($method, $uri); - } - - if (class_exists(Psr17FactoryDiscovery::class)) { - return Psr17FactoryDiscovery::findRequestFactory()->createRequest($method, $uri); - } - - throw new \LogicException(sprintf('You cannot use "%s()" as the "nyholm/psr7" package is not installed. Try running "composer require nyholm/psr7".', __METHOD__)); - } - - /** - * {@inheritdoc} - */ - public function createStream(string $content = ''): StreamInterface - { - $stream = $this->streamFactory->createStream($content); - - if ($stream->isSeekable()) { - $stream->seek(0); - } - - return $stream; - } - - /** - * {@inheritdoc} - */ - public function createStreamFromFile(string $filename, string $mode = 'r'): StreamInterface - { - return $this->streamFactory->createStreamFromFile($filename, $mode); - } - - /** - * {@inheritdoc} - */ - public function createStreamFromResource($resource): StreamInterface - { - return $this->streamFactory->createStreamFromResource($resource); - } - - /** - * {@inheritdoc} - */ - public function createUri(string $uri = ''): UriInterface - { - if ($this->responseFactory instanceof UriFactoryInterface) { - return $this->responseFactory->createUri($uri); - } - - if (class_exists(Uri::class)) { - return new Uri($uri); - } - - if (class_exists(Psr17FactoryDiscovery::class)) { - return Psr17FactoryDiscovery::findUrlFactory()->createUri($uri); - } - - throw new \LogicException(sprintf('You cannot use "%s()" as the "nyholm/psr7" package is not installed. Try running "composer require nyholm/psr7".', __METHOD__)); - } -} - -/** - * @internal - */ -class Psr18NetworkException extends \RuntimeException implements NetworkExceptionInterface -{ - private $request; - - public function __construct(TransportExceptionInterface $e, RequestInterface $request) - { - parent::__construct($e->getMessage(), 0, $e); - $this->request = $request; - } - - public function getRequest(): RequestInterface - { - return $this->request; - } -} - -/** - * @internal - */ -class Psr18RequestException extends \InvalidArgumentException implements RequestExceptionInterface -{ - private $request; - - public function __construct(TransportExceptionInterface $e, RequestInterface $request) - { - parent::__construct($e->getMessage(), 0, $e); - $this->request = $request; - } - - public function getRequest(): RequestInterface - { - return $this->request; - } -} diff --git a/source/vendor/symfony/http-client/README.md b/source/vendor/symfony/http-client/README.md deleted file mode 100644 index 214489b..0000000 --- a/source/vendor/symfony/http-client/README.md +++ /dev/null @@ -1,13 +0,0 @@ -HttpClient component -==================== - -The HttpClient component provides powerful methods to fetch HTTP resources synchronously or asynchronously. - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/http_client.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/source/vendor/symfony/http-client/Response/CurlResponse.php b/source/vendor/symfony/http-client/Response/CurlResponse.php deleted file mode 100644 index 1ccc48a..0000000 --- a/source/vendor/symfony/http-client/Response/CurlResponse.php +++ /dev/null @@ -1,413 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Response; - -use Psr\Log\LoggerInterface; -use Symfony\Component\HttpClient\Chunk\FirstChunk; -use Symfony\Component\HttpClient\Chunk\InformationalChunk; -use Symfony\Component\HttpClient\Exception\TransportException; -use Symfony\Component\HttpClient\Internal\Canary; -use Symfony\Component\HttpClient\Internal\ClientState; -use Symfony\Component\HttpClient\Internal\CurlClientState; -use Symfony\Contracts\HttpClient\ResponseInterface; - -/** - * @author Nicolas Grekas - * - * @internal - */ -final class CurlResponse implements ResponseInterface -{ - use ResponseTrait { - getContent as private doGetContent; - } - - private static $performing = false; - private $multi; - private $debugBuffer; - - /** - * @param \CurlHandle|resource|string $ch - * - * @internal - */ - public function __construct(CurlClientState $multi, $ch, array $options = null, LoggerInterface $logger = null, string $method = 'GET', callable $resolveRedirect = null, int $curlVersion = null) - { - $this->multi = $multi; - - if (\is_resource($ch) || $ch instanceof \CurlHandle) { - $this->handle = $ch; - $this->debugBuffer = fopen('php://temp', 'w+'); - if (0x074000 === $curlVersion) { - fwrite($this->debugBuffer, 'Due to a bug in curl 7.64.0, the debug log is disabled; use another version to work around the issue.'); - } else { - curl_setopt($ch, \CURLOPT_VERBOSE, true); - curl_setopt($ch, \CURLOPT_STDERR, $this->debugBuffer); - } - } else { - $this->info['url'] = $ch; - $ch = $this->handle; - } - - $this->id = $id = (int) $ch; - $this->logger = $logger; - $this->shouldBuffer = $options['buffer'] ?? true; - $this->timeout = $options['timeout'] ?? null; - $this->info['http_method'] = $method; - $this->info['user_data'] = $options['user_data'] ?? null; - $this->info['start_time'] = $this->info['start_time'] ?? microtime(true); - $info = &$this->info; - $headers = &$this->headers; - $debugBuffer = $this->debugBuffer; - - if (!$info['response_headers']) { - // Used to keep track of what we're waiting for - curl_setopt($ch, \CURLOPT_PRIVATE, \in_array($method, ['GET', 'HEAD', 'OPTIONS', 'TRACE'], true) && 1.0 < (float) ($options['http_version'] ?? 1.1) ? 'H2' : 'H0'); // H = headers + retry counter - } - - curl_setopt($ch, \CURLOPT_HEADERFUNCTION, static function ($ch, string $data) use (&$info, &$headers, $options, $multi, $id, &$location, $resolveRedirect, $logger): int { - if (0 !== substr_compare($data, "\r\n", -2)) { - return 0; - } - - $len = 0; - - foreach (explode("\r\n", substr($data, 0, -2)) as $data) { - $len += 2 + self::parseHeaderLine($ch, $data, $info, $headers, $options, $multi, $id, $location, $resolveRedirect, $logger); - } - - return $len; - }); - - if (null === $options) { - // Pushed response: buffer until requested - curl_setopt($ch, \CURLOPT_WRITEFUNCTION, static function ($ch, string $data) use ($multi, $id): int { - $multi->handlesActivity[$id][] = $data; - curl_pause($ch, \CURLPAUSE_RECV); - - return \strlen($data); - }); - - return; - } - - $this->inflate = !isset($options['normalized_headers']['accept-encoding']); - curl_pause($ch, \CURLPAUSE_CONT); - - if ($onProgress = $options['on_progress']) { - $url = isset($info['url']) ? ['url' => $info['url']] : []; - curl_setopt($ch, \CURLOPT_NOPROGRESS, false); - curl_setopt($ch, \CURLOPT_PROGRESSFUNCTION, static function ($ch, $dlSize, $dlNow) use ($onProgress, &$info, $url, $multi, $debugBuffer) { - try { - rewind($debugBuffer); - $debug = ['debug' => stream_get_contents($debugBuffer)]; - $onProgress($dlNow, $dlSize, $url + curl_getinfo($ch) + $info + $debug); - } catch (\Throwable $e) { - $multi->handlesActivity[(int) $ch][] = null; - $multi->handlesActivity[(int) $ch][] = $e; - - return 1; // Abort the request - } - - return null; - }); - } - - curl_setopt($ch, \CURLOPT_WRITEFUNCTION, static function ($ch, string $data) use ($multi, $id): int { - if ('H' === (curl_getinfo($ch, \CURLINFO_PRIVATE)[0] ?? null)) { - $multi->handlesActivity[$id][] = null; - $multi->handlesActivity[$id][] = new TransportException(sprintf('Unsupported protocol for "%s"', curl_getinfo($ch, \CURLINFO_EFFECTIVE_URL))); - - return 0; - } - - curl_setopt($ch, \CURLOPT_WRITEFUNCTION, static function ($ch, string $data) use ($multi, $id): int { - $multi->handlesActivity[$id][] = $data; - - return \strlen($data); - }); - - $multi->handlesActivity[$id][] = $data; - - return \strlen($data); - }); - - $this->initializer = static function (self $response) { - $waitFor = curl_getinfo($ch = $response->handle, \CURLINFO_PRIVATE); - - return 'H' === $waitFor[0]; - }; - - // Schedule the request in a non-blocking way - $multi->openHandles[$id] = [$ch, $options]; - curl_multi_add_handle($multi->handle, $ch); - - $this->canary = new Canary(static function () use ($ch, $multi, $id) { - unset($multi->openHandles[$id], $multi->handlesActivity[$id]); - curl_setopt($ch, \CURLOPT_PRIVATE, '_0'); - - if (self::$performing) { - return; - } - - curl_multi_remove_handle($multi->handle, $ch); - curl_setopt_array($ch, [ - \CURLOPT_NOPROGRESS => true, - \CURLOPT_PROGRESSFUNCTION => null, - \CURLOPT_HEADERFUNCTION => null, - \CURLOPT_WRITEFUNCTION => null, - \CURLOPT_READFUNCTION => null, - \CURLOPT_INFILE => null, - ]); - - if (!$multi->openHandles) { - // Schedule DNS cache eviction for the next request - $multi->dnsCache->evictions = $multi->dnsCache->evictions ?: $multi->dnsCache->removals; - $multi->dnsCache->removals = $multi->dnsCache->hostnames = []; - } - }); - } - - /** - * {@inheritdoc} - */ - public function getInfo(string $type = null) - { - if (!$info = $this->finalInfo) { - $info = array_merge($this->info, curl_getinfo($this->handle)); - $info['url'] = $this->info['url'] ?? $info['url']; - $info['redirect_url'] = $this->info['redirect_url'] ?? null; - - // workaround curl not subtracting the time offset for pushed responses - if (isset($this->info['url']) && $info['start_time'] / 1000 < $info['total_time']) { - $info['total_time'] -= $info['starttransfer_time'] ?: $info['total_time']; - $info['starttransfer_time'] = 0.0; - } - - rewind($this->debugBuffer); - $info['debug'] = stream_get_contents($this->debugBuffer); - $waitFor = curl_getinfo($this->handle, \CURLINFO_PRIVATE); - - if ('H' !== $waitFor[0] && 'C' !== $waitFor[0]) { - curl_setopt($this->handle, \CURLOPT_VERBOSE, false); - rewind($this->debugBuffer); - ftruncate($this->debugBuffer, 0); - $this->finalInfo = $info; - } - } - - return null !== $type ? $info[$type] ?? null : $info; - } - - /** - * {@inheritdoc} - */ - public function getContent(bool $throw = true): string - { - $performing = self::$performing; - self::$performing = $performing || '_0' === curl_getinfo($this->handle, \CURLINFO_PRIVATE); - - try { - return $this->doGetContent($throw); - } finally { - self::$performing = $performing; - } - } - - public function __destruct() - { - curl_setopt($this->handle, \CURLOPT_VERBOSE, false); - - if (null === $this->timeout) { - return; // Unused pushed response - } - - $this->doDestruct(); - } - - /** - * {@inheritdoc} - */ - private static function schedule(self $response, array &$runningResponses): void - { - if (isset($runningResponses[$i = (int) $response->multi->handle])) { - $runningResponses[$i][1][$response->id] = $response; - } else { - $runningResponses[$i] = [$response->multi, [$response->id => $response]]; - } - - if ('_0' === curl_getinfo($ch = $response->handle, \CURLINFO_PRIVATE)) { - // Response already completed - $response->multi->handlesActivity[$response->id][] = null; - $response->multi->handlesActivity[$response->id][] = null !== $response->info['error'] ? new TransportException($response->info['error']) : null; - } - } - - /** - * {@inheritdoc} - * - * @param CurlClientState $multi - */ - private static function perform(ClientState $multi, array &$responses = null): void - { - if (self::$performing) { - if ($responses) { - $response = current($responses); - $multi->handlesActivity[(int) $response->handle][] = null; - $multi->handlesActivity[(int) $response->handle][] = new TransportException(sprintf('Userland callback cannot use the client nor the response while processing "%s".', curl_getinfo($response->handle, \CURLINFO_EFFECTIVE_URL))); - } - - return; - } - - try { - self::$performing = true; - $active = 0; - while (\CURLM_CALL_MULTI_PERFORM === curl_multi_exec($multi->handle, $active)); - - while ($info = curl_multi_info_read($multi->handle)) { - $result = $info['result']; - $id = (int) $ch = $info['handle']; - $waitFor = @curl_getinfo($ch, \CURLINFO_PRIVATE) ?: '_0'; - - if (\in_array($result, [\CURLE_SEND_ERROR, \CURLE_RECV_ERROR, /*CURLE_HTTP2*/ 16, /*CURLE_HTTP2_STREAM*/ 92], true) && $waitFor[1] && 'C' !== $waitFor[0]) { - curl_multi_remove_handle($multi->handle, $ch); - $waitFor[1] = (string) ((int) $waitFor[1] - 1); // decrement the retry counter - curl_setopt($ch, \CURLOPT_PRIVATE, $waitFor); - curl_setopt($ch, \CURLOPT_FORBID_REUSE, true); - - if (0 === curl_multi_add_handle($multi->handle, $ch)) { - continue; - } - } - - $multi->handlesActivity[$id][] = null; - $multi->handlesActivity[$id][] = \in_array($result, [\CURLE_OK, \CURLE_TOO_MANY_REDIRECTS], true) || '_0' === $waitFor || curl_getinfo($ch, \CURLINFO_SIZE_DOWNLOAD) === curl_getinfo($ch, \CURLINFO_CONTENT_LENGTH_DOWNLOAD) ? null : new TransportException(sprintf('%s for "%s".', curl_strerror($result), curl_getinfo($ch, \CURLINFO_EFFECTIVE_URL))); - } - } finally { - self::$performing = false; - } - } - - /** - * {@inheritdoc} - * - * @param CurlClientState $multi - */ - private static function select(ClientState $multi, float $timeout): int - { - if (\PHP_VERSION_ID < 70123 || (70200 <= \PHP_VERSION_ID && \PHP_VERSION_ID < 70211)) { - // workaround https://bugs.php.net/76480 - $timeout = min($timeout, 0.01); - } - - return curl_multi_select($multi->handle, $timeout); - } - - /** - * Parses header lines as curl yields them to us. - */ - private static function parseHeaderLine($ch, string $data, array &$info, array &$headers, ?array $options, CurlClientState $multi, int $id, ?string &$location, ?callable $resolveRedirect, ?LoggerInterface $logger): int - { - $waitFor = @curl_getinfo($ch, \CURLINFO_PRIVATE) ?: '_0'; - - if ('H' !== $waitFor[0]) { - return \strlen($data); // Ignore HTTP trailers - } - - if ('' !== $data) { - try { - // Regular header line: add it to the list - self::addResponseHeaders([$data], $info, $headers); - } catch (TransportException $e) { - $multi->handlesActivity[$id][] = null; - $multi->handlesActivity[$id][] = $e; - - return \strlen($data); - } - - if (!str_starts_with($data, 'HTTP/')) { - if (0 === stripos($data, 'Location:')) { - $location = trim(substr($data, 9)); - } - - return \strlen($data); - } - - if (\function_exists('openssl_x509_read') && $certinfo = curl_getinfo($ch, \CURLINFO_CERTINFO)) { - $info['peer_certificate_chain'] = array_map('openssl_x509_read', array_column($certinfo, 'Cert')); - } - - if (300 <= $info['http_code'] && $info['http_code'] < 400) { - if (curl_getinfo($ch, \CURLINFO_REDIRECT_COUNT) === $options['max_redirects']) { - curl_setopt($ch, \CURLOPT_FOLLOWLOCATION, false); - } elseif (303 === $info['http_code'] || ('POST' === $info['http_method'] && \in_array($info['http_code'], [301, 302], true))) { - $info['http_method'] = 'HEAD' === $info['http_method'] ? 'HEAD' : 'GET'; - curl_setopt($ch, \CURLOPT_POSTFIELDS, ''); - } - } - - return \strlen($data); - } - - // End of headers: handle informational responses, redirects, etc. - - if (200 > $statusCode = curl_getinfo($ch, \CURLINFO_RESPONSE_CODE)) { - $multi->handlesActivity[$id][] = new InformationalChunk($statusCode, $headers); - $location = null; - - return \strlen($data); - } - - $info['redirect_url'] = null; - - if (300 <= $statusCode && $statusCode < 400 && null !== $location) { - if (null === $info['redirect_url'] = $resolveRedirect($ch, $location)) { - $options['max_redirects'] = curl_getinfo($ch, \CURLINFO_REDIRECT_COUNT); - curl_setopt($ch, \CURLOPT_FOLLOWLOCATION, false); - curl_setopt($ch, \CURLOPT_MAXREDIRS, $options['max_redirects']); - } else { - $url = parse_url($location ?? ':'); - - if (isset($url['host']) && null !== $ip = $multi->dnsCache->hostnames[$url['host'] = strtolower($url['host'])] ?? null) { - // Populate DNS cache for redirects if needed - $port = $url['port'] ?? ('http' === ($url['scheme'] ?? parse_url(curl_getinfo($ch, \CURLINFO_EFFECTIVE_URL), \PHP_URL_SCHEME)) ? 80 : 443); - curl_setopt($ch, \CURLOPT_RESOLVE, ["{$url['host']}:$port:$ip"]); - $multi->dnsCache->removals["-{$url['host']}:$port"] = "-{$url['host']}:$port"; - } - } - } - - if (401 === $statusCode && isset($options['auth_ntlm']) && 0 === strncasecmp($headers['www-authenticate'][0] ?? '', 'NTLM ', 5)) { - // Continue with NTLM auth - } elseif ($statusCode < 300 || 400 <= $statusCode || null === $location || curl_getinfo($ch, \CURLINFO_REDIRECT_COUNT) === $options['max_redirects']) { - // Headers and redirects completed, time to get the response's content - $multi->handlesActivity[$id][] = new FirstChunk(); - - if ('HEAD' === $info['http_method'] || \in_array($statusCode, [204, 304], true)) { - $waitFor = '_0'; // no content expected - $multi->handlesActivity[$id][] = null; - $multi->handlesActivity[$id][] = null; - } else { - $waitFor[0] = 'C'; // C = content - } - - curl_setopt($ch, \CURLOPT_PRIVATE, $waitFor); - } elseif (null !== $info['redirect_url'] && $logger) { - $logger->info(sprintf('Redirecting: "%s %s"', $info['http_code'], $info['redirect_url'])); - } - - $location = null; - - return \strlen($data); - } -} diff --git a/source/vendor/symfony/http-client/Response/HttplugPromise.php b/source/vendor/symfony/http-client/Response/HttplugPromise.php deleted file mode 100644 index f3806c9..0000000 --- a/source/vendor/symfony/http-client/Response/HttplugPromise.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Response; - -use GuzzleHttp\Promise\PromiseInterface as GuzzlePromiseInterface; -use Http\Promise\Promise as HttplugPromiseInterface; -use Psr\Http\Message\ResponseInterface as Psr7ResponseInterface; - -/** - * @author Tobias Nyholm - * - * @internal - */ -final class HttplugPromise implements HttplugPromiseInterface -{ - private $promise; - - public function __construct(GuzzlePromiseInterface $promise) - { - $this->promise = $promise; - } - - public function then(callable $onFulfilled = null, callable $onRejected = null): self - { - return new self($this->promise->then($onFulfilled, $onRejected)); - } - - public function cancel(): void - { - $this->promise->cancel(); - } - - /** - * {@inheritdoc} - */ - public function getState(): string - { - return $this->promise->getState(); - } - - /** - * {@inheritdoc} - * - * @return Psr7ResponseInterface|mixed - */ - public function wait($unwrap = true) - { - $result = $this->promise->wait($unwrap); - - while ($result instanceof HttplugPromiseInterface || $result instanceof GuzzlePromiseInterface) { - $result = $result->wait($unwrap); - } - - return $result; - } -} diff --git a/source/vendor/symfony/http-client/Response/MockResponse.php b/source/vendor/symfony/http-client/Response/MockResponse.php deleted file mode 100644 index 8f58032..0000000 --- a/source/vendor/symfony/http-client/Response/MockResponse.php +++ /dev/null @@ -1,301 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Response; - -use Symfony\Component\HttpClient\Chunk\ErrorChunk; -use Symfony\Component\HttpClient\Chunk\FirstChunk; -use Symfony\Component\HttpClient\Exception\InvalidArgumentException; -use Symfony\Component\HttpClient\Exception\TransportException; -use Symfony\Component\HttpClient\Internal\ClientState; -use Symfony\Contracts\HttpClient\ResponseInterface; - -/** - * A test-friendly response. - * - * @author Nicolas Grekas - */ -class MockResponse implements ResponseInterface -{ - use ResponseTrait { - doDestruct as public __destruct; - } - - private $body; - private $requestOptions = []; - - private static $mainMulti; - private static $idSequence = 0; - - /** - * @param string|string[]|iterable $body The response body as a string or an iterable of strings, - * yielding an empty string simulates an idle timeout, - * exceptions are turned to TransportException - * - * @see ResponseInterface::getInfo() for possible info, e.g. "response_headers" - */ - public function __construct($body = '', array $info = []) - { - $this->body = is_iterable($body) ? $body : (string) $body; - $this->info = $info + ['http_code' => 200] + $this->info; - - if (!isset($info['response_headers'])) { - return; - } - - $responseHeaders = []; - - foreach ($info['response_headers'] as $k => $v) { - foreach ((array) $v as $v) { - $responseHeaders[] = (\is_string($k) ? $k.': ' : '').$v; - } - } - - $this->info['response_headers'] = []; - self::addResponseHeaders($responseHeaders, $this->info, $this->headers); - } - - /** - * Returns the options used when doing the request. - */ - public function getRequestOptions(): array - { - return $this->requestOptions; - } - - /** - * {@inheritdoc} - */ - public function getInfo(string $type = null) - { - return null !== $type ? $this->info[$type] ?? null : $this->info; - } - - /** - * {@inheritdoc} - */ - public function cancel(): void - { - $this->info['canceled'] = true; - $this->info['error'] = 'Response has been canceled.'; - $this->body = null; - } - - /** - * {@inheritdoc} - */ - protected function close(): void - { - $this->inflate = null; - $this->body = []; - } - - /** - * @internal - */ - public static function fromRequest(string $method, string $url, array $options, ResponseInterface $mock): self - { - $response = new self([]); - $response->requestOptions = $options; - $response->id = ++self::$idSequence; - $response->shouldBuffer = $options['buffer'] ?? true; - $response->initializer = static function (self $response) { - return \is_array($response->body[0] ?? null); - }; - - $response->info['redirect_count'] = 0; - $response->info['redirect_url'] = null; - $response->info['start_time'] = microtime(true); - $response->info['http_method'] = $method; - $response->info['http_code'] = 0; - $response->info['user_data'] = $options['user_data'] ?? null; - $response->info['url'] = $url; - - if ($mock instanceof self) { - $mock->requestOptions = $response->requestOptions; - } - - self::writeRequest($response, $options, $mock); - $response->body[] = [$options, $mock]; - - return $response; - } - - /** - * {@inheritdoc} - */ - protected static function schedule(self $response, array &$runningResponses): void - { - if (!$response->id) { - throw new InvalidArgumentException('MockResponse instances must be issued by MockHttpClient before processing.'); - } - - $multi = self::$mainMulti ?? self::$mainMulti = new ClientState(); - - if (!isset($runningResponses[0])) { - $runningResponses[0] = [$multi, []]; - } - - $runningResponses[0][1][$response->id] = $response; - } - - /** - * {@inheritdoc} - */ - protected static function perform(ClientState $multi, array &$responses): void - { - foreach ($responses as $response) { - $id = $response->id; - - if (null === $response->body) { - // Canceled response - $response->body = []; - } elseif ([] === $response->body) { - // Error chunk - $multi->handlesActivity[$id][] = null; - $multi->handlesActivity[$id][] = null !== $response->info['error'] ? new TransportException($response->info['error']) : null; - } elseif (null === $chunk = array_shift($response->body)) { - // Last chunk - $multi->handlesActivity[$id][] = null; - $multi->handlesActivity[$id][] = array_shift($response->body); - } elseif (\is_array($chunk)) { - // First chunk - try { - $offset = 0; - $chunk[1]->getStatusCode(); - $chunk[1]->getHeaders(false); - self::readResponse($response, $chunk[0], $chunk[1], $offset); - $multi->handlesActivity[$id][] = new FirstChunk(); - $buffer = $response->requestOptions['buffer'] ?? null; - - if ($buffer instanceof \Closure && $response->content = $buffer($response->headers) ?: null) { - $response->content = \is_resource($response->content) ? $response->content : fopen('php://temp', 'w+'); - } - } catch (\Throwable $e) { - $multi->handlesActivity[$id][] = null; - $multi->handlesActivity[$id][] = $e; - } - } else { - // Data or timeout chunk - $multi->handlesActivity[$id][] = $chunk; - } - } - } - - /** - * {@inheritdoc} - */ - protected static function select(ClientState $multi, float $timeout): int - { - return 42; - } - - /** - * Simulates sending the request. - */ - private static function writeRequest(self $response, array $options, ResponseInterface $mock) - { - $onProgress = $options['on_progress'] ?? static function () {}; - $response->info += $mock->getInfo() ?: []; - - // simulate "size_upload" if it is set - if (isset($response->info['size_upload'])) { - $response->info['size_upload'] = 0.0; - } - - // simulate "total_time" if it is not set - if (!isset($response->info['total_time'])) { - $response->info['total_time'] = microtime(true) - $response->info['start_time']; - } - - // "notify" DNS resolution - $onProgress(0, 0, $response->info); - - // consume the request body - if (\is_resource($body = $options['body'] ?? '')) { - $data = stream_get_contents($body); - if (isset($response->info['size_upload'])) { - $response->info['size_upload'] += \strlen($data); - } - } elseif ($body instanceof \Closure) { - while ('' !== $data = $body(16372)) { - if (!\is_string($data)) { - throw new TransportException(sprintf('Return value of the "body" option callback must be string, "%s" returned.', \gettype($data))); - } - - // "notify" upload progress - if (isset($response->info['size_upload'])) { - $response->info['size_upload'] += \strlen($data); - } - - $onProgress(0, 0, $response->info); - } - } - } - - /** - * Simulates reading the response. - */ - private static function readResponse(self $response, array $options, ResponseInterface $mock, int &$offset) - { - $onProgress = $options['on_progress'] ?? static function () {}; - - // populate info related to headers - $info = $mock->getInfo() ?: []; - $response->info['http_code'] = ($info['http_code'] ?? 0) ?: $mock->getStatusCode() ?: 200; - $response->addResponseHeaders($info['response_headers'] ?? [], $response->info, $response->headers); - $dlSize = isset($response->headers['content-encoding']) || 'HEAD' === $response->info['http_method'] || \in_array($response->info['http_code'], [204, 304], true) ? 0 : (int) ($response->headers['content-length'][0] ?? 0); - - $response->info = [ - 'start_time' => $response->info['start_time'], - 'user_data' => $response->info['user_data'], - 'http_code' => $response->info['http_code'], - ] + $info + $response->info; - - if (!isset($response->info['total_time'])) { - $response->info['total_time'] = microtime(true) - $response->info['start_time']; - } - - // "notify" headers arrival - $onProgress(0, $dlSize, $response->info); - - // cast response body to activity list - $body = $mock instanceof self ? $mock->body : $mock->getContent(false); - - if (!\is_string($body)) { - foreach ($body as $chunk) { - if ('' === $chunk = (string) $chunk) { - // simulate an idle timeout - $response->body[] = new ErrorChunk($offset, sprintf('Idle timeout reached for "%s".', $response->info['url'])); - } else { - $response->body[] = $chunk; - $offset += \strlen($chunk); - // "notify" download progress - $onProgress($offset, $dlSize, $response->info); - } - } - } elseif ('' !== $body) { - $response->body[] = $body; - $offset = \strlen($body); - } - - if (!isset($response->info['total_time'])) { - $response->info['total_time'] = microtime(true) - $response->info['start_time']; - } - - // "notify" completion - $onProgress($offset, $dlSize, $response->info); - - if ($dlSize && $offset !== $dlSize) { - throw new TransportException(sprintf('Transfer closed with %d bytes remaining to read.', $dlSize - $offset)); - } - } -} diff --git a/source/vendor/symfony/http-client/Response/NativeResponse.php b/source/vendor/symfony/http-client/Response/NativeResponse.php deleted file mode 100644 index e87402f..0000000 --- a/source/vendor/symfony/http-client/Response/NativeResponse.php +++ /dev/null @@ -1,331 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Response; - -use Psr\Log\LoggerInterface; -use Symfony\Component\HttpClient\Chunk\FirstChunk; -use Symfony\Component\HttpClient\Exception\TransportException; -use Symfony\Component\HttpClient\Internal\Canary; -use Symfony\Component\HttpClient\Internal\ClientState; -use Symfony\Component\HttpClient\Internal\NativeClientState; -use Symfony\Contracts\HttpClient\ResponseInterface; - -/** - * @author Nicolas Grekas - * - * @internal - */ -final class NativeResponse implements ResponseInterface -{ - use ResponseTrait; - - private $context; - private $url; - private $resolveRedirect; - private $onProgress; - private $remaining; - private $buffer; - private $multi; - private $debugBuffer; - private $shouldBuffer; - - /** - * @internal - */ - public function __construct(NativeClientState $multi, $context, string $url, array $options, array &$info, callable $resolveRedirect, ?callable $onProgress, ?LoggerInterface $logger) - { - $this->multi = $multi; - $this->id = $id = (int) $context; - $this->context = $context; - $this->url = $url; - $this->logger = $logger; - $this->timeout = $options['timeout']; - $this->info = &$info; - $this->resolveRedirect = $resolveRedirect; - $this->onProgress = $onProgress; - $this->inflate = !isset($options['normalized_headers']['accept-encoding']); - $this->shouldBuffer = $options['buffer'] ?? true; - - // Temporary resource to dechunk the response stream - $this->buffer = fopen('php://temp', 'w+'); - - $info['user_data'] = $options['user_data']; - ++$multi->responseCount; - - $this->initializer = static function (self $response) { - return null === $response->remaining; - }; - - $this->canary = new Canary(static function () use ($multi, $id) { - unset($multi->openHandles[$id], $multi->handlesActivity[$id]); - }); - } - - /** - * {@inheritdoc} - */ - public function getInfo(string $type = null) - { - if (!$info = $this->finalInfo) { - $info = $this->info; - $info['url'] = implode('', $info['url']); - unset($info['size_body'], $info['request_header']); - - if (null === $this->buffer) { - $this->finalInfo = $info; - } - } - - return null !== $type ? $info[$type] ?? null : $info; - } - - public function __destruct() - { - try { - $this->doDestruct(); - } finally { - // Clear the DNS cache when all requests completed - if (0 >= --$this->multi->responseCount) { - $this->multi->responseCount = 0; - $this->multi->dnsCache = []; - } - } - } - - private function open(): void - { - $url = $this->url; - - set_error_handler(function ($type, $msg) use (&$url) { - if (\E_NOTICE !== $type || 'fopen(): Content-type not specified assuming application/x-www-form-urlencoded' !== $msg) { - throw new TransportException($msg); - } - - $this->logger && $this->logger->info(sprintf('%s for "%s".', $msg, $url ?? $this->url)); - }); - - try { - $this->info['start_time'] = microtime(true); - - while (true) { - $context = stream_context_get_options($this->context); - - if ($proxy = $context['http']['proxy'] ?? null) { - $this->info['debug'] .= "* Establish HTTP proxy tunnel to {$proxy}\n"; - $this->info['request_header'] = $url; - } else { - $this->info['debug'] .= "* Trying {$this->info['primary_ip']}...\n"; - $this->info['request_header'] = $this->info['url']['path'].$this->info['url']['query']; - } - - $this->info['request_header'] = sprintf("> %s %s HTTP/%s \r\n", $context['http']['method'], $this->info['request_header'], $context['http']['protocol_version']); - $this->info['request_header'] .= implode("\r\n", $context['http']['header'])."\r\n\r\n"; - - if (\array_key_exists('peer_name', $context['ssl']) && null === $context['ssl']['peer_name']) { - unset($context['ssl']['peer_name']); - $this->context = stream_context_create([], ['options' => $context] + stream_context_get_params($this->context)); - } - - // Send request and follow redirects when needed - $this->handle = $h = fopen($url, 'r', false, $this->context); - self::addResponseHeaders(stream_get_meta_data($h)['wrapper_data'], $this->info, $this->headers, $this->info['debug']); - $url = ($this->resolveRedirect)($this->multi, $this->headers['location'][0] ?? null, $this->context); - - if (null === $url) { - break; - } - - $this->logger && $this->logger->info(sprintf('Redirecting: "%s %s"', $this->info['http_code'], $url ?? $this->url)); - } - } catch (\Throwable $e) { - $this->close(); - $this->multi->handlesActivity[$this->id][] = null; - $this->multi->handlesActivity[$this->id][] = $e; - - return; - } finally { - $this->info['pretransfer_time'] = $this->info['total_time'] = microtime(true) - $this->info['start_time']; - restore_error_handler(); - } - - if (isset($context['ssl']['capture_peer_cert_chain']) && isset(($context = stream_context_get_options($this->context))['ssl']['peer_certificate_chain'])) { - $this->info['peer_certificate_chain'] = $context['ssl']['peer_certificate_chain']; - } - - stream_set_blocking($h, false); - $this->context = $this->resolveRedirect = null; - - // Create dechunk buffers - if (isset($this->headers['content-length'])) { - $this->remaining = (int) $this->headers['content-length'][0]; - } elseif ('chunked' === ($this->headers['transfer-encoding'][0] ?? null)) { - stream_filter_append($this->buffer, 'dechunk', \STREAM_FILTER_WRITE); - $this->remaining = -1; - } else { - $this->remaining = -2; - } - - $this->multi->handlesActivity[$this->id] = [new FirstChunk()]; - - if ('HEAD' === $context['http']['method'] || \in_array($this->info['http_code'], [204, 304], true)) { - $this->multi->handlesActivity[$this->id][] = null; - $this->multi->handlesActivity[$this->id][] = null; - - return; - } - - $this->multi->openHandles[$this->id] = [$h, $this->buffer, $this->onProgress, &$this->remaining, &$this->info]; - } - - /** - * {@inheritdoc} - */ - private function close(): void - { - $this->canary->cancel(); - $this->handle = $this->buffer = $this->inflate = $this->onProgress = null; - } - - /** - * {@inheritdoc} - */ - private static function schedule(self $response, array &$runningResponses): void - { - if (!isset($runningResponses[$i = $response->multi->id])) { - $runningResponses[$i] = [$response->multi, []]; - } - - $runningResponses[$i][1][$response->id] = $response; - - if (null === $response->buffer) { - // Response already completed - $response->multi->handlesActivity[$response->id][] = null; - $response->multi->handlesActivity[$response->id][] = null !== $response->info['error'] ? new TransportException($response->info['error']) : null; - } - } - - /** - * {@inheritdoc} - * - * @param NativeClientState $multi - */ - private static function perform(ClientState $multi, array &$responses = null): void - { - foreach ($multi->openHandles as $i => [$h, $buffer, $onProgress]) { - $hasActivity = false; - $remaining = &$multi->openHandles[$i][3]; - $info = &$multi->openHandles[$i][4]; - $e = null; - - // Read incoming buffer and write it to the dechunk one - try { - if ($remaining && '' !== $data = (string) fread($h, 0 > $remaining ? 16372 : $remaining)) { - fwrite($buffer, $data); - $hasActivity = true; - $multi->sleep = false; - - if (-1 !== $remaining) { - $remaining -= \strlen($data); - } - } - } catch (\Throwable $e) { - $hasActivity = $onProgress = false; - } - - if (!$hasActivity) { - if ($onProgress) { - try { - // Notify the progress callback so that it can e.g. cancel - // the request if the stream is inactive for too long - $info['total_time'] = microtime(true) - $info['start_time']; - $onProgress(); - } catch (\Throwable $e) { - // no-op - } - } - } elseif ('' !== $data = stream_get_contents($buffer, -1, 0)) { - rewind($buffer); - ftruncate($buffer, 0); - - if (null === $e) { - $multi->handlesActivity[$i][] = $data; - } - } - - if (null !== $e || !$remaining || feof($h)) { - // Stream completed - $info['total_time'] = microtime(true) - $info['start_time']; - $info['starttransfer_time'] = $info['starttransfer_time'] ?: $info['total_time']; - - if ($onProgress) { - try { - $onProgress(-1); - } catch (\Throwable $e) { - // no-op - } - } - - if (null === $e) { - if (0 < $remaining) { - $e = new TransportException(sprintf('Transfer closed with %s bytes remaining to read.', $remaining)); - } elseif (-1 === $remaining && fwrite($buffer, '-') && '' !== stream_get_contents($buffer, -1, 0)) { - $e = new TransportException('Transfer closed with outstanding data remaining from chunked response.'); - } - } - - $multi->handlesActivity[$i][] = null; - $multi->handlesActivity[$i][] = $e; - unset($multi->openHandles[$i]); - $multi->sleep = false; - } - } - - if (null === $responses) { - return; - } - - // Create empty activity lists to tell ResponseTrait::stream() we still have pending requests - foreach ($responses as $i => $response) { - if (null === $response->remaining && null !== $response->buffer) { - $multi->handlesActivity[$i] = []; - } - } - - if (\count($multi->openHandles) >= $multi->maxHostConnections) { - return; - } - - // Open the next pending request - this is a blocking operation so we do only one of them - foreach ($responses as $i => $response) { - if (null === $response->remaining && null !== $response->buffer) { - $response->open(); - $multi->sleep = false; - self::perform($multi); - - break; - } - } - } - - /** - * {@inheritdoc} - * - * @param NativeClientState $multi - */ - private static function select(ClientState $multi, float $timeout): int - { - $_ = []; - $handles = array_column($multi->openHandles, 0); - - return (!$multi->sleep = !$multi->sleep) ? -1 : stream_select($handles, $_, $_, (int) $timeout, (int) (1E6 * ($timeout - (int) $timeout))); - } -} diff --git a/source/vendor/symfony/http-client/Response/ResponseStream.php b/source/vendor/symfony/http-client/Response/ResponseStream.php deleted file mode 100644 index f86d2d4..0000000 --- a/source/vendor/symfony/http-client/Response/ResponseStream.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Response; - -use Symfony\Contracts\HttpClient\ChunkInterface; -use Symfony\Contracts\HttpClient\ResponseInterface; -use Symfony\Contracts\HttpClient\ResponseStreamInterface; - -/** - * @author Nicolas Grekas - */ -final class ResponseStream implements ResponseStreamInterface -{ - private $generator; - - public function __construct(\Generator $generator) - { - $this->generator = $generator; - } - - public function key(): ResponseInterface - { - return $this->generator->key(); - } - - public function current(): ChunkInterface - { - return $this->generator->current(); - } - - public function next(): void - { - $this->generator->next(); - } - - public function rewind(): void - { - $this->generator->rewind(); - } - - public function valid(): bool - { - return $this->generator->valid(); - } -} diff --git a/source/vendor/symfony/http-client/Response/ResponseTrait.php b/source/vendor/symfony/http-client/Response/ResponseTrait.php deleted file mode 100644 index 69caabf..0000000 --- a/source/vendor/symfony/http-client/Response/ResponseTrait.php +++ /dev/null @@ -1,469 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Response; - -use Symfony\Component\HttpClient\Chunk\DataChunk; -use Symfony\Component\HttpClient\Chunk\ErrorChunk; -use Symfony\Component\HttpClient\Chunk\FirstChunk; -use Symfony\Component\HttpClient\Chunk\LastChunk; -use Symfony\Component\HttpClient\Exception\ClientException; -use Symfony\Component\HttpClient\Exception\JsonException; -use Symfony\Component\HttpClient\Exception\RedirectionException; -use Symfony\Component\HttpClient\Exception\ServerException; -use Symfony\Component\HttpClient\Exception\TransportException; -use Symfony\Component\HttpClient\Internal\ClientState; -use Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface; -use Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface; -use Symfony\Contracts\HttpClient\Exception\ServerExceptionInterface; -use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface; - -/** - * Implements the common logic for response classes. - * - * @author Nicolas Grekas - * - * @internal - */ -trait ResponseTrait -{ - private $logger; - private $headers = []; - private $canary; - - /** - * @var callable|null A callback that initializes the two previous properties - */ - private $initializer; - - private $info = [ - 'response_headers' => [], - 'http_code' => 0, - 'error' => null, - 'canceled' => false, - ]; - - /** @var object|resource */ - private $handle; - private $id; - private $timeout = 0; - private $inflate; - private $shouldBuffer; - private $content; - private $finalInfo; - private $offset = 0; - private $jsonData; - - /** - * {@inheritdoc} - */ - public function getStatusCode(): int - { - if ($this->initializer) { - self::initialize($this); - } - - return $this->info['http_code']; - } - - /** - * {@inheritdoc} - */ - public function getHeaders(bool $throw = true): array - { - if ($this->initializer) { - self::initialize($this); - } - - if ($throw) { - $this->checkStatusCode(); - } - - return $this->headers; - } - - /** - * {@inheritdoc} - */ - public function getContent(bool $throw = true): string - { - if ($this->initializer) { - self::initialize($this); - } - - if ($throw) { - $this->checkStatusCode(); - } - - if (null === $this->content) { - $content = null; - - foreach (self::stream([$this]) as $chunk) { - if (!$chunk->isLast()) { - $content .= $chunk->getContent(); - } - } - - if (null !== $content) { - return $content; - } - - if (null === $this->content) { - throw new TransportException('Cannot get the content of the response twice: buffering is disabled.'); - } - } else { - foreach (self::stream([$this]) as $chunk) { - // Chunks are buffered in $this->content already - } - } - - rewind($this->content); - - return stream_get_contents($this->content); - } - - /** - * {@inheritdoc} - */ - public function toArray(bool $throw = true): array - { - if ('' === $content = $this->getContent($throw)) { - throw new JsonException('Response body is empty.'); - } - - if (null !== $this->jsonData) { - return $this->jsonData; - } - - try { - $content = json_decode($content, true, 512, \JSON_BIGINT_AS_STRING | (\PHP_VERSION_ID >= 70300 ? \JSON_THROW_ON_ERROR : 0)); - } catch (\JsonException $e) { - throw new JsonException($e->getMessage().sprintf(' for "%s".', $this->getInfo('url')), $e->getCode()); - } - - if (\PHP_VERSION_ID < 70300 && \JSON_ERROR_NONE !== json_last_error()) { - throw new JsonException(json_last_error_msg().sprintf(' for "%s".', $this->getInfo('url')), json_last_error()); - } - - if (!\is_array($content)) { - throw new JsonException(sprintf('JSON content was expected to decode to an array, "%s" returned for "%s".', \gettype($content), $this->getInfo('url'))); - } - - if (null !== $this->content) { - // Option "buffer" is true - return $this->jsonData = $content; - } - - return $content; - } - - /** - * {@inheritdoc} - */ - public function cancel(): void - { - $this->info['canceled'] = true; - $this->info['error'] = 'Response has been canceled.'; - $this->close(); - } - - /** - * Casts the response to a PHP stream resource. - * - * @return resource - * - * @throws TransportExceptionInterface When a network error occurs - * @throws RedirectionExceptionInterface On a 3xx when $throw is true and the "max_redirects" option has been reached - * @throws ClientExceptionInterface On a 4xx when $throw is true - * @throws ServerExceptionInterface On a 5xx when $throw is true - */ - public function toStream(bool $throw = true) - { - if ($throw) { - // Ensure headers arrived - $this->getHeaders($throw); - } - - $stream = StreamWrapper::createResource($this); - stream_get_meta_data($stream)['wrapper_data'] - ->bindHandles($this->handle, $this->content); - - return $stream; - } - - public function __sleep() - { - throw new \BadMethodCallException('Cannot serialize '.__CLASS__); - } - - public function __wakeup() - { - throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); - } - - /** - * Closes the response and all its network handles. - */ - private function close(): void - { - $this->canary->cancel(); - $this->inflate = null; - } - - /** - * Adds pending responses to the activity list. - */ - abstract protected static function schedule(self $response, array &$runningResponses): void; - - /** - * Performs all pending non-blocking operations. - */ - abstract protected static function perform(ClientState $multi, array &$responses): void; - - /** - * Waits for network activity. - */ - abstract protected static function select(ClientState $multi, float $timeout): int; - - private static function initialize(self $response): void - { - if (null !== $response->info['error']) { - throw new TransportException($response->info['error']); - } - - try { - if (($response->initializer)($response)) { - foreach (self::stream([$response]) as $chunk) { - if ($chunk->isFirst()) { - break; - } - } - } - } catch (\Throwable $e) { - // Persist timeouts thrown during initialization - $response->info['error'] = $e->getMessage(); - $response->close(); - throw $e; - } - - $response->initializer = null; - } - - private static function addResponseHeaders(array $responseHeaders, array &$info, array &$headers, string &$debug = ''): void - { - foreach ($responseHeaders as $h) { - if (11 <= \strlen($h) && '/' === $h[4] && preg_match('#^HTTP/\d+(?:\.\d+)? ([1-9]\d\d)(?: |$)#', $h, $m)) { - if ($headers) { - $debug .= "< \r\n"; - $headers = []; - } - $info['http_code'] = (int) $m[1]; - } elseif (2 === \count($m = explode(':', $h, 2))) { - $headers[strtolower($m[0])][] = ltrim($m[1]); - } - - $debug .= "< {$h}\r\n"; - $info['response_headers'][] = $h; - } - - $debug .= "< \r\n"; - - if (!$info['http_code']) { - throw new TransportException(sprintf('Invalid or missing HTTP status line for "%s".', implode('', $info['url']))); - } - } - - private function checkStatusCode() - { - if (500 <= $this->info['http_code']) { - throw new ServerException($this); - } - - if (400 <= $this->info['http_code']) { - throw new ClientException($this); - } - - if (300 <= $this->info['http_code']) { - throw new RedirectionException($this); - } - } - - /** - * Ensures the request is always sent and that the response code was checked. - */ - private function doDestruct() - { - $this->shouldBuffer = true; - - if ($this->initializer && null === $this->info['error']) { - self::initialize($this); - $this->checkStatusCode(); - } - } - - /** - * Implements an event loop based on a buffer activity queue. - * - * @internal - */ - public static function stream(iterable $responses, float $timeout = null): \Generator - { - $runningResponses = []; - - foreach ($responses as $response) { - self::schedule($response, $runningResponses); - } - - $lastActivity = microtime(true); - $elapsedTimeout = 0; - - while (true) { - $hasActivity = false; - $timeoutMax = 0; - $timeoutMin = $timeout ?? \INF; - - /** @var ClientState $multi */ - foreach ($runningResponses as $i => [$multi]) { - $responses = &$runningResponses[$i][1]; - self::perform($multi, $responses); - - foreach ($responses as $j => $response) { - $timeoutMax = $timeout ?? max($timeoutMax, $response->timeout); - $timeoutMin = min($timeoutMin, $response->timeout, 1); - $chunk = false; - - if (isset($multi->handlesActivity[$j])) { - // no-op - } elseif (!isset($multi->openHandles[$j])) { - unset($responses[$j]); - continue; - } elseif ($elapsedTimeout >= $timeoutMax) { - $multi->handlesActivity[$j] = [new ErrorChunk($response->offset, sprintf('Idle timeout reached for "%s".', $response->getInfo('url')))]; - } else { - continue; - } - - while ($multi->handlesActivity[$j] ?? false) { - $hasActivity = true; - $elapsedTimeout = 0; - - if (\is_string($chunk = array_shift($multi->handlesActivity[$j]))) { - if (null !== $response->inflate && false === $chunk = @inflate_add($response->inflate, $chunk)) { - $multi->handlesActivity[$j] = [null, new TransportException(sprintf('Error while processing content unencoding for "%s".', $response->getInfo('url')))]; - continue; - } - - if ('' !== $chunk && null !== $response->content && \strlen($chunk) !== fwrite($response->content, $chunk)) { - $multi->handlesActivity[$j] = [null, new TransportException(sprintf('Failed writing %d bytes to the response buffer.', \strlen($chunk)))]; - continue; - } - - $chunkLen = \strlen($chunk); - $chunk = new DataChunk($response->offset, $chunk); - $response->offset += $chunkLen; - } elseif (null === $chunk) { - $e = $multi->handlesActivity[$j][0]; - unset($responses[$j], $multi->handlesActivity[$j]); - $response->close(); - - if (null !== $e) { - $response->info['error'] = $e->getMessage(); - - if ($e instanceof \Error) { - throw $e; - } - - $chunk = new ErrorChunk($response->offset, $e); - } else { - if (0 === $response->offset && null === $response->content) { - $response->content = fopen('php://memory', 'w+'); - } - - $chunk = new LastChunk($response->offset); - } - } elseif ($chunk instanceof ErrorChunk) { - unset($responses[$j]); - $elapsedTimeout = $timeoutMax; - } elseif ($chunk instanceof FirstChunk) { - if ($response->logger) { - $info = $response->getInfo(); - $response->logger->info(sprintf('Response: "%s %s"', $info['http_code'], $info['url'])); - } - - $response->inflate = \extension_loaded('zlib') && $response->inflate && 'gzip' === ($response->headers['content-encoding'][0] ?? null) ? inflate_init(\ZLIB_ENCODING_GZIP) : null; - - if ($response->shouldBuffer instanceof \Closure) { - try { - $response->shouldBuffer = ($response->shouldBuffer)($response->headers); - - if (null !== $response->info['error']) { - throw new TransportException($response->info['error']); - } - } catch (\Throwable $e) { - $response->close(); - $multi->handlesActivity[$j] = [null, $e]; - } - } - - if (true === $response->shouldBuffer) { - $response->content = fopen('php://temp', 'w+'); - } elseif (\is_resource($response->shouldBuffer)) { - $response->content = $response->shouldBuffer; - } - $response->shouldBuffer = null; - - yield $response => $chunk; - - if ($response->initializer && null === $response->info['error']) { - // Ensure the HTTP status code is always checked - $response->getHeaders(true); - } - - continue; - } - - yield $response => $chunk; - } - - unset($multi->handlesActivity[$j]); - - if ($chunk instanceof ErrorChunk && !$chunk->didThrow()) { - // Ensure transport exceptions are always thrown - $chunk->getContent(); - } - } - - if (!$responses) { - unset($runningResponses[$i]); - } - - // Prevent memory leaks - $multi->handlesActivity = $multi->handlesActivity ?: []; - $multi->openHandles = $multi->openHandles ?: []; - } - - if (!$runningResponses) { - break; - } - - if ($hasActivity) { - $lastActivity = microtime(true); - continue; - } - - if (-1 === self::select($multi, min($timeoutMin, $timeoutMax - $elapsedTimeout))) { - usleep(min(500, 1E6 * $timeoutMin)); - } - - $elapsedTimeout = microtime(true) - $lastActivity; - } - } -} diff --git a/source/vendor/symfony/http-client/Response/StreamWrapper.php b/source/vendor/symfony/http-client/Response/StreamWrapper.php deleted file mode 100644 index 644f2ee..0000000 --- a/source/vendor/symfony/http-client/Response/StreamWrapper.php +++ /dev/null @@ -1,296 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Response; - -use Symfony\Contracts\HttpClient\Exception\ExceptionInterface; -use Symfony\Contracts\HttpClient\HttpClientInterface; -use Symfony\Contracts\HttpClient\ResponseInterface; - -/** - * Allows turning ResponseInterface instances to PHP streams. - * - * @author Nicolas Grekas - */ -class StreamWrapper -{ - /** @var resource|string|null */ - public $context; - - /** @var HttpClientInterface */ - private $client; - - /** @var ResponseInterface */ - private $response; - - /** @var resource|null */ - private $content; - - /** @var resource|null */ - private $handle; - - private $blocking = true; - private $timeout; - private $eof = false; - private $offset = 0; - - /** - * Creates a PHP stream resource from a ResponseInterface. - * - * @return resource - */ - public static function createResource(ResponseInterface $response, HttpClientInterface $client = null) - { - if (null === $client && !method_exists($response, 'stream')) { - throw new \InvalidArgumentException(sprintf('Providing a client to "%s()" is required when the response doesn\'t have any "stream()" method.', __CLASS__)); - } - - if (false === stream_wrapper_register('symfony', __CLASS__)) { - throw new \RuntimeException(error_get_last()['message'] ?? 'Registering the "symfony" stream wrapper failed.'); - } - - try { - $context = [ - 'client' => $client ?? $response, - 'response' => $response, - ]; - - return fopen('symfony://'.$response->getInfo('url'), 'r', false, stream_context_create(['symfony' => $context])) ?: null; - } finally { - stream_wrapper_unregister('symfony'); - } - } - - public function getResponse(): ResponseInterface - { - return $this->response; - } - - /** - * @param resource|null $handle The resource handle that should be monitored when - * stream_select() is used on the created stream - * @param resource|null $content The seekable resource where the response body is buffered - */ - public function bindHandles(&$handle, &$content): void - { - $this->handle = &$handle; - $this->content = &$content; - } - - public function stream_open(string $path, string $mode, int $options): bool - { - if ('r' !== $mode) { - if ($options & \STREAM_REPORT_ERRORS) { - trigger_error(sprintf('Invalid mode "%s": only "r" is supported.', $mode), \E_USER_WARNING); - } - - return false; - } - - $context = stream_context_get_options($this->context)['symfony'] ?? null; - $this->client = $context['client'] ?? null; - $this->response = $context['response'] ?? null; - $this->context = null; - - if (null !== $this->client && null !== $this->response) { - return true; - } - - if ($options & \STREAM_REPORT_ERRORS) { - trigger_error('Missing options "client" or "response" in "symfony" stream context.', \E_USER_WARNING); - } - - return false; - } - - public function stream_read(int $count) - { - if (\is_resource($this->content)) { - // Empty the internal activity list - foreach ($this->client->stream([$this->response], 0) as $chunk) { - try { - if (!$chunk->isTimeout() && $chunk->isFirst()) { - $this->response->getStatusCode(); // ignore 3/4/5xx - } - } catch (ExceptionInterface $e) { - trigger_error($e->getMessage(), \E_USER_WARNING); - - return false; - } - } - - if (0 !== fseek($this->content, $this->offset)) { - return false; - } - - if ('' !== $data = fread($this->content, $count)) { - fseek($this->content, 0, \SEEK_END); - $this->offset += \strlen($data); - - return $data; - } - } - - if (\is_string($this->content)) { - if (\strlen($this->content) <= $count) { - $data = $this->content; - $this->content = null; - } else { - $data = substr($this->content, 0, $count); - $this->content = substr($this->content, $count); - } - $this->offset += \strlen($data); - - return $data; - } - - foreach ($this->client->stream([$this->response], $this->blocking ? $this->timeout : 0) as $chunk) { - try { - $this->eof = true; - $this->eof = !$chunk->isTimeout(); - $this->eof = $chunk->isLast(); - - if ($chunk->isFirst()) { - $this->response->getStatusCode(); // ignore 3/4/5xx - } - - if ('' !== $data = $chunk->getContent()) { - if (\strlen($data) > $count) { - if (null === $this->content) { - $this->content = substr($data, $count); - } - $data = substr($data, 0, $count); - } - $this->offset += \strlen($data); - - return $data; - } - } catch (ExceptionInterface $e) { - trigger_error($e->getMessage(), \E_USER_WARNING); - - return false; - } - } - - return ''; - } - - public function stream_set_option(int $option, int $arg1, ?int $arg2): bool - { - if (\STREAM_OPTION_BLOCKING === $option) { - $this->blocking = (bool) $arg1; - } elseif (\STREAM_OPTION_READ_TIMEOUT === $option) { - $this->timeout = $arg1 + $arg2 / 1e6; - } else { - return false; - } - - return true; - } - - public function stream_tell(): int - { - return $this->offset; - } - - public function stream_eof(): bool - { - return $this->eof && !\is_string($this->content); - } - - public function stream_seek(int $offset, int $whence = \SEEK_SET): bool - { - if (!\is_resource($this->content) || 0 !== fseek($this->content, 0, \SEEK_END)) { - return false; - } - - $size = ftell($this->content); - - if (\SEEK_CUR === $whence) { - $offset += $this->offset; - } - - if (\SEEK_END === $whence || $size < $offset) { - foreach ($this->client->stream([$this->response]) as $chunk) { - try { - if ($chunk->isFirst()) { - $this->response->getStatusCode(); // ignore 3/4/5xx - } - - // Chunks are buffered in $this->content already - $size += \strlen($chunk->getContent()); - - if (\SEEK_END !== $whence && $offset <= $size) { - break; - } - } catch (ExceptionInterface $e) { - trigger_error($e->getMessage(), \E_USER_WARNING); - - return false; - } - } - - if (\SEEK_END === $whence) { - $offset += $size; - } - } - - if (0 <= $offset && $offset <= $size) { - $this->eof = false; - $this->offset = $offset; - - return true; - } - - return false; - } - - public function stream_cast(int $castAs) - { - if (\STREAM_CAST_FOR_SELECT === $castAs) { - $this->response->getHeaders(false); - - return $this->handle ?? false; - } - - return false; - } - - public function stream_stat(): array - { - try { - $headers = $this->response->getHeaders(false); - } catch (ExceptionInterface $e) { - trigger_error($e->getMessage(), \E_USER_WARNING); - $headers = []; - } - - return [ - 'dev' => 0, - 'ino' => 0, - 'mode' => 33060, - 'nlink' => 0, - 'uid' => 0, - 'gid' => 0, - 'rdev' => 0, - 'size' => (int) ($headers['content-length'][0] ?? -1), - 'atime' => 0, - 'mtime' => strtotime($headers['last-modified'][0] ?? '') ?: 0, - 'ctime' => 0, - 'blksize' => 0, - 'blocks' => 0, - ]; - } - - private function __construct() - { - } -} diff --git a/source/vendor/symfony/http-client/ScopingHttpClient.php b/source/vendor/symfony/http-client/ScopingHttpClient.php deleted file mode 100644 index 3dcde64..0000000 --- a/source/vendor/symfony/http-client/ScopingHttpClient.php +++ /dev/null @@ -1,108 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient; - -use Symfony\Component\HttpClient\Exception\InvalidArgumentException; -use Symfony\Contracts\HttpClient\HttpClientInterface; -use Symfony\Contracts\HttpClient\ResponseInterface; -use Symfony\Contracts\HttpClient\ResponseStreamInterface; -use Symfony\Contracts\Service\ResetInterface; - -/** - * Auto-configure the default options based on the requested URL. - * - * @author Anthony Martin - */ -class ScopingHttpClient implements HttpClientInterface, ResetInterface -{ - use HttpClientTrait; - - private $client; - private $defaultOptionsByRegexp; - private $defaultRegexp; - - public function __construct(HttpClientInterface $client, array $defaultOptionsByRegexp, string $defaultRegexp = null) - { - $this->client = $client; - $this->defaultOptionsByRegexp = $defaultOptionsByRegexp; - $this->defaultRegexp = $defaultRegexp; - - if (null !== $defaultRegexp && !isset($defaultOptionsByRegexp[$defaultRegexp])) { - throw new InvalidArgumentException(sprintf('No options are mapped to the provided "%s" default regexp.', $defaultRegexp)); - } - } - - public static function forBaseUri(HttpClientInterface $client, string $baseUri, array $defaultOptions = [], $regexp = null): self - { - if (null === $regexp) { - $regexp = preg_quote(implode('', self::resolveUrl(self::parseUrl('.'), self::parseUrl($baseUri)))); - } - - $defaultOptions['base_uri'] = $baseUri; - - return new self($client, [$regexp => $defaultOptions], $regexp); - } - - /** - * {@inheritdoc} - */ - public function request(string $method, string $url, array $options = []): ResponseInterface - { - $e = null; - $url = self::parseUrl($url, $options['query'] ?? []); - - if (\is_string($options['base_uri'] ?? null)) { - $options['base_uri'] = self::parseUrl($options['base_uri']); - } - - try { - $url = implode('', self::resolveUrl($url, $options['base_uri'] ?? null)); - } catch (InvalidArgumentException $e) { - if (null === $this->defaultRegexp) { - throw $e; - } - - $defaultOptions = $this->defaultOptionsByRegexp[$this->defaultRegexp]; - $options = self::mergeDefaultOptions($options, $defaultOptions, true); - if (\is_string($options['base_uri'] ?? null)) { - $options['base_uri'] = self::parseUrl($options['base_uri']); - } - $url = implode('', self::resolveUrl($url, $options['base_uri'] ?? null, $defaultOptions['query'] ?? [])); - } - - foreach ($this->defaultOptionsByRegexp as $regexp => $defaultOptions) { - if (preg_match("{{$regexp}}A", $url)) { - if (null === $e || $regexp !== $this->defaultRegexp) { - $options = self::mergeDefaultOptions($options, $defaultOptions, true); - } - break; - } - } - - return $this->client->request($method, $url, $options); - } - - /** - * {@inheritdoc} - */ - public function stream($responses, float $timeout = null): ResponseStreamInterface - { - return $this->client->stream($responses, $timeout); - } - - public function reset() - { - if ($this->client instanceof ResetInterface) { - $this->client->reset(); - } - } -} diff --git a/source/vendor/symfony/http-client/TraceableHttpClient.php b/source/vendor/symfony/http-client/TraceableHttpClient.php deleted file mode 100644 index d60d084..0000000 --- a/source/vendor/symfony/http-client/TraceableHttpClient.php +++ /dev/null @@ -1,78 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient; - -use Symfony\Contracts\HttpClient\HttpClientInterface; -use Symfony\Contracts\HttpClient\ResponseInterface; -use Symfony\Contracts\HttpClient\ResponseStreamInterface; -use Symfony\Contracts\Service\ResetInterface; - -/** - * @author Jérémy Romey - */ -final class TraceableHttpClient implements HttpClientInterface, ResetInterface -{ - private $client; - private $tracedRequests = []; - - public function __construct(HttpClientInterface $client) - { - $this->client = $client; - } - - /** - * {@inheritdoc} - */ - public function request(string $method, string $url, array $options = []): ResponseInterface - { - $traceInfo = []; - $this->tracedRequests[] = [ - 'method' => $method, - 'url' => $url, - 'options' => $options, - 'info' => &$traceInfo, - ]; - $onProgress = $options['on_progress'] ?? null; - - $options['on_progress'] = function (int $dlNow, int $dlSize, array $info) use (&$traceInfo, $onProgress) { - $traceInfo = $info; - - if (null !== $onProgress) { - $onProgress($dlNow, $dlSize, $info); - } - }; - - return $this->client->request($method, $url, $options); - } - - /** - * {@inheritdoc} - */ - public function stream($responses, float $timeout = null): ResponseStreamInterface - { - return $this->client->stream($responses, $timeout); - } - - public function getTracedRequests(): array - { - return $this->tracedRequests; - } - - public function reset() - { - if ($this->client instanceof ResetInterface) { - $this->client->reset(); - } - - $this->tracedRequests = []; - } -} diff --git a/source/vendor/symfony/polyfill-ctype/Ctype.php b/source/vendor/symfony/polyfill-ctype/Ctype.php deleted file mode 100644 index 58414dc..0000000 --- a/source/vendor/symfony/polyfill-ctype/Ctype.php +++ /dev/null @@ -1,227 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Ctype; - -/** - * Ctype implementation through regex. - * - * @internal - * - * @author Gert de Pagter - */ -final class Ctype -{ - /** - * Returns TRUE if every character in text is either a letter or a digit, FALSE otherwise. - * - * @see https://php.net/ctype-alnum - * - * @param string|int $text - * - * @return bool - */ - public static function ctype_alnum($text) - { - $text = self::convert_int_to_char_for_ctype($text); - - return \is_string($text) && '' !== $text && !preg_match('/[^A-Za-z0-9]/', $text); - } - - /** - * Returns TRUE if every character in text is a letter, FALSE otherwise. - * - * @see https://php.net/ctype-alpha - * - * @param string|int $text - * - * @return bool - */ - public static function ctype_alpha($text) - { - $text = self::convert_int_to_char_for_ctype($text); - - return \is_string($text) && '' !== $text && !preg_match('/[^A-Za-z]/', $text); - } - - /** - * Returns TRUE if every character in text is a control character from the current locale, FALSE otherwise. - * - * @see https://php.net/ctype-cntrl - * - * @param string|int $text - * - * @return bool - */ - public static function ctype_cntrl($text) - { - $text = self::convert_int_to_char_for_ctype($text); - - return \is_string($text) && '' !== $text && !preg_match('/[^\x00-\x1f\x7f]/', $text); - } - - /** - * Returns TRUE if every character in the string text is a decimal digit, FALSE otherwise. - * - * @see https://php.net/ctype-digit - * - * @param string|int $text - * - * @return bool - */ - public static function ctype_digit($text) - { - $text = self::convert_int_to_char_for_ctype($text); - - return \is_string($text) && '' !== $text && !preg_match('/[^0-9]/', $text); - } - - /** - * Returns TRUE if every character in text is printable and actually creates visible output (no white space), FALSE otherwise. - * - * @see https://php.net/ctype-graph - * - * @param string|int $text - * - * @return bool - */ - public static function ctype_graph($text) - { - $text = self::convert_int_to_char_for_ctype($text); - - return \is_string($text) && '' !== $text && !preg_match('/[^!-~]/', $text); - } - - /** - * Returns TRUE if every character in text is a lowercase letter. - * - * @see https://php.net/ctype-lower - * - * @param string|int $text - * - * @return bool - */ - public static function ctype_lower($text) - { - $text = self::convert_int_to_char_for_ctype($text); - - return \is_string($text) && '' !== $text && !preg_match('/[^a-z]/', $text); - } - - /** - * Returns TRUE if every character in text will actually create output (including blanks). Returns FALSE if text contains control characters or characters that do not have any output or control function at all. - * - * @see https://php.net/ctype-print - * - * @param string|int $text - * - * @return bool - */ - public static function ctype_print($text) - { - $text = self::convert_int_to_char_for_ctype($text); - - return \is_string($text) && '' !== $text && !preg_match('/[^ -~]/', $text); - } - - /** - * Returns TRUE if every character in text is printable, but neither letter, digit or blank, FALSE otherwise. - * - * @see https://php.net/ctype-punct - * - * @param string|int $text - * - * @return bool - */ - public static function ctype_punct($text) - { - $text = self::convert_int_to_char_for_ctype($text); - - return \is_string($text) && '' !== $text && !preg_match('/[^!-\/\:-@\[-`\{-~]/', $text); - } - - /** - * Returns TRUE if every character in text creates some sort of white space, FALSE otherwise. Besides the blank character this also includes tab, vertical tab, line feed, carriage return and form feed characters. - * - * @see https://php.net/ctype-space - * - * @param string|int $text - * - * @return bool - */ - public static function ctype_space($text) - { - $text = self::convert_int_to_char_for_ctype($text); - - return \is_string($text) && '' !== $text && !preg_match('/[^\s]/', $text); - } - - /** - * Returns TRUE if every character in text is an uppercase letter. - * - * @see https://php.net/ctype-upper - * - * @param string|int $text - * - * @return bool - */ - public static function ctype_upper($text) - { - $text = self::convert_int_to_char_for_ctype($text); - - return \is_string($text) && '' !== $text && !preg_match('/[^A-Z]/', $text); - } - - /** - * Returns TRUE if every character in text is a hexadecimal 'digit', that is a decimal digit or a character from [A-Fa-f] , FALSE otherwise. - * - * @see https://php.net/ctype-xdigit - * - * @param string|int $text - * - * @return bool - */ - public static function ctype_xdigit($text) - { - $text = self::convert_int_to_char_for_ctype($text); - - return \is_string($text) && '' !== $text && !preg_match('/[^A-Fa-f0-9]/', $text); - } - - /** - * Converts integers to their char versions according to normal ctype behaviour, if needed. - * - * If an integer between -128 and 255 inclusive is provided, - * it is interpreted as the ASCII value of a single character - * (negative values have 256 added in order to allow characters in the Extended ASCII range). - * Any other integer is interpreted as a string containing the decimal digits of the integer. - * - * @param string|int $int - * - * @return mixed - */ - private static function convert_int_to_char_for_ctype($int) - { - if (!\is_int($int)) { - return $int; - } - - if ($int < -128 || $int > 255) { - return (string) $int; - } - - if ($int < 0) { - $int += 256; - } - - return \chr($int); - } -} diff --git a/source/vendor/symfony/polyfill-ctype/LICENSE b/source/vendor/symfony/polyfill-ctype/LICENSE deleted file mode 100644 index 3f853aa..0000000 --- a/source/vendor/symfony/polyfill-ctype/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2018-2019 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/source/vendor/symfony/polyfill-ctype/README.md b/source/vendor/symfony/polyfill-ctype/README.md deleted file mode 100644 index 8add1ab..0000000 --- a/source/vendor/symfony/polyfill-ctype/README.md +++ /dev/null @@ -1,12 +0,0 @@ -Symfony Polyfill / Ctype -======================== - -This component provides `ctype_*` functions to users who run php versions without the ctype extension. - -More information can be found in the -[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). - -License -======= - -This library is released under the [MIT license](LICENSE). diff --git a/source/vendor/symfony/polyfill-ctype/bootstrap.php b/source/vendor/symfony/polyfill-ctype/bootstrap.php deleted file mode 100644 index d54524b..0000000 --- a/source/vendor/symfony/polyfill-ctype/bootstrap.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Ctype as p; - -if (\PHP_VERSION_ID >= 80000) { - return require __DIR__.'/bootstrap80.php'; -} - -if (!function_exists('ctype_alnum')) { - function ctype_alnum($text) { return p\Ctype::ctype_alnum($text); } -} -if (!function_exists('ctype_alpha')) { - function ctype_alpha($text) { return p\Ctype::ctype_alpha($text); } -} -if (!function_exists('ctype_cntrl')) { - function ctype_cntrl($text) { return p\Ctype::ctype_cntrl($text); } -} -if (!function_exists('ctype_digit')) { - function ctype_digit($text) { return p\Ctype::ctype_digit($text); } -} -if (!function_exists('ctype_graph')) { - function ctype_graph($text) { return p\Ctype::ctype_graph($text); } -} -if (!function_exists('ctype_lower')) { - function ctype_lower($text) { return p\Ctype::ctype_lower($text); } -} -if (!function_exists('ctype_print')) { - function ctype_print($text) { return p\Ctype::ctype_print($text); } -} -if (!function_exists('ctype_punct')) { - function ctype_punct($text) { return p\Ctype::ctype_punct($text); } -} -if (!function_exists('ctype_space')) { - function ctype_space($text) { return p\Ctype::ctype_space($text); } -} -if (!function_exists('ctype_upper')) { - function ctype_upper($text) { return p\Ctype::ctype_upper($text); } -} -if (!function_exists('ctype_xdigit')) { - function ctype_xdigit($text) { return p\Ctype::ctype_xdigit($text); } -} diff --git a/source/vendor/symfony/polyfill-ctype/bootstrap80.php b/source/vendor/symfony/polyfill-ctype/bootstrap80.php deleted file mode 100644 index ab2f861..0000000 --- a/source/vendor/symfony/polyfill-ctype/bootstrap80.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Ctype as p; - -if (!function_exists('ctype_alnum')) { - function ctype_alnum(mixed $text): bool { return p\Ctype::ctype_alnum($text); } -} -if (!function_exists('ctype_alpha')) { - function ctype_alpha(mixed $text): bool { return p\Ctype::ctype_alpha($text); } -} -if (!function_exists('ctype_cntrl')) { - function ctype_cntrl(mixed $text): bool { return p\Ctype::ctype_cntrl($text); } -} -if (!function_exists('ctype_digit')) { - function ctype_digit(mixed $text): bool { return p\Ctype::ctype_digit($text); } -} -if (!function_exists('ctype_graph')) { - function ctype_graph(mixed $text): bool { return p\Ctype::ctype_graph($text); } -} -if (!function_exists('ctype_lower')) { - function ctype_lower(mixed $text): bool { return p\Ctype::ctype_lower($text); } -} -if (!function_exists('ctype_print')) { - function ctype_print(mixed $text): bool { return p\Ctype::ctype_print($text); } -} -if (!function_exists('ctype_punct')) { - function ctype_punct(mixed $text): bool { return p\Ctype::ctype_punct($text); } -} -if (!function_exists('ctype_space')) { - function ctype_space(mixed $text): bool { return p\Ctype::ctype_space($text); } -} -if (!function_exists('ctype_upper')) { - function ctype_upper(mixed $text): bool { return p\Ctype::ctype_upper($text); } -} -if (!function_exists('ctype_xdigit')) { - function ctype_xdigit(mixed $text): bool { return p\Ctype::ctype_xdigit($text); } -} diff --git a/source/vendor/symfony/polyfill-iconv/Iconv.php b/source/vendor/symfony/polyfill-iconv/Iconv.php deleted file mode 100644 index c17a70d..0000000 --- a/source/vendor/symfony/polyfill-iconv/Iconv.php +++ /dev/null @@ -1,744 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Iconv; - -/** - * iconv implementation in pure PHP, UTF-8 centric. - * - * Implemented: - * - iconv - Convert string to requested character encoding - * - iconv_mime_decode - Decodes a MIME header field - * - iconv_mime_decode_headers - Decodes multiple MIME header fields at once - * - iconv_get_encoding - Retrieve internal configuration variables of iconv extension - * - iconv_set_encoding - Set current setting for character encoding conversion - * - iconv_mime_encode - Composes a MIME header field - * - iconv_strlen - Returns the character count of string - * - iconv_strpos - Finds position of first occurrence of a needle within a haystack - * - iconv_strrpos - Finds the last occurrence of a needle within a haystack - * - iconv_substr - Cut out part of a string - * - * Charsets available for conversion are defined by files - * in the charset/ directory and by Iconv::$alias below. - * You're welcome to send back any addition you make. - * - * @author Nicolas Grekas - * - * @internal - */ -final class Iconv -{ - public const ERROR_ILLEGAL_CHARACTER = 'iconv(): Detected an illegal character in input string'; - public const ERROR_WRONG_CHARSET = 'iconv(): Wrong charset, conversion from `%s\' to `%s\' is not allowed'; - - public static $inputEncoding = 'utf-8'; - public static $outputEncoding = 'utf-8'; - public static $internalEncoding = 'utf-8'; - - private static $alias = [ - 'utf8' => 'utf-8', - 'ascii' => 'us-ascii', - 'tis-620' => 'iso-8859-11', - 'cp1250' => 'windows-1250', - 'cp1251' => 'windows-1251', - 'cp1252' => 'windows-1252', - 'cp1253' => 'windows-1253', - 'cp1254' => 'windows-1254', - 'cp1255' => 'windows-1255', - 'cp1256' => 'windows-1256', - 'cp1257' => 'windows-1257', - 'cp1258' => 'windows-1258', - 'shift-jis' => 'cp932', - 'shift_jis' => 'cp932', - 'latin1' => 'iso-8859-1', - 'latin2' => 'iso-8859-2', - 'latin3' => 'iso-8859-3', - 'latin4' => 'iso-8859-4', - 'latin5' => 'iso-8859-9', - 'latin6' => 'iso-8859-10', - 'latin7' => 'iso-8859-13', - 'latin8' => 'iso-8859-14', - 'latin9' => 'iso-8859-15', - 'latin10' => 'iso-8859-16', - 'iso8859-1' => 'iso-8859-1', - 'iso8859-2' => 'iso-8859-2', - 'iso8859-3' => 'iso-8859-3', - 'iso8859-4' => 'iso-8859-4', - 'iso8859-5' => 'iso-8859-5', - 'iso8859-6' => 'iso-8859-6', - 'iso8859-7' => 'iso-8859-7', - 'iso8859-8' => 'iso-8859-8', - 'iso8859-9' => 'iso-8859-9', - 'iso8859-10' => 'iso-8859-10', - 'iso8859-11' => 'iso-8859-11', - 'iso8859-12' => 'iso-8859-12', - 'iso8859-13' => 'iso-8859-13', - 'iso8859-14' => 'iso-8859-14', - 'iso8859-15' => 'iso-8859-15', - 'iso8859-16' => 'iso-8859-16', - 'iso_8859-1' => 'iso-8859-1', - 'iso_8859-2' => 'iso-8859-2', - 'iso_8859-3' => 'iso-8859-3', - 'iso_8859-4' => 'iso-8859-4', - 'iso_8859-5' => 'iso-8859-5', - 'iso_8859-6' => 'iso-8859-6', - 'iso_8859-7' => 'iso-8859-7', - 'iso_8859-8' => 'iso-8859-8', - 'iso_8859-9' => 'iso-8859-9', - 'iso_8859-10' => 'iso-8859-10', - 'iso_8859-11' => 'iso-8859-11', - 'iso_8859-12' => 'iso-8859-12', - 'iso_8859-13' => 'iso-8859-13', - 'iso_8859-14' => 'iso-8859-14', - 'iso_8859-15' => 'iso-8859-15', - 'iso_8859-16' => 'iso-8859-16', - 'iso88591' => 'iso-8859-1', - 'iso88592' => 'iso-8859-2', - 'iso88593' => 'iso-8859-3', - 'iso88594' => 'iso-8859-4', - 'iso88595' => 'iso-8859-5', - 'iso88596' => 'iso-8859-6', - 'iso88597' => 'iso-8859-7', - 'iso88598' => 'iso-8859-8', - 'iso88599' => 'iso-8859-9', - 'iso885910' => 'iso-8859-10', - 'iso885911' => 'iso-8859-11', - 'iso885912' => 'iso-8859-12', - 'iso885913' => 'iso-8859-13', - 'iso885914' => 'iso-8859-14', - 'iso885915' => 'iso-8859-15', - 'iso885916' => 'iso-8859-16', - ]; - private static $translitMap = []; - private static $convertMap = []; - private static $errorHandler; - private static $lastError; - - private static $ulenMask = ["\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4]; - private static $isValidUtf8; - - public static function iconv($inCharset, $outCharset, $str) - { - $str = (string) $str; - if ('' === $str) { - return ''; - } - - // Prepare for //IGNORE and //TRANSLIT - - $translit = $ignore = ''; - - $outCharset = strtolower($outCharset); - $inCharset = strtolower($inCharset); - - if ('' === $outCharset) { - $outCharset = 'iso-8859-1'; - } - if ('' === $inCharset) { - $inCharset = 'iso-8859-1'; - } - - do { - $loop = false; - - if ('//translit' === substr($outCharset, -10)) { - $loop = $translit = true; - $outCharset = substr($outCharset, 0, -10); - } - - if ('//ignore' === substr($outCharset, -8)) { - $loop = $ignore = true; - $outCharset = substr($outCharset, 0, -8); - } - } while ($loop); - - do { - $loop = false; - - if ('//translit' === substr($inCharset, -10)) { - $loop = true; - $inCharset = substr($inCharset, 0, -10); - } - - if ('//ignore' === substr($inCharset, -8)) { - $loop = true; - $inCharset = substr($inCharset, 0, -8); - } - } while ($loop); - - if (isset(self::$alias[$inCharset])) { - $inCharset = self::$alias[$inCharset]; - } - if (isset(self::$alias[$outCharset])) { - $outCharset = self::$alias[$outCharset]; - } - - // Load charset maps - - if (('utf-8' !== $inCharset && !self::loadMap('from.', $inCharset, $inMap)) - || ('utf-8' !== $outCharset && !self::loadMap('to.', $outCharset, $outMap))) { - trigger_error(sprintf(self::ERROR_WRONG_CHARSET, $inCharset, $outCharset)); - - return false; - } - - if ('utf-8' !== $inCharset) { - // Convert input to UTF-8 - $result = ''; - if (self::mapToUtf8($result, $inMap, $str, $ignore)) { - $str = $result; - } else { - $str = false; - } - self::$isValidUtf8 = true; - } else { - self::$isValidUtf8 = preg_match('//u', $str); - - if (!self::$isValidUtf8 && !$ignore) { - trigger_error(self::ERROR_ILLEGAL_CHARACTER); - - return false; - } - - if ('utf-8' === $outCharset) { - // UTF-8 validation - $str = self::utf8ToUtf8($str, $ignore); - } - } - - if ('utf-8' !== $outCharset && false !== $str) { - // Convert output to UTF-8 - $result = ''; - if (self::mapFromUtf8($result, $outMap, $str, $ignore, $translit)) { - return $result; - } - - return false; - } - - return $str; - } - - public static function iconv_mime_decode_headers($str, $mode = 0, $charset = null) - { - if (null === $charset) { - $charset = self::$internalEncoding; - } - - if (false !== strpos($str, "\r")) { - $str = strtr(str_replace("\r\n", "\n", $str), "\r", "\n"); - } - $str = explode("\n\n", $str, 2); - - $headers = []; - - $str = preg_split('/\n(?![ \t])/', $str[0]); - foreach ($str as $str) { - $str = self::iconv_mime_decode($str, $mode, $charset); - if (false === $str) { - return false; - } - $str = explode(':', $str, 2); - - if (2 === \count($str)) { - if (isset($headers[$str[0]])) { - if (!\is_array($headers[$str[0]])) { - $headers[$str[0]] = [$headers[$str[0]]]; - } - $headers[$str[0]][] = ltrim($str[1]); - } else { - $headers[$str[0]] = ltrim($str[1]); - } - } - } - - return $headers; - } - - public static function iconv_mime_decode($str, $mode = 0, $charset = null) - { - if (null === $charset) { - $charset = self::$internalEncoding; - } - if (\ICONV_MIME_DECODE_CONTINUE_ON_ERROR & $mode) { - $charset .= '//IGNORE'; - } - - if (false !== strpos($str, "\r")) { - $str = strtr(str_replace("\r\n", "\n", $str), "\r", "\n"); - } - $str = preg_split('/\n(?![ \t])/', rtrim($str), 2); - $str = preg_replace('/[ \t]*\n[ \t]+/', ' ', rtrim($str[0])); - $str = preg_split('/=\?([^?]+)\?([bqBQ])\?(.*?)\?=/', $str, -1, \PREG_SPLIT_DELIM_CAPTURE); - - $result = self::iconv('utf-8', $charset, $str[0]); - if (false === $result) { - return false; - } - - $i = 1; - $len = \count($str); - - while ($i < $len) { - $c = strtolower($str[$i]); - if ((\ICONV_MIME_DECODE_CONTINUE_ON_ERROR & $mode) - && 'utf-8' !== $c - && !isset(self::$alias[$c]) - && !self::loadMap('from.', $c, $d)) { - $d = false; - } elseif ('B' === strtoupper($str[$i + 1])) { - $d = base64_decode($str[$i + 2]); - } else { - $d = rawurldecode(strtr(str_replace('%', '%25', $str[$i + 2]), '=_', '% ')); - } - - if (false !== $d) { - if ('' !== $d) { - if ('' === $d = self::iconv($c, $charset, $d)) { - $str[$i + 3] = substr($str[$i + 3], 1); - } else { - $result .= $d; - } - } - $d = self::iconv('utf-8', $charset, $str[$i + 3]); - if ('' !== trim($d)) { - $result .= $d; - } - } elseif (\ICONV_MIME_DECODE_CONTINUE_ON_ERROR & $mode) { - $result .= "=?{$str[$i]}?{$str[$i + 1]}?{$str[$i + 2]}?={$str[$i + 3]}"; - } else { - $result = false; - break; - } - - $i += 4; - } - - return $result; - } - - public static function iconv_get_encoding($type = 'all') - { - switch ($type) { - case 'input_encoding': return self::$inputEncoding; - case 'output_encoding': return self::$outputEncoding; - case 'internal_encoding': return self::$internalEncoding; - } - - return [ - 'input_encoding' => self::$inputEncoding, - 'output_encoding' => self::$outputEncoding, - 'internal_encoding' => self::$internalEncoding, - ]; - } - - public static function iconv_set_encoding($type, $charset) - { - switch ($type) { - case 'input_encoding': self::$inputEncoding = $charset; break; - case 'output_encoding': self::$outputEncoding = $charset; break; - case 'internal_encoding': self::$internalEncoding = $charset; break; - default: return false; - } - - return true; - } - - public static function iconv_mime_encode($fieldName, $fieldValue, $pref = null) - { - if (!\is_array($pref)) { - $pref = []; - } - - $pref += [ - 'scheme' => 'B', - 'input-charset' => self::$internalEncoding, - 'output-charset' => self::$internalEncoding, - 'line-length' => 76, - 'line-break-chars' => "\r\n", - ]; - - if (preg_match('/[\x80-\xFF]/', $fieldName)) { - $fieldName = ''; - } - - $scheme = strtoupper(substr($pref['scheme'], 0, 1)); - $in = strtolower($pref['input-charset']); - $out = strtolower($pref['output-charset']); - - if ('utf-8' !== $in && false === $fieldValue = self::iconv($in, 'utf-8', $fieldValue)) { - return false; - } - - preg_match_all('/./us', $fieldValue, $chars); - - $chars = $chars[0] ?? []; - - $lineBreak = (int) $pref['line-length']; - $lineStart = "=?{$pref['output-charset']}?{$scheme}?"; - $lineLength = \strlen($fieldName) + 2 + \strlen($lineStart) + 2; - $lineOffset = \strlen($lineStart) + 3; - $lineData = ''; - - $fieldValue = []; - - $Q = 'Q' === $scheme; - - foreach ($chars as $c) { - if ('utf-8' !== $out && false === $c = self::iconv('utf-8', $out, $c)) { - return false; - } - - $o = $Q - ? $c = preg_replace_callback( - '/[=_\?\x00-\x1F\x80-\xFF]/', - [__CLASS__, 'qpByteCallback'], - $c - ) - : base64_encode($lineData.$c); - - if (isset($o[$lineBreak - $lineLength])) { - if (!$Q) { - $lineData = base64_encode($lineData); - } - $fieldValue[] = $lineStart.$lineData.'?='; - $lineLength = $lineOffset; - $lineData = ''; - } - - $lineData .= $c; - $Q && $lineLength += \strlen($c); - } - - if ('' !== $lineData) { - if (!$Q) { - $lineData = base64_encode($lineData); - } - $fieldValue[] = $lineStart.$lineData.'?='; - } - - return $fieldName.': '.implode($pref['line-break-chars'].' ', $fieldValue); - } - - public static function iconv_strlen($s, $encoding = null) - { - static $hasXml = null; - if (null === $hasXml) { - $hasXml = \extension_loaded('xml'); - } - - if ($hasXml) { - return self::strlen1($s, $encoding); - } - - return self::strlen2($s, $encoding); - } - - public static function strlen1($s, $encoding = null) - { - if (null === $encoding) { - $encoding = self::$internalEncoding; - } - if (0 !== stripos($encoding, 'utf-8') && false === $s = self::iconv($encoding, 'utf-8', $s)) { - return false; - } - - return \strlen(utf8_decode($s)); - } - - public static function strlen2($s, $encoding = null) - { - if (null === $encoding) { - $encoding = self::$internalEncoding; - } - if (0 !== stripos($encoding, 'utf-8') && false === $s = self::iconv($encoding, 'utf-8', $s)) { - return false; - } - - $ulenMask = self::$ulenMask; - - $i = 0; - $j = 0; - $len = \strlen($s); - - while ($i < $len) { - $u = $s[$i] & "\xF0"; - $i += $ulenMask[$u] ?? 1; - ++$j; - } - - return $j; - } - - public static function iconv_strpos($haystack, $needle, $offset = 0, $encoding = null) - { - if (null === $encoding) { - $encoding = self::$internalEncoding; - } - - if (0 !== stripos($encoding, 'utf-8')) { - if (false === $haystack = self::iconv($encoding, 'utf-8', $haystack)) { - return false; - } - if (false === $needle = self::iconv($encoding, 'utf-8', $needle)) { - return false; - } - } - - if ($offset = (int) $offset) { - $haystack = self::iconv_substr($haystack, $offset, 2147483647, 'utf-8'); - } - $pos = strpos($haystack, $needle); - - return false === $pos ? false : ($offset + ($pos ? self::iconv_strlen(substr($haystack, 0, $pos), 'utf-8') : 0)); - } - - public static function iconv_strrpos($haystack, $needle, $encoding = null) - { - if (null === $encoding) { - $encoding = self::$internalEncoding; - } - - if (0 !== stripos($encoding, 'utf-8')) { - if (false === $haystack = self::iconv($encoding, 'utf-8', $haystack)) { - return false; - } - if (false === $needle = self::iconv($encoding, 'utf-8', $needle)) { - return false; - } - } - - $pos = isset($needle[0]) ? strrpos($haystack, $needle) : false; - - return false === $pos ? false : self::iconv_strlen($pos ? substr($haystack, 0, $pos) : $haystack, 'utf-8'); - } - - public static function iconv_substr($s, $start, $length = 2147483647, $encoding = null) - { - if (null === $encoding) { - $encoding = self::$internalEncoding; - } - if (0 !== stripos($encoding, 'utf-8')) { - $encoding = null; - } elseif (false === $s = self::iconv($encoding, 'utf-8', $s)) { - return false; - } - - $s = (string) $s; - $slen = self::iconv_strlen($s, 'utf-8'); - $start = (int) $start; - - if (0 > $start) { - $start += $slen; - } - if (0 > $start) { - if (\PHP_VERSION_ID < 80000) { - return false; - } - - $start = 0; - } - if ($start >= $slen) { - return \PHP_VERSION_ID >= 80000 ? '' : false; - } - - $rx = $slen - $start; - - if (0 > $length) { - $length += $rx; - } - if (0 === $length) { - return ''; - } - if (0 > $length) { - return \PHP_VERSION_ID >= 80000 ? '' : false; - } - - if ($length > $rx) { - $length = $rx; - } - - $rx = '/^'.($start ? self::pregOffset($start) : '').'('.self::pregOffset($length).')/u'; - - $s = preg_match($rx, $s, $s) ? $s[1] : ''; - - if (null === $encoding) { - return $s; - } - - return self::iconv('utf-8', $encoding, $s); - } - - private static function loadMap($type, $charset, &$map) - { - if (!isset(self::$convertMap[$type.$charset])) { - if (false === $map = self::getData($type.$charset)) { - if ('to.' === $type && self::loadMap('from.', $charset, $map)) { - $map = array_flip($map); - } else { - return false; - } - } - - self::$convertMap[$type.$charset] = $map; - } else { - $map = self::$convertMap[$type.$charset]; - } - - return true; - } - - private static function utf8ToUtf8($str, $ignore) - { - $ulenMask = self::$ulenMask; - $valid = self::$isValidUtf8; - - $u = $str; - $i = $j = 0; - $len = \strlen($str); - - while ($i < $len) { - if ($str[$i] < "\x80") { - $u[$j++] = $str[$i++]; - } else { - $ulen = $str[$i] & "\xF0"; - $ulen = $ulenMask[$ulen] ?? 1; - $uchr = substr($str, $i, $ulen); - - if (1 === $ulen || !($valid || preg_match('/^.$/us', $uchr))) { - if ($ignore) { - ++$i; - continue; - } - - trigger_error(self::ERROR_ILLEGAL_CHARACTER); - - return false; - } - - $i += $ulen; - - $u[$j++] = $uchr[0]; - - isset($uchr[1]) && 0 !== ($u[$j++] = $uchr[1]) - && isset($uchr[2]) && 0 !== ($u[$j++] = $uchr[2]) - && isset($uchr[3]) && 0 !== ($u[$j++] = $uchr[3]); - } - } - - return substr($u, 0, $j); - } - - private static function mapToUtf8(&$result, array $map, $str, $ignore) - { - $len = \strlen($str); - for ($i = 0; $i < $len; ++$i) { - if (isset($str[$i + 1], $map[$str[$i].$str[$i + 1]])) { - $result .= $map[$str[$i].$str[++$i]]; - } elseif (isset($map[$str[$i]])) { - $result .= $map[$str[$i]]; - } elseif (!$ignore) { - trigger_error(self::ERROR_ILLEGAL_CHARACTER); - - return false; - } - } - - return true; - } - - private static function mapFromUtf8(&$result, array $map, $str, $ignore, $translit) - { - $ulenMask = self::$ulenMask; - $valid = self::$isValidUtf8; - - if ($translit && !self::$translitMap) { - self::$translitMap = self::getData('translit'); - } - - $i = 0; - $len = \strlen($str); - - while ($i < $len) { - if ($str[$i] < "\x80") { - $uchr = $str[$i++]; - } else { - $ulen = $str[$i] & "\xF0"; - $ulen = $ulenMask[$ulen] ?? 1; - $uchr = substr($str, $i, $ulen); - - if ($ignore && (1 === $ulen || !($valid || preg_match('/^.$/us', $uchr)))) { - ++$i; - continue; - } - - $i += $ulen; - } - - if (isset($map[$uchr])) { - $result .= $map[$uchr]; - } elseif ($translit) { - if (isset(self::$translitMap[$uchr])) { - $uchr = self::$translitMap[$uchr]; - } elseif ($uchr >= "\xC3\x80") { - $uchr = \Normalizer::normalize($uchr, \Normalizer::NFD); - - if ($uchr[0] < "\x80") { - $uchr = $uchr[0]; - } elseif ($ignore) { - continue; - } else { - return false; - } - } elseif ($ignore) { - continue; - } else { - return false; - } - - $str = $uchr.substr($str, $i); - $len = \strlen($str); - $i = 0; - } elseif (!$ignore) { - return false; - } - } - - return true; - } - - private static function qpByteCallback(array $m) - { - return '='.strtoupper(dechex(\ord($m[0]))); - } - - private static function pregOffset($offset) - { - $rx = []; - $offset = (int) $offset; - - while ($offset > 65535) { - $rx[] = '.{65535}'; - $offset -= 65535; - } - - return implode('', $rx).'.{'.$offset.'}'; - } - - private static function getData($file) - { - if (file_exists($file = __DIR__.'/Resources/charset/'.$file.'.php')) { - return require $file; - } - - return false; - } -} diff --git a/source/vendor/symfony/polyfill-iconv/LICENSE b/source/vendor/symfony/polyfill-iconv/LICENSE deleted file mode 100644 index 4cd8bdd..0000000 --- a/source/vendor/symfony/polyfill-iconv/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2015-2019 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/source/vendor/symfony/polyfill-iconv/README.md b/source/vendor/symfony/polyfill-iconv/README.md deleted file mode 100644 index b0c8984..0000000 --- a/source/vendor/symfony/polyfill-iconv/README.md +++ /dev/null @@ -1,14 +0,0 @@ -Symfony Polyfill / Iconv -======================== - -This component provides a native PHP implementation of the -[php.net/iconv](https://php.net/iconv) functions -(short of [`ob_iconv_handler`](https://php.net/ob-iconv-handler)). - -More information can be found in the -[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). - -License -======= - -This library is released under the [MIT license](LICENSE). diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.big5.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.big5.php deleted file mode 100644 index b119854..0000000 --- a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.big5.php +++ /dev/null @@ -1,13719 +0,0 @@ - ' ', - 'A' => ',', - 'B' => '、', - 'C' => '。', - 'D' => '.', - 'E' => '•', - 'F' => ';', - 'G' => ':', - 'H' => '?', - 'I' => '!', - 'J' => '︰', - 'K' => '…', - 'L' => '‥', - 'M' => '﹐', - 'N' => '、', - 'O' => '﹒', - 'P' => '·', - 'Q' => '﹔', - 'R' => '﹕', - 'S' => '﹖', - 'T' => '﹗', - 'U' => '|', - 'V' => '–', - 'W' => '︱', - 'X' => '—', - 'Y' => '︳', - 'Z' => '�', - '[' => '︴', - '\\' => '﹏', - ']' => '(', - '^' => ')', - '_' => '︵', - '`' => '︶', - 'a' => '{', - 'b' => '}', - 'c' => '︷', - 'd' => '︸', - 'e' => '〔', - 'f' => '〕', - 'g' => '︹', - 'h' => '︺', - 'i' => '【', - 'j' => '】', - 'k' => '︻', - 'l' => '︼', - 'm' => '《', - 'n' => '》', - 'o' => '︽', - 'p' => '︾', - 'q' => '〈', - 'r' => '〉', - 's' => '︿', - 't' => '﹀', - 'u' => '「', - 'v' => '」', - 'w' => '﹁', - 'x' => '﹂', - 'y' => '『', - 'z' => '』', - '{' => '﹃', - '|' => '﹄', - '}' => '﹙', - '~' => '﹚', - '' => '﹛', - '' => '﹜', - '' => '﹝', - '' => '﹞', - '' => '‘', - '' => '’', - '' => '“', - '' => '”', - '' => '〝', - '' => '〞', - '' => '‵', - '' => '′', - '' => '#', - '' => '&', - '' => '*', - '' => '※', - '' => '§', - '' => '〃', - '' => '○', - '' => '●', - '' => '△', - '' => '▲', - '' => '◎', - '' => '☆', - '' => '★', - '' => '◇', - '' => '◆', - '' => '□', - '' => '■', - '' => '▽', - '' => '▼', - '' => '㊣', - '' => '℅', - '' => '‾', - '' => '�', - '' => '_', - '' => '�', - '' => '﹉', - '' => '﹊', - '' => '﹍', - '' => '﹎', - '' => '﹋', - '' => '﹌', - '' => '﹟', - '' => '﹠', - '' => '﹡', - '' => '+', - '' => '-', - '' => '×', - '' => '÷', - '' => '±', - '' => '√', - '' => '<', - '' => '>', - '' => '=', - '' => '≦', - '' => '≧', - '' => '≠', - '' => '∞', - '' => '≒', - '' => '≡', - '' => '﹢', - '' => '﹣', - '' => '﹤', - '' => '﹥', - '' => '﹦', - '' => '∼', - '' => '∩', - '' => '∪', - '' => '⊥', - '' => '∠', - '' => '∟', - '' => '⊿', - '' => '㏒', - '' => '㏑', - '' => '∫', - '' => '∮', - '' => '∵', - '' => '∴', - '' => '♀', - '' => '♂', - '' => '♁', - '' => '☉', - '' => '↑', - '' => '↓', - '' => '←', - '' => '→', - '' => '↖', - '' => '↗', - '' => '↙', - '' => '↘', - '' => '∥', - '' => '∣', - '' => '�', - '@' => '�', - 'A' => '/', - 'B' => '\', - 'C' => '$', - 'D' => '¥', - 'E' => '〒', - 'F' => '¢', - 'G' => '£', - 'H' => '%', - 'I' => '@', - 'J' => '℃', - 'K' => '℉', - 'L' => '﹩', - 'M' => '﹪', - 'N' => '﹫', - 'O' => '㏕', - 'P' => '㎜', - 'Q' => '㎝', - 'R' => '㎞', - 'S' => '㏎', - 'T' => '㎡', - 'U' => '㎎', - 'V' => '㎏', - 'W' => '㏄', - 'X' => '°', - 'Y' => '兙', - 'Z' => '兛', - '[' => '兞', - '\\' => '兝', - ']' => '兡', - '^' => '兣', - '_' => '嗧', - '`' => '瓩', - 'a' => '糎', - 'b' => '▁', - 'c' => '▂', - 'd' => '▃', - 'e' => '▄', - 'f' => '▅', - 'g' => '▆', - 'h' => '▇', - 'i' => '█', - 'j' => '▏', - 'k' => '▎', - 'l' => '▍', - 'm' => '▌', - 'n' => '▋', - 'o' => '▊', - 'p' => '▉', - 'q' => '┼', - 'r' => '┴', - 's' => '┬', - 't' => '┤', - 'u' => '├', - 'v' => '▔', - 'w' => '─', - 'x' => '│', - 'y' => '▕', - 'z' => '┌', - '{' => '┐', - '|' => '└', - '}' => '┘', - '~' => '╭', - '' => '╮', - '' => '╰', - '' => '╯', - '' => '═', - '' => '╞', - '' => '╪', - '' => '╡', - '' => '◢', - '' => '◣', - '' => '◥', - '' => '◤', - '' => '╱', - '' => '╲', - '' => '╳', - '' => '0', - '' => '1', - '' => '2', - '' => '3', - '' => '4', - '' => '5', - '' => '6', - '' => '7', - '' => '8', - '' => '9', - '' => 'Ⅰ', - '' => 'Ⅱ', - '' => 'Ⅲ', - '' => 'Ⅳ', - '' => 'Ⅴ', - '' => 'Ⅵ', - '' => 'Ⅶ', - '' => 'Ⅷ', - '' => 'Ⅸ', - '' => 'Ⅹ', - '' => '〡', - '' => '〢', - '' => '〣', - '' => '〤', - '' => '〥', - '' => '〦', - '' => '〧', - '' => '〨', - '' => '〩', - '' => '�', - '' => '卄', - '' => '�', - '' => 'A', - '' => 'B', - '' => 'C', - '' => 'D', - '' => 'E', - '' => 'F', - '' => 'G', - '' => 'H', - '' => 'I', - '' => 'J', - '' => 'K', - '' => 'L', - '' => 'M', - '' => 'N', - '' => 'O', - '' => 'P', - '' => 'Q', - '' => 'R', - '' => 'S', - '' => 'T', - '' => 'U', - '' => 'V', - '' => 'W', - '' => 'X', - '' => 'Y', - '' => 'Z', - '' => 'a', - '' => 'b', - '' => 'c', - '' => 'd', - '' => 'e', - '' => 'f', - '' => 'g', - '' => 'h', - '' => 'i', - '' => 'j', - '' => 'k', - '' => 'l', - '' => 'm', - '' => 'n', - '' => 'o', - '' => 'p', - '' => 'q', - '' => 'r', - '' => 's', - '' => 't', - '' => 'u', - '' => 'v', - '@' => 'w', - 'A' => 'x', - 'B' => 'y', - 'C' => 'z', - 'D' => 'Α', - 'E' => 'Β', - 'F' => 'Γ', - 'G' => 'Δ', - 'H' => 'Ε', - 'I' => 'Ζ', - 'J' => 'Η', - 'K' => 'Θ', - 'L' => 'Ι', - 'M' => 'Κ', - 'N' => 'Λ', - 'O' => 'Μ', - 'P' => 'Ν', - 'Q' => 'Ξ', - 'R' => 'Ο', - 'S' => 'Π', - 'T' => 'Ρ', - 'U' => 'Σ', - 'V' => 'Τ', - 'W' => 'Υ', - 'X' => 'Φ', - 'Y' => 'Χ', - 'Z' => 'Ψ', - '[' => 'Ω', - '\\' => 'α', - ']' => 'β', - '^' => 'γ', - '_' => 'δ', - '`' => 'ε', - 'a' => 'ζ', - 'b' => 'η', - 'c' => 'θ', - 'd' => 'ι', - 'e' => 'κ', - 'f' => 'λ', - 'g' => 'μ', - 'h' => 'ν', - 'i' => 'ξ', - 'j' => 'ο', - 'k' => 'π', - 'l' => 'ρ', - 'm' => 'σ', - 'n' => 'τ', - 'o' => 'υ', - 'p' => 'φ', - 'q' => 'χ', - 'r' => 'ψ', - 's' => 'ω', - 't' => 'ㄅ', - 'u' => 'ㄆ', - 'v' => 'ㄇ', - 'w' => 'ㄈ', - 'x' => 'ㄉ', - 'y' => 'ㄊ', - 'z' => 'ㄋ', - '{' => 'ㄌ', - '|' => 'ㄍ', - '}' => 'ㄎ', - '~' => 'ㄏ', - '' => 'ㄐ', - '' => 'ㄑ', - '' => 'ㄒ', - '' => 'ㄓ', - '' => 'ㄔ', - '' => 'ㄕ', - '' => 'ㄖ', - '' => 'ㄗ', - '' => 'ㄘ', - '' => 'ㄙ', - '' => 'ㄚ', - '' => 'ㄛ', - '' => 'ㄜ', - '' => 'ㄝ', - '' => 'ㄞ', - '' => 'ㄟ', - '' => 'ㄠ', - '' => 'ㄡ', - '' => 'ㄢ', - '' => 'ㄣ', - '' => 'ㄤ', - '' => 'ㄥ', - '' => 'ㄦ', - '' => 'ㄧ', - '' => 'ㄨ', - '' => 'ㄩ', - '' => '˙', - '' => 'ˉ', - '' => 'ˊ', - '' => 'ˇ', - '' => 'ˋ', - '@' => '一', - 'A' => '乙', - 'B' => '丁', - 'C' => '七', - 'D' => '乃', - 'E' => '九', - 'F' => '了', - 'G' => '二', - 'H' => '人', - 'I' => '儿', - 'J' => '入', - 'K' => '八', - 'L' => '几', - 'M' => '刀', - 'N' => '刁', - 'O' => '力', - 'P' => '匕', - 'Q' => '十', - 'R' => '卜', - 'S' => '又', - 'T' => '三', - 'U' => '下', - 'V' => '丈', - 'W' => '上', - 'X' => '丫', - 'Y' => '丸', - 'Z' => '凡', - '[' => '久', - '\\' => '么', - ']' => '也', - '^' => '乞', - '_' => '于', - '`' => '亡', - 'a' => '兀', - 'b' => '刃', - 'c' => '勺', - 'd' => '千', - 'e' => '叉', - 'f' => '口', - 'g' => '土', - 'h' => '士', - 'i' => '夕', - 'j' => '大', - 'k' => '女', - 'l' => '子', - 'm' => '孑', - 'n' => '孓', - 'o' => '寸', - 'p' => '小', - 'q' => '尢', - 'r' => '尸', - 's' => '山', - 't' => '川', - 'u' => '工', - 'v' => '己', - 'w' => '已', - 'x' => '巳', - 'y' => '巾', - 'z' => '干', - '{' => '廾', - '|' => '弋', - '}' => '弓', - '~' => '才', - '' => '丑', - '' => '丐', - '' => '不', - '' => '中', - '' => '丰', - '' => '丹', - '' => '之', - '' => '尹', - '' => '予', - '' => '云', - '' => '井', - '' => '互', - '' => '五', - '' => '亢', - '' => '仁', - '' => '什', - '' => '仃', - '' => '仆', - '' => '仇', - '' => '仍', - '' => '今', - '' => '介', - '' => '仄', - '' => '元', - '' => '允', - '' => '內', - '' => '六', - '' => '兮', - '' => '公', - '' => '冗', - '' => '凶', - '' => '分', - '' => '切', - '' => '刈', - '' => '勻', - '' => '勾', - '' => '勿', - '' => '化', - '' => '匹', - '' => '午', - '' => '升', - '' => '卅', - '' => '卞', - '' => '厄', - '' => '友', - '' => '及', - '' => '反', - '' => '壬', - '' => '天', - '' => '夫', - '' => '太', - '' => '夭', - '' => '孔', - '' => '少', - '' => '尤', - '' => '尺', - '' => '屯', - '' => '巴', - '' => '幻', - '' => '廿', - '' => '弔', - '' => '引', - '' => '心', - '' => '戈', - '' => '戶', - '' => '手', - '' => '扎', - '' => '支', - '' => '文', - '' => '斗', - '' => '斤', - '' => '方', - '' => '日', - '' => '曰', - '' => '月', - '' => '木', - '' => '欠', - '' => '止', - '' => '歹', - '' => '毋', - '' => '比', - '' => '毛', - '' => '氏', - '' => '水', - '' => '火', - '' => '爪', - '' => '父', - '' => '爻', - '' => '片', - '' => '牙', - '' => '牛', - '' => '犬', - '' => '王', - '' => '丙', - '@' => '世', - 'A' => '丕', - 'B' => '且', - 'C' => '丘', - 'D' => '主', - 'E' => '乍', - 'F' => '乏', - 'G' => '乎', - 'H' => '以', - 'I' => '付', - 'J' => '仔', - 'K' => '仕', - 'L' => '他', - 'M' => '仗', - 'N' => '代', - 'O' => '令', - 'P' => '仙', - 'Q' => '仞', - 'R' => '充', - 'S' => '兄', - 'T' => '冉', - 'U' => '冊', - 'V' => '冬', - 'W' => '凹', - 'X' => '出', - 'Y' => '凸', - 'Z' => '刊', - '[' => '加', - '\\' => '功', - ']' => '包', - '^' => '匆', - '_' => '北', - '`' => '匝', - 'a' => '仟', - 'b' => '半', - 'c' => '卉', - 'd' => '卡', - 'e' => '占', - 'f' => '卯', - 'g' => '卮', - 'h' => '去', - 'i' => '可', - 'j' => '古', - 'k' => '右', - 'l' => '召', - 'm' => '叮', - 'n' => '叩', - 'o' => '叨', - 'p' => '叼', - 'q' => '司', - 'r' => '叵', - 's' => '叫', - 't' => '另', - 'u' => '只', - 'v' => '史', - 'w' => '叱', - 'x' => '台', - 'y' => '句', - 'z' => '叭', - '{' => '叻', - '|' => '四', - '}' => '囚', - '~' => '外', - '' => '央', - '' => '失', - '' => '奴', - '' => '奶', - '' => '孕', - '' => '它', - '' => '尼', - '' => '巨', - '' => '巧', - '' => '左', - '' => '市', - '' => '布', - '' => '平', - '' => '幼', - '' => '弁', - '' => '弘', - '' => '弗', - '' => '必', - '' => '戊', - '' => '打', - '' => '扔', - '' => '扒', - '' => '扑', - '' => '斥', - '' => '旦', - '' => '朮', - '' => '本', - '' => '未', - '' => '末', - '' => '札', - '' => '正', - '' => '母', - '' => '民', - '' => '氐', - '' => '永', - '' => '汁', - '' => '汀', - '' => '氾', - '' => '犯', - '' => '玄', - '' => '玉', - '' => '瓜', - '' => '瓦', - '' => '甘', - '' => '生', - '' => '用', - '' => '甩', - '' => '田', - '' => '由', - '' => '甲', - '' => '申', - '' => '疋', - '' => '白', - '' => '皮', - '' => '皿', - '' => '目', - '' => '矛', - '' => '矢', - '' => '石', - '' => '示', - '' => '禾', - '' => '穴', - '' => '立', - '' => '丞', - '' => '丟', - '' => '乒', - '' => '乓', - '' => '乩', - '' => '亙', - '' => '交', - '' => '亦', - '' => '亥', - '' => '仿', - '' => '伉', - '' => '伙', - '' => '伊', - '' => '伕', - '' => '伍', - '' => '伐', - '' => '休', - '' => '伏', - '' => '仲', - '' => '件', - '' => '任', - '' => '仰', - '' => '仳', - '' => '份', - '' => '企', - '' => '伋', - '' => '光', - '' => '兇', - '' => '兆', - '' => '先', - '' => '全', - '@' => '共', - 'A' => '再', - 'B' => '冰', - 'C' => '列', - 'D' => '刑', - 'E' => '划', - 'F' => '刎', - 'G' => '刖', - 'H' => '劣', - 'I' => '匈', - 'J' => '匡', - 'K' => '匠', - 'L' => '印', - 'M' => '危', - 'N' => '吉', - 'O' => '吏', - 'P' => '同', - 'Q' => '吊', - 'R' => '吐', - 'S' => '吁', - 'T' => '吋', - 'U' => '各', - 'V' => '向', - 'W' => '名', - 'X' => '合', - 'Y' => '吃', - 'Z' => '后', - '[' => '吆', - '\\' => '吒', - ']' => '因', - '^' => '回', - '_' => '囝', - '`' => '圳', - 'a' => '地', - 'b' => '在', - 'c' => '圭', - 'd' => '圬', - 'e' => '圯', - 'f' => '圩', - 'g' => '夙', - 'h' => '多', - 'i' => '夷', - 'j' => '夸', - 'k' => '妄', - 'l' => '奸', - 'm' => '妃', - 'n' => '好', - 'o' => '她', - 'p' => '如', - 'q' => '妁', - 'r' => '字', - 's' => '存', - 't' => '宇', - 'u' => '守', - 'v' => '宅', - 'w' => '安', - 'x' => '寺', - 'y' => '尖', - 'z' => '屹', - '{' => '州', - '|' => '帆', - '}' => '并', - '~' => '年', - '' => '式', - '' => '弛', - '' => '忙', - '' => '忖', - '' => '戎', - '' => '戌', - '' => '戍', - '' => '成', - '' => '扣', - '' => '扛', - '' => '托', - '' => '收', - '' => '早', - '' => '旨', - '' => '旬', - '' => '旭', - '' => '曲', - '' => '曳', - '' => '有', - '' => '朽', - '' => '朴', - '' => '朱', - '' => '朵', - '' => '次', - '' => '此', - '' => '死', - '' => '氖', - '' => '汝', - '' => '汗', - '' => '汙', - '' => '江', - '' => '池', - '' => '汐', - '' => '汕', - '' => '污', - '' => '汛', - '' => '汍', - '' => '汎', - '' => '灰', - '' => '牟', - '' => '牝', - '' => '百', - '' => '竹', - '' => '米', - '' => '糸', - '' => '缶', - '' => '羊', - '' => '羽', - '' => '老', - '' => '考', - '' => '而', - '' => '耒', - '' => '耳', - '' => '聿', - '' => '肉', - '' => '肋', - '' => '肌', - '' => '臣', - '' => '自', - '' => '至', - '' => '臼', - '' => '舌', - '' => '舛', - '' => '舟', - '' => '艮', - '' => '色', - '' => '艾', - '' => '虫', - '' => '血', - '' => '行', - '' => '衣', - '' => '西', - '' => '阡', - '' => '串', - '' => '亨', - '' => '位', - '' => '住', - '' => '佇', - '' => '佗', - '' => '佞', - '' => '伴', - '' => '佛', - '' => '何', - '' => '估', - '' => '佐', - '' => '佑', - '' => '伽', - '' => '伺', - '' => '伸', - '' => '佃', - '' => '佔', - '' => '似', - '' => '但', - '' => '佣', - '@' => '作', - 'A' => '你', - 'B' => '伯', - 'C' => '低', - 'D' => '伶', - 'E' => '余', - 'F' => '佝', - 'G' => '佈', - 'H' => '佚', - 'I' => '兌', - 'J' => '克', - 'K' => '免', - 'L' => '兵', - 'M' => '冶', - 'N' => '冷', - 'O' => '別', - 'P' => '判', - 'Q' => '利', - 'R' => '刪', - 'S' => '刨', - 'T' => '劫', - 'U' => '助', - 'V' => '努', - 'W' => '劬', - 'X' => '匣', - 'Y' => '即', - 'Z' => '卵', - '[' => '吝', - '\\' => '吭', - ']' => '吞', - '^' => '吾', - '_' => '否', - '`' => '呎', - 'a' => '吧', - 'b' => '呆', - 'c' => '呃', - 'd' => '吳', - 'e' => '呈', - 'f' => '呂', - 'g' => '君', - 'h' => '吩', - 'i' => '告', - 'j' => '吹', - 'k' => '吻', - 'l' => '吸', - 'm' => '吮', - 'n' => '吵', - 'o' => '吶', - 'p' => '吠', - 'q' => '吼', - 'r' => '呀', - 's' => '吱', - 't' => '含', - 'u' => '吟', - 'v' => '听', - 'w' => '囪', - 'x' => '困', - 'y' => '囤', - 'z' => '囫', - '{' => '坊', - '|' => '坑', - '}' => '址', - '~' => '坍', - '' => '均', - '' => '坎', - '' => '圾', - '' => '坐', - '' => '坏', - '' => '圻', - '' => '壯', - '' => '夾', - '' => '妝', - '' => '妒', - '' => '妨', - '' => '妞', - '' => '妣', - '' => '妙', - '' => '妖', - '' => '妍', - '' => '妤', - '' => '妓', - '' => '妊', - '' => '妥', - '' => '孝', - '' => '孜', - '' => '孚', - '' => '孛', - '' => '完', - '' => '宋', - '' => '宏', - '' => '尬', - '' => '局', - '' => '屁', - '' => '尿', - '' => '尾', - '' => '岐', - '' => '岑', - '' => '岔', - '' => '岌', - '' => '巫', - '' => '希', - '' => '序', - '' => '庇', - '' => '床', - '' => '廷', - '' => '弄', - '' => '弟', - '' => '彤', - '' => '形', - '' => '彷', - '' => '役', - '' => '忘', - '' => '忌', - '' => '志', - '' => '忍', - '' => '忱', - '' => '快', - '' => '忸', - '' => '忪', - '' => '戒', - '' => '我', - '' => '抄', - '' => '抗', - '' => '抖', - '' => '技', - '' => '扶', - '' => '抉', - '' => '扭', - '' => '把', - '' => '扼', - '' => '找', - '' => '批', - '' => '扳', - '' => '抒', - '' => '扯', - '' => '折', - '' => '扮', - '' => '投', - '' => '抓', - '' => '抑', - '' => '抆', - '' => '改', - '' => '攻', - '' => '攸', - '' => '旱', - '' => '更', - '' => '束', - '' => '李', - '' => '杏', - '' => '材', - '' => '村', - '' => '杜', - '' => '杖', - '' => '杞', - '' => '杉', - '' => '杆', - '' => '杠', - '@' => '杓', - 'A' => '杗', - 'B' => '步', - 'C' => '每', - 'D' => '求', - 'E' => '汞', - 'F' => '沙', - 'G' => '沁', - 'H' => '沈', - 'I' => '沉', - 'J' => '沅', - 'K' => '沛', - 'L' => '汪', - 'M' => '決', - 'N' => '沐', - 'O' => '汰', - 'P' => '沌', - 'Q' => '汨', - 'R' => '沖', - 'S' => '沒', - 'T' => '汽', - 'U' => '沃', - 'V' => '汲', - 'W' => '汾', - 'X' => '汴', - 'Y' => '沆', - 'Z' => '汶', - '[' => '沍', - '\\' => '沔', - ']' => '沘', - '^' => '沂', - '_' => '灶', - '`' => '灼', - 'a' => '災', - 'b' => '灸', - 'c' => '牢', - 'd' => '牡', - 'e' => '牠', - 'f' => '狄', - 'g' => '狂', - 'h' => '玖', - 'i' => '甬', - 'j' => '甫', - 'k' => '男', - 'l' => '甸', - 'm' => '皂', - 'n' => '盯', - 'o' => '矣', - 'p' => '私', - 'q' => '秀', - 'r' => '禿', - 's' => '究', - 't' => '系', - 'u' => '罕', - 'v' => '肖', - 'w' => '肓', - 'x' => '肝', - 'y' => '肘', - 'z' => '肛', - '{' => '肚', - '|' => '育', - '}' => '良', - '~' => '芒', - '' => '芋', - '' => '芍', - '' => '見', - '' => '角', - '' => '言', - '' => '谷', - '' => '豆', - '' => '豕', - '' => '貝', - '' => '赤', - '' => '走', - '' => '足', - '' => '身', - '' => '車', - '' => '辛', - '' => '辰', - '' => '迂', - '' => '迆', - '' => '迅', - '' => '迄', - '' => '巡', - '' => '邑', - '' => '邢', - '' => '邪', - '' => '邦', - '' => '那', - '' => '酉', - '' => '釆', - '' => '里', - '' => '防', - '' => '阮', - '' => '阱', - '' => '阪', - '' => '阬', - '' => '並', - '' => '乖', - '' => '乳', - '' => '事', - '' => '些', - '' => '亞', - '' => '享', - '' => '京', - '' => '佯', - '' => '依', - '' => '侍', - '' => '佳', - '' => '使', - '' => '佬', - '' => '供', - '' => '例', - '' => '來', - '' => '侃', - '' => '佰', - '' => '併', - '' => '侈', - '' => '佩', - '' => '佻', - '' => '侖', - '' => '佾', - '' => '侏', - '' => '侑', - '' => '佺', - '' => '兔', - '' => '兒', - '' => '兕', - '' => '兩', - '' => '具', - '' => '其', - '' => '典', - '' => '冽', - '' => '函', - '' => '刻', - '' => '券', - '' => '刷', - '' => '刺', - '' => '到', - '' => '刮', - '' => '制', - '' => '剁', - '' => '劾', - '' => '劻', - '' => '卒', - '' => '協', - '' => '卓', - '' => '卑', - '' => '卦', - '' => '卷', - '' => '卸', - '' => '卹', - '' => '取', - '' => '叔', - '' => '受', - '' => '味', - '' => '呵', - '@' => '咖', - 'A' => '呸', - 'B' => '咕', - 'C' => '咀', - 'D' => '呻', - 'E' => '呷', - 'F' => '咄', - 'G' => '咒', - 'H' => '咆', - 'I' => '呼', - 'J' => '咐', - 'K' => '呱', - 'L' => '呶', - 'M' => '和', - 'N' => '咚', - 'O' => '呢', - 'P' => '周', - 'Q' => '咋', - 'R' => '命', - 'S' => '咎', - 'T' => '固', - 'U' => '垃', - 'V' => '坷', - 'W' => '坪', - 'X' => '坩', - 'Y' => '坡', - 'Z' => '坦', - '[' => '坤', - '\\' => '坼', - ']' => '夜', - '^' => '奉', - '_' => '奇', - '`' => '奈', - 'a' => '奄', - 'b' => '奔', - 'c' => '妾', - 'd' => '妻', - 'e' => '委', - 'f' => '妹', - 'g' => '妮', - 'h' => '姑', - 'i' => '姆', - 'j' => '姐', - 'k' => '姍', - 'l' => '始', - 'm' => '姓', - 'n' => '姊', - 'o' => '妯', - 'p' => '妳', - 'q' => '姒', - 'r' => '姅', - 's' => '孟', - 't' => '孤', - 'u' => '季', - 'v' => '宗', - 'w' => '定', - 'x' => '官', - 'y' => '宜', - 'z' => '宙', - '{' => '宛', - '|' => '尚', - '}' => '屈', - '~' => '居', - '' => '屆', - '' => '岷', - '' => '岡', - '' => '岸', - '' => '岩', - '' => '岫', - '' => '岱', - '' => '岳', - '' => '帘', - '' => '帚', - '' => '帖', - '' => '帕', - '' => '帛', - '' => '帑', - '' => '幸', - '' => '庚', - '' => '店', - '' => '府', - '' => '底', - '' => '庖', - '' => '延', - '' => '弦', - '' => '弧', - '' => '弩', - '' => '往', - '' => '征', - '' => '彿', - '' => '彼', - '' => '忝', - '' => '忠', - '' => '忽', - '' => '念', - '' => '忿', - '' => '怏', - '' => '怔', - '' => '怯', - '' => '怵', - '' => '怖', - '' => '怪', - '' => '怕', - '' => '怡', - '' => '性', - '' => '怩', - '' => '怫', - '' => '怛', - '' => '或', - '' => '戕', - '' => '房', - '' => '戾', - '' => '所', - '' => '承', - '' => '拉', - '' => '拌', - '' => '拄', - '' => '抿', - '' => '拂', - '' => '抹', - '' => '拒', - '' => '招', - '' => '披', - '' => '拓', - '' => '拔', - '' => '拋', - '' => '拈', - '' => '抨', - '' => '抽', - '' => '押', - '' => '拐', - '' => '拙', - '' => '拇', - '' => '拍', - '' => '抵', - '' => '拚', - '' => '抱', - '' => '拘', - '' => '拖', - '' => '拗', - '' => '拆', - '' => '抬', - '' => '拎', - '' => '放', - '' => '斧', - '' => '於', - '' => '旺', - '' => '昔', - '' => '易', - '' => '昌', - '' => '昆', - '' => '昂', - '' => '明', - '' => '昀', - '' => '昏', - '' => '昕', - '' => '昊', - '@' => '昇', - 'A' => '服', - 'B' => '朋', - 'C' => '杭', - 'D' => '枋', - 'E' => '枕', - 'F' => '東', - 'G' => '果', - 'H' => '杳', - 'I' => '杷', - 'J' => '枇', - 'K' => '枝', - 'L' => '林', - 'M' => '杯', - 'N' => '杰', - 'O' => '板', - 'P' => '枉', - 'Q' => '松', - 'R' => '析', - 'S' => '杵', - 'T' => '枚', - 'U' => '枓', - 'V' => '杼', - 'W' => '杪', - 'X' => '杲', - 'Y' => '欣', - 'Z' => '武', - '[' => '歧', - '\\' => '歿', - ']' => '氓', - '^' => '氛', - '_' => '泣', - '`' => '注', - 'a' => '泳', - 'b' => '沱', - 'c' => '泌', - 'd' => '泥', - 'e' => '河', - 'f' => '沽', - 'g' => '沾', - 'h' => '沼', - 'i' => '波', - 'j' => '沫', - 'k' => '法', - 'l' => '泓', - 'm' => '沸', - 'n' => '泄', - 'o' => '油', - 'p' => '況', - 'q' => '沮', - 'r' => '泗', - 's' => '泅', - 't' => '泱', - 'u' => '沿', - 'v' => '治', - 'w' => '泡', - 'x' => '泛', - 'y' => '泊', - 'z' => '沬', - '{' => '泯', - '|' => '泜', - '}' => '泖', - '~' => '泠', - '' => '炕', - '' => '炎', - '' => '炒', - '' => '炊', - '' => '炙', - '' => '爬', - '' => '爭', - '' => '爸', - '' => '版', - '' => '牧', - '' => '物', - '' => '狀', - '' => '狎', - '' => '狙', - '' => '狗', - '' => '狐', - '' => '玩', - '' => '玨', - '' => '玟', - '' => '玫', - '' => '玥', - '' => '甽', - '' => '疝', - '' => '疙', - '' => '疚', - '' => '的', - '' => '盂', - '' => '盲', - '' => '直', - '' => '知', - '' => '矽', - '' => '社', - '' => '祀', - '' => '祁', - '' => '秉', - '' => '秈', - '' => '空', - '' => '穹', - '' => '竺', - '' => '糾', - '' => '罔', - '' => '羌', - '' => '羋', - '' => '者', - '' => '肺', - '' => '肥', - '' => '肢', - '' => '肱', - '' => '股', - '' => '肫', - '' => '肩', - '' => '肴', - '' => '肪', - '' => '肯', - '' => '臥', - '' => '臾', - '' => '舍', - '' => '芳', - '' => '芝', - '' => '芙', - '' => '芭', - '' => '芽', - '' => '芟', - '' => '芹', - '' => '花', - '' => '芬', - '' => '芥', - '' => '芯', - '' => '芸', - '' => '芣', - '' => '芰', - '' => '芾', - '' => '芷', - '' => '虎', - '' => '虱', - '' => '初', - '' => '表', - '' => '軋', - '' => '迎', - '' => '返', - '' => '近', - '' => '邵', - '' => '邸', - '' => '邱', - '' => '邶', - '' => '采', - '' => '金', - '' => '長', - '' => '門', - '' => '阜', - '' => '陀', - '' => '阿', - '' => '阻', - '' => '附', - '@' => '陂', - 'A' => '隹', - 'B' => '雨', - 'C' => '青', - 'D' => '非', - 'E' => '亟', - 'F' => '亭', - 'G' => '亮', - 'H' => '信', - 'I' => '侵', - 'J' => '侯', - 'K' => '便', - 'L' => '俠', - 'M' => '俑', - 'N' => '俏', - 'O' => '保', - 'P' => '促', - 'Q' => '侶', - 'R' => '俘', - 'S' => '俟', - 'T' => '俊', - 'U' => '俗', - 'V' => '侮', - 'W' => '俐', - 'X' => '俄', - 'Y' => '係', - 'Z' => '俚', - '[' => '俎', - '\\' => '俞', - ']' => '侷', - '^' => '兗', - '_' => '冒', - '`' => '冑', - 'a' => '冠', - 'b' => '剎', - 'c' => '剃', - 'd' => '削', - 'e' => '前', - 'f' => '剌', - 'g' => '剋', - 'h' => '則', - 'i' => '勇', - 'j' => '勉', - 'k' => '勃', - 'l' => '勁', - 'm' => '匍', - 'n' => '南', - 'o' => '卻', - 'p' => '厚', - 'q' => '叛', - 'r' => '咬', - 's' => '哀', - 't' => '咨', - 'u' => '哎', - 'v' => '哉', - 'w' => '咸', - 'x' => '咦', - 'y' => '咳', - 'z' => '哇', - '{' => '哂', - '|' => '咽', - '}' => '咪', - '~' => '品', - '' => '哄', - '' => '哈', - '' => '咯', - '' => '咫', - '' => '咱', - '' => '咻', - '' => '咩', - '' => '咧', - '' => '咿', - '' => '囿', - '' => '垂', - '' => '型', - '' => '垠', - '' => '垣', - '' => '垢', - '' => '城', - '' => '垮', - '' => '垓', - '' => '奕', - '' => '契', - '' => '奏', - '' => '奎', - '' => '奐', - '' => '姜', - '' => '姘', - '' => '姿', - '' => '姣', - '' => '姨', - '' => '娃', - '' => '姥', - '' => '姪', - '' => '姚', - '' => '姦', - '' => '威', - '' => '姻', - '' => '孩', - '' => '宣', - '' => '宦', - '' => '室', - '' => '客', - '' => '宥', - '' => '封', - '' => '屎', - '' => '屏', - '' => '屍', - '' => '屋', - '' => '峙', - '' => '峒', - '' => '巷', - '' => '帝', - '' => '帥', - '' => '帟', - '' => '幽', - '' => '庠', - '' => '度', - '' => '建', - '' => '弈', - '' => '弭', - '' => '彥', - '' => '很', - '' => '待', - '' => '徊', - '' => '律', - '' => '徇', - '' => '後', - '' => '徉', - '' => '怒', - '' => '思', - '' => '怠', - '' => '急', - '' => '怎', - '' => '怨', - '' => '恍', - '' => '恰', - '' => '恨', - '' => '恢', - '' => '恆', - '' => '恃', - '' => '恬', - '' => '恫', - '' => '恪', - '' => '恤', - '' => '扁', - '' => '拜', - '' => '挖', - '' => '按', - '' => '拼', - '' => '拭', - '' => '持', - '' => '拮', - '' => '拽', - '' => '指', - '' => '拱', - '' => '拷', - '@' => '拯', - 'A' => '括', - 'B' => '拾', - 'C' => '拴', - 'D' => '挑', - 'E' => '挂', - 'F' => '政', - 'G' => '故', - 'H' => '斫', - 'I' => '施', - 'J' => '既', - 'K' => '春', - 'L' => '昭', - 'M' => '映', - 'N' => '昧', - 'O' => '是', - 'P' => '星', - 'Q' => '昨', - 'R' => '昱', - 'S' => '昤', - 'T' => '曷', - 'U' => '柿', - 'V' => '染', - 'W' => '柱', - 'X' => '柔', - 'Y' => '某', - 'Z' => '柬', - '[' => '架', - '\\' => '枯', - ']' => '柵', - '^' => '柩', - '_' => '柯', - '`' => '柄', - 'a' => '柑', - 'b' => '枴', - 'c' => '柚', - 'd' => '查', - 'e' => '枸', - 'f' => '柏', - 'g' => '柞', - 'h' => '柳', - 'i' => '枰', - 'j' => '柙', - 'k' => '柢', - 'l' => '柝', - 'm' => '柒', - 'n' => '歪', - 'o' => '殃', - 'p' => '殆', - 'q' => '段', - 'r' => '毒', - 's' => '毗', - 't' => '氟', - 'u' => '泉', - 'v' => '洋', - 'w' => '洲', - 'x' => '洪', - 'y' => '流', - 'z' => '津', - '{' => '洌', - '|' => '洱', - '}' => '洞', - '~' => '洗', - '' => '活', - '' => '洽', - '' => '派', - '' => '洶', - '' => '洛', - '' => '泵', - '' => '洹', - '' => '洧', - '' => '洸', - '' => '洩', - '' => '洮', - '' => '洵', - '' => '洎', - '' => '洫', - '' => '炫', - '' => '為', - '' => '炳', - '' => '炬', - '' => '炯', - '' => '炭', - '' => '炸', - '' => '炮', - '' => '炤', - '' => '爰', - '' => '牲', - '' => '牯', - '' => '牴', - '' => '狩', - '' => '狠', - '' => '狡', - '' => '玷', - '' => '珊', - '' => '玻', - '' => '玲', - '' => '珍', - '' => '珀', - '' => '玳', - '' => '甚', - '' => '甭', - '' => '畏', - '' => '界', - '' => '畎', - '' => '畋', - '' => '疫', - '' => '疤', - '' => '疥', - '' => '疢', - '' => '疣', - '' => '癸', - '' => '皆', - '' => '皇', - '' => '皈', - '' => '盈', - '' => '盆', - '' => '盃', - '' => '盅', - '' => '省', - '' => '盹', - '' => '相', - '' => '眉', - '' => '看', - '' => '盾', - '' => '盼', - '' => '眇', - '' => '矜', - '' => '砂', - '' => '研', - '' => '砌', - '' => '砍', - '' => '祆', - '' => '祉', - '' => '祈', - '' => '祇', - '' => '禹', - '' => '禺', - '' => '科', - '' => '秒', - '' => '秋', - '' => '穿', - '' => '突', - '' => '竿', - '' => '竽', - '' => '籽', - '' => '紂', - '' => '紅', - '' => '紀', - '' => '紉', - '' => '紇', - '' => '約', - '' => '紆', - '' => '缸', - '' => '美', - '' => '羿', - '' => '耄', - '@' => '耐', - 'A' => '耍', - 'B' => '耑', - 'C' => '耶', - 'D' => '胖', - 'E' => '胥', - 'F' => '胚', - 'G' => '胃', - 'H' => '胄', - 'I' => '背', - 'J' => '胡', - 'K' => '胛', - 'L' => '胎', - 'M' => '胞', - 'N' => '胤', - 'O' => '胝', - 'P' => '致', - 'Q' => '舢', - 'R' => '苧', - 'S' => '范', - 'T' => '茅', - 'U' => '苣', - 'V' => '苛', - 'W' => '苦', - 'X' => '茄', - 'Y' => '若', - 'Z' => '茂', - '[' => '茉', - '\\' => '苒', - ']' => '苗', - '^' => '英', - '_' => '茁', - '`' => '苜', - 'a' => '苔', - 'b' => '苑', - 'c' => '苞', - 'd' => '苓', - 'e' => '苟', - 'f' => '苯', - 'g' => '茆', - 'h' => '虐', - 'i' => '虹', - 'j' => '虻', - 'k' => '虺', - 'l' => '衍', - 'm' => '衫', - 'n' => '要', - 'o' => '觔', - 'p' => '計', - 'q' => '訂', - 'r' => '訃', - 's' => '貞', - 't' => '負', - 'u' => '赴', - 'v' => '赳', - 'w' => '趴', - 'x' => '軍', - 'y' => '軌', - 'z' => '述', - '{' => '迦', - '|' => '迢', - '}' => '迪', - '~' => '迥', - '' => '迭', - '' => '迫', - '' => '迤', - '' => '迨', - '' => '郊', - '' => '郎', - '' => '郁', - '' => '郃', - '' => '酋', - '' => '酊', - '' => '重', - '' => '閂', - '' => '限', - '' => '陋', - '' => '陌', - '' => '降', - '' => '面', - '' => '革', - '' => '韋', - '' => '韭', - '' => '音', - '' => '頁', - '' => '風', - '' => '飛', - '' => '食', - '' => '首', - '' => '香', - '' => '乘', - '' => '亳', - '' => '倌', - '' => '倍', - '' => '倣', - '' => '俯', - '' => '倦', - '' => '倥', - '' => '俸', - '' => '倩', - '' => '倖', - '' => '倆', - '' => '值', - '' => '借', - '' => '倚', - '' => '倒', - '' => '們', - '' => '俺', - '' => '倀', - '' => '倔', - '' => '倨', - '' => '俱', - '' => '倡', - '' => '個', - '' => '候', - '' => '倘', - '' => '俳', - '' => '修', - '' => '倭', - '' => '倪', - '' => '俾', - '' => '倫', - '' => '倉', - '' => '兼', - '' => '冤', - '' => '冥', - '' => '冢', - '' => '凍', - '' => '凌', - '' => '准', - '' => '凋', - '' => '剖', - '' => '剜', - '' => '剔', - '' => '剛', - '' => '剝', - '' => '匪', - '' => '卿', - '' => '原', - '' => '厝', - '' => '叟', - '' => '哨', - '' => '唐', - '' => '唁', - '' => '唷', - '' => '哼', - '' => '哥', - '' => '哲', - '' => '唆', - '' => '哺', - '' => '唔', - '' => '哩', - '' => '哭', - '' => '員', - '' => '唉', - '' => '哮', - '' => '哪', - '@' => '哦', - 'A' => '唧', - 'B' => '唇', - 'C' => '哽', - 'D' => '唏', - 'E' => '圃', - 'F' => '圄', - 'G' => '埂', - 'H' => '埔', - 'I' => '埋', - 'J' => '埃', - 'K' => '堉', - 'L' => '夏', - 'M' => '套', - 'N' => '奘', - 'O' => '奚', - 'P' => '娑', - 'Q' => '娘', - 'R' => '娜', - 'S' => '娟', - 'T' => '娛', - 'U' => '娓', - 'V' => '姬', - 'W' => '娠', - 'X' => '娣', - 'Y' => '娩', - 'Z' => '娥', - '[' => '娌', - '\\' => '娉', - ']' => '孫', - '^' => '屘', - '_' => '宰', - '`' => '害', - 'a' => '家', - 'b' => '宴', - 'c' => '宮', - 'd' => '宵', - 'e' => '容', - 'f' => '宸', - 'g' => '射', - 'h' => '屑', - 'i' => '展', - 'j' => '屐', - 'k' => '峭', - 'l' => '峽', - 'm' => '峻', - 'n' => '峪', - 'o' => '峨', - 'p' => '峰', - 'q' => '島', - 'r' => '崁', - 's' => '峴', - 't' => '差', - 'u' => '席', - 'v' => '師', - 'w' => '庫', - 'x' => '庭', - 'y' => '座', - 'z' => '弱', - '{' => '徒', - '|' => '徑', - '}' => '徐', - '~' => '恙', - '' => '恣', - '' => '恥', - '' => '恐', - '' => '恕', - '' => '恭', - '' => '恩', - '' => '息', - '' => '悄', - '' => '悟', - '' => '悚', - '' => '悍', - '' => '悔', - '' => '悌', - '' => '悅', - '' => '悖', - '' => '扇', - '' => '拳', - '' => '挈', - '' => '拿', - '' => '捎', - '' => '挾', - '' => '振', - '' => '捕', - '' => '捂', - '' => '捆', - '' => '捏', - '' => '捉', - '' => '挺', - '' => '捐', - '' => '挽', - '' => '挪', - '' => '挫', - '' => '挨', - '' => '捍', - '' => '捌', - '' => '效', - '' => '敉', - '' => '料', - '' => '旁', - '' => '旅', - '' => '時', - '' => '晉', - '' => '晏', - '' => '晃', - '' => '晒', - '' => '晌', - '' => '晅', - '' => '晁', - '' => '書', - '' => '朔', - '' => '朕', - '' => '朗', - '' => '校', - '' => '核', - '' => '案', - '' => '框', - '' => '桓', - '' => '根', - '' => '桂', - '' => '桔', - '' => '栩', - '' => '梳', - '' => '栗', - '' => '桌', - '' => '桑', - '' => '栽', - '' => '柴', - '' => '桐', - '' => '桀', - '' => '格', - '' => '桃', - '' => '株', - '' => '桅', - '' => '栓', - '' => '栘', - '' => '桁', - '' => '殊', - '' => '殉', - '' => '殷', - '' => '氣', - '' => '氧', - '' => '氨', - '' => '氦', - '' => '氤', - '' => '泰', - '' => '浪', - '' => '涕', - '' => '消', - '' => '涇', - '' => '浦', - '' => '浸', - '' => '海', - '' => '浙', - '' => '涓', - '@' => '浬', - 'A' => '涉', - 'B' => '浮', - 'C' => '浚', - 'D' => '浴', - 'E' => '浩', - 'F' => '涌', - 'G' => '涊', - 'H' => '浹', - 'I' => '涅', - 'J' => '浥', - 'K' => '涔', - 'L' => '烊', - 'M' => '烘', - 'N' => '烤', - 'O' => '烙', - 'P' => '烈', - 'Q' => '烏', - 'R' => '爹', - 'S' => '特', - 'T' => '狼', - 'U' => '狹', - 'V' => '狽', - 'W' => '狸', - 'X' => '狷', - 'Y' => '玆', - 'Z' => '班', - '[' => '琉', - '\\' => '珮', - ']' => '珠', - '^' => '珪', - '_' => '珞', - '`' => '畔', - 'a' => '畝', - 'b' => '畜', - 'c' => '畚', - 'd' => '留', - 'e' => '疾', - 'f' => '病', - 'g' => '症', - 'h' => '疲', - 'i' => '疳', - 'j' => '疽', - 'k' => '疼', - 'l' => '疹', - 'm' => '痂', - 'n' => '疸', - 'o' => '皋', - 'p' => '皰', - 'q' => '益', - 'r' => '盍', - 's' => '盎', - 't' => '眩', - 'u' => '真', - 'v' => '眠', - 'w' => '眨', - 'x' => '矩', - 'y' => '砰', - 'z' => '砧', - '{' => '砸', - '|' => '砝', - '}' => '破', - '~' => '砷', - '' => '砥', - '' => '砭', - '' => '砠', - '' => '砟', - '' => '砲', - '' => '祕', - '' => '祐', - '' => '祠', - '' => '祟', - '' => '祖', - '' => '神', - '' => '祝', - '' => '祗', - '' => '祚', - '' => '秤', - '' => '秣', - '' => '秧', - '' => '租', - '' => '秦', - '' => '秩', - '' => '秘', - '' => '窄', - '' => '窈', - '' => '站', - '' => '笆', - '' => '笑', - '' => '粉', - '' => '紡', - '' => '紗', - '' => '紋', - '' => '紊', - '' => '素', - '' => '索', - '' => '純', - '' => '紐', - '' => '紕', - '' => '級', - '' => '紜', - '' => '納', - '' => '紙', - '' => '紛', - '' => '缺', - '' => '罟', - '' => '羔', - '' => '翅', - '' => '翁', - '' => '耆', - '' => '耘', - '' => '耕', - '' => '耙', - '' => '耗', - '' => '耽', - '' => '耿', - '' => '胱', - '' => '脂', - '' => '胰', - '' => '脅', - '' => '胭', - '' => '胴', - '' => '脆', - '' => '胸', - '' => '胳', - '' => '脈', - '' => '能', - '' => '脊', - '' => '胼', - '' => '胯', - '' => '臭', - '' => '臬', - '' => '舀', - '' => '舐', - '' => '航', - '' => '舫', - '' => '舨', - '' => '般', - '' => '芻', - '' => '茫', - '' => '荒', - '' => '荔', - '' => '荊', - '' => '茸', - '' => '荐', - '' => '草', - '' => '茵', - '' => '茴', - '' => '荏', - '' => '茲', - '' => '茹', - '' => '茶', - '' => '茗', - '' => '荀', - '' => '茱', - '' => '茨', - '' => '荃', - '@' => '虔', - 'A' => '蚊', - 'B' => '蚪', - 'C' => '蚓', - 'D' => '蚤', - 'E' => '蚩', - 'F' => '蚌', - 'G' => '蚣', - 'H' => '蚜', - 'I' => '衰', - 'J' => '衷', - 'K' => '袁', - 'L' => '袂', - 'M' => '衽', - 'N' => '衹', - 'O' => '記', - 'P' => '訐', - 'Q' => '討', - 'R' => '訌', - 'S' => '訕', - 'T' => '訊', - 'U' => '託', - 'V' => '訓', - 'W' => '訖', - 'X' => '訏', - 'Y' => '訑', - 'Z' => '豈', - '[' => '豺', - '\\' => '豹', - ']' => '財', - '^' => '貢', - '_' => '起', - '`' => '躬', - 'a' => '軒', - 'b' => '軔', - 'c' => '軏', - 'd' => '辱', - 'e' => '送', - 'f' => '逆', - 'g' => '迷', - 'h' => '退', - 'i' => '迺', - 'j' => '迴', - 'k' => '逃', - 'l' => '追', - 'm' => '逅', - 'n' => '迸', - 'o' => '邕', - 'p' => '郡', - 'q' => '郝', - 'r' => '郢', - 's' => '酒', - 't' => '配', - 'u' => '酌', - 'v' => '釘', - 'w' => '針', - 'x' => '釗', - 'y' => '釜', - 'z' => '釙', - '{' => '閃', - '|' => '院', - '}' => '陣', - '~' => '陡', - '' => '陛', - '' => '陝', - '' => '除', - '' => '陘', - '' => '陞', - '' => '隻', - '' => '飢', - '' => '馬', - '' => '骨', - '' => '高', - '' => '鬥', - '' => '鬲', - '' => '鬼', - '' => '乾', - '' => '偺', - '' => '偽', - '' => '停', - '' => '假', - '' => '偃', - '' => '偌', - '' => '做', - '' => '偉', - '' => '健', - '' => '偶', - '' => '偎', - '' => '偕', - '' => '偵', - '' => '側', - '' => '偷', - '' => '偏', - '' => '倏', - '' => '偯', - '' => '偭', - '' => '兜', - '' => '冕', - '' => '凰', - '' => '剪', - '' => '副', - '' => '勒', - '' => '務', - '' => '勘', - '' => '動', - '' => '匐', - '' => '匏', - '' => '匙', - '' => '匿', - '' => '區', - '' => '匾', - '' => '參', - '' => '曼', - '' => '商', - '' => '啪', - '' => '啦', - '' => '啄', - '' => '啞', - '' => '啡', - '' => '啃', - '' => '啊', - '' => '唱', - '' => '啖', - '' => '問', - '' => '啕', - '' => '唯', - '' => '啤', - '' => '唸', - '' => '售', - '' => '啜', - '' => '唬', - '' => '啣', - '' => '唳', - '' => '啁', - '' => '啗', - '' => '圈', - '' => '國', - '' => '圉', - '' => '域', - '' => '堅', - '' => '堊', - '' => '堆', - '' => '埠', - '' => '埤', - '' => '基', - '' => '堂', - '' => '堵', - '' => '執', - '' => '培', - '' => '夠', - '' => '奢', - '' => '娶', - '' => '婁', - '' => '婉', - '' => '婦', - '' => '婪', - '' => '婀', - '@' => '娼', - 'A' => '婢', - 'B' => '婚', - 'C' => '婆', - 'D' => '婊', - 'E' => '孰', - 'F' => '寇', - 'G' => '寅', - 'H' => '寄', - 'I' => '寂', - 'J' => '宿', - 'K' => '密', - 'L' => '尉', - 'M' => '專', - 'N' => '將', - 'O' => '屠', - 'P' => '屜', - 'Q' => '屝', - 'R' => '崇', - 'S' => '崆', - 'T' => '崎', - 'U' => '崛', - 'V' => '崖', - 'W' => '崢', - 'X' => '崑', - 'Y' => '崩', - 'Z' => '崔', - '[' => '崙', - '\\' => '崤', - ']' => '崧', - '^' => '崗', - '_' => '巢', - '`' => '常', - 'a' => '帶', - 'b' => '帳', - 'c' => '帷', - 'd' => '康', - 'e' => '庸', - 'f' => '庶', - 'g' => '庵', - 'h' => '庾', - 'i' => '張', - 'j' => '強', - 'k' => '彗', - 'l' => '彬', - 'm' => '彩', - 'n' => '彫', - 'o' => '得', - 'p' => '徙', - 'q' => '從', - 'r' => '徘', - 's' => '御', - 't' => '徠', - 'u' => '徜', - 'v' => '恿', - 'w' => '患', - 'x' => '悉', - 'y' => '悠', - 'z' => '您', - '{' => '惋', - '|' => '悴', - '}' => '惦', - '~' => '悽', - '' => '情', - '' => '悻', - '' => '悵', - '' => '惜', - '' => '悼', - '' => '惘', - '' => '惕', - '' => '惆', - '' => '惟', - '' => '悸', - '' => '惚', - '' => '惇', - '' => '戚', - '' => '戛', - '' => '扈', - '' => '掠', - '' => '控', - '' => '捲', - '' => '掖', - '' => '探', - '' => '接', - '' => '捷', - '' => '捧', - '' => '掘', - '' => '措', - '' => '捱', - '' => '掩', - '' => '掉', - '' => '掃', - '' => '掛', - '' => '捫', - '' => '推', - '' => '掄', - '' => '授', - '' => '掙', - '' => '採', - '' => '掬', - '' => '排', - '' => '掏', - '' => '掀', - '' => '捻', - '' => '捩', - '' => '捨', - '' => '捺', - '' => '敝', - '' => '敖', - '' => '救', - '' => '教', - '' => '敗', - '' => '啟', - '' => '敏', - '' => '敘', - '' => '敕', - '' => '敔', - '' => '斜', - '' => '斛', - '' => '斬', - '' => '族', - '' => '旋', - '' => '旌', - '' => '旎', - '' => '晝', - '' => '晚', - '' => '晤', - '' => '晨', - '' => '晦', - '' => '晞', - '' => '曹', - '' => '勗', - '' => '望', - '' => '梁', - '' => '梯', - '' => '梢', - '' => '梓', - '' => '梵', - '' => '桿', - '' => '桶', - '' => '梱', - '' => '梧', - '' => '梗', - '' => '械', - '' => '梃', - '' => '棄', - '' => '梭', - '' => '梆', - '' => '梅', - '' => '梔', - '' => '條', - '' => '梨', - '' => '梟', - '' => '梡', - '' => '梂', - '' => '欲', - '' => '殺', - '@' => '毫', - 'A' => '毬', - 'B' => '氫', - 'C' => '涎', - 'D' => '涼', - 'E' => '淳', - 'F' => '淙', - 'G' => '液', - 'H' => '淡', - 'I' => '淌', - 'J' => '淤', - 'K' => '添', - 'L' => '淺', - 'M' => '清', - 'N' => '淇', - 'O' => '淋', - 'P' => '涯', - 'Q' => '淑', - 'R' => '涮', - 'S' => '淞', - 'T' => '淹', - 'U' => '涸', - 'V' => '混', - 'W' => '淵', - 'X' => '淅', - 'Y' => '淒', - 'Z' => '渚', - '[' => '涵', - '\\' => '淚', - ']' => '淫', - '^' => '淘', - '_' => '淪', - '`' => '深', - 'a' => '淮', - 'b' => '淨', - 'c' => '淆', - 'd' => '淄', - 'e' => '涪', - 'f' => '淬', - 'g' => '涿', - 'h' => '淦', - 'i' => '烹', - 'j' => '焉', - 'k' => '焊', - 'l' => '烽', - 'm' => '烯', - 'n' => '爽', - 'o' => '牽', - 'p' => '犁', - 'q' => '猜', - 'r' => '猛', - 's' => '猖', - 't' => '猓', - 'u' => '猙', - 'v' => '率', - 'w' => '琅', - 'x' => '琊', - 'y' => '球', - 'z' => '理', - '{' => '現', - '|' => '琍', - '}' => '瓠', - '~' => '瓶', - '' => '瓷', - '' => '甜', - '' => '產', - '' => '略', - '' => '畦', - '' => '畢', - '' => '異', - '' => '疏', - '' => '痔', - '' => '痕', - '' => '疵', - '' => '痊', - '' => '痍', - '' => '皎', - '' => '盔', - '' => '盒', - '' => '盛', - '' => '眷', - '' => '眾', - '' => '眼', - '' => '眶', - '' => '眸', - '' => '眺', - '' => '硫', - '' => '硃', - '' => '硎', - '' => '祥', - '' => '票', - '' => '祭', - '' => '移', - '' => '窒', - '' => '窕', - '' => '笠', - '' => '笨', - '' => '笛', - '' => '第', - '' => '符', - '' => '笙', - '' => '笞', - '' => '笮', - '' => '粒', - '' => '粗', - '' => '粕', - '' => '絆', - '' => '絃', - '' => '統', - '' => '紮', - '' => '紹', - '' => '紼', - '' => '絀', - '' => '細', - '' => '紳', - '' => '組', - '' => '累', - '' => '終', - '' => '紲', - '' => '紱', - '' => '缽', - '' => '羞', - '' => '羚', - '' => '翌', - '' => '翎', - '' => '習', - '' => '耜', - '' => '聊', - '' => '聆', - '' => '脯', - '' => '脖', - '' => '脣', - '' => '脫', - '' => '脩', - '' => '脰', - '' => '脤', - '' => '舂', - '' => '舵', - '' => '舷', - '' => '舶', - '' => '船', - '' => '莎', - '' => '莞', - '' => '莘', - '' => '荸', - '' => '莢', - '' => '莖', - '' => '莽', - '' => '莫', - '' => '莒', - '' => '莊', - '' => '莓', - '' => '莉', - '' => '莠', - '' => '荷', - '' => '荻', - '' => '荼', - '@' => '莆', - 'A' => '莧', - 'B' => '處', - 'C' => '彪', - 'D' => '蛇', - 'E' => '蛀', - 'F' => '蚶', - 'G' => '蛄', - 'H' => '蚵', - 'I' => '蛆', - 'J' => '蛋', - 'K' => '蚱', - 'L' => '蚯', - 'M' => '蛉', - 'N' => '術', - 'O' => '袞', - 'P' => '袈', - 'Q' => '被', - 'R' => '袒', - 'S' => '袖', - 'T' => '袍', - 'U' => '袋', - 'V' => '覓', - 'W' => '規', - 'X' => '訪', - 'Y' => '訝', - 'Z' => '訣', - '[' => '訥', - '\\' => '許', - ']' => '設', - '^' => '訟', - '_' => '訛', - '`' => '訢', - 'a' => '豉', - 'b' => '豚', - 'c' => '販', - 'd' => '責', - 'e' => '貫', - 'f' => '貨', - 'g' => '貪', - 'h' => '貧', - 'i' => '赧', - 'j' => '赦', - 'k' => '趾', - 'l' => '趺', - 'm' => '軛', - 'n' => '軟', - 'o' => '這', - 'p' => '逍', - 'q' => '通', - 'r' => '逗', - 's' => '連', - 't' => '速', - 'u' => '逝', - 'v' => '逐', - 'w' => '逕', - 'x' => '逞', - 'y' => '造', - 'z' => '透', - '{' => '逢', - '|' => '逖', - '}' => '逛', - '~' => '途', - '' => '部', - '' => '郭', - '' => '都', - '' => '酗', - '' => '野', - '' => '釵', - '' => '釦', - '' => '釣', - '' => '釧', - '' => '釭', - '' => '釩', - '' => '閉', - '' => '陪', - '' => '陵', - '' => '陳', - '' => '陸', - '' => '陰', - '' => '陴', - '' => '陶', - '' => '陷', - '' => '陬', - '' => '雀', - '' => '雪', - '' => '雩', - '' => '章', - '' => '竟', - '' => '頂', - '' => '頃', - '' => '魚', - '' => '鳥', - '' => '鹵', - '' => '鹿', - '' => '麥', - '' => '麻', - '' => '傢', - '' => '傍', - '' => '傅', - '' => '備', - '' => '傑', - '' => '傀', - '' => '傖', - '' => '傘', - '' => '傚', - '' => '最', - '' => '凱', - '' => '割', - '' => '剴', - '' => '創', - '' => '剩', - '' => '勞', - '' => '勝', - '' => '勛', - '' => '博', - '' => '厥', - '' => '啻', - '' => '喀', - '' => '喧', - '' => '啼', - '' => '喊', - '' => '喝', - '' => '喘', - '' => '喂', - '' => '喜', - '' => '喪', - '' => '喔', - '' => '喇', - '' => '喋', - '' => '喃', - '' => '喳', - '' => '單', - '' => '喟', - '' => '唾', - '' => '喲', - '' => '喚', - '' => '喻', - '' => '喬', - '' => '喱', - '' => '啾', - '' => '喉', - '' => '喫', - '' => '喙', - '' => '圍', - '' => '堯', - '' => '堪', - '' => '場', - '' => '堤', - '' => '堰', - '' => '報', - '' => '堡', - '' => '堝', - '' => '堠', - '' => '壹', - '' => '壺', - '' => '奠', - '@' => '婷', - 'A' => '媚', - 'B' => '婿', - 'C' => '媒', - 'D' => '媛', - 'E' => '媧', - 'F' => '孳', - 'G' => '孱', - 'H' => '寒', - 'I' => '富', - 'J' => '寓', - 'K' => '寐', - 'L' => '尊', - 'M' => '尋', - 'N' => '就', - 'O' => '嵌', - 'P' => '嵐', - 'Q' => '崴', - 'R' => '嵇', - 'S' => '巽', - 'T' => '幅', - 'U' => '帽', - 'V' => '幀', - 'W' => '幃', - 'X' => '幾', - 'Y' => '廊', - 'Z' => '廁', - '[' => '廂', - '\\' => '廄', - ']' => '弼', - '^' => '彭', - '_' => '復', - '`' => '循', - 'a' => '徨', - 'b' => '惑', - 'c' => '惡', - 'd' => '悲', - 'e' => '悶', - 'f' => '惠', - 'g' => '愜', - 'h' => '愣', - 'i' => '惺', - 'j' => '愕', - 'k' => '惰', - 'l' => '惻', - 'm' => '惴', - 'n' => '慨', - 'o' => '惱', - 'p' => '愎', - 'q' => '惶', - 'r' => '愉', - 's' => '愀', - 't' => '愒', - 'u' => '戟', - 'v' => '扉', - 'w' => '掣', - 'x' => '掌', - 'y' => '描', - 'z' => '揀', - '{' => '揩', - '|' => '揉', - '}' => '揆', - '~' => '揍', - '' => '插', - '' => '揣', - '' => '提', - '' => '握', - '' => '揖', - '' => '揭', - '' => '揮', - '' => '捶', - '' => '援', - '' => '揪', - '' => '換', - '' => '摒', - '' => '揚', - '' => '揹', - '' => '敞', - '' => '敦', - '' => '敢', - '' => '散', - '' => '斑', - '' => '斐', - '' => '斯', - '' => '普', - '' => '晰', - '' => '晴', - '' => '晶', - '' => '景', - '' => '暑', - '' => '智', - '' => '晾', - '' => '晷', - '' => '曾', - '' => '替', - '' => '期', - '' => '朝', - '' => '棺', - '' => '棕', - '' => '棠', - '' => '棘', - '' => '棗', - '' => '椅', - '' => '棟', - '' => '棵', - '' => '森', - '' => '棧', - '' => '棹', - '' => '棒', - '' => '棲', - '' => '棣', - '' => '棋', - '' => '棍', - '' => '植', - '' => '椒', - '' => '椎', - '' => '棉', - '' => '棚', - '' => '楮', - '' => '棻', - '' => '款', - '' => '欺', - '' => '欽', - '' => '殘', - '' => '殖', - '' => '殼', - '' => '毯', - '' => '氮', - '' => '氯', - '' => '氬', - '' => '港', - '' => '游', - '' => '湔', - '' => '渡', - '' => '渲', - '' => '湧', - '' => '湊', - '' => '渠', - '' => '渥', - '' => '渣', - '' => '減', - '' => '湛', - '' => '湘', - '' => '渤', - '' => '湖', - '' => '湮', - '' => '渭', - '' => '渦', - '' => '湯', - '' => '渴', - '' => '湍', - '' => '渺', - '' => '測', - '' => '湃', - '' => '渝', - '' => '渾', - '' => '滋', - '@' => '溉', - 'A' => '渙', - 'B' => '湎', - 'C' => '湣', - 'D' => '湄', - 'E' => '湲', - 'F' => '湩', - 'G' => '湟', - 'H' => '焙', - 'I' => '焚', - 'J' => '焦', - 'K' => '焰', - 'L' => '無', - 'M' => '然', - 'N' => '煮', - 'O' => '焜', - 'P' => '牌', - 'Q' => '犄', - 'R' => '犀', - 'S' => '猶', - 'T' => '猥', - 'U' => '猴', - 'V' => '猩', - 'W' => '琺', - 'X' => '琪', - 'Y' => '琳', - 'Z' => '琢', - '[' => '琥', - '\\' => '琵', - ']' => '琶', - '^' => '琴', - '_' => '琯', - '`' => '琛', - 'a' => '琦', - 'b' => '琨', - 'c' => '甥', - 'd' => '甦', - 'e' => '畫', - 'f' => '番', - 'g' => '痢', - 'h' => '痛', - 'i' => '痣', - 'j' => '痙', - 'k' => '痘', - 'l' => '痞', - 'm' => '痠', - 'n' => '登', - 'o' => '發', - 'p' => '皖', - 'q' => '皓', - 'r' => '皴', - 's' => '盜', - 't' => '睏', - 'u' => '短', - 'v' => '硝', - 'w' => '硬', - 'x' => '硯', - 'y' => '稍', - 'z' => '稈', - '{' => '程', - '|' => '稅', - '}' => '稀', - '~' => '窘', - '' => '窗', - '' => '窖', - '' => '童', - '' => '竣', - '' => '等', - '' => '策', - '' => '筆', - '' => '筐', - '' => '筒', - '' => '答', - '' => '筍', - '' => '筋', - '' => '筏', - '' => '筑', - '' => '粟', - '' => '粥', - '' => '絞', - '' => '結', - '' => '絨', - '' => '絕', - '' => '紫', - '' => '絮', - '' => '絲', - '' => '絡', - '' => '給', - '' => '絢', - '' => '絰', - '' => '絳', - '' => '善', - '' => '翔', - '' => '翕', - '' => '耋', - '' => '聒', - '' => '肅', - '' => '腕', - '' => '腔', - '' => '腋', - '' => '腑', - '' => '腎', - '' => '脹', - '' => '腆', - '' => '脾', - '' => '腌', - '' => '腓', - '' => '腴', - '' => '舒', - '' => '舜', - '' => '菩', - '' => '萃', - '' => '菸', - '' => '萍', - '' => '菠', - '' => '菅', - '' => '萋', - '' => '菁', - '' => '華', - '' => '菱', - '' => '菴', - '' => '著', - '' => '萊', - '' => '菰', - '' => '萌', - '' => '菌', - '' => '菽', - '' => '菲', - '' => '菊', - '' => '萸', - '' => '萎', - '' => '萄', - '' => '菜', - '' => '萇', - '' => '菔', - '' => '菟', - '' => '虛', - '' => '蛟', - '' => '蛙', - '' => '蛭', - '' => '蛔', - '' => '蛛', - '' => '蛤', - '' => '蛐', - '' => '蛞', - '' => '街', - '' => '裁', - '' => '裂', - '' => '袱', - '' => '覃', - '' => '視', - '' => '註', - '' => '詠', - '' => '評', - '' => '詞', - '' => '証', - '' => '詁', - '@' => '詔', - 'A' => '詛', - 'B' => '詐', - 'C' => '詆', - 'D' => '訴', - 'E' => '診', - 'F' => '訶', - 'G' => '詖', - 'H' => '象', - 'I' => '貂', - 'J' => '貯', - 'K' => '貼', - 'L' => '貳', - 'M' => '貽', - 'N' => '賁', - 'O' => '費', - 'P' => '賀', - 'Q' => '貴', - 'R' => '買', - 'S' => '貶', - 'T' => '貿', - 'U' => '貸', - 'V' => '越', - 'W' => '超', - 'X' => '趁', - 'Y' => '跎', - 'Z' => '距', - '[' => '跋', - '\\' => '跚', - ']' => '跑', - '^' => '跌', - '_' => '跛', - '`' => '跆', - 'a' => '軻', - 'b' => '軸', - 'c' => '軼', - 'd' => '辜', - 'e' => '逮', - 'f' => '逵', - 'g' => '週', - 'h' => '逸', - 'i' => '進', - 'j' => '逶', - 'k' => '鄂', - 'l' => '郵', - 'm' => '鄉', - 'n' => '郾', - 'o' => '酣', - 'p' => '酥', - 'q' => '量', - 'r' => '鈔', - 's' => '鈕', - 't' => '鈣', - 'u' => '鈉', - 'v' => '鈞', - 'w' => '鈍', - 'x' => '鈐', - 'y' => '鈇', - 'z' => '鈑', - '{' => '閔', - '|' => '閏', - '}' => '開', - '~' => '閑', - '' => '間', - '' => '閒', - '' => '閎', - '' => '隊', - '' => '階', - '' => '隋', - '' => '陽', - '' => '隅', - '' => '隆', - '' => '隍', - '' => '陲', - '' => '隄', - '' => '雁', - '' => '雅', - '' => '雄', - '' => '集', - '' => '雇', - '' => '雯', - '' => '雲', - '' => '韌', - '' => '項', - '' => '順', - '' => '須', - '' => '飧', - '' => '飪', - '' => '飯', - '' => '飩', - '' => '飲', - '' => '飭', - '' => '馮', - '' => '馭', - '' => '黃', - '' => '黍', - '' => '黑', - '' => '亂', - '' => '傭', - '' => '債', - '' => '傲', - '' => '傳', - '' => '僅', - '' => '傾', - '' => '催', - '' => '傷', - '' => '傻', - '' => '傯', - '' => '僇', - '' => '剿', - '' => '剷', - '' => '剽', - '' => '募', - '' => '勦', - '' => '勤', - '' => '勢', - '' => '勣', - '' => '匯', - '' => '嗟', - '' => '嗨', - '' => '嗓', - '' => '嗦', - '' => '嗎', - '' => '嗜', - '' => '嗇', - '' => '嗑', - '' => '嗣', - '' => '嗤', - '' => '嗯', - '' => '嗚', - '' => '嗡', - '' => '嗅', - '' => '嗆', - '' => '嗥', - '' => '嗉', - '' => '園', - '' => '圓', - '' => '塞', - '' => '塑', - '' => '塘', - '' => '塗', - '' => '塚', - '' => '塔', - '' => '填', - '' => '塌', - '' => '塭', - '' => '塊', - '' => '塢', - '' => '塒', - '' => '塋', - '' => '奧', - '' => '嫁', - '' => '嫉', - '' => '嫌', - '' => '媾', - '' => '媽', - '' => '媼', - '@' => '媳', - 'A' => '嫂', - 'B' => '媲', - 'C' => '嵩', - 'D' => '嵯', - 'E' => '幌', - 'F' => '幹', - 'G' => '廉', - 'H' => '廈', - 'I' => '弒', - 'J' => '彙', - 'K' => '徬', - 'L' => '微', - 'M' => '愚', - 'N' => '意', - 'O' => '慈', - 'P' => '感', - 'Q' => '想', - 'R' => '愛', - 'S' => '惹', - 'T' => '愁', - 'U' => '愈', - 'V' => '慎', - 'W' => '慌', - 'X' => '慄', - 'Y' => '慍', - 'Z' => '愾', - '[' => '愴', - '\\' => '愧', - ']' => '愍', - '^' => '愆', - '_' => '愷', - '`' => '戡', - 'a' => '戢', - 'b' => '搓', - 'c' => '搾', - 'd' => '搞', - 'e' => '搪', - 'f' => '搭', - 'g' => '搽', - 'h' => '搬', - 'i' => '搏', - 'j' => '搜', - 'k' => '搔', - 'l' => '損', - 'm' => '搶', - 'n' => '搖', - 'o' => '搗', - 'p' => '搆', - 'q' => '敬', - 'r' => '斟', - 's' => '新', - 't' => '暗', - 'u' => '暉', - 'v' => '暇', - 'w' => '暈', - 'x' => '暖', - 'y' => '暄', - 'z' => '暘', - '{' => '暍', - '|' => '會', - '}' => '榔', - '~' => '業', - '' => '楚', - '' => '楷', - '' => '楠', - '' => '楔', - '' => '極', - '' => '椰', - '' => '概', - '' => '楊', - '' => '楨', - '' => '楫', - '' => '楞', - '' => '楓', - '' => '楹', - '' => '榆', - '' => '楝', - '' => '楣', - '' => '楛', - '' => '歇', - '' => '歲', - '' => '毀', - '' => '殿', - '' => '毓', - '' => '毽', - '' => '溢', - '' => '溯', - '' => '滓', - '' => '溶', - '' => '滂', - '' => '源', - '' => '溝', - '' => '滇', - '' => '滅', - '' => '溥', - '' => '溘', - '' => '溼', - '' => '溺', - '' => '溫', - '' => '滑', - '' => '準', - '' => '溜', - '' => '滄', - '' => '滔', - '' => '溪', - '' => '溧', - '' => '溴', - '' => '煎', - '' => '煙', - '' => '煩', - '' => '煤', - '' => '煉', - '' => '照', - '' => '煜', - '' => '煬', - '' => '煦', - '' => '煌', - '' => '煥', - '' => '煞', - '' => '煆', - '' => '煨', - '' => '煖', - '' => '爺', - '' => '牒', - '' => '猷', - '' => '獅', - '' => '猿', - '' => '猾', - '' => '瑯', - '' => '瑚', - '' => '瑕', - '' => '瑟', - '' => '瑞', - '' => '瑁', - '' => '琿', - '' => '瑙', - '' => '瑛', - '' => '瑜', - '' => '當', - '' => '畸', - '' => '瘀', - '' => '痰', - '' => '瘁', - '' => '痲', - '' => '痱', - '' => '痺', - '' => '痿', - '' => '痴', - '' => '痳', - '' => '盞', - '' => '盟', - '' => '睛', - '' => '睫', - '' => '睦', - '' => '睞', - '' => '督', - '@' => '睹', - 'A' => '睪', - 'B' => '睬', - 'C' => '睜', - 'D' => '睥', - 'E' => '睨', - 'F' => '睢', - 'G' => '矮', - 'H' => '碎', - 'I' => '碰', - 'J' => '碗', - 'K' => '碘', - 'L' => '碌', - 'M' => '碉', - 'N' => '硼', - 'O' => '碑', - 'P' => '碓', - 'Q' => '硿', - 'R' => '祺', - 'S' => '祿', - 'T' => '禁', - 'U' => '萬', - 'V' => '禽', - 'W' => '稜', - 'X' => '稚', - 'Y' => '稠', - 'Z' => '稔', - '[' => '稟', - '\\' => '稞', - ']' => '窟', - '^' => '窠', - '_' => '筷', - '`' => '節', - 'a' => '筠', - 'b' => '筮', - 'c' => '筧', - 'd' => '粱', - 'e' => '粳', - 'f' => '粵', - 'g' => '經', - 'h' => '絹', - 'i' => '綑', - 'j' => '綁', - 'k' => '綏', - 'l' => '絛', - 'm' => '置', - 'n' => '罩', - 'o' => '罪', - 'p' => '署', - 'q' => '義', - 'r' => '羨', - 's' => '群', - 't' => '聖', - 'u' => '聘', - 'v' => '肆', - 'w' => '肄', - 'x' => '腱', - 'y' => '腰', - 'z' => '腸', - '{' => '腥', - '|' => '腮', - '}' => '腳', - '~' => '腫', - '' => '腹', - '' => '腺', - '' => '腦', - '' => '舅', - '' => '艇', - '' => '蒂', - '' => '葷', - '' => '落', - '' => '萱', - '' => '葵', - '' => '葦', - '' => '葫', - '' => '葉', - '' => '葬', - '' => '葛', - '' => '萼', - '' => '萵', - '' => '葡', - '' => '董', - '' => '葩', - '' => '葭', - '' => '葆', - '' => '虞', - '' => '虜', - '' => '號', - '' => '蛹', - '' => '蜓', - '' => '蜈', - '' => '蜇', - '' => '蜀', - '' => '蛾', - '' => '蛻', - '' => '蜂', - '' => '蜃', - '' => '蜆', - '' => '蜊', - '' => '衙', - '' => '裟', - '' => '裔', - '' => '裙', - '' => '補', - '' => '裘', - '' => '裝', - '' => '裡', - '' => '裊', - '' => '裕', - '' => '裒', - '' => '覜', - '' => '解', - '' => '詫', - '' => '該', - '' => '詳', - '' => '試', - '' => '詩', - '' => '詰', - '' => '誇', - '' => '詼', - '' => '詣', - '' => '誠', - '' => '話', - '' => '誅', - '' => '詭', - '' => '詢', - '' => '詮', - '' => '詬', - '' => '詹', - '' => '詻', - '' => '訾', - '' => '詨', - '' => '豢', - '' => '貊', - '' => '貉', - '' => '賊', - '' => '資', - '' => '賈', - '' => '賄', - '' => '貲', - '' => '賃', - '' => '賂', - '' => '賅', - '' => '跡', - '' => '跟', - '' => '跨', - '' => '路', - '' => '跳', - '' => '跺', - '' => '跪', - '' => '跤', - '' => '跦', - '' => '躲', - '' => '較', - '' => '載', - '' => '軾', - '' => '輊', - '@' => '辟', - 'A' => '農', - 'B' => '運', - 'C' => '遊', - 'D' => '道', - 'E' => '遂', - 'F' => '達', - 'G' => '逼', - 'H' => '違', - 'I' => '遐', - 'J' => '遇', - 'K' => '遏', - 'L' => '過', - 'M' => '遍', - 'N' => '遑', - 'O' => '逾', - 'P' => '遁', - 'Q' => '鄒', - 'R' => '鄗', - 'S' => '酬', - 'T' => '酪', - 'U' => '酩', - 'V' => '釉', - 'W' => '鈷', - 'X' => '鉗', - 'Y' => '鈸', - 'Z' => '鈽', - '[' => '鉀', - '\\' => '鈾', - ']' => '鉛', - '^' => '鉋', - '_' => '鉤', - '`' => '鉑', - 'a' => '鈴', - 'b' => '鉉', - 'c' => '鉍', - 'd' => '鉅', - 'e' => '鈹', - 'f' => '鈿', - 'g' => '鉚', - 'h' => '閘', - 'i' => '隘', - 'j' => '隔', - 'k' => '隕', - 'l' => '雍', - 'm' => '雋', - 'n' => '雉', - 'o' => '雊', - 'p' => '雷', - 'q' => '電', - 'r' => '雹', - 's' => '零', - 't' => '靖', - 'u' => '靴', - 'v' => '靶', - 'w' => '預', - 'x' => '頑', - 'y' => '頓', - 'z' => '頊', - '{' => '頒', - '|' => '頌', - '}' => '飼', - '~' => '飴', - '' => '飽', - '' => '飾', - '' => '馳', - '' => '馱', - '' => '馴', - '' => '髡', - '' => '鳩', - '' => '麂', - '' => '鼎', - '' => '鼓', - '' => '鼠', - '' => '僧', - '' => '僮', - '' => '僥', - '' => '僖', - '' => '僭', - '' => '僚', - '' => '僕', - '' => '像', - '' => '僑', - '' => '僱', - '' => '僎', - '' => '僩', - '' => '兢', - '' => '凳', - '' => '劃', - '' => '劂', - '' => '匱', - '' => '厭', - '' => '嗾', - '' => '嘀', - '' => '嘛', - '' => '嘗', - '' => '嗽', - '' => '嘔', - '' => '嘆', - '' => '嘉', - '' => '嘍', - '' => '嘎', - '' => '嗷', - '' => '嘖', - '' => '嘟', - '' => '嘈', - '' => '嘐', - '' => '嗶', - '' => '團', - '' => '圖', - '' => '塵', - '' => '塾', - '' => '境', - '' => '墓', - '' => '墊', - '' => '塹', - '' => '墅', - '' => '塽', - '' => '壽', - '' => '夥', - '' => '夢', - '' => '夤', - '' => '奪', - '' => '奩', - '' => '嫡', - '' => '嫦', - '' => '嫩', - '' => '嫗', - '' => '嫖', - '' => '嫘', - '' => '嫣', - '' => '孵', - '' => '寞', - '' => '寧', - '' => '寡', - '' => '寥', - '' => '實', - '' => '寨', - '' => '寢', - '' => '寤', - '' => '察', - '' => '對', - '' => '屢', - '' => '嶄', - '' => '嶇', - '' => '幛', - '' => '幣', - '' => '幕', - '' => '幗', - '' => '幔', - '' => '廓', - '' => '廖', - '' => '弊', - '' => '彆', - '' => '彰', - '' => '徹', - '' => '慇', - '@' => '愿', - 'A' => '態', - 'B' => '慷', - 'C' => '慢', - 'D' => '慣', - 'E' => '慟', - 'F' => '慚', - 'G' => '慘', - 'H' => '慵', - 'I' => '截', - 'J' => '撇', - 'K' => '摘', - 'L' => '摔', - 'M' => '撤', - 'N' => '摸', - 'O' => '摟', - 'P' => '摺', - 'Q' => '摑', - 'R' => '摧', - 'S' => '搴', - 'T' => '摭', - 'U' => '摻', - 'V' => '敲', - 'W' => '斡', - 'X' => '旗', - 'Y' => '旖', - 'Z' => '暢', - '[' => '暨', - '\\' => '暝', - ']' => '榜', - '^' => '榨', - '_' => '榕', - '`' => '槁', - 'a' => '榮', - 'b' => '槓', - 'c' => '構', - 'd' => '榛', - 'e' => '榷', - 'f' => '榻', - 'g' => '榫', - 'h' => '榴', - 'i' => '槐', - 'j' => '槍', - 'k' => '榭', - 'l' => '槌', - 'm' => '榦', - 'n' => '槃', - 'o' => '榣', - 'p' => '歉', - 'q' => '歌', - 'r' => '氳', - 's' => '漳', - 't' => '演', - 'u' => '滾', - 'v' => '漓', - 'w' => '滴', - 'x' => '漩', - 'y' => '漾', - 'z' => '漠', - '{' => '漬', - '|' => '漏', - '}' => '漂', - '~' => '漢', - '' => '滿', - '' => '滯', - '' => '漆', - '' => '漱', - '' => '漸', - '' => '漲', - '' => '漣', - '' => '漕', - '' => '漫', - '' => '漯', - '' => '澈', - '' => '漪', - '' => '滬', - '' => '漁', - '' => '滲', - '' => '滌', - '' => '滷', - '' => '熔', - '' => '熙', - '' => '煽', - '' => '熊', - '' => '熄', - '' => '熒', - '' => '爾', - '' => '犒', - '' => '犖', - '' => '獄', - '' => '獐', - '' => '瑤', - '' => '瑣', - '' => '瑪', - '' => '瑰', - '' => '瑭', - '' => '甄', - '' => '疑', - '' => '瘧', - '' => '瘍', - '' => '瘋', - '' => '瘉', - '' => '瘓', - '' => '盡', - '' => '監', - '' => '瞄', - '' => '睽', - '' => '睿', - '' => '睡', - '' => '磁', - '' => '碟', - '' => '碧', - '' => '碳', - '' => '碩', - '' => '碣', - '' => '禎', - '' => '福', - '' => '禍', - '' => '種', - '' => '稱', - '' => '窪', - '' => '窩', - '' => '竭', - '' => '端', - '' => '管', - '' => '箕', - '' => '箋', - '' => '筵', - '' => '算', - '' => '箝', - '' => '箔', - '' => '箏', - '' => '箸', - '' => '箇', - '' => '箄', - '' => '粹', - '' => '粽', - '' => '精', - '' => '綻', - '' => '綰', - '' => '綜', - '' => '綽', - '' => '綾', - '' => '綠', - '' => '緊', - '' => '綴', - '' => '網', - '' => '綱', - '' => '綺', - '' => '綢', - '' => '綿', - '' => '綵', - '' => '綸', - '' => '維', - '' => '緒', - '' => '緇', - '' => '綬', - '@' => '罰', - 'A' => '翠', - 'B' => '翡', - 'C' => '翟', - 'D' => '聞', - 'E' => '聚', - 'F' => '肇', - 'G' => '腐', - 'H' => '膀', - 'I' => '膏', - 'J' => '膈', - 'K' => '膊', - 'L' => '腿', - 'M' => '膂', - 'N' => '臧', - 'O' => '臺', - 'P' => '與', - 'Q' => '舔', - 'R' => '舞', - 'S' => '艋', - 'T' => '蓉', - 'U' => '蒿', - 'V' => '蓆', - 'W' => '蓄', - 'X' => '蒙', - 'Y' => '蒞', - 'Z' => '蒲', - '[' => '蒜', - '\\' => '蓋', - ']' => '蒸', - '^' => '蓀', - '_' => '蓓', - '`' => '蒐', - 'a' => '蒼', - 'b' => '蓑', - 'c' => '蓊', - 'd' => '蜿', - 'e' => '蜜', - 'f' => '蜻', - 'g' => '蜢', - 'h' => '蜥', - 'i' => '蜴', - 'j' => '蜘', - 'k' => '蝕', - 'l' => '蜷', - 'm' => '蜩', - 'n' => '裳', - 'o' => '褂', - 'p' => '裴', - 'q' => '裹', - 'r' => '裸', - 's' => '製', - 't' => '裨', - 'u' => '褚', - 'v' => '裯', - 'w' => '誦', - 'x' => '誌', - 'y' => '語', - 'z' => '誣', - '{' => '認', - '|' => '誡', - '}' => '誓', - '~' => '誤', - '' => '說', - '' => '誥', - '' => '誨', - '' => '誘', - '' => '誑', - '' => '誚', - '' => '誧', - '' => '豪', - '' => '貍', - '' => '貌', - '' => '賓', - '' => '賑', - '' => '賒', - '' => '赫', - '' => '趙', - '' => '趕', - '' => '跼', - '' => '輔', - '' => '輒', - '' => '輕', - '' => '輓', - '' => '辣', - '' => '遠', - '' => '遘', - '' => '遜', - '' => '遣', - '' => '遙', - '' => '遞', - '' => '遢', - '' => '遝', - '' => '遛', - '' => '鄙', - '' => '鄘', - '' => '鄞', - '' => '酵', - '' => '酸', - '' => '酷', - '' => '酴', - '' => '鉸', - '' => '銀', - '' => '銅', - '' => '銘', - '' => '銖', - '' => '鉻', - '' => '銓', - '' => '銜', - '' => '銨', - '' => '鉼', - '' => '銑', - '' => '閡', - '' => '閨', - '' => '閩', - '' => '閣', - '' => '閥', - '' => '閤', - '' => '隙', - '' => '障', - '' => '際', - '' => '雌', - '' => '雒', - '' => '需', - '' => '靼', - '' => '鞅', - '' => '韶', - '' => '頗', - '' => '領', - '' => '颯', - '' => '颱', - '' => '餃', - '' => '餅', - '' => '餌', - '' => '餉', - '' => '駁', - '' => '骯', - '' => '骰', - '' => '髦', - '' => '魁', - '' => '魂', - '' => '鳴', - '' => '鳶', - '' => '鳳', - '' => '麼', - '' => '鼻', - '' => '齊', - '' => '億', - '' => '儀', - '' => '僻', - '' => '僵', - '' => '價', - '' => '儂', - '' => '儈', - '' => '儉', - '' => '儅', - '' => '凜', - '@' => '劇', - 'A' => '劈', - 'B' => '劉', - 'C' => '劍', - 'D' => '劊', - 'E' => '勰', - 'F' => '厲', - 'G' => '嘮', - 'H' => '嘻', - 'I' => '嘹', - 'J' => '嘲', - 'K' => '嘿', - 'L' => '嘴', - 'M' => '嘩', - 'N' => '噓', - 'O' => '噎', - 'P' => '噗', - 'Q' => '噴', - 'R' => '嘶', - 'S' => '嘯', - 'T' => '嘰', - 'U' => '墀', - 'V' => '墟', - 'W' => '增', - 'X' => '墳', - 'Y' => '墜', - 'Z' => '墮', - '[' => '墩', - '\\' => '墦', - ']' => '奭', - '^' => '嬉', - '_' => '嫻', - '`' => '嬋', - 'a' => '嫵', - 'b' => '嬌', - 'c' => '嬈', - 'd' => '寮', - 'e' => '寬', - 'f' => '審', - 'g' => '寫', - 'h' => '層', - 'i' => '履', - 'j' => '嶝', - 'k' => '嶔', - 'l' => '幢', - 'm' => '幟', - 'n' => '幡', - 'o' => '廢', - 'p' => '廚', - 'q' => '廟', - 'r' => '廝', - 's' => '廣', - 't' => '廠', - 'u' => '彈', - 'v' => '影', - 'w' => '德', - 'x' => '徵', - 'y' => '慶', - 'z' => '慧', - '{' => '慮', - '|' => '慝', - '}' => '慕', - '~' => '憂', - '' => '慼', - '' => '慰', - '' => '慫', - '' => '慾', - '' => '憧', - '' => '憐', - '' => '憫', - '' => '憎', - '' => '憬', - '' => '憚', - '' => '憤', - '' => '憔', - '' => '憮', - '' => '戮', - '' => '摩', - '' => '摯', - '' => '摹', - '' => '撞', - '' => '撲', - '' => '撈', - '' => '撐', - '' => '撰', - '' => '撥', - '' => '撓', - '' => '撕', - '' => '撩', - '' => '撒', - '' => '撮', - '' => '播', - '' => '撫', - '' => '撚', - '' => '撬', - '' => '撙', - '' => '撢', - '' => '撳', - '' => '敵', - '' => '敷', - '' => '數', - '' => '暮', - '' => '暫', - '' => '暴', - '' => '暱', - '' => '樣', - '' => '樟', - '' => '槨', - '' => '樁', - '' => '樞', - '' => '標', - '' => '槽', - '' => '模', - '' => '樓', - '' => '樊', - '' => '槳', - '' => '樂', - '' => '樅', - '' => '槭', - '' => '樑', - '' => '歐', - '' => '歎', - '' => '殤', - '' => '毅', - '' => '毆', - '' => '漿', - '' => '潼', - '' => '澄', - '' => '潑', - '' => '潦', - '' => '潔', - '' => '澆', - '' => '潭', - '' => '潛', - '' => '潸', - '' => '潮', - '' => '澎', - '' => '潺', - '' => '潰', - '' => '潤', - '' => '澗', - '' => '潘', - '' => '滕', - '' => '潯', - '' => '潠', - '' => '潟', - '' => '熟', - '' => '熬', - '' => '熱', - '' => '熨', - '' => '牖', - '' => '犛', - '' => '獎', - '' => '獗', - '' => '瑩', - '' => '璋', - '' => '璃', - '@' => '瑾', - 'A' => '璀', - 'B' => '畿', - 'C' => '瘠', - 'D' => '瘩', - 'E' => '瘟', - 'F' => '瘤', - 'G' => '瘦', - 'H' => '瘡', - 'I' => '瘢', - 'J' => '皚', - 'K' => '皺', - 'L' => '盤', - 'M' => '瞎', - 'N' => '瞇', - 'O' => '瞌', - 'P' => '瞑', - 'Q' => '瞋', - 'R' => '磋', - 'S' => '磅', - 'T' => '確', - 'U' => '磊', - 'V' => '碾', - 'W' => '磕', - 'X' => '碼', - 'Y' => '磐', - 'Z' => '稿', - '[' => '稼', - '\\' => '穀', - ']' => '稽', - '^' => '稷', - '_' => '稻', - '`' => '窯', - 'a' => '窮', - 'b' => '箭', - 'c' => '箱', - 'd' => '範', - 'e' => '箴', - 'f' => '篆', - 'g' => '篇', - 'h' => '篁', - 'i' => '箠', - 'j' => '篌', - 'k' => '糊', - 'l' => '締', - 'm' => '練', - 'n' => '緯', - 'o' => '緻', - 'p' => '緘', - 'q' => '緬', - 'r' => '緝', - 's' => '編', - 't' => '緣', - 'u' => '線', - 'v' => '緞', - 'w' => '緩', - 'x' => '綞', - 'y' => '緙', - 'z' => '緲', - '{' => '緹', - '|' => '罵', - '}' => '罷', - '~' => '羯', - '' => '翩', - '' => '耦', - '' => '膛', - '' => '膜', - '' => '膝', - '' => '膠', - '' => '膚', - '' => '膘', - '' => '蔗', - '' => '蔽', - '' => '蔚', - '' => '蓮', - '' => '蔬', - '' => '蔭', - '' => '蔓', - '' => '蔑', - '' => '蔣', - '' => '蔡', - '' => '蔔', - '' => '蓬', - '' => '蔥', - '' => '蓿', - '' => '蔆', - '' => '螂', - '' => '蝴', - '' => '蝶', - '' => '蝠', - '' => '蝦', - '' => '蝸', - '' => '蝨', - '' => '蝙', - '' => '蝗', - '' => '蝌', - '' => '蝓', - '' => '衛', - '' => '衝', - '' => '褐', - '' => '複', - '' => '褒', - '' => '褓', - '' => '褕', - '' => '褊', - '' => '誼', - '' => '諒', - '' => '談', - '' => '諄', - '' => '誕', - '' => '請', - '' => '諸', - '' => '課', - '' => '諉', - '' => '諂', - '' => '調', - '' => '誰', - '' => '論', - '' => '諍', - '' => '誶', - '' => '誹', - '' => '諛', - '' => '豌', - '' => '豎', - '' => '豬', - '' => '賠', - '' => '賞', - '' => '賦', - '' => '賤', - '' => '賬', - '' => '賭', - '' => '賢', - '' => '賣', - '' => '賜', - '' => '質', - '' => '賡', - '' => '赭', - '' => '趟', - '' => '趣', - '' => '踫', - '' => '踐', - '' => '踝', - '' => '踢', - '' => '踏', - '' => '踩', - '' => '踟', - '' => '踡', - '' => '踞', - '' => '躺', - '' => '輝', - '' => '輛', - '' => '輟', - '' => '輩', - '' => '輦', - '' => '輪', - '' => '輜', - '' => '輞', - '@' => '輥', - 'A' => '適', - 'B' => '遮', - 'C' => '遨', - 'D' => '遭', - 'E' => '遷', - 'F' => '鄰', - 'G' => '鄭', - 'H' => '鄧', - 'I' => '鄱', - 'J' => '醇', - 'K' => '醉', - 'L' => '醋', - 'M' => '醃', - 'N' => '鋅', - 'O' => '銻', - 'P' => '銷', - 'Q' => '鋪', - 'R' => '銬', - 'S' => '鋤', - 'T' => '鋁', - 'U' => '銳', - 'V' => '銼', - 'W' => '鋒', - 'X' => '鋇', - 'Y' => '鋰', - 'Z' => '銲', - '[' => '閭', - '\\' => '閱', - ']' => '霄', - '^' => '霆', - '_' => '震', - '`' => '霉', - 'a' => '靠', - 'b' => '鞍', - 'c' => '鞋', - 'd' => '鞏', - 'e' => '頡', - 'f' => '頫', - 'g' => '頜', - 'h' => '颳', - 'i' => '養', - 'j' => '餓', - 'k' => '餒', - 'l' => '餘', - 'm' => '駝', - 'n' => '駐', - 'o' => '駟', - 'p' => '駛', - 'q' => '駑', - 'r' => '駕', - 's' => '駒', - 't' => '駙', - 'u' => '骷', - 'v' => '髮', - 'w' => '髯', - 'x' => '鬧', - 'y' => '魅', - 'z' => '魄', - '{' => '魷', - '|' => '魯', - '}' => '鴆', - '~' => '鴉', - '' => '鴃', - '' => '麩', - '' => '麾', - '' => '黎', - '' => '墨', - '' => '齒', - '' => '儒', - '' => '儘', - '' => '儔', - '' => '儐', - '' => '儕', - '' => '冀', - '' => '冪', - '' => '凝', - '' => '劑', - '' => '劓', - '' => '勳', - '' => '噙', - '' => '噫', - '' => '噹', - '' => '噩', - '' => '噤', - '' => '噸', - '' => '噪', - '' => '器', - '' => '噥', - '' => '噱', - '' => '噯', - '' => '噬', - '' => '噢', - '' => '噶', - '' => '壁', - '' => '墾', - '' => '壇', - '' => '壅', - '' => '奮', - '' => '嬝', - '' => '嬴', - '' => '學', - '' => '寰', - '' => '導', - '' => '彊', - '' => '憲', - '' => '憑', - '' => '憩', - '' => '憊', - '' => '懍', - '' => '憶', - '' => '憾', - '' => '懊', - '' => '懈', - '' => '戰', - '' => '擅', - '' => '擁', - '' => '擋', - '' => '撻', - '' => '撼', - '' => '據', - '' => '擄', - '' => '擇', - '' => '擂', - '' => '操', - '' => '撿', - '' => '擒', - '' => '擔', - '' => '撾', - '' => '整', - '' => '曆', - '' => '曉', - '' => '暹', - '' => '曄', - '' => '曇', - '' => '暸', - '' => '樽', - '' => '樸', - '' => '樺', - '' => '橙', - '' => '橫', - '' => '橘', - '' => '樹', - '' => '橄', - '' => '橢', - '' => '橡', - '' => '橋', - '' => '橇', - '' => '樵', - '' => '機', - '' => '橈', - '' => '歙', - '' => '歷', - '' => '氅', - '' => '濂', - '' => '澱', - '' => '澡', - '@' => '濃', - 'A' => '澤', - 'B' => '濁', - 'C' => '澧', - 'D' => '澳', - 'E' => '激', - 'F' => '澹', - 'G' => '澶', - 'H' => '澦', - 'I' => '澠', - 'J' => '澴', - 'K' => '熾', - 'L' => '燉', - 'M' => '燐', - 'N' => '燒', - 'O' => '燈', - 'P' => '燕', - 'Q' => '熹', - 'R' => '燎', - 'S' => '燙', - 'T' => '燜', - 'U' => '燃', - 'V' => '燄', - 'W' => '獨', - 'X' => '璜', - 'Y' => '璣', - 'Z' => '璘', - '[' => '璟', - '\\' => '璞', - ']' => '瓢', - '^' => '甌', - '_' => '甍', - '`' => '瘴', - 'a' => '瘸', - 'b' => '瘺', - 'c' => '盧', - 'd' => '盥', - 'e' => '瞠', - 'f' => '瞞', - 'g' => '瞟', - 'h' => '瞥', - 'i' => '磨', - 'j' => '磚', - 'k' => '磬', - 'l' => '磧', - 'm' => '禦', - 'n' => '積', - 'o' => '穎', - 'p' => '穆', - 'q' => '穌', - 'r' => '穋', - 's' => '窺', - 't' => '篙', - 'u' => '簑', - 'v' => '築', - 'w' => '篤', - 'x' => '篛', - 'y' => '篡', - 'z' => '篩', - '{' => '篦', - '|' => '糕', - '}' => '糖', - '~' => '縊', - '' => '縑', - '' => '縈', - '' => '縛', - '' => '縣', - '' => '縞', - '' => '縝', - '' => '縉', - '' => '縐', - '' => '罹', - '' => '羲', - '' => '翰', - '' => '翱', - '' => '翮', - '' => '耨', - '' => '膳', - '' => '膩', - '' => '膨', - '' => '臻', - '' => '興', - '' => '艘', - '' => '艙', - '' => '蕊', - '' => '蕙', - '' => '蕈', - '' => '蕨', - '' => '蕩', - '' => '蕃', - '' => '蕉', - '' => '蕭', - '' => '蕪', - '' => '蕞', - '' => '螃', - '' => '螟', - '' => '螞', - '' => '螢', - '' => '融', - '' => '衡', - '' => '褪', - '' => '褲', - '' => '褥', - '' => '褫', - '' => '褡', - '' => '親', - '' => '覦', - '' => '諦', - '' => '諺', - '' => '諫', - '' => '諱', - '' => '謀', - '' => '諜', - '' => '諧', - '' => '諮', - '' => '諾', - '' => '謁', - '' => '謂', - '' => '諷', - '' => '諭', - '' => '諳', - '' => '諶', - '' => '諼', - '' => '豫', - '' => '豭', - '' => '貓', - '' => '賴', - '' => '蹄', - '' => '踱', - '' => '踴', - '' => '蹂', - '' => '踹', - '' => '踵', - '' => '輻', - '' => '輯', - '' => '輸', - '' => '輳', - '' => '辨', - '' => '辦', - '' => '遵', - '' => '遴', - '' => '選', - '' => '遲', - '' => '遼', - '' => '遺', - '' => '鄴', - '' => '醒', - '' => '錠', - '' => '錶', - '' => '鋸', - '' => '錳', - '' => '錯', - '' => '錢', - '' => '鋼', - '' => '錫', - '' => '錄', - '' => '錚', - '@' => '錐', - 'A' => '錦', - 'B' => '錡', - 'C' => '錕', - 'D' => '錮', - 'E' => '錙', - 'F' => '閻', - 'G' => '隧', - 'H' => '隨', - 'I' => '險', - 'J' => '雕', - 'K' => '霎', - 'L' => '霑', - 'M' => '霖', - 'N' => '霍', - 'O' => '霓', - 'P' => '霏', - 'Q' => '靛', - 'R' => '靜', - 'S' => '靦', - 'T' => '鞘', - 'U' => '頰', - 'V' => '頸', - 'W' => '頻', - 'X' => '頷', - 'Y' => '頭', - 'Z' => '頹', - '[' => '頤', - '\\' => '餐', - ']' => '館', - '^' => '餞', - '_' => '餛', - '`' => '餡', - 'a' => '餚', - 'b' => '駭', - 'c' => '駢', - 'd' => '駱', - 'e' => '骸', - 'f' => '骼', - 'g' => '髻', - 'h' => '髭', - 'i' => '鬨', - 'j' => '鮑', - 'k' => '鴕', - 'l' => '鴣', - 'm' => '鴦', - 'n' => '鴨', - 'o' => '鴒', - 'p' => '鴛', - 'q' => '默', - 'r' => '黔', - 's' => '龍', - 't' => '龜', - 'u' => '優', - 'v' => '償', - 'w' => '儡', - 'x' => '儲', - 'y' => '勵', - 'z' => '嚎', - '{' => '嚀', - '|' => '嚐', - '}' => '嚅', - '~' => '嚇', - '' => '嚏', - '' => '壕', - '' => '壓', - '' => '壑', - '' => '壎', - '' => '嬰', - '' => '嬪', - '' => '嬤', - '' => '孺', - '' => '尷', - '' => '屨', - '' => '嶼', - '' => '嶺', - '' => '嶽', - '' => '嶸', - '' => '幫', - '' => '彌', - '' => '徽', - '' => '應', - '' => '懂', - '' => '懇', - '' => '懦', - '' => '懋', - '' => '戲', - '' => '戴', - '' => '擎', - '' => '擊', - '' => '擘', - '' => '擠', - '' => '擰', - '' => '擦', - '' => '擬', - '' => '擱', - '' => '擢', - '' => '擭', - '' => '斂', - '' => '斃', - '' => '曙', - '' => '曖', - '' => '檀', - '' => '檔', - '' => '檄', - '' => '檢', - '' => '檜', - '' => '櫛', - '' => '檣', - '' => '橾', - '' => '檗', - '' => '檐', - '' => '檠', - '' => '歜', - '' => '殮', - '' => '毚', - '' => '氈', - '' => '濘', - '' => '濱', - '' => '濟', - '' => '濠', - '' => '濛', - '' => '濤', - '' => '濫', - '' => '濯', - '' => '澀', - '' => '濬', - '' => '濡', - '' => '濩', - '' => '濕', - '' => '濮', - '' => '濰', - '' => '燧', - '' => '營', - '' => '燮', - '' => '燦', - '' => '燥', - '' => '燭', - '' => '燬', - '' => '燴', - '' => '燠', - '' => '爵', - '' => '牆', - '' => '獰', - '' => '獲', - '' => '璩', - '' => '環', - '' => '璦', - '' => '璨', - '' => '癆', - '' => '療', - '' => '癌', - '' => '盪', - '' => '瞳', - '' => '瞪', - '' => '瞰', - '' => '瞬', - '@' => '瞧', - 'A' => '瞭', - 'B' => '矯', - 'C' => '磷', - 'D' => '磺', - 'E' => '磴', - 'F' => '磯', - 'G' => '礁', - 'H' => '禧', - 'I' => '禪', - 'J' => '穗', - 'K' => '窿', - 'L' => '簇', - 'M' => '簍', - 'N' => '篾', - 'O' => '篷', - 'P' => '簌', - 'Q' => '篠', - 'R' => '糠', - 'S' => '糜', - 'T' => '糞', - 'U' => '糢', - 'V' => '糟', - 'W' => '糙', - 'X' => '糝', - 'Y' => '縮', - 'Z' => '績', - '[' => '繆', - '\\' => '縷', - ']' => '縲', - '^' => '繃', - '_' => '縫', - '`' => '總', - 'a' => '縱', - 'b' => '繅', - 'c' => '繁', - 'd' => '縴', - 'e' => '縹', - 'f' => '繈', - 'g' => '縵', - 'h' => '縿', - 'i' => '縯', - 'j' => '罄', - 'k' => '翳', - 'l' => '翼', - 'm' => '聱', - 'n' => '聲', - 'o' => '聰', - 'p' => '聯', - 'q' => '聳', - 'r' => '臆', - 's' => '臃', - 't' => '膺', - 'u' => '臂', - 'v' => '臀', - 'w' => '膿', - 'x' => '膽', - 'y' => '臉', - 'z' => '膾', - '{' => '臨', - '|' => '舉', - '}' => '艱', - '~' => '薪', - '' => '薄', - '' => '蕾', - '' => '薜', - '' => '薑', - '' => '薔', - '' => '薯', - '' => '薛', - '' => '薇', - '' => '薨', - '' => '薊', - '' => '虧', - '' => '蟀', - '' => '蟑', - '' => '螳', - '' => '蟒', - '' => '蟆', - '' => '螫', - '' => '螻', - '' => '螺', - '' => '蟈', - '' => '蟋', - '' => '褻', - '' => '褶', - '' => '襄', - '' => '褸', - '' => '褽', - '' => '覬', - '' => '謎', - '' => '謗', - '' => '謙', - '' => '講', - '' => '謊', - '' => '謠', - '' => '謝', - '' => '謄', - '' => '謐', - '' => '豁', - '' => '谿', - '' => '豳', - '' => '賺', - '' => '賽', - '' => '購', - '' => '賸', - '' => '賻', - '' => '趨', - '' => '蹉', - '' => '蹋', - '' => '蹈', - '' => '蹊', - '' => '轄', - '' => '輾', - '' => '轂', - '' => '轅', - '' => '輿', - '' => '避', - '' => '遽', - '' => '還', - '' => '邁', - '' => '邂', - '' => '邀', - '' => '鄹', - '' => '醣', - '' => '醞', - '' => '醜', - '' => '鍍', - '' => '鎂', - '' => '錨', - '' => '鍵', - '' => '鍊', - '' => '鍥', - '' => '鍋', - '' => '錘', - '' => '鍾', - '' => '鍬', - '' => '鍛', - '' => '鍰', - '' => '鍚', - '' => '鍔', - '' => '闊', - '' => '闋', - '' => '闌', - '' => '闈', - '' => '闆', - '' => '隱', - '' => '隸', - '' => '雖', - '' => '霜', - '' => '霞', - '' => '鞠', - '' => '韓', - '' => '顆', - '' => '颶', - '' => '餵', - '' => '騁', - '@' => '駿', - 'A' => '鮮', - 'B' => '鮫', - 'C' => '鮪', - 'D' => '鮭', - 'E' => '鴻', - 'F' => '鴿', - 'G' => '麋', - 'H' => '黏', - 'I' => '點', - 'J' => '黜', - 'K' => '黝', - 'L' => '黛', - 'M' => '鼾', - 'N' => '齋', - 'O' => '叢', - 'P' => '嚕', - 'Q' => '嚮', - 'R' => '壙', - 'S' => '壘', - 'T' => '嬸', - 'U' => '彝', - 'V' => '懣', - 'W' => '戳', - 'X' => '擴', - 'Y' => '擲', - 'Z' => '擾', - '[' => '攆', - '\\' => '擺', - ']' => '擻', - '^' => '擷', - '_' => '斷', - '`' => '曜', - 'a' => '朦', - 'b' => '檳', - 'c' => '檬', - 'd' => '櫃', - 'e' => '檻', - 'f' => '檸', - 'g' => '櫂', - 'h' => '檮', - 'i' => '檯', - 'j' => '歟', - 'k' => '歸', - 'l' => '殯', - 'm' => '瀉', - 'n' => '瀋', - 'o' => '濾', - 'p' => '瀆', - 'q' => '濺', - 'r' => '瀑', - 's' => '瀏', - 't' => '燻', - 'u' => '燼', - 'v' => '燾', - 'w' => '燸', - 'x' => '獷', - 'y' => '獵', - 'z' => '璧', - '{' => '璿', - '|' => '甕', - '}' => '癖', - '~' => '癘', - '¡' => '癒', - '¢' => '瞽', - '£' => '瞿', - '¤' => '瞻', - '¥' => '瞼', - '¦' => '礎', - '§' => '禮', - '¨' => '穡', - '©' => '穢', - 'ª' => '穠', - '«' => '竄', - '¬' => '竅', - '­' => '簫', - '®' => '簧', - '¯' => '簪', - '°' => '簞', - '±' => '簣', - '²' => '簡', - '³' => '糧', - '´' => '織', - 'µ' => '繕', - '¶' => '繞', - '·' => '繚', - '¸' => '繡', - '¹' => '繒', - 'º' => '繙', - '»' => '罈', - '¼' => '翹', - '½' => '翻', - '¾' => '職', - '¿' => '聶', - '' => '臍', - '' => '臏', - '' => '舊', - '' => '藏', - '' => '薩', - '' => '藍', - '' => '藐', - '' => '藉', - '' => '薰', - '' => '薺', - '' => '薹', - '' => '薦', - '' => '蟯', - '' => '蟬', - '' => '蟲', - '' => '蟠', - '' => '覆', - '' => '覲', - '' => '觴', - '' => '謨', - '' => '謹', - '' => '謬', - '' => '謫', - '' => '豐', - '' => '贅', - '' => '蹙', - '' => '蹣', - '' => '蹦', - '' => '蹤', - '' => '蹟', - '' => '蹕', - '' => '軀', - '' => '轉', - '' => '轍', - '' => '邇', - '' => '邃', - '' => '邈', - '' => '醫', - '' => '醬', - '' => '釐', - '' => '鎔', - '' => '鎊', - '' => '鎖', - '' => '鎢', - '' => '鎳', - '' => '鎮', - '' => '鎬', - '' => '鎰', - '' => '鎘', - '' => '鎚', - '' => '鎗', - '' => '闔', - '' => '闖', - '' => '闐', - '' => '闕', - '' => '離', - '' => '雜', - '' => '雙', - '' => '雛', - '' => '雞', - '' => '霤', - '' => '鞣', - '' => '鞦', - '@' => '鞭', - 'A' => '韹', - 'B' => '額', - 'C' => '顏', - 'D' => '題', - 'E' => '顎', - 'F' => '顓', - 'G' => '颺', - 'H' => '餾', - 'I' => '餿', - 'J' => '餽', - 'K' => '餮', - 'L' => '馥', - 'M' => '騎', - 'N' => '髁', - 'O' => '鬃', - 'P' => '鬆', - 'Q' => '魏', - 'R' => '魎', - 'S' => '魍', - 'T' => '鯊', - 'U' => '鯉', - 'V' => '鯽', - 'W' => '鯈', - 'X' => '鯀', - 'Y' => '鵑', - 'Z' => '鵝', - '[' => '鵠', - '\\' => '黠', - ']' => '鼕', - '^' => '鼬', - '_' => '儳', - '`' => '嚥', - 'a' => '壞', - 'b' => '壟', - 'c' => '壢', - 'd' => '寵', - 'e' => '龐', - 'f' => '廬', - 'g' => '懲', - 'h' => '懷', - 'i' => '懶', - 'j' => '懵', - 'k' => '攀', - 'l' => '攏', - 'm' => '曠', - 'n' => '曝', - 'o' => '櫥', - 'p' => '櫝', - 'q' => '櫚', - 'r' => '櫓', - 's' => '瀛', - 't' => '瀟', - 'u' => '瀨', - 'v' => '瀚', - 'w' => '瀝', - 'x' => '瀕', - 'y' => '瀘', - 'z' => '爆', - '{' => '爍', - '|' => '牘', - '}' => '犢', - '~' => '獸', - 'á' => '獺', - 'â' => '璽', - 'ã' => '瓊', - 'ä' => '瓣', - 'å' => '疇', - 'æ' => '疆', - 'ç' => '癟', - 'è' => '癡', - 'é' => '矇', - 'ê' => '礙', - 'ë' => '禱', - 'ì' => '穫', - 'í' => '穩', - 'î' => '簾', - 'ï' => '簿', - 'ð' => '簸', - 'ñ' => '簽', - 'ò' => '簷', - 'ó' => '籀', - 'ô' => '繫', - 'õ' => '繭', - 'ö' => '繹', - '÷' => '繩', - 'ø' => '繪', - 'ù' => '羅', - 'ú' => '繳', - 'û' => '羶', - 'ü' => '羹', - 'ý' => '羸', - 'þ' => '臘', - 'ÿ' => '藩', - '' => '藝', - '' => '藪', - '' => '藕', - '' => '藤', - '' => '藥', - '' => '藷', - '' => '蟻', - '' => '蠅', - '' => '蠍', - '' => '蟹', - '' => '蟾', - '' => '襠', - '' => '襟', - '' => '襖', - '' => '襞', - '' => '譁', - '' => '譜', - '' => '識', - '' => '證', - '' => '譚', - '' => '譎', - '' => '譏', - '' => '譆', - '' => '譙', - '' => '贈', - '' => '贊', - '' => '蹼', - '' => '蹲', - '' => '躇', - '' => '蹶', - '' => '蹬', - '' => '蹺', - '' => '蹴', - '' => '轔', - '' => '轎', - '' => '辭', - '' => '邊', - '' => '邋', - '' => '醱', - '' => '醮', - '' => '鏡', - '' => '鏑', - '' => '鏟', - '' => '鏃', - '' => '鏈', - '' => '鏜', - '' => '鏝', - '' => '鏖', - '' => '鏢', - '' => '鏍', - '' => '鏘', - '' => '鏤', - '' => '鏗', - '' => '鏨', - '' => '關', - '' => '隴', - '' => '難', - '' => '霪', - '' => '霧', - '' => '靡', - '' => '韜', - '' => '韻', - '' => '類', - '@' => '願', - 'A' => '顛', - 'B' => '颼', - 'C' => '饅', - 'D' => '饉', - 'E' => '騖', - 'F' => '騙', - 'G' => '鬍', - 'H' => '鯨', - 'I' => '鯧', - 'J' => '鯖', - 'K' => '鯛', - 'L' => '鶉', - 'M' => '鵡', - 'N' => '鵲', - 'O' => '鵪', - 'P' => '鵬', - 'Q' => '麒', - 'R' => '麗', - 'S' => '麓', - 'T' => '麴', - 'U' => '勸', - 'V' => '嚨', - 'W' => '嚷', - 'X' => '嚶', - 'Y' => '嚴', - 'Z' => '嚼', - '[' => '壤', - '\\' => '孀', - ']' => '孃', - '^' => '孽', - '_' => '寶', - '`' => '巉', - 'a' => '懸', - 'b' => '懺', - 'c' => '攘', - 'd' => '攔', - 'e' => '攙', - 'f' => '曦', - 'g' => '朧', - 'h' => '櫬', - 'i' => '瀾', - 'j' => '瀰', - 'k' => '瀲', - 'l' => '爐', - 'm' => '獻', - 'n' => '瓏', - 'o' => '癢', - 'p' => '癥', - 'q' => '礦', - 'r' => '礪', - 's' => '礬', - 't' => '礫', - 'u' => '竇', - 'v' => '競', - 'w' => '籌', - 'x' => '籃', - 'y' => '籍', - 'z' => '糯', - '{' => '糰', - '|' => '辮', - '}' => '繽', - '~' => '繼', - 'ġ' => '纂', - 'Ģ' => '罌', - 'ģ' => '耀', - 'Ĥ' => '臚', - 'ĥ' => '艦', - 'Ħ' => '藻', - 'ħ' => '藹', - 'Ĩ' => '蘑', - 'ĩ' => '藺', - 'Ī' => '蘆', - 'ī' => '蘋', - 'Ĭ' => '蘇', - 'ĭ' => '蘊', - 'Į' => '蠔', - 'į' => '蠕', - 'İ' => '襤', - 'ı' => '覺', - 'IJ' => '觸', - 'ij' => '議', - 'Ĵ' => '譬', - 'ĵ' => '警', - 'Ķ' => '譯', - 'ķ' => '譟', - 'ĸ' => '譫', - 'Ĺ' => '贏', - 'ĺ' => '贍', - 'Ļ' => '躉', - 'ļ' => '躁', - 'Ľ' => '躅', - 'ľ' => '躂', - 'Ŀ' => '醴', - '' => '釋', - '' => '鐘', - '' => '鐃', - '' => '鏽', - '' => '闡', - '' => '霰', - '' => '飄', - '' => '饒', - '' => '饑', - '' => '馨', - '' => '騫', - '' => '騰', - '' => '騷', - '' => '騵', - '' => '鰓', - '' => '鰍', - '' => '鹹', - '' => '麵', - '' => '黨', - '' => '鼯', - '' => '齟', - '' => '齣', - '' => '齡', - '' => '儷', - '' => '儸', - '' => '囁', - '' => '囀', - '' => '囂', - '' => '夔', - '' => '屬', - '' => '巍', - '' => '懼', - '' => '懾', - '' => '攝', - '' => '攜', - '' => '斕', - '' => '曩', - '' => '櫻', - '' => '欄', - '' => '櫺', - '' => '殲', - '' => '灌', - '' => '爛', - '' => '犧', - '' => '瓖', - '' => '瓔', - '' => '癩', - '' => '矓', - '' => '籐', - '' => '纏', - '' => '續', - '' => '羼', - '' => '蘗', - '' => '蘭', - '' => '蘚', - '' => '蠣', - '' => '蠢', - '' => '蠡', - '' => '蠟', - '' => '襪', - '' => '襬', - '' => '覽', - '' => '譴', - '@' => '護', - 'A' => '譽', - 'B' => '贓', - 'C' => '躊', - 'D' => '躍', - 'E' => '躋', - 'F' => '轟', - 'G' => '辯', - 'H' => '醺', - 'I' => '鐮', - 'J' => '鐳', - 'K' => '鐵', - 'L' => '鐺', - 'M' => '鐸', - 'N' => '鐲', - 'O' => '鐫', - 'P' => '闢', - 'Q' => '霸', - 'R' => '霹', - 'S' => '露', - 'T' => '響', - 'U' => '顧', - 'V' => '顥', - 'W' => '饗', - 'X' => '驅', - 'Y' => '驃', - 'Z' => '驀', - '[' => '騾', - '\\' => '髏', - ']' => '魔', - '^' => '魑', - '_' => '鰭', - '`' => '鰥', - 'a' => '鶯', - 'b' => '鶴', - 'c' => '鷂', - 'd' => '鶸', - 'e' => '麝', - 'f' => '黯', - 'g' => '鼙', - 'h' => '齜', - 'i' => '齦', - 'j' => '齧', - 'k' => '儼', - 'l' => '儻', - 'm' => '囈', - 'n' => '囊', - 'o' => '囉', - 'p' => '孿', - 'q' => '巔', - 'r' => '巒', - 's' => '彎', - 't' => '懿', - 'u' => '攤', - 'v' => '權', - 'w' => '歡', - 'x' => '灑', - 'y' => '灘', - 'z' => '玀', - '{' => '瓤', - '|' => '疊', - '}' => '癮', - '~' => '癬', - 'š' => '禳', - 'Ţ' => '籠', - 'ţ' => '籟', - 'Ť' => '聾', - 'ť' => '聽', - 'Ŧ' => '臟', - 'ŧ' => '襲', - 'Ũ' => '襯', - 'ũ' => '觼', - 'Ū' => '讀', - 'ū' => '贖', - 'Ŭ' => '贗', - 'ŭ' => '躑', - 'Ů' => '躓', - 'ů' => '轡', - 'Ű' => '酈', - 'ű' => '鑄', - 'Ų' => '鑑', - 'ų' => '鑒', - 'Ŵ' => '霽', - 'ŵ' => '霾', - 'Ŷ' => '韃', - 'ŷ' => '韁', - 'Ÿ' => '顫', - 'Ź' => '饕', - 'ź' => '驕', - 'Ż' => '驍', - 'ż' => '髒', - 'Ž' => '鬚', - 'ž' => '鱉', - 'ſ' => '鰱', - '' => '鰾', - '' => '鰻', - '' => '鷓', - '' => '鷗', - '' => '鼴', - '' => '齬', - '' => '齪', - '' => '龔', - '' => '囌', - '' => '巖', - '' => '戀', - '' => '攣', - '' => '攫', - '' => '攪', - '' => '曬', - '' => '欐', - '' => '瓚', - '' => '竊', - '' => '籤', - '' => '籣', - '' => '籥', - '' => '纓', - '' => '纖', - '' => '纔', - '' => '臢', - '' => '蘸', - '' => '蘿', - '' => '蠱', - '' => '變', - '' => '邐', - '' => '邏', - '' => '鑣', - '' => '鑠', - '' => '鑤', - '' => '靨', - '' => '顯', - '' => '饜', - '' => '驚', - '' => '驛', - '' => '驗', - '' => '髓', - '' => '體', - '' => '髑', - '' => '鱔', - '' => '鱗', - '' => '鱖', - '' => '鷥', - '' => '麟', - '' => '黴', - '' => '囑', - '' => '壩', - '' => '攬', - '' => '灞', - '' => '癱', - '' => '癲', - '' => '矗', - '' => '罐', - '' => '羈', - '' => '蠶', - '' => '蠹', - '' => '衢', - '' => '讓', - '' => '讒', - '@' => '讖', - 'A' => '艷', - 'B' => '贛', - 'C' => '釀', - 'D' => '鑪', - 'E' => '靂', - 'F' => '靈', - 'G' => '靄', - 'H' => '韆', - 'I' => '顰', - 'J' => '驟', - 'K' => '鬢', - 'L' => '魘', - 'M' => '鱟', - 'N' => '鷹', - 'O' => '鷺', - 'P' => '鹼', - 'Q' => '鹽', - 'R' => '鼇', - 'S' => '齷', - 'T' => '齲', - 'U' => '廳', - 'V' => '欖', - 'W' => '灣', - 'X' => '籬', - 'Y' => '籮', - 'Z' => '蠻', - '[' => '觀', - '\\' => '躡', - ']' => '釁', - '^' => '鑲', - '_' => '鑰', - '`' => '顱', - 'a' => '饞', - 'b' => '髖', - 'c' => '鬣', - 'd' => '黌', - 'e' => '灤', - 'f' => '矚', - 'g' => '讚', - 'h' => '鑷', - 'i' => '韉', - 'j' => '驢', - 'k' => '驥', - 'l' => '纜', - 'm' => '讜', - 'n' => '躪', - 'o' => '釅', - 'p' => '鑽', - 'q' => '鑾', - 'r' => '鑼', - 's' => '鱷', - 't' => '鱸', - 'u' => '黷', - 'v' => '豔', - 'w' => '鑿', - 'x' => '鸚', - 'y' => '爨', - 'z' => '驪', - '{' => '鬱', - '|' => '鸛', - '}' => '鸞', - '~' => '籲', - 'ơ' => 'ヾ', - 'Ƣ' => 'ゝ', - 'ƣ' => 'ゞ', - 'Ƥ' => '々', - 'ƥ' => 'ぁ', - 'Ʀ' => 'あ', - 'Ƨ' => 'ぃ', - 'ƨ' => 'い', - 'Ʃ' => 'ぅ', - 'ƪ' => 'う', - 'ƫ' => 'ぇ', - 'Ƭ' => 'え', - 'ƭ' => 'ぉ', - 'Ʈ' => 'お', - 'Ư' => 'か', - 'ư' => 'が', - 'Ʊ' => 'き', - 'Ʋ' => 'ぎ', - 'Ƴ' => 'く', - 'ƴ' => 'ぐ', - 'Ƶ' => 'け', - 'ƶ' => 'げ', - 'Ʒ' => 'こ', - 'Ƹ' => 'ご', - 'ƹ' => 'さ', - 'ƺ' => 'ざ', - 'ƻ' => 'し', - 'Ƽ' => 'じ', - 'ƽ' => 'す', - 'ƾ' => 'ず', - 'ƿ' => 'せ', - '' => 'ぜ', - '' => 'そ', - '' => 'ぞ', - '' => 'た', - '' => 'だ', - '' => 'ち', - '' => 'ぢ', - '' => 'っ', - '' => 'つ', - '' => 'づ', - '' => 'て', - '' => 'で', - '' => 'と', - '' => 'ど', - '' => 'な', - '' => 'に', - '' => 'ぬ', - '' => 'ね', - '' => 'の', - '' => 'は', - '' => 'ば', - '' => 'ぱ', - '' => 'ひ', - '' => 'び', - '' => 'ぴ', - '' => 'ふ', - '' => 'ぶ', - '' => 'ぷ', - '' => 'へ', - '' => 'べ', - '' => 'ぺ', - '' => 'ほ', - '' => 'ぼ', - '' => 'ぽ', - '' => 'ま', - '' => 'み', - '' => 'む', - '' => 'め', - '' => 'も', - '' => 'ゃ', - '' => 'や', - '' => 'ゅ', - '' => 'ゆ', - '' => 'ょ', - '' => 'よ', - '' => 'ら', - '' => 'り', - '' => 'る', - '' => 'れ', - '' => 'ろ', - '' => 'ゎ', - '' => 'わ', - '' => 'ゐ', - '' => 'ゑ', - '' => 'を', - '' => 'ん', - '' => 'ァ', - '' => 'ア', - '' => 'ィ', - '' => 'イ', - '' => 'ゥ', - '' => 'ウ', - '' => 'ェ', - '@' => 'エ', - 'A' => 'ォ', - 'B' => 'オ', - 'C' => 'カ', - 'D' => 'ガ', - 'E' => 'キ', - 'F' => 'ギ', - 'G' => 'ク', - 'H' => 'グ', - 'I' => 'ケ', - 'J' => 'ゲ', - 'K' => 'コ', - 'L' => 'ゴ', - 'M' => 'サ', - 'N' => 'ザ', - 'O' => 'シ', - 'P' => 'ジ', - 'Q' => 'ス', - 'R' => 'ズ', - 'S' => 'セ', - 'T' => 'ゼ', - 'U' => 'ソ', - 'V' => 'ゾ', - 'W' => 'タ', - 'X' => 'ダ', - 'Y' => 'チ', - 'Z' => 'ヂ', - '[' => 'ッ', - '\\' => 'ツ', - ']' => 'ヅ', - '^' => 'テ', - '_' => 'デ', - '`' => 'ト', - 'a' => 'ド', - 'b' => 'ナ', - 'c' => 'ニ', - 'd' => 'ヌ', - 'e' => 'ネ', - 'f' => 'ノ', - 'g' => 'ハ', - 'h' => 'バ', - 'i' => 'パ', - 'j' => 'ヒ', - 'k' => 'ビ', - 'l' => 'ピ', - 'm' => 'フ', - 'n' => 'ブ', - 'o' => 'プ', - 'p' => 'ヘ', - 'q' => 'ベ', - 'r' => 'ペ', - 's' => 'ホ', - 't' => 'ボ', - 'u' => 'ポ', - 'v' => 'マ', - 'w' => 'ミ', - 'x' => 'ム', - 'y' => 'メ', - 'z' => 'モ', - '{' => 'ャ', - '|' => 'ヤ', - '}' => 'ュ', - '~' => 'ユ', - 'ǡ' => 'ョ', - 'Ǣ' => 'ヨ', - 'ǣ' => 'ラ', - 'Ǥ' => 'リ', - 'ǥ' => 'ル', - 'Ǧ' => 'レ', - 'ǧ' => 'ロ', - 'Ǩ' => 'ヮ', - 'ǩ' => 'ワ', - 'Ǫ' => 'ヰ', - 'ǫ' => 'ヱ', - 'Ǭ' => 'ヲ', - 'ǭ' => 'ン', - 'Ǯ' => 'ヴ', - 'ǯ' => 'ヵ', - 'ǰ' => 'ヶ', - 'DZ' => 'Д', - 'Dz' => 'Е', - 'dz' => 'Ё', - 'Ǵ' => 'Ж', - 'ǵ' => 'З', - 'Ƕ' => 'И', - 'Ƿ' => 'Й', - 'Ǹ' => 'К', - 'ǹ' => 'Л', - 'Ǻ' => 'М', - 'ǻ' => 'У', - 'Ǽ' => 'Ф', - 'ǽ' => 'Х', - 'Ǿ' => 'Ц', - 'ǿ' => 'Ч', - '' => 'Ш', - '' => 'Щ', - '' => 'Ъ', - '' => 'Ы', - '' => 'Ь', - '' => 'Э', - '' => 'Ю', - '' => 'Я', - '' => 'а', - '' => 'б', - '' => 'в', - '' => 'г', - '' => 'д', - '' => 'е', - '' => 'ё', - '' => 'ж', - '' => 'з', - '' => 'и', - '' => 'й', - '' => 'к', - '' => 'л', - '' => 'м', - '' => 'н', - '' => 'о', - '' => 'п', - '' => 'р', - '' => 'с', - '' => 'т', - '' => 'у', - '' => 'ф', - '' => 'х', - '' => 'ц', - '' => 'ч', - '' => 'ш', - '' => 'щ', - '' => 'ъ', - '' => 'ы', - '' => 'ь', - '' => 'э', - '' => 'ю', - '' => 'я', - '' => '①', - '' => '②', - '' => '③', - '' => '④', - '' => '⑤', - '' => '⑥', - '' => '⑦', - '' => '⑧', - '' => '⑨', - '' => '⑩', - '' => '⑴', - '' => '⑵', - '' => '⑶', - '' => '⑷', - '' => '⑸', - '' => '⑹', - '' => '⑺', - '' => '⑻', - '' => '⑼', - '' => '⑽', - '@' => '乂', - 'A' => '乜', - 'B' => '凵', - 'C' => '匚', - 'D' => '厂', - 'E' => '万', - 'F' => '丌', - 'G' => '乇', - 'H' => '亍', - 'I' => '囗', - 'J' => '兀', - 'K' => '屮', - 'L' => '彳', - 'M' => '丏', - 'N' => '冇', - 'O' => '与', - 'P' => '丮', - 'Q' => '亓', - 'R' => '仂', - 'S' => '仉', - 'T' => '仈', - 'U' => '冘', - 'V' => '勼', - 'W' => '卬', - 'X' => '厹', - 'Y' => '圠', - 'Z' => '夃', - '[' => '夬', - '\\' => '尐', - ']' => '巿', - '^' => '旡', - '_' => '殳', - '`' => '毌', - 'a' => '气', - 'b' => '爿', - 'c' => '丱', - 'd' => '丼', - 'e' => '仨', - 'f' => '仜', - 'g' => '仩', - 'h' => '仡', - 'i' => '仝', - 'j' => '仚', - 'k' => '刌', - 'l' => '匜', - 'm' => '卌', - 'n' => '圢', - 'o' => '圣', - 'p' => '夗', - 'q' => '夯', - 'r' => '宁', - 's' => '宄', - 't' => '尒', - 'u' => '尻', - 'v' => '屴', - 'w' => '屳', - 'x' => '帄', - 'y' => '庀', - 'z' => '庂', - '{' => '忉', - '|' => '戉', - '}' => '扐', - '~' => '氕', - 'ɡ' => '氶', - 'ɢ' => '汃', - 'ɣ' => '氿', - 'ɤ' => '氻', - 'ɥ' => '犮', - 'ɦ' => '犰', - 'ɧ' => '玊', - 'ɨ' => '禸', - 'ɩ' => '肊', - 'ɪ' => '阞', - 'ɫ' => '伎', - 'ɬ' => '优', - 'ɭ' => '伬', - 'ɮ' => '仵', - 'ɯ' => '伔', - 'ɰ' => '仱', - 'ɱ' => '伀', - 'ɲ' => '价', - 'ɳ' => '伈', - 'ɴ' => '伝', - 'ɵ' => '伂', - 'ɶ' => '伅', - 'ɷ' => '伢', - 'ɸ' => '伓', - 'ɹ' => '伄', - 'ɺ' => '仴', - 'ɻ' => '伒', - 'ɼ' => '冱', - 'ɽ' => '刓', - 'ɾ' => '刉', - 'ɿ' => '刐', - '' => '劦', - '' => '匢', - '' => '匟', - '' => '卍', - '' => '厊', - '' => '吇', - '' => '囡', - '' => '囟', - '' => '圮', - '' => '圪', - '' => '圴', - '' => '夼', - '' => '妀', - '' => '奼', - '' => '妅', - '' => '奻', - '' => '奾', - '' => '奷', - '' => '奿', - '' => '孖', - '' => '尕', - '' => '尥', - '' => '屼', - '' => '屺', - '' => '屻', - '' => '屾', - '' => '巟', - '' => '幵', - '' => '庄', - '' => '异', - '' => '弚', - '' => '彴', - '' => '忕', - '' => '忔', - '' => '忏', - '' => '扜', - '' => '扞', - '' => '扤', - '' => '扡', - '' => '扦', - '' => '扢', - '' => '扙', - '' => '扠', - '' => '扚', - '' => '扥', - '' => '旯', - '' => '旮', - '' => '朾', - '' => '朹', - '' => '朸', - '' => '朻', - '' => '机', - '' => '朿', - '' => '朼', - '' => '朳', - '' => '氘', - '' => '汆', - '' => '汒', - '' => '汜', - '' => '汏', - '' => '汊', - '' => '汔', - '' => '汋', - '@' => '汌', - 'A' => '灱', - 'B' => '牞', - 'C' => '犴', - 'D' => '犵', - 'E' => '玎', - 'F' => '甪', - 'G' => '癿', - 'H' => '穵', - 'I' => '网', - 'J' => '艸', - 'K' => '艼', - 'L' => '芀', - 'M' => '艽', - 'N' => '艿', - 'O' => '虍', - 'P' => '襾', - 'Q' => '邙', - 'R' => '邗', - 'S' => '邘', - 'T' => '邛', - 'U' => '邔', - 'V' => '阢', - 'W' => '阤', - 'X' => '阠', - 'Y' => '阣', - 'Z' => '佖', - '[' => '伻', - '\\' => '佢', - ']' => '佉', - '^' => '体', - '_' => '佤', - '`' => '伾', - 'a' => '佧', - 'b' => '佒', - 'c' => '佟', - 'd' => '佁', - 'e' => '佘', - 'f' => '伭', - 'g' => '伳', - 'h' => '伿', - 'i' => '佡', - 'j' => '冏', - 'k' => '冹', - 'l' => '刜', - 'm' => '刞', - 'n' => '刡', - 'o' => '劭', - 'p' => '劮', - 'q' => '匉', - 'r' => '卣', - 's' => '卲', - 't' => '厎', - 'u' => '厏', - 'v' => '吰', - 'w' => '吷', - 'x' => '吪', - 'y' => '呔', - 'z' => '呅', - '{' => '吙', - '|' => '吜', - '}' => '吥', - '~' => '吘', - 'ʡ' => '吽', - 'ʢ' => '呏', - 'ʣ' => '呁', - 'ʤ' => '吨', - 'ʥ' => '吤', - 'ʦ' => '呇', - 'ʧ' => '囮', - 'ʨ' => '囧', - 'ʩ' => '囥', - 'ʪ' => '坁', - 'ʫ' => '坅', - 'ʬ' => '坌', - 'ʭ' => '坉', - 'ʮ' => '坋', - 'ʯ' => '坒', - 'ʰ' => '夆', - 'ʱ' => '奀', - 'ʲ' => '妦', - 'ʳ' => '妘', - 'ʴ' => '妠', - 'ʵ' => '妗', - 'ʶ' => '妎', - 'ʷ' => '妢', - 'ʸ' => '妐', - 'ʹ' => '妏', - 'ʺ' => '妧', - 'ʻ' => '妡', - 'ʼ' => '宎', - 'ʽ' => '宒', - 'ʾ' => '尨', - 'ʿ' => '尪', - '' => '岍', - '' => '岏', - '' => '岈', - '' => '岋', - '' => '岉', - '' => '岒', - '' => '岊', - '' => '岆', - '' => '岓', - '' => '岕', - '' => '巠', - '' => '帊', - '' => '帎', - '' => '庋', - '' => '庉', - '' => '庌', - '' => '庈', - '' => '庍', - '' => '弅', - '' => '弝', - '' => '彸', - '' => '彶', - '' => '忒', - '' => '忑', - '' => '忐', - '' => '忭', - '' => '忨', - '' => '忮', - '' => '忳', - '' => '忡', - '' => '忤', - '' => '忣', - '' => '忺', - '' => '忯', - '' => '忷', - '' => '忻', - '' => '怀', - '' => '忴', - '' => '戺', - '' => '抃', - '' => '抌', - '' => '抎', - '' => '抏', - '' => '抔', - '' => '抇', - '' => '扱', - '' => '扻', - '' => '扺', - '' => '扰', - '' => '抁', - '' => '抈', - '' => '扷', - '' => '扽', - '' => '扲', - '' => '扴', - '' => '攷', - '' => '旰', - '' => '旴', - '' => '旳', - '' => '旲', - '' => '旵', - '' => '杅', - '' => '杇', - '@' => '杙', - 'A' => '杕', - 'B' => '杌', - 'C' => '杈', - 'D' => '杝', - 'E' => '杍', - 'F' => '杚', - 'G' => '杋', - 'H' => '毐', - 'I' => '氙', - 'J' => '氚', - 'K' => '汸', - 'L' => '汧', - 'M' => '汫', - 'N' => '沄', - 'O' => '沋', - 'P' => '沏', - 'Q' => '汱', - 'R' => '汯', - 'S' => '汩', - 'T' => '沚', - 'U' => '汭', - 'V' => '沇', - 'W' => '沕', - 'X' => '沜', - 'Y' => '汦', - 'Z' => '汳', - '[' => '汥', - '\\' => '汻', - ']' => '沎', - '^' => '灴', - '_' => '灺', - '`' => '牣', - 'a' => '犿', - 'b' => '犽', - 'c' => '狃', - 'd' => '狆', - 'e' => '狁', - 'f' => '犺', - 'g' => '狅', - 'h' => '玕', - 'i' => '玗', - 'j' => '玓', - 'k' => '玔', - 'l' => '玒', - 'm' => '町', - 'n' => '甹', - 'o' => '疔', - 'p' => '疕', - 'q' => '皁', - 'r' => '礽', - 's' => '耴', - 't' => '肕', - 'u' => '肙', - 'v' => '肐', - 'w' => '肒', - 'x' => '肜', - 'y' => '芐', - 'z' => '芏', - '{' => '芅', - '|' => '芎', - '}' => '芑', - '~' => '芓', - 'ˡ' => '芊', - 'ˢ' => '芃', - 'ˣ' => '芄', - 'ˤ' => '豸', - '˥' => '迉', - '˦' => '辿', - '˧' => '邟', - '˨' => '邡', - '˩' => '邥', - '˪' => '邞', - '˫' => '邧', - 'ˬ' => '邠', - '˭' => '阰', - 'ˮ' => '阨', - '˯' => '阯', - '˰' => '阭', - '˱' => '丳', - '˲' => '侘', - '˳' => '佼', - '˴' => '侅', - '˵' => '佽', - '˶' => '侀', - '˷' => '侇', - '˸' => '佶', - '˹' => '佴', - '˺' => '侉', - '˻' => '侄', - '˼' => '佷', - '˽' => '佌', - '˾' => '侗', - '˿' => '佪', - '' => '侚', - '' => '佹', - '' => '侁', - '' => '佸', - '' => '侐', - '' => '侜', - '' => '侔', - '' => '侞', - '' => '侒', - '' => '侂', - '' => '侕', - '' => '佫', - '' => '佮', - '' => '冞', - '' => '冼', - '' => '冾', - '' => '刵', - '' => '刲', - '' => '刳', - '' => '剆', - '' => '刱', - '' => '劼', - '' => '匊', - '' => '匋', - '' => '匼', - '' => '厒', - '' => '厔', - '' => '咇', - '' => '呿', - '' => '咁', - '' => '咑', - '' => '咂', - '' => '咈', - '' => '呫', - '' => '呺', - '' => '呾', - '' => '呥', - '' => '呬', - '' => '呴', - '' => '呦', - '' => '咍', - '' => '呯', - '' => '呡', - '' => '呠', - '' => '咘', - '' => '呣', - '' => '呧', - '' => '呤', - '' => '囷', - '' => '囹', - '' => '坯', - '' => '坲', - '' => '坭', - '' => '坫', - '' => '坱', - '' => '坰', - '' => '坶', - '' => '垀', - '' => '坵', - '' => '坻', - '' => '坳', - '' => '坴', - '' => '坢', - '@' => '坨', - 'A' => '坽', - 'B' => '夌', - 'C' => '奅', - 'D' => '妵', - 'E' => '妺', - 'F' => '姏', - 'G' => '姎', - 'H' => '妲', - 'I' => '姌', - 'J' => '姁', - 'K' => '妶', - 'L' => '妼', - 'M' => '姃', - 'N' => '姖', - 'O' => '妱', - 'P' => '妽', - 'Q' => '姀', - 'R' => '姈', - 'S' => '妴', - 'T' => '姇', - 'U' => '孢', - 'V' => '孥', - 'W' => '宓', - 'X' => '宕', - 'Y' => '屄', - 'Z' => '屇', - '[' => '岮', - '\\' => '岤', - ']' => '岠', - '^' => '岵', - '_' => '岯', - '`' => '岨', - 'a' => '岬', - 'b' => '岟', - 'c' => '岣', - 'd' => '岭', - 'e' => '岢', - 'f' => '岪', - 'g' => '岧', - 'h' => '岝', - 'i' => '岥', - 'j' => '岶', - 'k' => '岰', - 'l' => '岦', - 'm' => '帗', - 'n' => '帔', - 'o' => '帙', - 'p' => '弨', - 'q' => '弢', - 'r' => '弣', - 's' => '弤', - 't' => '彔', - 'u' => '徂', - 'v' => '彾', - 'w' => '彽', - 'x' => '忞', - 'y' => '忥', - 'z' => '怭', - '{' => '怦', - '|' => '怙', - '}' => '怲', - '~' => '怋', - '̡' => '怴', - '̢' => '怊', - '̣' => '怗', - '̤' => '怳', - '̥' => '怚', - '̦' => '怞', - '̧' => '怬', - '̨' => '怢', - '̩' => '怍', - '̪' => '怐', - '̫' => '怮', - '̬' => '怓', - '̭' => '怑', - '̮' => '怌', - '̯' => '怉', - '̰' => '怜', - '̱' => '戔', - '̲' => '戽', - '̳' => '抭', - '̴' => '抴', - '̵' => '拑', - '̶' => '抾', - '̷' => '抪', - '̸' => '抶', - '̹' => '拊', - '̺' => '抮', - '̻' => '抳', - '̼' => '抯', - '̽' => '抻', - '̾' => '抩', - '̿' => '抰', - '' => '抸', - '' => '攽', - '' => '斨', - '' => '斻', - '' => '昉', - '' => '旼', - '' => '昄', - '' => '昒', - '' => '昈', - '' => '旻', - '' => '昃', - '' => '昋', - '' => '昍', - '' => '昅', - '' => '旽', - '' => '昑', - '' => '昐', - '' => '曶', - '' => '朊', - '' => '枅', - '' => '杬', - '' => '枎', - '' => '枒', - '' => '杶', - '' => '杻', - '' => '枘', - '' => '枆', - '' => '构', - '' => '杴', - '' => '枍', - '' => '枌', - '' => '杺', - '' => '枟', - '' => '枑', - '' => '枙', - '' => '枃', - '' => '杽', - '' => '极', - '' => '杸', - '' => '杹', - '' => '枔', - '' => '欥', - '' => '殀', - '' => '歾', - '' => '毞', - '' => '氝', - '' => '沓', - '' => '泬', - '' => '泫', - '' => '泮', - '' => '泙', - '' => '沶', - '' => '泔', - '' => '沭', - '' => '泧', - '' => '沷', - '' => '泐', - '' => '泂', - '' => '沺', - '' => '泃', - '' => '泆', - '' => '泭', - '' => '泲', - '@' => '泒', - 'A' => '泝', - 'B' => '沴', - 'C' => '沊', - 'D' => '沝', - 'E' => '沀', - 'F' => '泞', - 'G' => '泀', - 'H' => '洰', - 'I' => '泍', - 'J' => '泇', - 'K' => '沰', - 'L' => '泹', - 'M' => '泏', - 'N' => '泩', - 'O' => '泑', - 'P' => '炔', - 'Q' => '炘', - 'R' => '炅', - 'S' => '炓', - 'T' => '炆', - 'U' => '炄', - 'V' => '炑', - 'W' => '炖', - 'X' => '炂', - 'Y' => '炚', - 'Z' => '炃', - '[' => '牪', - '\\' => '狖', - ']' => '狋', - '^' => '狘', - '_' => '狉', - '`' => '狜', - 'a' => '狒', - 'b' => '狔', - 'c' => '狚', - 'd' => '狌', - 'e' => '狑', - 'f' => '玤', - 'g' => '玡', - 'h' => '玭', - 'i' => '玦', - 'j' => '玢', - 'k' => '玠', - 'l' => '玬', - 'm' => '玝', - 'n' => '瓝', - 'o' => '瓨', - 'p' => '甿', - 'q' => '畀', - 'r' => '甾', - 's' => '疌', - 't' => '疘', - 'u' => '皯', - 'v' => '盳', - 'w' => '盱', - 'x' => '盰', - 'y' => '盵', - 'z' => '矸', - '{' => '矼', - '|' => '矹', - '}' => '矻', - '~' => '矺', - '͡' => '矷', - '͢' => '祂', - 'ͣ' => '礿', - 'ͤ' => '秅', - 'ͥ' => '穸', - 'ͦ' => '穻', - 'ͧ' => '竻', - 'ͨ' => '籵', - 'ͩ' => '糽', - 'ͪ' => '耵', - 'ͫ' => '肏', - 'ͬ' => '肮', - 'ͭ' => '肣', - 'ͮ' => '肸', - 'ͯ' => '肵', - 'Ͱ' => '肭', - 'ͱ' => '舠', - 'Ͳ' => '芠', - 'ͳ' => '苀', - 'ʹ' => '芫', - '͵' => '芚', - 'Ͷ' => '芘', - 'ͷ' => '芛', - '͸' => '芵', - '͹' => '芧', - 'ͺ' => '芮', - 'ͻ' => '芼', - 'ͼ' => '芞', - 'ͽ' => '芺', - ';' => '芴', - 'Ϳ' => '芨', - '' => '芡', - '' => '芩', - '' => '苂', - '' => '芤', - '' => '苃', - '' => '芶', - '' => '芢', - '' => '虰', - '' => '虯', - '' => '虭', - '' => '虮', - '' => '豖', - '' => '迒', - '' => '迋', - '' => '迓', - '' => '迍', - '' => '迖', - '' => '迕', - '' => '迗', - '' => '邲', - '' => '邴', - '' => '邯', - '' => '邳', - '' => '邰', - '' => '阹', - '' => '阽', - '' => '阼', - '' => '阺', - '' => '陃', - '' => '俍', - '' => '俅', - '' => '俓', - '' => '侲', - '' => '俉', - '' => '俋', - '' => '俁', - '' => '俔', - '' => '俜', - '' => '俙', - '' => '侻', - '' => '侳', - '' => '俛', - '' => '俇', - '' => '俖', - '' => '侺', - '' => '俀', - '' => '侹', - '' => '俬', - '' => '剄', - '' => '剉', - '' => '勀', - '' => '勂', - '' => '匽', - '' => '卼', - '' => '厗', - '' => '厖', - '' => '厙', - '' => '厘', - '' => '咺', - '' => '咡', - '' => '咭', - '' => '咥', - '' => '哏', - '@' => '哃', - 'A' => '茍', - 'B' => '咷', - 'C' => '咮', - 'D' => '哖', - 'E' => '咶', - 'F' => '哅', - 'G' => '哆', - 'H' => '咠', - 'I' => '呰', - 'J' => '咼', - 'K' => '咢', - 'L' => '咾', - 'M' => '呲', - 'N' => '哞', - 'O' => '咰', - 'P' => '垵', - 'Q' => '垞', - 'R' => '垟', - 'S' => '垤', - 'T' => '垌', - 'U' => '垗', - 'V' => '垝', - 'W' => '垛', - 'X' => '垔', - 'Y' => '垘', - 'Z' => '垏', - '[' => '垙', - '\\' => '垥', - ']' => '垚', - '^' => '垕', - '_' => '壴', - '`' => '复', - 'a' => '奓', - 'b' => '姡', - 'c' => '姞', - 'd' => '姮', - 'e' => '娀', - 'f' => '姱', - 'g' => '姝', - 'h' => '姺', - 'i' => '姽', - 'j' => '姼', - 'k' => '姶', - 'l' => '姤', - 'm' => '姲', - 'n' => '姷', - 'o' => '姛', - 'p' => '姩', - 'q' => '姳', - 'r' => '姵', - 's' => '姠', - 't' => '姾', - 'u' => '姴', - 'v' => '姭', - 'w' => '宨', - 'x' => '屌', - 'y' => '峐', - 'z' => '峘', - '{' => '峌', - '|' => '峗', - '}' => '峋', - '~' => '峛', - 'Ρ' => '峞', - '΢' => '峚', - 'Σ' => '峉', - 'Τ' => '峇', - 'Υ' => '峊', - 'Φ' => '峖', - 'Χ' => '峓', - 'Ψ' => '峔', - 'Ω' => '峏', - 'Ϊ' => '峈', - 'Ϋ' => '峆', - 'ά' => '峎', - 'έ' => '峟', - 'ή' => '峸', - 'ί' => '巹', - 'ΰ' => '帡', - 'α' => '帢', - 'β' => '帣', - 'γ' => '帠', - 'δ' => '帤', - 'ε' => '庰', - 'ζ' => '庤', - 'η' => '庢', - 'θ' => '庛', - 'ι' => '庣', - 'κ' => '庥', - 'λ' => '弇', - 'μ' => '弮', - 'ν' => '彖', - 'ξ' => '徆', - 'ο' => '怷', - '' => '怹', - '' => '恔', - '' => '恲', - '' => '恞', - '' => '恅', - '' => '恓', - '' => '恇', - '' => '恉', - '' => '恛', - '' => '恌', - '' => '恀', - '' => '恂', - '' => '恟', - '' => '怤', - '' => '恄', - '' => '恘', - '' => '恦', - '' => '恮', - '' => '扂', - '' => '扃', - '' => '拏', - '' => '挍', - '' => '挋', - '' => '拵', - '' => '挎', - '' => '挃', - '' => '拫', - '' => '拹', - '' => '挏', - '' => '挌', - '' => '拸', - '' => '拶', - '' => '挀', - '' => '挓', - '' => '挔', - '' => '拺', - '' => '挕', - '' => '拻', - '' => '拰', - '' => '敁', - '' => '敃', - '' => '斪', - '' => '斿', - '' => '昶', - '' => '昡', - '' => '昲', - '' => '昵', - '' => '昜', - '' => '昦', - '' => '昢', - '' => '昳', - '' => '昫', - '' => '昺', - '' => '昝', - '' => '昴', - '' => '昹', - '' => '昮', - '' => '朏', - '' => '朐', - '' => '柁', - '' => '柲', - '' => '柈', - '' => '枺', - '@' => '柜', - 'A' => '枻', - 'B' => '柸', - 'C' => '柘', - 'D' => '柀', - 'E' => '枷', - 'F' => '柅', - 'G' => '柫', - 'H' => '柤', - 'I' => '柟', - 'J' => '枵', - 'K' => '柍', - 'L' => '枳', - 'M' => '柷', - 'N' => '柶', - 'O' => '柮', - 'P' => '柣', - 'Q' => '柂', - 'R' => '枹', - 'S' => '柎', - 'T' => '柧', - 'U' => '柰', - 'V' => '枲', - 'W' => '柼', - 'X' => '柆', - 'Y' => '柭', - 'Z' => '柌', - '[' => '枮', - '\\' => '柦', - ']' => '柛', - '^' => '柺', - '_' => '柉', - '`' => '柊', - 'a' => '柃', - 'b' => '柪', - 'c' => '柋', - 'd' => '欨', - 'e' => '殂', - 'f' => '殄', - 'g' => '殶', - 'h' => '毖', - 'i' => '毘', - 'j' => '毠', - 'k' => '氠', - 'l' => '氡', - 'm' => '洨', - 'n' => '洴', - 'o' => '洭', - 'p' => '洟', - 'q' => '洼', - 'r' => '洿', - 's' => '洒', - 't' => '洊', - 'u' => '泚', - 'v' => '洳', - 'w' => '洄', - 'x' => '洙', - 'y' => '洺', - 'z' => '洚', - '{' => '洑', - '|' => '洀', - '}' => '洝', - '~' => '浂', - 'ϡ' => '洁', - 'Ϣ' => '洘', - 'ϣ' => '洷', - 'Ϥ' => '洃', - 'ϥ' => '洏', - 'Ϧ' => '浀', - 'ϧ' => '洇', - 'Ϩ' => '洠', - 'ϩ' => '洬', - 'Ϫ' => '洈', - 'ϫ' => '洢', - 'Ϭ' => '洉', - 'ϭ' => '洐', - 'Ϯ' => '炷', - 'ϯ' => '炟', - 'ϰ' => '炾', - 'ϱ' => '炱', - 'ϲ' => '炰', - 'ϳ' => '炡', - 'ϴ' => '炴', - 'ϵ' => '炵', - '϶' => '炩', - 'Ϸ' => '牁', - 'ϸ' => '牉', - 'Ϲ' => '牊', - 'Ϻ' => '牬', - 'ϻ' => '牰', - 'ϼ' => '牳', - 'Ͻ' => '牮', - 'Ͼ' => '狊', - 'Ͽ' => '狤', - '' => '狨', - '' => '狫', - '' => '狟', - '' => '狪', - '' => '狦', - '' => '狣', - '' => '玅', - '' => '珌', - '' => '珂', - '' => '珈', - '' => '珅', - '' => '玹', - '' => '玶', - '' => '玵', - '' => '玴', - '' => '珫', - '' => '玿', - '' => '珇', - '' => '玾', - '' => '珃', - '' => '珆', - '' => '玸', - '' => '珋', - '' => '瓬', - '' => '瓮', - '' => '甮', - '' => '畇', - '' => '畈', - '' => '疧', - '' => '疪', - '' => '癹', - '' => '盄', - '' => '眈', - '' => '眃', - '' => '眄', - '' => '眅', - '' => '眊', - '' => '盷', - '' => '盻', - '' => '盺', - '' => '矧', - '' => '矨', - '' => '砆', - '' => '砑', - '' => '砒', - '' => '砅', - '' => '砐', - '' => '砏', - '' => '砎', - '' => '砉', - '' => '砃', - '' => '砓', - '' => '祊', - '' => '祌', - '' => '祋', - '' => '祅', - '' => '祄', - '' => '秕', - '' => '种', - '' => '秏', - '' => '秖', - '' => '秎', - '' => '窀', - '@' => '穾', - 'A' => '竑', - 'B' => '笀', - 'C' => '笁', - 'D' => '籺', - 'E' => '籸', - 'F' => '籹', - 'G' => '籿', - 'H' => '粀', - 'I' => '粁', - 'J' => '紃', - 'K' => '紈', - 'L' => '紁', - 'M' => '罘', - 'N' => '羑', - 'O' => '羍', - 'P' => '羾', - 'Q' => '耇', - 'R' => '耎', - 'S' => '耏', - 'T' => '耔', - 'U' => '耷', - 'V' => '胘', - 'W' => '胇', - 'X' => '胠', - 'Y' => '胑', - 'Z' => '胈', - '[' => '胂', - '\\' => '胐', - ']' => '胅', - '^' => '胣', - '_' => '胙', - '`' => '胜', - 'a' => '胊', - 'b' => '胕', - 'c' => '胉', - 'd' => '胏', - 'e' => '胗', - 'f' => '胦', - 'g' => '胍', - 'h' => '臿', - 'i' => '舡', - 'j' => '芔', - 'k' => '苙', - 'l' => '苾', - 'm' => '苹', - 'n' => '茇', - 'o' => '苨', - 'p' => '茀', - 'q' => '苕', - 'r' => '茺', - 's' => '苫', - 't' => '苖', - 'u' => '苴', - 'v' => '苬', - 'w' => '苡', - 'x' => '苲', - 'y' => '苵', - 'z' => '茌', - '{' => '苻', - '|' => '苶', - '}' => '苰', - '~' => '苪', - 'С' => '苤', - 'Т' => '苠', - 'У' => '苺', - 'Ф' => '苳', - 'Х' => '苭', - 'Ц' => '虷', - 'Ч' => '虴', - 'Ш' => '虼', - 'Щ' => '虳', - 'Ъ' => '衁', - 'Ы' => '衎', - 'Ь' => '衧', - 'Э' => '衪', - 'Ю' => '衩', - 'Я' => '觓', - 'а' => '訄', - 'б' => '訇', - 'в' => '赲', - 'г' => '迣', - 'д' => '迡', - 'е' => '迮', - 'ж' => '迠', - 'з' => '郱', - 'и' => '邽', - 'й' => '邿', - 'к' => '郕', - 'л' => '郅', - 'м' => '邾', - 'н' => '郇', - 'о' => '郋', - 'п' => '郈', - '' => '釔', - '' => '釓', - '' => '陔', - '' => '陏', - '' => '陑', - '' => '陓', - '' => '陊', - '' => '陎', - '' => '倞', - '' => '倅', - '' => '倇', - '' => '倓', - '' => '倢', - '' => '倰', - '' => '倛', - '' => '俵', - '' => '俴', - '' => '倳', - '' => '倷', - '' => '倬', - '' => '俶', - '' => '俷', - '' => '倗', - '' => '倜', - '' => '倠', - '' => '倧', - '' => '倵', - '' => '倯', - '' => '倱', - '' => '倎', - '' => '党', - '' => '冔', - '' => '冓', - '' => '凊', - '' => '凄', - '' => '凅', - '' => '凈', - '' => '凎', - '' => '剡', - '' => '剚', - '' => '剒', - '' => '剞', - '' => '剟', - '' => '剕', - '' => '剢', - '' => '勍', - '' => '匎', - '' => '厞', - '' => '唦', - '' => '哢', - '' => '唗', - '' => '唒', - '' => '哧', - '' => '哳', - '' => '哤', - '' => '唚', - '' => '哿', - '' => '唄', - '' => '唈', - '' => '哫', - '' => '唑', - '' => '唅', - '' => '哱', - '@' => '唊', - 'A' => '哻', - 'B' => '哷', - 'C' => '哸', - 'D' => '哠', - 'E' => '唎', - 'F' => '唃', - 'G' => '唋', - 'H' => '圁', - 'I' => '圂', - 'J' => '埌', - 'K' => '堲', - 'L' => '埕', - 'M' => '埒', - 'N' => '垺', - 'O' => '埆', - 'P' => '垽', - 'Q' => '垼', - 'R' => '垸', - 'S' => '垶', - 'T' => '垿', - 'U' => '埇', - 'V' => '埐', - 'W' => '垹', - 'X' => '埁', - 'Y' => '夎', - 'Z' => '奊', - '[' => '娙', - '\\' => '娖', - ']' => '娭', - '^' => '娮', - '_' => '娕', - '`' => '娏', - 'a' => '娗', - 'b' => '娊', - 'c' => '娞', - 'd' => '娳', - 'e' => '孬', - 'f' => '宧', - 'g' => '宭', - 'h' => '宬', - 'i' => '尃', - 'j' => '屖', - 'k' => '屔', - 'l' => '峬', - 'm' => '峿', - 'n' => '峮', - 'o' => '峱', - 'p' => '峷', - 'q' => '崀', - 'r' => '峹', - 's' => '帩', - 't' => '帨', - 'u' => '庨', - 'v' => '庮', - 'w' => '庪', - 'x' => '庬', - 'y' => '弳', - 'z' => '弰', - '{' => '彧', - '|' => '恝', - '}' => '恚', - '~' => '恧', - 'ѡ' => '恁', - 'Ѣ' => '悢', - 'ѣ' => '悈', - 'Ѥ' => '悀', - 'ѥ' => '悒', - 'Ѧ' => '悁', - 'ѧ' => '悝', - 'Ѩ' => '悃', - 'ѩ' => '悕', - 'Ѫ' => '悛', - 'ѫ' => '悗', - 'Ѭ' => '悇', - 'ѭ' => '悜', - 'Ѯ' => '悎', - 'ѯ' => '戙', - 'Ѱ' => '扆', - 'ѱ' => '拲', - 'Ѳ' => '挐', - 'ѳ' => '捖', - 'Ѵ' => '挬', - 'ѵ' => '捄', - 'Ѷ' => '捅', - 'ѷ' => '挶', - 'Ѹ' => '捃', - 'ѹ' => '揤', - 'Ѻ' => '挹', - 'ѻ' => '捋', - 'Ѽ' => '捊', - 'ѽ' => '挼', - 'Ѿ' => '挩', - 'ѿ' => '捁', - '' => '挴', - '' => '捘', - '' => '捔', - '' => '捙', - '' => '挭', - '' => '捇', - '' => '挳', - '' => '捚', - '' => '捑', - '' => '挸', - '' => '捗', - '' => '捀', - '' => '捈', - '' => '敊', - '' => '敆', - '' => '旆', - '' => '旃', - '' => '旄', - '' => '旂', - '' => '晊', - '' => '晟', - '' => '晇', - '' => '晑', - '' => '朒', - '' => '朓', - '' => '栟', - '' => '栚', - '' => '桉', - '' => '栲', - '' => '栳', - '' => '栻', - '' => '桋', - '' => '桏', - '' => '栖', - '' => '栱', - '' => '栜', - '' => '栵', - '' => '栫', - '' => '栭', - '' => '栯', - '' => '桎', - '' => '桄', - '' => '栴', - '' => '栝', - '' => '栒', - '' => '栔', - '' => '栦', - '' => '栨', - '' => '栮', - '' => '桍', - '' => '栺', - '' => '栥', - '' => '栠', - '' => '欬', - '' => '欯', - '' => '欭', - '' => '欱', - '' => '欴', - '' => '歭', - '' => '肂', - '' => '殈', - '' => '毦', - '' => '毤', - '@' => '毨', - 'A' => '毣', - 'B' => '毢', - 'C' => '毧', - 'D' => '氥', - 'E' => '浺', - 'F' => '浣', - 'G' => '浤', - 'H' => '浶', - 'I' => '洍', - 'J' => '浡', - 'K' => '涒', - 'L' => '浘', - 'M' => '浢', - 'N' => '浭', - 'O' => '浯', - 'P' => '涑', - 'Q' => '涍', - 'R' => '淯', - 'S' => '浿', - 'T' => '涆', - 'U' => '浞', - 'V' => '浧', - 'W' => '浠', - 'X' => '涗', - 'Y' => '浰', - 'Z' => '浼', - '[' => '浟', - '\\' => '涂', - ']' => '涘', - '^' => '洯', - '_' => '浨', - '`' => '涋', - 'a' => '浾', - 'b' => '涀', - 'c' => '涄', - 'd' => '洖', - 'e' => '涃', - 'f' => '浻', - 'g' => '浽', - 'h' => '浵', - 'i' => '涐', - 'j' => '烜', - 'k' => '烓', - 'l' => '烑', - 'm' => '烝', - 'n' => '烋', - 'o' => '缹', - 'p' => '烢', - 'q' => '烗', - 'r' => '烒', - 's' => '烞', - 't' => '烠', - 'u' => '烔', - 'v' => '烍', - 'w' => '烅', - 'x' => '烆', - 'y' => '烇', - 'z' => '烚', - '{' => '烎', - '|' => '烡', - '}' => '牂', - '~' => '牸', - 'ҡ' => '牷', - 'Ң' => '牶', - 'ң' => '猀', - 'Ҥ' => '狺', - 'ҥ' => '狴', - 'Ҧ' => '狾', - 'ҧ' => '狶', - 'Ҩ' => '狳', - 'ҩ' => '狻', - 'Ҫ' => '猁', - 'ҫ' => '珓', - 'Ҭ' => '珙', - 'ҭ' => '珥', - 'Ү' => '珖', - 'ү' => '玼', - 'Ұ' => '珧', - 'ұ' => '珣', - 'Ҳ' => '珩', - 'ҳ' => '珜', - 'Ҵ' => '珒', - 'ҵ' => '珛', - 'Ҷ' => '珔', - 'ҷ' => '珝', - 'Ҹ' => '珚', - 'ҹ' => '珗', - 'Һ' => '珘', - 'һ' => '珨', - 'Ҽ' => '瓞', - 'ҽ' => '瓟', - 'Ҿ' => '瓴', - 'ҿ' => '瓵', - '' => '甡', - '' => '畛', - '' => '畟', - '' => '疰', - '' => '痁', - '' => '疻', - '' => '痄', - '' => '痀', - '' => '疿', - '' => '疶', - '' => '疺', - '' => '皊', - '' => '盉', - '' => '眝', - '' => '眛', - '' => '眐', - '' => '眓', - '' => '眒', - '' => '眣', - '' => '眑', - '' => '眕', - '' => '眙', - '' => '眚', - '' => '眢', - '' => '眧', - '' => '砣', - '' => '砬', - '' => '砢', - '' => '砵', - '' => '砯', - '' => '砨', - '' => '砮', - '' => '砫', - '' => '砡', - '' => '砩', - '' => '砳', - '' => '砪', - '' => '砱', - '' => '祔', - '' => '祛', - '' => '祏', - '' => '祜', - '' => '祓', - '' => '祒', - '' => '祑', - '' => '秫', - '' => '秬', - '' => '秠', - '' => '秮', - '' => '秭', - '' => '秪', - '' => '秜', - '' => '秞', - '' => '秝', - '' => '窆', - '' => '窉', - '' => '窅', - '' => '窋', - '' => '窌', - '' => '窊', - '' => '窇', - '' => '竘', - '' => '笐', - '@' => '笄', - 'A' => '笓', - 'B' => '笅', - 'C' => '笏', - 'D' => '笈', - 'E' => '笊', - 'F' => '笎', - 'G' => '笉', - 'H' => '笒', - 'I' => '粄', - 'J' => '粑', - 'K' => '粊', - 'L' => '粌', - 'M' => '粈', - 'N' => '粍', - 'O' => '粅', - 'P' => '紞', - 'Q' => '紝', - 'R' => '紑', - 'S' => '紎', - 'T' => '紘', - 'U' => '紖', - 'V' => '紓', - 'W' => '紟', - 'X' => '紒', - 'Y' => '紏', - 'Z' => '紌', - '[' => '罜', - '\\' => '罡', - ']' => '罞', - '^' => '罠', - '_' => '罝', - '`' => '罛', - 'a' => '羖', - 'b' => '羒', - 'c' => '翃', - 'd' => '翂', - 'e' => '翀', - 'f' => '耖', - 'g' => '耾', - 'h' => '耹', - 'i' => '胺', - 'j' => '胲', - 'k' => '胹', - 'l' => '胵', - 'm' => '脁', - 'n' => '胻', - 'o' => '脀', - 'p' => '舁', - 'q' => '舯', - 'r' => '舥', - 's' => '茳', - 't' => '茭', - 'u' => '荄', - 'v' => '茙', - 'w' => '荑', - 'x' => '茥', - 'y' => '荖', - 'z' => '茿', - '{' => '荁', - '|' => '茦', - '}' => '茜', - '~' => '茢', - 'ӡ' => '荂', - 'Ӣ' => '荎', - 'ӣ' => '茛', - 'Ӥ' => '茪', - 'ӥ' => '茈', - 'Ӧ' => '茼', - 'ӧ' => '荍', - 'Ө' => '茖', - 'ө' => '茤', - 'Ӫ' => '茠', - 'ӫ' => '茷', - 'Ӭ' => '茯', - 'ӭ' => '茩', - 'Ӯ' => '荇', - 'ӯ' => '荅', - 'Ӱ' => '荌', - 'ӱ' => '荓', - 'Ӳ' => '茞', - 'ӳ' => '茬', - 'Ӵ' => '荋', - 'ӵ' => '茧', - 'Ӷ' => '荈', - 'ӷ' => '虓', - 'Ӹ' => '虒', - 'ӹ' => '蚢', - 'Ӻ' => '蚨', - 'ӻ' => '蚖', - 'Ӽ' => '蚍', - 'ӽ' => '蚑', - 'Ӿ' => '蚞', - 'ӿ' => '蚇', - '' => '蚗', - '' => '蚆', - '' => '蚋', - '' => '蚚', - '' => '蚅', - '' => '蚥', - '' => '蚙', - '' => '蚡', - '' => '蚧', - '' => '蚕', - '' => '蚘', - '' => '蚎', - '' => '蚝', - '' => '蚐', - '' => '蚔', - '' => '衃', - '' => '衄', - '' => '衭', - '' => '衵', - '' => '衶', - '' => '衲', - '' => '袀', - '' => '衱', - '' => '衿', - '' => '衯', - '' => '袃', - '' => '衾', - '' => '衴', - '' => '衼', - '' => '訒', - '' => '豇', - '' => '豗', - '' => '豻', - '' => '貤', - '' => '貣', - '' => '赶', - '' => '赸', - '' => '趵', - '' => '趷', - '' => '趶', - '' => '軑', - '' => '軓', - '' => '迾', - '' => '迵', - '' => '适', - '' => '迿', - '' => '迻', - '' => '逄', - '' => '迼', - '' => '迶', - '' => '郖', - '' => '郠', - '' => '郙', - '' => '郚', - '' => '郣', - '' => '郟', - '' => '郥', - '' => '郘', - '' => '郛', - '' => '郗', - '' => '郜', - '' => '郤', - '' => '酐', - '@' => '酎', - 'A' => '酏', - 'B' => '釕', - 'C' => '釢', - 'D' => '釚', - 'E' => '陜', - 'F' => '陟', - 'G' => '隼', - 'H' => '飣', - 'I' => '髟', - 'J' => '鬯', - 'K' => '乿', - 'L' => '偰', - 'M' => '偪', - 'N' => '偡', - 'O' => '偞', - 'P' => '偠', - 'Q' => '偓', - 'R' => '偋', - 'S' => '偝', - 'T' => '偲', - 'U' => '偈', - 'V' => '偍', - 'W' => '偁', - 'X' => '偛', - 'Y' => '偊', - 'Z' => '偢', - '[' => '倕', - '\\' => '偅', - ']' => '偟', - '^' => '偩', - '_' => '偫', - '`' => '偣', - 'a' => '偤', - 'b' => '偆', - 'c' => '偀', - 'd' => '偮', - 'e' => '偳', - 'f' => '偗', - 'g' => '偑', - 'h' => '凐', - 'i' => '剫', - 'j' => '剭', - 'k' => '剬', - 'l' => '剮', - 'm' => '勖', - 'n' => '勓', - 'o' => '匭', - 'p' => '厜', - 'q' => '啵', - 'r' => '啶', - 's' => '唼', - 't' => '啍', - 'u' => '啐', - 'v' => '唴', - 'w' => '唪', - 'x' => '啑', - 'y' => '啢', - 'z' => '唶', - '{' => '唵', - '|' => '唰', - '}' => '啒', - '~' => '啅', - 'ԡ' => '唌', - 'Ԣ' => '唲', - 'ԣ' => '啥', - 'Ԥ' => '啎', - 'ԥ' => '唹', - 'Ԧ' => '啈', - 'ԧ' => '唭', - 'Ԩ' => '唻', - 'ԩ' => '啀', - 'Ԫ' => '啋', - 'ԫ' => '圊', - 'Ԭ' => '圇', - 'ԭ' => '埻', - 'Ԯ' => '堔', - 'ԯ' => '埢', - '԰' => '埶', - 'Ա' => '埜', - 'Բ' => '埴', - 'Գ' => '堀', - 'Դ' => '埭', - 'Ե' => '埽', - 'Զ' => '堈', - 'Է' => '埸', - 'Ը' => '堋', - 'Թ' => '埳', - 'Ժ' => '埏', - 'Ի' => '堇', - 'Լ' => '埮', - 'Խ' => '埣', - 'Ծ' => '埲', - 'Կ' => '埥', - '' => '埬', - '' => '埡', - '' => '堎', - '' => '埼', - '' => '堐', - '' => '埧', - '' => '堁', - '' => '堌', - '' => '埱', - '' => '埩', - '' => '埰', - '' => '堍', - '' => '堄', - '' => '奜', - '' => '婠', - '' => '婘', - '' => '婕', - '' => '婧', - '' => '婞', - '' => '娸', - '' => '娵', - '' => '婭', - '' => '婐', - '' => '婟', - '' => '婥', - '' => '婬', - '' => '婓', - '' => '婤', - '' => '婗', - '' => '婃', - '' => '婝', - '' => '婒', - '' => '婄', - '' => '婛', - '' => '婈', - '' => '媎', - '' => '娾', - '' => '婍', - '' => '娹', - '' => '婌', - '' => '婰', - '' => '婩', - '' => '婇', - '' => '婑', - '' => '婖', - '' => '婂', - '' => '婜', - '' => '孲', - '' => '孮', - '' => '寁', - '' => '寀', - '' => '屙', - '' => '崞', - '' => '崋', - '' => '崝', - '' => '崚', - '' => '崠', - '' => '崌', - '' => '崨', - '' => '崍', - '' => '崦', - '' => '崥', - '' => '崏', - '@' => '崰', - 'A' => '崒', - 'B' => '崣', - 'C' => '崟', - 'D' => '崮', - 'E' => '帾', - 'F' => '帴', - 'G' => '庱', - 'H' => '庴', - 'I' => '庹', - 'J' => '庲', - 'K' => '庳', - 'L' => '弶', - 'M' => '弸', - 'N' => '徛', - 'O' => '徖', - 'P' => '徟', - 'Q' => '悊', - 'R' => '悐', - 'S' => '悆', - 'T' => '悾', - 'U' => '悰', - 'V' => '悺', - 'W' => '惓', - 'X' => '惔', - 'Y' => '惏', - 'Z' => '惤', - '[' => '惙', - '\\' => '惝', - ']' => '惈', - '^' => '悱', - '_' => '惛', - '`' => '悷', - 'a' => '惊', - 'b' => '悿', - 'c' => '惃', - 'd' => '惍', - 'e' => '惀', - 'f' => '挲', - 'g' => '捥', - 'h' => '掊', - 'i' => '掂', - 'j' => '捽', - 'k' => '掽', - 'l' => '掞', - 'm' => '掭', - 'n' => '掝', - 'o' => '掗', - 'p' => '掫', - 'q' => '掎', - 'r' => '捯', - 's' => '掇', - 't' => '掐', - 'u' => '据', - 'v' => '掯', - 'w' => '捵', - 'x' => '掜', - 'y' => '捭', - 'z' => '掮', - '{' => '捼', - '|' => '掤', - '}' => '挻', - '~' => '掟', - 'ա' => '捸', - 'բ' => '掅', - 'գ' => '掁', - 'դ' => '掑', - 'ե' => '掍', - 'զ' => '捰', - 'է' => '敓', - 'ը' => '旍', - 'թ' => '晥', - 'ժ' => '晡', - 'ի' => '晛', - 'լ' => '晙', - 'խ' => '晜', - 'ծ' => '晢', - 'կ' => '朘', - 'հ' => '桹', - 'ձ' => '梇', - 'ղ' => '梐', - 'ճ' => '梜', - 'մ' => '桭', - 'յ' => '桮', - 'ն' => '梮', - 'շ' => '梫', - 'ո' => '楖', - 'չ' => '桯', - 'պ' => '梣', - 'ջ' => '梬', - 'ռ' => '梩', - 'ս' => '桵', - 'վ' => '桴', - 'տ' => '梲', - '' => '梏', - '' => '桷', - '' => '梒', - '' => '桼', - '' => '桫', - '' => '桲', - '' => '梪', - '' => '梀', - '' => '桱', - '' => '桾', - '' => '梛', - '' => '梖', - '' => '梋', - '' => '梠', - '' => '梉', - '' => '梤', - '' => '桸', - '' => '桻', - '' => '梑', - '' => '梌', - '' => '梊', - '' => '桽', - '' => '欶', - '' => '欳', - '' => '欷', - '' => '欸', - '' => '殑', - '' => '殏', - '' => '殍', - '' => '殎', - '' => '殌', - '' => '氪', - '' => '淀', - '' => '涫', - '' => '涴', - '' => '涳', - '' => '湴', - '' => '涬', - '' => '淩', - '' => '淢', - '' => '涷', - '' => '淶', - '' => '淔', - '' => '渀', - '' => '淈', - '' => '淠', - '' => '淟', - '' => '淖', - '' => '涾', - '' => '淥', - '' => '淜', - '' => '淝', - '' => '淛', - '' => '淴', - '' => '淊', - '' => '涽', - '' => '淭', - '' => '淰', - '' => '涺', - '' => '淕', - '' => '淂', - '' => '淏', - '' => '淉', - '@' => '淐', - 'A' => '淲', - 'B' => '淓', - 'C' => '淽', - 'D' => '淗', - 'E' => '淍', - 'F' => '淣', - 'G' => '涻', - 'H' => '烺', - 'I' => '焍', - 'J' => '烷', - 'K' => '焗', - 'L' => '烴', - 'M' => '焌', - 'N' => '烰', - 'O' => '焄', - 'P' => '烳', - 'Q' => '焐', - 'R' => '烼', - 'S' => '烿', - 'T' => '焆', - 'U' => '焓', - 'V' => '焀', - 'W' => '烸', - 'X' => '烶', - 'Y' => '焋', - 'Z' => '焂', - '[' => '焎', - '\\' => '牾', - ']' => '牻', - '^' => '牼', - '_' => '牿', - '`' => '猝', - 'a' => '猗', - 'b' => '猇', - 'c' => '猑', - 'd' => '猘', - 'e' => '猊', - 'f' => '猈', - 'g' => '狿', - 'h' => '猏', - 'i' => '猞', - 'j' => '玈', - 'k' => '珶', - 'l' => '珸', - 'm' => '珵', - 'n' => '琄', - 'o' => '琁', - 'p' => '珽', - 'q' => '琇', - 'r' => '琀', - 's' => '珺', - 't' => '珼', - 'u' => '珿', - 'v' => '琌', - 'w' => '琋', - 'x' => '珴', - 'y' => '琈', - 'z' => '畤', - '{' => '畣', - '|' => '痎', - '}' => '痒', - '~' => '痏', - '֡' => '痋', - '֢' => '痌', - '֣' => '痑', - '֤' => '痐', - '֥' => '皏', - '֦' => '皉', - '֧' => '盓', - '֨' => '眹', - '֩' => '眯', - '֪' => '眭', - '֫' => '眱', - '֬' => '眲', - '֭' => '眴', - '֮' => '眳', - '֯' => '眽', - 'ְ' => '眥', - 'ֱ' => '眻', - 'ֲ' => '眵', - 'ֳ' => '硈', - 'ִ' => '硒', - 'ֵ' => '硉', - 'ֶ' => '硍', - 'ַ' => '硊', - 'ָ' => '硌', - 'ֹ' => '砦', - 'ֺ' => '硅', - 'ֻ' => '硐', - 'ּ' => '祤', - 'ֽ' => '祧', - '־' => '祩', - 'ֿ' => '祪', - '' => '祣', - '' => '祫', - '' => '祡', - '' => '离', - '' => '秺', - '' => '秸', - '' => '秶', - '' => '秷', - '' => '窏', - '' => '窔', - '' => '窐', - '' => '笵', - '' => '筇', - '' => '笴', - '' => '笥', - '' => '笰', - '' => '笢', - '' => '笤', - '' => '笳', - '' => '笘', - '' => '笪', - '' => '笝', - '' => '笱', - '' => '笫', - '' => '笭', - '' => '笯', - '' => '笲', - '' => '笸', - '' => '笚', - '' => '笣', - '' => '粔', - '' => '粘', - '' => '粖', - '' => '粣', - '' => '紵', - '' => '紽', - '' => '紸', - '' => '紶', - '' => '紺', - '' => '絅', - '' => '紬', - '' => '紩', - '' => '絁', - '' => '絇', - '' => '紾', - '' => '紿', - '' => '絊', - '' => '紻', - '' => '紨', - '' => '罣', - '' => '羕', - '' => '羜', - '' => '羝', - '' => '羛', - '' => '翊', - '' => '翋', - '' => '翍', - '' => '翐', - '' => '翑', - '' => '翇', - '' => '翏', - '' => '翉', - '' => '耟', - '@' => '耞', - 'A' => '耛', - 'B' => '聇', - 'C' => '聃', - 'D' => '聈', - 'E' => '脘', - 'F' => '脥', - 'G' => '脙', - 'H' => '脛', - 'I' => '脭', - 'J' => '脟', - 'K' => '脬', - 'L' => '脞', - 'M' => '脡', - 'N' => '脕', - 'O' => '脧', - 'P' => '脝', - 'Q' => '脢', - 'R' => '舑', - 'S' => '舸', - 'T' => '舳', - 'U' => '舺', - 'V' => '舴', - 'W' => '舲', - 'X' => '艴', - 'Y' => '莐', - 'Z' => '莣', - '[' => '莨', - '\\' => '莍', - ']' => '荺', - '^' => '荳', - '_' => '莤', - '`' => '荴', - 'a' => '莏', - 'b' => '莁', - 'c' => '莕', - 'd' => '莙', - 'e' => '荵', - 'f' => '莔', - 'g' => '莩', - 'h' => '荽', - 'i' => '莃', - 'j' => '莌', - 'k' => '莝', - 'l' => '莛', - 'm' => '莪', - 'n' => '莋', - 'o' => '荾', - 'p' => '莥', - 'q' => '莯', - 'r' => '莈', - 's' => '莗', - 't' => '莰', - 'u' => '荿', - 'v' => '莦', - 'w' => '莇', - 'x' => '莮', - 'y' => '荶', - 'z' => '莚', - '{' => '虙', - '|' => '虖', - '}' => '蚿', - '~' => '蚷', - 'ס' => '蛂', - 'ע' => '蛁', - 'ף' => '蛅', - 'פ' => '蚺', - 'ץ' => '蚰', - 'צ' => '蛈', - 'ק' => '蚹', - 'ר' => '蚳', - 'ש' => '蚸', - 'ת' => '蛌', - '׫' => '蚴', - '׬' => '蚻', - '׭' => '蚼', - '׮' => '蛃', - 'ׯ' => '蚽', - 'װ' => '蚾', - 'ױ' => '衒', - 'ײ' => '袉', - '׳' => '袕', - '״' => '袨', - '׵' => '袢', - '׶' => '袪', - '׷' => '袚', - '׸' => '袑', - '׹' => '袡', - '׺' => '袟', - '׻' => '袘', - '׼' => '袧', - '׽' => '袙', - '׾' => '袛', - '׿' => '袗', - '' => '袤', - '' => '袬', - '' => '袌', - '' => '袓', - '' => '袎', - '' => '覂', - '' => '觖', - '' => '觙', - '' => '觕', - '' => '訰', - '' => '訧', - '' => '訬', - '' => '訞', - '' => '谹', - '' => '谻', - '' => '豜', - '' => '豝', - '' => '豽', - '' => '貥', - '' => '赽', - '' => '赻', - '' => '赹', - '' => '趼', - '' => '跂', - '' => '趹', - '' => '趿', - '' => '跁', - '' => '軘', - '' => '軞', - '' => '軝', - '' => '軜', - '' => '軗', - '' => '軠', - '' => '軡', - '' => '逤', - '' => '逋', - '' => '逑', - '' => '逜', - '' => '逌', - '' => '逡', - '' => '郯', - '' => '郪', - '' => '郰', - '' => '郴', - '' => '郲', - '' => '郳', - '' => '郔', - '' => '郫', - '' => '郬', - '' => '郩', - '' => '酖', - '' => '酘', - '' => '酚', - '' => '酓', - '' => '酕', - '' => '釬', - '' => '釴', - '' => '釱', - '' => '釳', - '' => '釸', - '' => '釤', - '' => '釹', - '' => '釪', - '@' => '釫', - 'A' => '釷', - 'B' => '釨', - 'C' => '釮', - 'D' => '镺', - 'E' => '閆', - 'F' => '閈', - 'G' => '陼', - 'H' => '陭', - 'I' => '陫', - 'J' => '陱', - 'K' => '陯', - 'L' => '隿', - 'M' => '靪', - 'N' => '頄', - 'O' => '飥', - 'P' => '馗', - 'Q' => '傛', - 'R' => '傕', - 'S' => '傔', - 'T' => '傞', - 'U' => '傋', - 'V' => '傣', - 'W' => '傃', - 'X' => '傌', - 'Y' => '傎', - 'Z' => '傝', - '[' => '偨', - '\\' => '傜', - ']' => '傒', - '^' => '傂', - '_' => '傇', - '`' => '兟', - 'a' => '凔', - 'b' => '匒', - 'c' => '匑', - 'd' => '厤', - 'e' => '厧', - 'f' => '喑', - 'g' => '喨', - 'h' => '喥', - 'i' => '喭', - 'j' => '啷', - 'k' => '噅', - 'l' => '喢', - 'm' => '喓', - 'n' => '喈', - 'o' => '喏', - 'p' => '喵', - 'q' => '喁', - 'r' => '喣', - 's' => '喒', - 't' => '喤', - 'u' => '啽', - 'v' => '喌', - 'w' => '喦', - 'x' => '啿', - 'y' => '喕', - 'z' => '喡', - '{' => '喎', - '|' => '圌', - '}' => '堩', - '~' => '堷', - 'ء' => '堙', - 'آ' => '堞', - 'أ' => '堧', - 'ؤ' => '堣', - 'إ' => '堨', - 'ئ' => '埵', - 'ا' => '塈', - 'ب' => '堥', - 'ة' => '堜', - 'ت' => '堛', - 'ث' => '堳', - 'ج' => '堿', - 'ح' => '堶', - 'خ' => '堮', - 'د' => '堹', - 'ذ' => '堸', - 'ر' => '堭', - 'ز' => '堬', - 'س' => '堻', - 'ش' => '奡', - 'ص' => '媯', - 'ض' => '媔', - 'ط' => '媟', - 'ظ' => '婺', - 'ع' => '媢', - 'غ' => '媞', - 'ػ' => '婸', - 'ؼ' => '媦', - 'ؽ' => '婼', - 'ؾ' => '媥', - 'ؿ' => '媬', - '' => '媕', - '' => '媮', - '' => '娷', - '' => '媄', - '' => '媊', - '' => '媗', - '' => '媃', - '' => '媋', - '' => '媩', - '' => '婻', - '' => '婽', - '' => '媌', - '' => '媜', - '' => '媏', - '' => '媓', - '' => '媝', - '' => '寪', - '' => '寍', - '' => '寋', - '' => '寔', - '' => '寑', - '' => '寊', - '' => '寎', - '' => '尌', - '' => '尰', - '' => '崷', - '' => '嵃', - '' => '嵫', - '' => '嵁', - '' => '嵋', - '' => '崿', - '' => '崵', - '' => '嵑', - '' => '嵎', - '' => '嵕', - '' => '崳', - '' => '崺', - '' => '嵒', - '' => '崽', - '' => '崱', - '' => '嵙', - '' => '嵂', - '' => '崹', - '' => '嵉', - '' => '崸', - '' => '崼', - '' => '崲', - '' => '崶', - '' => '嵀', - '' => '嵅', - '' => '幄', - '' => '幁', - '' => '彘', - '' => '徦', - '' => '徥', - '' => '徫', - '' => '惉', - '' => '悹', - '' => '惌', - '' => '惢', - '' => '惎', - '' => '惄', - '' => '愔', - '@' => '惲', - 'A' => '愊', - 'B' => '愖', - 'C' => '愅', - 'D' => '惵', - 'E' => '愓', - 'F' => '惸', - 'G' => '惼', - 'H' => '惾', - 'I' => '惁', - 'J' => '愃', - 'K' => '愘', - 'L' => '愝', - 'M' => '愐', - 'N' => '惿', - 'O' => '愄', - 'P' => '愋', - 'Q' => '扊', - 'R' => '掔', - 'S' => '掱', - 'T' => '掰', - 'U' => '揎', - 'V' => '揥', - 'W' => '揨', - 'X' => '揯', - 'Y' => '揃', - 'Z' => '撝', - '[' => '揳', - '\\' => '揊', - ']' => '揠', - '^' => '揶', - '_' => '揕', - '`' => '揲', - 'a' => '揵', - 'b' => '摡', - 'c' => '揟', - 'd' => '掾', - 'e' => '揝', - 'f' => '揜', - 'g' => '揄', - 'h' => '揘', - 'i' => '揓', - 'j' => '揂', - 'k' => '揇', - 'l' => '揌', - 'm' => '揋', - 'n' => '揈', - 'o' => '揰', - 'p' => '揗', - 'q' => '揙', - 'r' => '攲', - 's' => '敧', - 't' => '敪', - 'u' => '敤', - 'v' => '敜', - 'w' => '敨', - 'x' => '敥', - 'y' => '斌', - 'z' => '斝', - '{' => '斞', - '|' => '斮', - '}' => '旐', - '~' => '旒', - '١' => '晼', - '٢' => '晬', - '٣' => '晻', - '٤' => '暀', - '٥' => '晱', - '٦' => '晹', - '٧' => '晪', - '٨' => '晲', - '٩' => '朁', - '٪' => '椌', - '٫' => '棓', - '٬' => '椄', - '٭' => '棜', - 'ٮ' => '椪', - 'ٯ' => '棬', - 'ٰ' => '棪', - 'ٱ' => '棱', - 'ٲ' => '椏', - 'ٳ' => '棖', - 'ٴ' => '棷', - 'ٵ' => '棫', - 'ٶ' => '棤', - 'ٷ' => '棶', - 'ٸ' => '椓', - 'ٹ' => '椐', - 'ٺ' => '棳', - 'ٻ' => '棡', - 'ټ' => '椇', - 'ٽ' => '棌', - 'پ' => '椈', - 'ٿ' => '楰', - '' => '梴', - '' => '椑', - '' => '棯', - '' => '棆', - '' => '椔', - '' => '棸', - '' => '棐', - '' => '棽', - '' => '棼', - '' => '棨', - '' => '椋', - '' => '椊', - '' => '椗', - '' => '棎', - '' => '棈', - '' => '棝', - '' => '棞', - '' => '棦', - '' => '棴', - '' => '棑', - '' => '椆', - '' => '棔', - '' => '棩', - '' => '椕', - '' => '椥', - '' => '棇', - '' => '欹', - '' => '欻', - '' => '欿', - '' => '欼', - '' => '殔', - '' => '殗', - '' => '殙', - '' => '殕', - '' => '殽', - '' => '毰', - '' => '毲', - '' => '毳', - '' => '氰', - '' => '淼', - '' => '湆', - '' => '湇', - '' => '渟', - '' => '湉', - '' => '溈', - '' => '渼', - '' => '渽', - '' => '湅', - '' => '湢', - '' => '渫', - '' => '渿', - '' => '湁', - '' => '湝', - '' => '湳', - '' => '渜', - '' => '渳', - '' => '湋', - '' => '湀', - '' => '湑', - '' => '渻', - '' => '渃', - '' => '渮', - '' => '湞', - '@' => '湨', - 'A' => '湜', - 'B' => '湡', - 'C' => '渱', - 'D' => '渨', - 'E' => '湠', - 'F' => '湱', - 'G' => '湫', - 'H' => '渹', - 'I' => '渢', - 'J' => '渰', - 'K' => '湓', - 'L' => '湥', - 'M' => '渧', - 'N' => '湸', - 'O' => '湤', - 'P' => '湷', - 'Q' => '湕', - 'R' => '湹', - 'S' => '湒', - 'T' => '湦', - 'U' => '渵', - 'V' => '渶', - 'W' => '湚', - 'X' => '焠', - 'Y' => '焞', - 'Z' => '焯', - '[' => '烻', - '\\' => '焮', - ']' => '焱', - '^' => '焣', - '_' => '焥', - '`' => '焢', - 'a' => '焲', - 'b' => '焟', - 'c' => '焨', - 'd' => '焺', - 'e' => '焛', - 'f' => '牋', - 'g' => '牚', - 'h' => '犈', - 'i' => '犉', - 'j' => '犆', - 'k' => '犅', - 'l' => '犋', - 'm' => '猒', - 'n' => '猋', - 'o' => '猰', - 'p' => '猢', - 'q' => '猱', - 'r' => '猳', - 's' => '猧', - 't' => '猲', - 'u' => '猭', - 'v' => '猦', - 'w' => '猣', - 'x' => '猵', - 'y' => '猌', - 'z' => '琮', - '{' => '琬', - '|' => '琰', - '}' => '琫', - '~' => '琖', - 'ڡ' => '琚', - 'ڢ' => '琡', - 'ڣ' => '琭', - 'ڤ' => '琱', - 'ڥ' => '琤', - 'ڦ' => '琣', - 'ڧ' => '琝', - 'ڨ' => '琩', - 'ک' => '琠', - 'ڪ' => '琲', - 'ګ' => '瓻', - 'ڬ' => '甯', - 'ڭ' => '畯', - 'ڮ' => '畬', - 'گ' => '痧', - 'ڰ' => '痚', - 'ڱ' => '痡', - 'ڲ' => '痦', - 'ڳ' => '痝', - 'ڴ' => '痟', - 'ڵ' => '痤', - 'ڶ' => '痗', - 'ڷ' => '皕', - 'ڸ' => '皒', - 'ڹ' => '盚', - 'ں' => '睆', - 'ڻ' => '睇', - 'ڼ' => '睄', - 'ڽ' => '睍', - 'ھ' => '睅', - 'ڿ' => '睊', - '' => '睎', - '' => '睋', - '' => '睌', - '' => '矞', - '' => '矬', - '' => '硠', - '' => '硤', - '' => '硥', - '' => '硜', - '' => '硭', - '' => '硱', - '' => '硪', - '' => '确', - '' => '硰', - '' => '硩', - '' => '硨', - '' => '硞', - '' => '硢', - '' => '祴', - '' => '祳', - '' => '祲', - '' => '祰', - '' => '稂', - '' => '稊', - '' => '稃', - '' => '稌', - '' => '稄', - '' => '窙', - '' => '竦', - '' => '竤', - '' => '筊', - '' => '笻', - '' => '筄', - '' => '筈', - '' => '筌', - '' => '筎', - '' => '筀', - '' => '筘', - '' => '筅', - '' => '粢', - '' => '粞', - '' => '粨', - '' => '粡', - '' => '絘', - '' => '絯', - '' => '絣', - '' => '絓', - '' => '絖', - '' => '絧', - '' => '絪', - '' => '絏', - '' => '絭', - '' => '絜', - '' => '絫', - '' => '絒', - '' => '絔', - '' => '絩', - '' => '絑', - '' => '絟', - '' => '絎', - '' => '缾', - '' => '缿', - '' => '罥', - '@' => '罦', - 'A' => '羢', - 'B' => '羠', - 'C' => '羡', - 'D' => '翗', - 'E' => '聑', - 'F' => '聏', - 'G' => '聐', - 'H' => '胾', - 'I' => '胔', - 'J' => '腃', - 'K' => '腊', - 'L' => '腒', - 'M' => '腏', - 'N' => '腇', - 'O' => '脽', - 'P' => '腍', - 'Q' => '脺', - 'R' => '臦', - 'S' => '臮', - 'T' => '臷', - 'U' => '臸', - 'V' => '臹', - 'W' => '舄', - 'X' => '舼', - 'Y' => '舽', - 'Z' => '舿', - '[' => '艵', - '\\' => '茻', - ']' => '菏', - '^' => '菹', - '_' => '萣', - '`' => '菀', - 'a' => '菨', - 'b' => '萒', - 'c' => '菧', - 'd' => '菤', - 'e' => '菼', - 'f' => '菶', - 'g' => '萐', - 'h' => '菆', - 'i' => '菈', - 'j' => '菫', - 'k' => '菣', - 'l' => '莿', - 'm' => '萁', - 'n' => '菝', - 'o' => '菥', - 'p' => '菘', - 'q' => '菿', - 'r' => '菡', - 's' => '菋', - 't' => '菎', - 'u' => '菖', - 'v' => '菵', - 'w' => '菉', - 'x' => '萉', - 'y' => '萏', - 'z' => '菞', - '{' => '萑', - '|' => '萆', - '}' => '菂', - '~' => '菳', - 'ۡ' => '菕', - 'ۢ' => '菺', - 'ۣ' => '菇', - 'ۤ' => '菑', - 'ۥ' => '菪', - 'ۦ' => '萓', - 'ۧ' => '菃', - 'ۨ' => '菬', - '۩' => '菮', - '۪' => '菄', - '۫' => '菻', - '۬' => '菗', - 'ۭ' => '菢', - 'ۮ' => '萛', - 'ۯ' => '菛', - '۰' => '菾', - '۱' => '蛘', - '۲' => '蛢', - '۳' => '蛦', - '۴' => '蛓', - '۵' => '蛣', - '۶' => '蛚', - '۷' => '蛪', - '۸' => '蛝', - '۹' => '蛫', - 'ۺ' => '蛜', - 'ۻ' => '蛬', - 'ۼ' => '蛩', - '۽' => '蛗', - '۾' => '蛨', - 'ۿ' => '蛑', - '' => '衈', - '' => '衖', - '' => '衕', - '' => '袺', - '' => '裗', - '' => '袹', - '' => '袸', - '' => '裀', - '' => '袾', - '' => '袶', - '' => '袼', - '' => '袷', - '' => '袽', - '' => '袲', - '' => '褁', - '' => '裉', - '' => '覕', - '' => '覘', - '' => '覗', - '' => '觝', - '' => '觚', - '' => '觛', - '' => '詎', - '' => '詍', - '' => '訹', - '' => '詙', - '' => '詀', - '' => '詗', - '' => '詘', - '' => '詄', - '' => '詅', - '' => '詒', - '' => '詈', - '' => '詑', - '' => '詊', - '' => '詌', - '' => '詏', - '' => '豟', - '' => '貁', - '' => '貀', - '' => '貺', - '' => '貾', - '' => '貰', - '' => '貹', - '' => '貵', - '' => '趄', - '' => '趀', - '' => '趉', - '' => '跘', - '' => '跓', - '' => '跍', - '' => '跇', - '' => '跖', - '' => '跜', - '' => '跏', - '' => '跕', - '' => '跙', - '' => '跈', - '' => '跗', - '' => '跅', - '' => '軯', - '' => '軷', - '' => '軺', - '@' => '軹', - 'A' => '軦', - 'B' => '軮', - 'C' => '軥', - 'D' => '軵', - 'E' => '軧', - 'F' => '軨', - 'G' => '軶', - 'H' => '軫', - 'I' => '軱', - 'J' => '軬', - 'K' => '軴', - 'L' => '軩', - 'M' => '逭', - 'N' => '逴', - 'O' => '逯', - 'P' => '鄆', - 'Q' => '鄬', - 'R' => '鄄', - 'S' => '郿', - 'T' => '郼', - 'U' => '鄈', - 'V' => '郹', - 'W' => '郻', - 'X' => '鄁', - 'Y' => '鄀', - 'Z' => '鄇', - '[' => '鄅', - '\\' => '鄃', - ']' => '酡', - '^' => '酤', - '_' => '酟', - '`' => '酢', - 'a' => '酠', - 'b' => '鈁', - 'c' => '鈊', - 'd' => '鈥', - 'e' => '鈃', - 'f' => '鈚', - 'g' => '鈦', - 'h' => '鈏', - 'i' => '鈌', - 'j' => '鈀', - 'k' => '鈒', - 'l' => '釿', - 'm' => '釽', - 'n' => '鈆', - 'o' => '鈄', - 'p' => '鈧', - 'q' => '鈂', - 'r' => '鈜', - 's' => '鈤', - 't' => '鈙', - 'u' => '鈗', - 'v' => '鈅', - 'w' => '鈖', - 'x' => '镻', - 'y' => '閍', - 'z' => '閌', - '{' => '閐', - '|' => '隇', - '}' => '陾', - '~' => '隈', - 'ܡ' => '隉', - 'ܢ' => '隃', - 'ܣ' => '隀', - 'ܤ' => '雂', - 'ܥ' => '雈', - 'ܦ' => '雃', - 'ܧ' => '雱', - 'ܨ' => '雰', - 'ܩ' => '靬', - 'ܪ' => '靰', - 'ܫ' => '靮', - 'ܬ' => '頇', - 'ܭ' => '颩', - 'ܮ' => '飫', - 'ܯ' => '鳦', - 'ܰ' => '黹', - 'ܱ' => '亃', - 'ܲ' => '亄', - 'ܳ' => '亶', - 'ܴ' => '傽', - 'ܵ' => '傿', - 'ܶ' => '僆', - 'ܷ' => '傮', - 'ܸ' => '僄', - 'ܹ' => '僊', - 'ܺ' => '傴', - 'ܻ' => '僈', - 'ܼ' => '僂', - 'ܽ' => '傰', - 'ܾ' => '僁', - 'ܿ' => '傺', - '' => '傱', - '' => '僋', - '' => '僉', - '' => '傶', - '' => '傸', - '' => '凗', - '' => '剺', - '' => '剸', - '' => '剻', - '' => '剼', - '' => '嗃', - '' => '嗛', - '' => '嗌', - '' => '嗐', - '' => '嗋', - '' => '嗊', - '' => '嗝', - '' => '嗀', - '' => '嗔', - '' => '嗄', - '' => '嗩', - '' => '喿', - '' => '嗒', - '' => '喍', - '' => '嗏', - '' => '嗕', - '' => '嗢', - '' => '嗖', - '' => '嗈', - '' => '嗲', - '' => '嗍', - '' => '嗙', - '' => '嗂', - '' => '圔', - '' => '塓', - '' => '塨', - '' => '塤', - '' => '塏', - '' => '塍', - '' => '塉', - '' => '塯', - '' => '塕', - '' => '塎', - '' => '塝', - '' => '塙', - '' => '塥', - '' => '塛', - '' => '堽', - '' => '塣', - '' => '塱', - '' => '壼', - '' => '嫇', - '' => '嫄', - '' => '嫋', - '' => '媺', - '' => '媸', - '' => '媱', - '' => '媵', - '' => '媰', - '' => '媿', - '' => '嫈', - '' => '媻', - '' => '嫆', - '@' => '媷', - 'A' => '嫀', - 'B' => '嫊', - 'C' => '媴', - 'D' => '媶', - 'E' => '嫍', - 'F' => '媹', - 'G' => '媐', - 'H' => '寖', - 'I' => '寘', - 'J' => '寙', - 'K' => '尟', - 'L' => '尳', - 'M' => '嵱', - 'N' => '嵣', - 'O' => '嵊', - 'P' => '嵥', - 'Q' => '嵲', - 'R' => '嵬', - 'S' => '嵞', - 'T' => '嵨', - 'U' => '嵧', - 'V' => '嵢', - 'W' => '巰', - 'X' => '幏', - 'Y' => '幎', - 'Z' => '幊', - '[' => '幍', - '\\' => '幋', - ']' => '廅', - '^' => '廌', - '_' => '廆', - '`' => '廋', - 'a' => '廇', - 'b' => '彀', - 'c' => '徯', - 'd' => '徭', - 'e' => '惷', - 'f' => '慉', - 'g' => '慊', - 'h' => '愫', - 'i' => '慅', - 'j' => '愶', - 'k' => '愲', - 'l' => '愮', - 'm' => '慆', - 'n' => '愯', - 'o' => '慏', - 'p' => '愩', - 'q' => '慀', - 'r' => '戠', - 's' => '酨', - 't' => '戣', - 'u' => '戥', - 'v' => '戤', - 'w' => '揅', - 'x' => '揱', - 'y' => '揫', - 'z' => '搐', - '{' => '搒', - '|' => '搉', - '}' => '搠', - '~' => '搤', - 'ݡ' => '搳', - 'ݢ' => '摃', - 'ݣ' => '搟', - 'ݤ' => '搕', - 'ݥ' => '搘', - 'ݦ' => '搹', - 'ݧ' => '搷', - 'ݨ' => '搢', - 'ݩ' => '搣', - 'ݪ' => '搌', - 'ݫ' => '搦', - 'ݬ' => '搰', - 'ݭ' => '搨', - 'ݮ' => '摁', - 'ݯ' => '搵', - 'ݰ' => '搯', - 'ݱ' => '搊', - 'ݲ' => '搚', - 'ݳ' => '摀', - 'ݴ' => '搥', - 'ݵ' => '搧', - 'ݶ' => '搋', - 'ݷ' => '揧', - 'ݸ' => '搛', - 'ݹ' => '搮', - 'ݺ' => '搡', - 'ݻ' => '搎', - 'ݼ' => '敯', - 'ݽ' => '斒', - 'ݾ' => '旓', - 'ݿ' => '暆', - '' => '暌', - '' => '暕', - '' => '暐', - '' => '暋', - '' => '暊', - '' => '暙', - '' => '暔', - '' => '晸', - '' => '朠', - '' => '楦', - '' => '楟', - '' => '椸', - '' => '楎', - '' => '楢', - '' => '楱', - '' => '椿', - '' => '楅', - '' => '楪', - '' => '椹', - '' => '楂', - '' => '楗', - '' => '楙', - '' => '楺', - '' => '楈', - '' => '楉', - '' => '椵', - '' => '楬', - '' => '椳', - '' => '椽', - '' => '楥', - '' => '棰', - '' => '楸', - '' => '椴', - '' => '楩', - '' => '楀', - '' => '楯', - '' => '楄', - '' => '楶', - '' => '楘', - '' => '楁', - '' => '楴', - '' => '楌', - '' => '椻', - '' => '楋', - '' => '椷', - '' => '楜', - '' => '楏', - '' => '楑', - '' => '椲', - '' => '楒', - '' => '椯', - '' => '楻', - '' => '椼', - '' => '歆', - '' => '歅', - '' => '歃', - '' => '歂', - '' => '歈', - '' => '歁', - '' => '殛', - '' => '嗀', - '' => '毻', - '' => '毼', - '@' => '毹', - 'A' => '毷', - 'B' => '毸', - 'C' => '溛', - 'D' => '滖', - 'E' => '滈', - 'F' => '溏', - 'G' => '滀', - 'H' => '溟', - 'I' => '溓', - 'J' => '溔', - 'K' => '溠', - 'L' => '溱', - 'M' => '溹', - 'N' => '滆', - 'O' => '滒', - 'P' => '溽', - 'Q' => '滁', - 'R' => '溞', - 'S' => '滉', - 'T' => '溷', - 'U' => '溰', - 'V' => '滍', - 'W' => '溦', - 'X' => '滏', - 'Y' => '溲', - 'Z' => '溾', - '[' => '滃', - '\\' => '滜', - ']' => '滘', - '^' => '溙', - '_' => '溒', - '`' => '溎', - 'a' => '溍', - 'b' => '溤', - 'c' => '溡', - 'd' => '溿', - 'e' => '溳', - 'f' => '滐', - 'g' => '滊', - 'h' => '溗', - 'i' => '溮', - 'j' => '溣', - 'k' => '煇', - 'l' => '煔', - 'm' => '煒', - 'n' => '煣', - 'o' => '煠', - 'p' => '煁', - 'q' => '煝', - 'r' => '煢', - 's' => '煲', - 't' => '煸', - 'u' => '煪', - 'v' => '煡', - 'w' => '煂', - 'x' => '煘', - 'y' => '煃', - 'z' => '煋', - '{' => '煰', - '|' => '煟', - '}' => '煐', - '~' => '煓', - 'ޡ' => '煄', - 'ޢ' => '煍', - 'ޣ' => '煚', - 'ޤ' => '牏', - 'ޥ' => '犍', - 'ަ' => '犌', - 'ާ' => '犑', - 'ި' => '犐', - 'ީ' => '犎', - 'ު' => '猼', - 'ޫ' => '獂', - 'ެ' => '猻', - 'ޭ' => '猺', - 'ޮ' => '獀', - 'ޯ' => '獊', - 'ް' => '獉', - 'ޱ' => '瑄', - '޲' => '瑊', - '޳' => '瑋', - '޴' => '瑒', - '޵' => '瑑', - '޶' => '瑗', - '޷' => '瑀', - '޸' => '瑏', - '޹' => '瑐', - '޺' => '瑎', - '޻' => '瑂', - '޼' => '瑆', - '޽' => '瑍', - '޾' => '瑔', - '޿' => '瓡', - '' => '瓿', - '' => '瓾', - '' => '瓽', - '' => '甝', - '' => '畹', - '' => '畷', - '' => '榃', - '' => '痯', - '' => '瘏', - '' => '瘃', - '' => '痷', - '' => '痾', - '' => '痼', - '' => '痹', - '' => '痸', - '' => '瘐', - '' => '痻', - '' => '痶', - '' => '痭', - '' => '痵', - '' => '痽', - '' => '皙', - '' => '皵', - '' => '盝', - '' => '睕', - '' => '睟', - '' => '睠', - '' => '睒', - '' => '睖', - '' => '睚', - '' => '睩', - '' => '睧', - '' => '睔', - '' => '睙', - '' => '睭', - '' => '矠', - '' => '碇', - '' => '碚', - '' => '碔', - '' => '碏', - '' => '碄', - '' => '碕', - '' => '碅', - '' => '碆', - '' => '碡', - '' => '碃', - '' => '硹', - '' => '碙', - '' => '碀', - '' => '碖', - '' => '硻', - '' => '祼', - '' => '禂', - '' => '祽', - '' => '祹', - '' => '稑', - '' => '稘', - '' => '稙', - '' => '稒', - '' => '稗', - '' => '稕', - '' => '稢', - '' => '稓', - '@' => '稛', - 'A' => '稐', - 'B' => '窣', - 'C' => '窢', - 'D' => '窞', - 'E' => '竫', - 'F' => '筦', - 'G' => '筤', - 'H' => '筭', - 'I' => '筴', - 'J' => '筩', - 'K' => '筲', - 'L' => '筥', - 'M' => '筳', - 'N' => '筱', - 'O' => '筰', - 'P' => '筡', - 'Q' => '筸', - 'R' => '筶', - 'S' => '筣', - 'T' => '粲', - 'U' => '粴', - 'V' => '粯', - 'W' => '綈', - 'X' => '綆', - 'Y' => '綀', - 'Z' => '綍', - '[' => '絿', - '\\' => '綅', - ']' => '絺', - '^' => '綎', - '_' => '絻', - '`' => '綃', - 'a' => '絼', - 'b' => '綌', - 'c' => '綔', - 'd' => '綄', - 'e' => '絽', - 'f' => '綒', - 'g' => '罭', - 'h' => '罫', - 'i' => '罧', - 'j' => '罨', - 'k' => '罬', - 'l' => '羦', - 'm' => '羥', - 'n' => '羧', - 'o' => '翛', - 'p' => '翜', - 'q' => '耡', - 'r' => '腤', - 's' => '腠', - 't' => '腷', - 'u' => '腜', - 'v' => '腩', - 'w' => '腛', - 'x' => '腢', - 'y' => '腲', - 'z' => '朡', - '{' => '腞', - '|' => '腶', - '}' => '腧', - '~' => '腯', - 'ߡ' => '腄', - 'ߢ' => '腡', - 'ߣ' => '舝', - 'ߤ' => '艉', - 'ߥ' => '艄', - 'ߦ' => '艀', - 'ߧ' => '艂', - 'ߨ' => '艅', - 'ߩ' => '蓱', - 'ߪ' => '萿', - '߫' => '葖', - '߬' => '葶', - '߭' => '葹', - '߮' => '蒏', - '߯' => '蒍', - '߰' => '葥', - '߱' => '葑', - '߲' => '葀', - '߳' => '蒆', - 'ߴ' => '葧', - 'ߵ' => '萰', - '߶' => '葍', - '߷' => '葽', - '߸' => '葚', - '߹' => '葙', - 'ߺ' => '葴', - '߻' => '葳', - '߼' => '葝', - '߽' => '蔇', - '߾' => '葞', - '߿' => '萷', - '' => '萺', - '' => '萴', - '' => '葺', - '' => '葃', - '' => '葸', - '' => '萲', - '' => '葅', - '' => '萩', - '' => '菙', - '' => '葋', - '' => '萯', - '' => '葂', - '' => '萭', - '' => '葟', - '' => '葰', - '' => '萹', - '' => '葎', - '' => '葌', - '' => '葒', - '' => '葯', - '' => '蓅', - '' => '蒎', - '' => '萻', - '' => '葇', - '' => '萶', - '' => '萳', - '' => '葨', - '' => '葾', - '' => '葄', - '' => '萫', - '' => '葠', - '' => '葔', - '' => '葮', - '' => '葐', - '' => '蜋', - '' => '蜄', - '' => '蛷', - '' => '蜌', - '' => '蛺', - '' => '蛖', - '' => '蛵', - '' => '蝍', - '' => '蛸', - '' => '蜎', - '' => '蜉', - '' => '蜁', - '' => '蛶', - '' => '蜍', - '' => '蜅', - '' => '裖', - '' => '裋', - '' => '裍', - '' => '裎', - '' => '裞', - '' => '裛', - '' => '裚', - '' => '裌', - '' => '裐', - '' => '覅', - '' => '覛', - '' => '觟', - '' => '觥', - '' => '觤', - '@' => '觡', - 'A' => '觠', - 'B' => '觢', - 'C' => '觜', - 'D' => '触', - 'E' => '詶', - 'F' => '誆', - 'G' => '詿', - 'H' => '詡', - 'I' => '訿', - 'J' => '詷', - 'K' => '誂', - 'L' => '誄', - 'M' => '詵', - 'N' => '誃', - 'O' => '誁', - 'P' => '詴', - 'Q' => '詺', - 'R' => '谼', - 'S' => '豋', - 'T' => '豊', - 'U' => '豥', - 'V' => '豤', - 'W' => '豦', - 'X' => '貆', - 'Y' => '貄', - 'Z' => '貅', - '[' => '賌', - '\\' => '赨', - ']' => '赩', - '^' => '趑', - '_' => '趌', - '`' => '趎', - 'a' => '趏', - 'b' => '趍', - 'c' => '趓', - 'd' => '趔', - 'e' => '趐', - 'f' => '趒', - 'g' => '跰', - 'h' => '跠', - 'i' => '跬', - 'j' => '跱', - 'k' => '跮', - 'l' => '跐', - 'm' => '跩', - 'n' => '跣', - 'o' => '跢', - 'p' => '跧', - 'q' => '跲', - 'r' => '跫', - 's' => '跴', - 't' => '輆', - 'u' => '軿', - 'v' => '輁', - 'w' => '輀', - 'x' => '輅', - 'y' => '輇', - 'z' => '輈', - '{' => '輂', - '|' => '輋', - '}' => '遒', - '~' => '逿', - '' => '遄', - '' => '遉', - '' => '逽', - '' => '鄐', - '' => '鄍', - '' => '鄏', - '' => '鄑', - '' => '鄖', - '' => '鄔', - '' => '鄋', - '' => '鄎', - '' => '酮', - '' => '酯', - '' => '鉈', - '' => '鉒', - '' => '鈰', - '' => '鈺', - '' => '鉦', - '' => '鈳', - '' => '鉥', - '' => '鉞', - '' => '銃', - '' => '鈮', - '' => '鉊', - '' => '鉆', - '' => '鉭', - '' => '鉬', - '' => '鉏', - '' => '鉠', - '' => '鉧', - '' => '鉯', - '' => '鈶', - '' => '鉡', - '' => '鉰', - '' => '鈱', - '' => '鉔', - '' => '鉣', - '' => '鉐', - '' => '鉲', - '' => '鉎', - '' => '鉓', - '' => '鉌', - '' => '鉖', - '' => '鈲', - '' => '閟', - '' => '閜', - '' => '閞', - '' => '閛', - '' => '隒', - '' => '隓', - '' => '隑', - '' => '隗', - '' => '雎', - '' => '雺', - '' => '雽', - '' => '雸', - '' => '雵', - '' => '靳', - '' => '靷', - '' => '靸', - '' => '靲', - '' => '頏', - '' => '頍', - '' => '頎', - '' => '颬', - '' => '飶', - '' => '飹', - '' => '馯', - '' => '馲', - '' => '馰', - '' => '馵', - '' => '骭', - '' => '骫', - '' => '魛', - '' => '鳪', - '' => '鳭', - '' => '鳧', - '' => '麀', - '' => '黽', - '' => '僦', - '' => '僔', - '' => '僗', - '' => '僨', - '' => '僳', - '' => '僛', - '' => '僪', - '' => '僝', - '' => '僤', - '' => '僓', - '' => '僬', - '' => '僰', - '' => '僯', - '' => '僣', - '' => '僠', - '@' => '凘', - 'A' => '劀', - 'B' => '劁', - 'C' => '勩', - 'D' => '勫', - 'E' => '匰', - 'F' => '厬', - 'G' => '嘧', - 'H' => '嘕', - 'I' => '嘌', - 'J' => '嘒', - 'K' => '嗼', - 'L' => '嘏', - 'M' => '嘜', - 'N' => '嘁', - 'O' => '嘓', - 'P' => '嘂', - 'Q' => '嗺', - 'R' => '嘝', - 'S' => '嘄', - 'T' => '嗿', - 'U' => '嗹', - 'V' => '墉', - 'W' => '塼', - 'X' => '墐', - 'Y' => '墘', - 'Z' => '墆', - '[' => '墁', - '\\' => '塿', - ']' => '塴', - '^' => '墋', - '_' => '塺', - '`' => '墇', - 'a' => '墑', - 'b' => '墎', - 'c' => '塶', - 'd' => '墂', - 'e' => '墈', - 'f' => '塻', - 'g' => '墔', - 'h' => '墏', - 'i' => '壾', - 'j' => '奫', - 'k' => '嫜', - 'l' => '嫮', - 'm' => '嫥', - 'n' => '嫕', - 'o' => '嫪', - 'p' => '嫚', - 'q' => '嫭', - 'r' => '嫫', - 's' => '嫳', - 't' => '嫢', - 'u' => '嫠', - 'v' => '嫛', - 'w' => '嫬', - 'x' => '嫞', - 'y' => '嫝', - 'z' => '嫙', - '{' => '嫨', - '|' => '嫟', - '}' => '孷', - '~' => '寠', - '' => '寣', - '' => '屣', - '' => '嶂', - '' => '嶀', - '' => '嵽', - '' => '嶆', - '' => '嵺', - '' => '嶁', - '' => '嵷', - '' => '嶊', - '' => '嶉', - '' => '嶈', - '' => '嵾', - '' => '嵼', - '' => '嶍', - '' => '嵹', - '' => '嵿', - '' => '幘', - '' => '幙', - '' => '幓', - '' => '廘', - '' => '廑', - '' => '廗', - '' => '廎', - '' => '廜', - '' => '廕', - '' => '廙', - '' => '廒', - '' => '廔', - '' => '彄', - '' => '彃', - '' => '彯', - '' => '徶', - '' => '愬', - '' => '愨', - '' => '慁', - '' => '慞', - '' => '慱', - '' => '慳', - '' => '慒', - '' => '慓', - '' => '慲', - '' => '慬', - '' => '憀', - '' => '慴', - '' => '慔', - '' => '慺', - '' => '慛', - '' => '慥', - '' => '愻', - '' => '慪', - '' => '慡', - '' => '慖', - '' => '戩', - '' => '戧', - '' => '戫', - '' => '搫', - '' => '摍', - '' => '摛', - '' => '摝', - '' => '摴', - '' => '摶', - '' => '摲', - '' => '摳', - '' => '摽', - '' => '摵', - '' => '摦', - '' => '撦', - '' => '摎', - '' => '撂', - '' => '摞', - '' => '摜', - '' => '摋', - '' => '摓', - '' => '摠', - '' => '摐', - '' => '摿', - '' => '搿', - '' => '摬', - '' => '摫', - '' => '摙', - '' => '摥', - '' => '摷', - '' => '敳', - '' => '斠', - '' => '暡', - '' => '暠', - '' => '暟', - '' => '朅', - '' => '朄', - '' => '朢', - '' => '榱', - '' => '榶', - '' => '槉', - '@' => '榠', - 'A' => '槎', - 'B' => '榖', - 'C' => '榰', - 'D' => '榬', - 'E' => '榼', - 'F' => '榑', - 'G' => '榙', - 'H' => '榎', - 'I' => '榧', - 'J' => '榍', - 'K' => '榩', - 'L' => '榾', - 'M' => '榯', - 'N' => '榿', - 'O' => '槄', - 'P' => '榽', - 'Q' => '榤', - 'R' => '槔', - 'S' => '榹', - 'T' => '槊', - 'U' => '榚', - 'V' => '槏', - 'W' => '榳', - 'X' => '榓', - 'Y' => '榪', - 'Z' => '榡', - '[' => '榞', - '\\' => '槙', - ']' => '榗', - '^' => '榐', - '_' => '槂', - '`' => '榵', - 'a' => '榥', - 'b' => '槆', - 'c' => '歊', - 'd' => '歍', - 'e' => '歋', - 'f' => '殞', - 'g' => '殟', - 'h' => '殠', - 'i' => '毃', - 'j' => '毄', - 'k' => '毾', - 'l' => '滎', - 'm' => '滵', - 'n' => '滱', - 'o' => '漃', - 'p' => '漥', - 'q' => '滸', - 'r' => '漷', - 's' => '滻', - 't' => '漮', - 'u' => '漉', - 'v' => '潎', - 'w' => '漙', - 'x' => '漚', - 'y' => '漧', - 'z' => '漘', - '{' => '漻', - '|' => '漒', - '}' => '滭', - '~' => '漊', - '' => '漶', - '' => '潳', - '' => '滹', - '' => '滮', - '' => '漭', - '' => '潀', - '' => '漰', - '' => '漼', - '' => '漵', - '' => '滫', - '' => '漇', - '' => '漎', - '' => '潃', - '' => '漅', - '' => '滽', - '' => '滶', - '' => '漹', - '' => '漜', - '' => '滼', - '' => '漺', - '' => '漟', - '' => '漍', - '' => '漞', - '' => '漈', - '' => '漡', - '' => '熇', - '' => '熐', - '' => '熉', - '' => '熀', - '' => '熅', - '' => '熂', - '' => '熏', - '' => '煻', - '' => '熆', - '' => '熁', - '' => '熗', - '' => '牄', - '' => '牓', - '' => '犗', - '' => '犕', - '' => '犓', - '' => '獃', - '' => '獍', - '' => '獑', - '' => '獌', - '' => '瑢', - '' => '瑳', - '' => '瑱', - '' => '瑵', - '' => '瑲', - '' => '瑧', - '' => '瑮', - '' => '甀', - '' => '甂', - '' => '甃', - '' => '畽', - '' => '疐', - '' => '瘖', - '' => '瘈', - '' => '瘌', - '' => '瘕', - '' => '瘑', - '' => '瘊', - '' => '瘔', - '' => '皸', - '' => '瞁', - '' => '睼', - '' => '瞅', - '' => '瞂', - '' => '睮', - '' => '瞀', - '' => '睯', - '' => '睾', - '' => '瞃', - '' => '碲', - '' => '碪', - '' => '碴', - '' => '碭', - '' => '碨', - '' => '硾', - '' => '碫', - '' => '碞', - '' => '碥', - '' => '碠', - '' => '碬', - '' => '碢', - '' => '碤', - '' => '禘', - '' => '禊', - '' => '禋', - '' => '禖', - '' => '禕', - '' => '禔', - '' => '禓', - '@' => '禗', - 'A' => '禈', - 'B' => '禒', - 'C' => '禐', - 'D' => '稫', - 'E' => '穊', - 'F' => '稰', - 'G' => '稯', - 'H' => '稨', - 'I' => '稦', - 'J' => '窨', - 'K' => '窫', - 'L' => '窬', - 'M' => '竮', - 'N' => '箈', - 'O' => '箜', - 'P' => '箊', - 'Q' => '箑', - 'R' => '箐', - 'S' => '箖', - 'T' => '箍', - 'U' => '箌', - 'V' => '箛', - 'W' => '箎', - 'X' => '箅', - 'Y' => '箘', - 'Z' => '劄', - '[' => '箙', - '\\' => '箤', - ']' => '箂', - '^' => '粻', - '_' => '粿', - '`' => '粼', - 'a' => '粺', - 'b' => '綧', - 'c' => '綷', - 'd' => '緂', - 'e' => '綣', - 'f' => '綪', - 'g' => '緁', - 'h' => '緀', - 'i' => '緅', - 'j' => '綝', - 'k' => '緎', - 'l' => '緄', - 'm' => '緆', - 'n' => '緋', - 'o' => '緌', - 'p' => '綯', - 'q' => '綹', - 'r' => '綖', - 's' => '綼', - 't' => '綟', - 'u' => '綦', - 'v' => '綮', - 'w' => '綩', - 'x' => '綡', - 'y' => '緉', - 'z' => '罳', - '{' => '翢', - '|' => '翣', - '}' => '翥', - '~' => '翞', - '' => '耤', - '' => '聝', - '' => '聜', - '' => '膉', - '' => '膆', - '' => '膃', - '' => '膇', - '' => '膍', - '' => '膌', - '' => '膋', - '' => '舕', - '' => '蒗', - '' => '蒤', - '' => '蒡', - '' => '蒟', - '' => '蒺', - '' => '蓎', - '' => '蓂', - '' => '蒬', - '' => '蒮', - '' => '蒫', - '' => '蒹', - '' => '蒴', - '' => '蓁', - '' => '蓍', - '' => '蒪', - '' => '蒚', - '' => '蒱', - '' => '蓐', - '' => '蒝', - '' => '蒧', - '' => '蒻', - '' => '蒢', - '' => '蒔', - '' => '蓇', - '' => '蓌', - '' => '蒛', - '' => '蒩', - '' => '蒯', - '' => '蒨', - '' => '蓖', - '' => '蒘', - '' => '蒶', - '' => '蓏', - '' => '蒠', - '' => '蓗', - '' => '蓔', - '' => '蓒', - '' => '蓛', - '' => '蒰', - '' => '蒑', - '' => '虡', - '' => '蜳', - '' => '蜣', - '' => '蜨', - '' => '蝫', - '' => '蝀', - '' => '蜮', - '' => '蜞', - '' => '蜡', - '' => '蜙', - '' => '蜛', - '' => '蝃', - '' => '蜬', - '' => '蝁', - '' => '蜾', - '' => '蝆', - '' => '蜠', - '' => '蜲', - '' => '蜪', - '' => '蜭', - '' => '蜼', - '' => '蜒', - '' => '蜺', - '' => '蜱', - '' => '蜵', - '' => '蝂', - '' => '蜦', - '' => '蜧', - '' => '蜸', - '' => '蜤', - '' => '蜚', - '' => '蜰', - '' => '蜑', - '' => '裷', - '' => '裧', - '' => '裱', - '' => '裲', - '' => '裺', - '' => '裾', - '' => '裮', - '' => '裼', - '' => '裶', - '' => '裻', - '@' => '裰', - 'A' => '裬', - 'B' => '裫', - 'C' => '覝', - 'D' => '覡', - 'E' => '覟', - 'F' => '覞', - 'G' => '觩', - 'H' => '觫', - 'I' => '觨', - 'J' => '誫', - 'K' => '誙', - 'L' => '誋', - 'M' => '誒', - 'N' => '誏', - 'O' => '誖', - 'P' => '谽', - 'Q' => '豨', - 'R' => '豩', - 'S' => '賕', - 'T' => '賏', - 'U' => '賗', - 'V' => '趖', - 'W' => '踉', - 'X' => '踂', - 'Y' => '跿', - 'Z' => '踍', - '[' => '跽', - '\\' => '踊', - ']' => '踃', - '^' => '踇', - '_' => '踆', - '`' => '踅', - 'a' => '跾', - 'b' => '踀', - 'c' => '踄', - 'd' => '輐', - 'e' => '輑', - 'f' => '輎', - 'g' => '輍', - 'h' => '鄣', - 'i' => '鄜', - 'j' => '鄠', - 'k' => '鄢', - 'l' => '鄟', - 'm' => '鄝', - 'n' => '鄚', - 'o' => '鄤', - 'p' => '鄡', - 'q' => '鄛', - 'r' => '酺', - 's' => '酲', - 't' => '酹', - 'u' => '酳', - 'v' => '銥', - 'w' => '銤', - 'x' => '鉶', - 'y' => '銛', - 'z' => '鉺', - '{' => '銠', - '|' => '銔', - '}' => '銪', - '~' => '銍', - '' => '銦', - '' => '銚', - '' => '銫', - '' => '鉹', - '' => '銗', - '' => '鉿', - '' => '銣', - '' => '鋮', - '' => '銎', - '' => '銂', - '' => '銕', - '' => '銢', - '' => '鉽', - '' => '銈', - '' => '銡', - '' => '銊', - '' => '銆', - '' => '銌', - '' => '銙', - '' => '銧', - '' => '鉾', - '' => '銇', - '' => '銩', - '' => '銝', - '' => '銋', - '' => '鈭', - '' => '隞', - '' => '隡', - '' => '雿', - '' => '靘', - '' => '靽', - '' => '靺', - '' => '靾', - '' => '鞃', - '' => '鞀', - '' => '鞂', - '' => '靻', - '' => '鞄', - '' => '鞁', - '' => '靿', - '' => '韎', - '' => '韍', - '' => '頖', - '' => '颭', - '' => '颮', - '' => '餂', - '' => '餀', - '' => '餇', - '' => '馝', - '' => '馜', - '' => '駃', - '' => '馹', - '' => '馻', - '' => '馺', - '' => '駂', - '' => '馽', - '' => '駇', - '' => '骱', - '' => '髣', - '' => '髧', - '' => '鬾', - '' => '鬿', - '' => '魠', - '' => '魡', - '' => '魟', - '' => '鳱', - '' => '鳲', - '' => '鳵', - '' => '麧', - '' => '僿', - '' => '儃', - '' => '儰', - '' => '僸', - '' => '儆', - '' => '儇', - '' => '僶', - '' => '僾', - '' => '儋', - '' => '儌', - '' => '僽', - '' => '儊', - '' => '劋', - '' => '劌', - '' => '勱', - '' => '勯', - '' => '噈', - '' => '噂', - '' => '噌', - '' => '嘵', - '' => '噁', - '' => '噊', - '' => '噉', - '' => '噆', - '' => '噘', - '@' => '噚', - 'A' => '噀', - 'B' => '嘳', - 'C' => '嘽', - 'D' => '嘬', - 'E' => '嘾', - 'F' => '嘸', - 'G' => '嘪', - 'H' => '嘺', - 'I' => '圚', - 'J' => '墫', - 'K' => '墝', - 'L' => '墱', - 'M' => '墠', - 'N' => '墣', - 'O' => '墯', - 'P' => '墬', - 'Q' => '墥', - 'R' => '墡', - 'S' => '壿', - 'T' => '嫿', - 'U' => '嫴', - 'V' => '嫽', - 'W' => '嫷', - 'X' => '嫶', - 'Y' => '嬃', - 'Z' => '嫸', - '[' => '嬂', - '\\' => '嫹', - ']' => '嬁', - '^' => '嬇', - '_' => '嬅', - '`' => '嬏', - 'a' => '屧', - 'b' => '嶙', - 'c' => '嶗', - 'd' => '嶟', - 'e' => '嶒', - 'f' => '嶢', - 'g' => '嶓', - 'h' => '嶕', - 'i' => '嶠', - 'j' => '嶜', - 'k' => '嶡', - 'l' => '嶚', - 'm' => '嶞', - 'n' => '幩', - 'o' => '幝', - 'p' => '幠', - 'q' => '幜', - 'r' => '緳', - 's' => '廛', - 't' => '廞', - 'u' => '廡', - 'v' => '彉', - 'w' => '徲', - 'x' => '憋', - 'y' => '憃', - 'z' => '慹', - '{' => '憱', - '|' => '憰', - '}' => '憢', - '~' => '憉', - '' => '憛', - '' => '憓', - '' => '憯', - '' => '憭', - '' => '憟', - '' => '憒', - '' => '憪', - '' => '憡', - '' => '憍', - '' => '慦', - '' => '憳', - '' => '戭', - '' => '摮', - '' => '摰', - '' => '撖', - '' => '撠', - '' => '撅', - '' => '撗', - '' => '撜', - '' => '撏', - '' => '撋', - '' => '撊', - '' => '撌', - '' => '撣', - '' => '撟', - '' => '摨', - '' => '撱', - '' => '撘', - '' => '敶', - '' => '敺', - '' => '敹', - '' => '敻', - '' => '斲', - '' => '斳', - '' => '暵', - '' => '暰', - '' => '暩', - '' => '暲', - '' => '暷', - '' => '暪', - '' => '暯', - '' => '樀', - '' => '樆', - '' => '樗', - '' => '槥', - '' => '槸', - '' => '樕', - '' => '槱', - '' => '槤', - '' => '樠', - '' => '槿', - '' => '槬', - '' => '槢', - '' => '樛', - '' => '樝', - '' => '槾', - '' => '樧', - '' => '槲', - '' => '槮', - '' => '樔', - '' => '槷', - '' => '槧', - '' => '橀', - '' => '樈', - '' => '槦', - '' => '槻', - '' => '樍', - '' => '槼', - '' => '槫', - '' => '樉', - '' => '樄', - '' => '樘', - '' => '樥', - '' => '樏', - '' => '槶', - '' => '樦', - '' => '樇', - '' => '槴', - '' => '樖', - '' => '歑', - '' => '殥', - '' => '殣', - '' => '殢', - '' => '殦', - '' => '氁', - '' => '氀', - '' => '毿', - '' => '氂', - '' => '潁', - '' => '漦', - '' => '潾', - '' => '澇', - '' => '濆', - '' => '澒', - '@' => '澍', - 'A' => '澉', - 'B' => '澌', - 'C' => '潢', - 'D' => '潏', - 'E' => '澅', - 'F' => '潚', - 'G' => '澖', - 'H' => '潶', - 'I' => '潬', - 'J' => '澂', - 'K' => '潕', - 'L' => '潲', - 'M' => '潒', - 'N' => '潐', - 'O' => '潗', - 'P' => '澔', - 'Q' => '澓', - 'R' => '潝', - 'S' => '漀', - 'T' => '潡', - 'U' => '潫', - 'V' => '潽', - 'W' => '潧', - 'X' => '澐', - 'Y' => '潓', - 'Z' => '澋', - '[' => '潩', - '\\' => '潿', - ']' => '澕', - '^' => '潣', - '_' => '潷', - '`' => '潪', - 'a' => '潻', - 'b' => '熲', - 'c' => '熯', - 'd' => '熛', - 'e' => '熰', - 'f' => '熠', - 'g' => '熚', - 'h' => '熩', - 'i' => '熵', - 'j' => '熝', - 'k' => '熥', - 'l' => '熞', - 'm' => '熤', - 'n' => '熡', - 'o' => '熪', - 'p' => '熜', - 'q' => '熧', - 'r' => '熳', - 's' => '犘', - 't' => '犚', - 'u' => '獘', - 'v' => '獒', - 'w' => '獞', - 'x' => '獟', - 'y' => '獠', - 'z' => '獝', - '{' => '獛', - '|' => '獡', - '}' => '獚', - '~' => '獙', - '' => '獢', - '' => '璇', - '' => '璉', - '' => '璊', - '' => '璆', - '' => '璁', - '' => '瑽', - '' => '璅', - '' => '璈', - '' => '瑼', - '' => '瑹', - '' => '甈', - '' => '甇', - '' => '畾', - '' => '瘥', - '' => '瘞', - '' => '瘙', - '' => '瘝', - '' => '瘜', - '' => '瘣', - '' => '瘚', - '' => '瘨', - '' => '瘛', - '' => '皜', - '' => '皝', - '' => '皞', - '' => '皛', - '' => '瞍', - '' => '瞏', - '' => '瞉', - '' => '瞈', - '' => '磍', - '' => '碻', - '' => '磏', - '' => '磌', - '' => '磑', - '' => '磎', - '' => '磔', - '' => '磈', - '' => '磃', - '' => '磄', - '' => '磉', - '' => '禚', - '' => '禡', - '' => '禠', - '' => '禜', - '' => '禢', - '' => '禛', - '' => '歶', - '' => '稹', - '' => '窲', - '' => '窴', - '' => '窳', - '' => '箷', - '' => '篋', - '' => '箾', - '' => '箬', - '' => '篎', - '' => '箯', - '' => '箹', - '' => '篊', - '' => '箵', - '' => '糅', - '' => '糈', - '' => '糌', - '' => '糋', - '' => '緷', - '' => '緛', - '' => '緪', - '' => '緧', - '' => '緗', - '' => '緡', - '' => '縃', - '' => '緺', - '' => '緦', - '' => '緶', - '' => '緱', - '' => '緰', - '' => '緮', - '' => '緟', - '' => '罶', - '' => '羬', - '' => '羰', - '' => '羭', - '' => '翭', - '' => '翫', - '' => '翪', - '' => '翬', - '' => '翦', - '' => '翨', - '' => '聤', - '' => '聧', - '' => '膣', - '' => '膟', - '@' => '膞', - 'A' => '膕', - 'B' => '膢', - 'C' => '膙', - 'D' => '膗', - 'E' => '舖', - 'F' => '艏', - 'G' => '艓', - 'H' => '艒', - 'I' => '艐', - 'J' => '艎', - 'K' => '艑', - 'L' => '蔤', - 'M' => '蔻', - 'N' => '蔏', - 'O' => '蔀', - 'P' => '蔩', - 'Q' => '蔎', - 'R' => '蔉', - 'S' => '蔍', - 'T' => '蔟', - 'U' => '蔊', - 'V' => '蔧', - 'W' => '蔜', - 'X' => '蓻', - 'Y' => '蔫', - 'Z' => '蓺', - '[' => '蔈', - '\\' => '蔌', - ']' => '蓴', - '^' => '蔪', - '_' => '蓲', - '`' => '蔕', - 'a' => '蓷', - 'b' => '蓫', - 'c' => '蓳', - 'd' => '蓼', - 'e' => '蔒', - 'f' => '蓪', - 'g' => '蓩', - 'h' => '蔖', - 'i' => '蓾', - 'j' => '蔨', - 'k' => '蔝', - 'l' => '蔮', - 'm' => '蔂', - 'n' => '蓽', - 'o' => '蔞', - 'p' => '蓶', - 'q' => '蔱', - 'r' => '蔦', - 's' => '蓧', - 't' => '蓨', - 'u' => '蓰', - 'v' => '蓯', - 'w' => '蓹', - 'x' => '蔘', - 'y' => '蔠', - 'z' => '蔰', - '{' => '蔋', - '|' => '蔙', - '}' => '蔯', - '~' => '虢', - '' => '蝖', - '' => '蝣', - '' => '蝤', - '' => '蝷', - '' => '蟡', - '' => '蝳', - '' => '蝘', - '' => '蝔', - '' => '蝛', - '' => '蝒', - '' => '蝡', - '' => '蝚', - '' => '蝑', - '' => '蝞', - '' => '蝭', - '' => '蝪', - '' => '蝐', - '' => '蝎', - '' => '蝟', - '' => '蝝', - '' => '蝯', - '' => '蝬', - '' => '蝺', - '' => '蝮', - '' => '蝜', - '' => '蝥', - '' => '蝏', - '' => '蝻', - '' => '蝵', - '' => '蝢', - '' => '蝧', - '' => '蝩', - '' => '衚', - '' => '褅', - '' => '褌', - '' => '褔', - '' => '褋', - '' => '褗', - '' => '褘', - '' => '褙', - '' => '褆', - '' => '褖', - '' => '褑', - '' => '褎', - '' => '褉', - '' => '覢', - '' => '覤', - '' => '覣', - '' => '觭', - '' => '觰', - '' => '觬', - '' => '諏', - '' => '諆', - '' => '誸', - '' => '諓', - '' => '諑', - '' => '諔', - '' => '諕', - '' => '誻', - '' => '諗', - '' => '誾', - '' => '諀', - '' => '諅', - '' => '諘', - '' => '諃', - '' => '誺', - '' => '誽', - '' => '諙', - '' => '谾', - '' => '豍', - '' => '貏', - '' => '賥', - '' => '賟', - '' => '賙', - '' => '賨', - '' => '賚', - '' => '賝', - '' => '賧', - '' => '趠', - '' => '趜', - '' => '趡', - '' => '趛', - '' => '踠', - '' => '踣', - '' => '踥', - '' => '踤', - '' => '踮', - '' => '踕', - '' => '踛', - '' => '踖', - '' => '踑', - '' => '踙', - '' => '踦', - '' => '踧', - '@' => '踔', - 'A' => '踒', - 'B' => '踘', - 'C' => '踓', - 'D' => '踜', - 'E' => '踗', - 'F' => '踚', - 'G' => '輬', - 'H' => '輤', - 'I' => '輘', - 'J' => '輚', - 'K' => '輠', - 'L' => '輣', - 'M' => '輖', - 'N' => '輗', - 'O' => '遳', - 'P' => '遰', - 'Q' => '遯', - 'R' => '遧', - 'S' => '遫', - 'T' => '鄯', - 'U' => '鄫', - 'V' => '鄩', - 'W' => '鄪', - 'X' => '鄲', - 'Y' => '鄦', - 'Z' => '鄮', - '[' => '醅', - '\\' => '醆', - ']' => '醊', - '^' => '醁', - '_' => '醂', - '`' => '醄', - 'a' => '醀', - 'b' => '鋐', - 'c' => '鋃', - 'd' => '鋄', - 'e' => '鋀', - 'f' => '鋙', - 'g' => '銶', - 'h' => '鋏', - 'i' => '鋱', - 'j' => '鋟', - 'k' => '鋘', - 'l' => '鋩', - 'm' => '鋗', - 'n' => '鋝', - 'o' => '鋌', - 'p' => '鋯', - 'q' => '鋂', - 'r' => '鋨', - 's' => '鋊', - 't' => '鋈', - 'u' => '鋎', - 'v' => '鋦', - 'w' => '鋍', - 'x' => '鋕', - 'y' => '鋉', - 'z' => '鋠', - '{' => '鋞', - '|' => '鋧', - '}' => '鋑', - '~' => '鋓', - '' => '銵', - '' => '鋡', - '' => '鋆', - '' => '銴', - '' => '镼', - '' => '閬', - '' => '閫', - '' => '閮', - '' => '閰', - '' => '隤', - '' => '隢', - '' => '雓', - '' => '霅', - '' => '霈', - '' => '霂', - '' => '靚', - '' => '鞊', - '' => '鞎', - '' => '鞈', - '' => '韐', - '' => '韏', - '' => '頞', - '' => '頝', - '' => '頦', - '' => '頩', - '' => '頨', - '' => '頠', - '' => '頛', - '' => '頧', - '' => '颲', - '' => '餈', - '' => '飺', - '' => '餑', - '' => '餔', - '' => '餖', - '' => '餗', - '' => '餕', - '' => '駜', - '' => '駍', - '' => '駏', - '' => '駓', - '' => '駔', - '' => '駎', - '' => '駉', - '' => '駖', - '' => '駘', - '' => '駋', - '' => '駗', - '' => '駌', - '' => '骳', - '' => '髬', - '' => '髫', - '' => '髳', - '' => '髲', - '' => '髱', - '' => '魆', - '' => '魃', - '' => '魧', - '' => '魴', - '' => '魱', - '' => '魦', - '' => '魶', - '' => '魵', - '' => '魰', - '' => '魨', - '' => '魤', - '' => '魬', - '' => '鳼', - '' => '鳺', - '' => '鳽', - '' => '鳿', - '' => '鳷', - '' => '鴇', - '' => '鴀', - '' => '鳹', - '' => '鳻', - '' => '鴈', - '' => '鴅', - '' => '鴄', - '' => '麃', - '' => '黓', - '' => '鼏', - '' => '鼐', - '' => '儜', - '' => '儓', - '' => '儗', - '' => '儚', - '' => '儑', - '' => '凞', - '' => '匴', - '' => '叡', - '' => '噰', - '' => '噠', - '' => '噮', - '@' => '噳', - 'A' => '噦', - 'B' => '噣', - 'C' => '噭', - 'D' => '噲', - 'E' => '噞', - 'F' => '噷', - 'G' => '圜', - 'H' => '圛', - 'I' => '壈', - 'J' => '墽', - 'K' => '壉', - 'L' => '墿', - 'M' => '墺', - 'N' => '壂', - 'O' => '墼', - 'P' => '壆', - 'Q' => '嬗', - 'R' => '嬙', - 'S' => '嬛', - 'T' => '嬡', - 'U' => '嬔', - 'V' => '嬓', - 'W' => '嬐', - 'X' => '嬖', - 'Y' => '嬨', - 'Z' => '嬚', - '[' => '嬠', - '\\' => '嬞', - ']' => '寯', - '^' => '嶬', - '_' => '嶱', - '`' => '嶩', - 'a' => '嶧', - 'b' => '嶵', - 'c' => '嶰', - 'd' => '嶮', - 'e' => '嶪', - 'f' => '嶨', - 'g' => '嶲', - 'h' => '嶭', - 'i' => '嶯', - 'j' => '嶴', - 'k' => '幧', - 'l' => '幨', - 'm' => '幦', - 'n' => '幯', - 'o' => '廩', - 'p' => '廧', - 'q' => '廦', - 'r' => '廨', - 's' => '廥', - 't' => '彋', - 'u' => '徼', - 'v' => '憝', - 'w' => '憨', - 'x' => '憖', - 'y' => '懅', - 'z' => '憴', - '{' => '懆', - '|' => '懁', - '}' => '懌', - '~' => '憺', - '' => '憿', - '' => '憸', - '' => '憌', - '' => '擗', - '' => '擖', - '' => '擐', - '' => '擏', - '' => '擉', - '' => '撽', - '' => '撉', - '' => '擃', - '' => '擛', - '' => '擳', - '' => '擙', - '' => '攳', - '' => '敿', - '' => '敼', - '' => '斢', - '' => '曈', - '' => '暾', - '' => '曀', - '' => '曊', - '' => '曋', - '' => '曏', - '' => '暽', - '' => '暻', - '' => '暺', - '' => '曌', - '' => '朣', - '' => '樴', - '' => '橦', - '' => '橉', - '' => '橧', - '' => '樲', - '' => '橨', - '' => '樾', - '' => '橝', - '' => '橭', - '' => '橶', - '' => '橛', - '' => '橑', - '' => '樨', - '' => '橚', - '' => '樻', - '' => '樿', - '' => '橁', - '' => '橪', - '' => '橤', - '' => '橐', - '' => '橏', - '' => '橔', - '' => '橯', - '' => '橩', - '' => '橠', - '' => '樼', - '' => '橞', - '' => '橖', - '' => '橕', - '' => '橍', - '' => '橎', - '' => '橆', - '' => '歕', - '' => '歔', - '' => '歖', - '' => '殧', - '' => '殪', - '' => '殫', - '' => '毈', - '' => '毇', - '' => '氄', - '' => '氃', - '' => '氆', - '' => '澭', - '' => '濋', - '' => '澣', - '' => '濇', - '' => '澼', - '' => '濎', - '' => '濈', - '' => '潞', - '' => '濄', - '' => '澽', - '' => '澞', - '' => '濊', - '' => '澨', - '' => '瀄', - '' => '澥', - '' => '澮', - '' => '澺', - '' => '澬', - '' => '澪', - '' => '濏', - '' => '澿', - '' => '澸', - '@' => '澢', - 'A' => '濉', - 'B' => '澫', - 'C' => '濍', - 'D' => '澯', - 'E' => '澲', - 'F' => '澰', - 'G' => '燅', - 'H' => '燂', - 'I' => '熿', - 'J' => '熸', - 'K' => '燖', - 'L' => '燀', - 'M' => '燁', - 'N' => '燋', - 'O' => '燔', - 'P' => '燊', - 'Q' => '燇', - 'R' => '燏', - 'S' => '熽', - 'T' => '燘', - 'U' => '熼', - 'V' => '燆', - 'W' => '燚', - 'X' => '燛', - 'Y' => '犝', - 'Z' => '犞', - '[' => '獩', - '\\' => '獦', - ']' => '獧', - '^' => '獬', - '_' => '獥', - '`' => '獫', - 'a' => '獪', - 'b' => '瑿', - 'c' => '璚', - 'd' => '璠', - 'e' => '璔', - 'f' => '璒', - 'g' => '璕', - 'h' => '璡', - 'i' => '甋', - 'j' => '疀', - 'k' => '瘯', - 'l' => '瘭', - 'm' => '瘱', - 'n' => '瘽', - 'o' => '瘳', - 'p' => '瘼', - 'q' => '瘵', - 'r' => '瘲', - 's' => '瘰', - 't' => '皻', - 'u' => '盦', - 'v' => '瞚', - 'w' => '瞝', - 'x' => '瞡', - 'y' => '瞜', - 'z' => '瞛', - '{' => '瞢', - '|' => '瞣', - '}' => '瞕', - '~' => '瞙', - '' => '瞗', - '' => '磝', - '' => '磩', - '' => '磥', - '' => '磪', - '' => '磞', - '' => '磣', - '' => '磛', - '' => '磡', - '' => '磢', - '' => '磭', - '' => '磟', - '' => '磠', - '' => '禤', - '' => '穄', - '' => '穈', - '' => '穇', - '' => '窶', - '' => '窸', - '' => '窵', - '' => '窱', - '' => '窷', - '' => '篞', - '' => '篣', - '' => '篧', - '' => '篝', - '' => '篕', - '' => '篥', - '' => '篚', - '' => '篨', - '' => '篹', - '' => '篔', - '' => '篪', - '' => '篢', - '' => '篜', - '' => '篫', - '' => '篘', - '' => '篟', - '' => '糒', - '' => '糔', - '' => '糗', - '' => '糐', - '' => '糑', - '' => '縒', - '' => '縡', - '' => '縗', - '' => '縌', - '' => '縟', - '' => '縠', - '' => '縓', - '' => '縎', - '' => '縜', - '' => '縕', - '' => '縚', - '' => '縢', - '' => '縋', - '' => '縏', - '' => '縖', - '' => '縍', - '' => '縔', - '' => '縥', - '' => '縤', - '' => '罃', - '' => '罻', - '' => '罼', - '' => '罺', - '' => '羱', - '' => '翯', - '' => '耪', - '' => '耩', - '' => '聬', - '' => '膱', - '' => '膦', - '' => '膮', - '' => '膹', - '' => '膵', - '' => '膫', - '' => '膰', - '' => '膬', - '' => '膴', - '' => '膲', - '' => '膷', - '' => '膧', - '' => '臲', - '' => '艕', - '' => '艖', - '' => '艗', - '' => '蕖', - '' => '蕅', - '' => '蕫', - '' => '蕍', - '' => '蕓', - '' => '蕡', - '' => '蕘', - '@' => '蕀', - 'A' => '蕆', - 'B' => '蕤', - 'C' => '蕁', - 'D' => '蕢', - 'E' => '蕄', - 'F' => '蕑', - 'G' => '蕇', - 'H' => '蕣', - 'I' => '蔾', - 'J' => '蕛', - 'K' => '蕱', - 'L' => '蕎', - 'M' => '蕮', - 'N' => '蕵', - 'O' => '蕕', - 'P' => '蕧', - 'Q' => '蕠', - 'R' => '薌', - 'S' => '蕦', - 'T' => '蕝', - 'U' => '蕔', - 'V' => '蕥', - 'W' => '蕬', - 'X' => '虣', - 'Y' => '虥', - 'Z' => '虤', - '[' => '螛', - '\\' => '螏', - ']' => '螗', - '^' => '螓', - '_' => '螒', - '`' => '螈', - 'a' => '螁', - 'b' => '螖', - 'c' => '螘', - 'd' => '蝹', - 'e' => '螇', - 'f' => '螣', - 'g' => '螅', - 'h' => '螐', - 'i' => '螑', - 'j' => '螝', - 'k' => '螄', - 'l' => '螔', - 'm' => '螜', - 'n' => '螚', - 'o' => '螉', - 'p' => '褞', - 'q' => '褦', - 'r' => '褰', - 's' => '褭', - 't' => '褮', - 'u' => '褧', - 'v' => '褱', - 'w' => '褢', - 'x' => '褩', - 'y' => '褣', - 'z' => '褯', - '{' => '褬', - '|' => '褟', - '}' => '觱', - '~' => '諠', - '' => '諢', - '' => '諲', - '' => '諴', - '' => '諵', - '' => '諝', - '' => '謔', - '' => '諤', - '' => '諟', - '' => '諰', - '' => '諈', - '' => '諞', - '' => '諡', - '' => '諨', - '' => '諿', - '' => '諯', - '' => '諻', - '' => '貑', - '' => '貒', - '' => '貐', - '' => '賵', - '' => '賮', - '' => '賱', - '' => '賰', - '' => '賳', - '' => '赬', - '' => '赮', - '' => '趥', - '' => '趧', - '' => '踳', - '' => '踾', - '' => '踸', - '' => '蹀', - '' => '蹅', - '' => '踶', - '' => '踼', - '' => '踽', - '' => '蹁', - '' => '踰', - '' => '踿', - '' => '躽', - '' => '輶', - '' => '輮', - '' => '輵', - '' => '輲', - '' => '輹', - '' => '輷', - '' => '輴', - '' => '遶', - '' => '遹', - '' => '遻', - '' => '邆', - '' => '郺', - '' => '鄳', - '' => '鄵', - '' => '鄶', - '' => '醓', - '' => '醐', - '' => '醑', - '' => '醍', - '' => '醏', - '' => '錧', - '' => '錞', - '' => '錈', - '' => '錟', - '' => '錆', - '' => '錏', - '' => '鍺', - '' => '錸', - '' => '錼', - '' => '錛', - '' => '錣', - '' => '錒', - '' => '錁', - '' => '鍆', - '' => '錭', - '' => '錎', - '' => '錍', - '' => '鋋', - '' => '錝', - '' => '鋺', - '' => '錥', - '' => '錓', - '' => '鋹', - '' => '鋷', - '' => '錴', - '' => '錂', - '' => '錤', - '' => '鋿', - '' => '錩', - '' => '錹', - '' => '錵', - '' => '錪', - '' => '錔', - '' => '錌', - '@' => '錋', - 'A' => '鋾', - 'B' => '錉', - 'C' => '錀', - 'D' => '鋻', - 'E' => '錖', - 'F' => '閼', - 'G' => '闍', - 'H' => '閾', - 'I' => '閹', - 'J' => '閺', - 'K' => '閶', - 'L' => '閿', - 'M' => '閵', - 'N' => '閽', - 'O' => '隩', - 'P' => '雔', - 'Q' => '霋', - 'R' => '霒', - 'S' => '霐', - 'T' => '鞙', - 'U' => '鞗', - 'V' => '鞔', - 'W' => '韰', - 'X' => '韸', - 'Y' => '頵', - 'Z' => '頯', - '[' => '頲', - '\\' => '餤', - ']' => '餟', - '^' => '餧', - '_' => '餩', - '`' => '馞', - 'a' => '駮', - 'b' => '駬', - 'c' => '駥', - 'd' => '駤', - 'e' => '駰', - 'f' => '駣', - 'g' => '駪', - 'h' => '駩', - 'i' => '駧', - 'j' => '骹', - 'k' => '骿', - 'l' => '骴', - 'm' => '骻', - 'n' => '髶', - 'o' => '髺', - 'p' => '髹', - 'q' => '髷', - 'r' => '鬳', - 's' => '鮀', - 't' => '鮅', - 'u' => '鮇', - 'v' => '魼', - 'w' => '魾', - 'x' => '魻', - 'y' => '鮂', - 'z' => '鮓', - '{' => '鮒', - '|' => '鮐', - '}' => '魺', - '~' => '鮕', - '' => '魽', - '' => '鮈', - '' => '鴥', - '' => '鴗', - '' => '鴠', - '' => '鴞', - '' => '鴔', - '' => '鴩', - '' => '鴝', - '' => '鴘', - '' => '鴢', - '' => '鴐', - '' => '鴙', - '' => '鴟', - '' => '麈', - '' => '麆', - '' => '麇', - '' => '麮', - '' => '麭', - '' => '黕', - '' => '黖', - '' => '黺', - '' => '鼒', - '' => '鼽', - '' => '儦', - '' => '儥', - '' => '儢', - '' => '儤', - '' => '儠', - '' => '儩', - '' => '勴', - '' => '嚓', - '' => '嚌', - '' => '嚍', - '' => '嚆', - '' => '嚄', - '' => '嚃', - '' => '噾', - '' => '嚂', - '' => '噿', - '' => '嚁', - '' => '壖', - '' => '壔', - '' => '壏', - '' => '壒', - '' => '嬭', - '' => '嬥', - '' => '嬲', - '' => '嬣', - '' => '嬬', - '' => '嬧', - '' => '嬦', - '' => '嬯', - '' => '嬮', - '' => '孻', - '' => '寱', - '' => '寲', - '' => '嶷', - '' => '幬', - '' => '幪', - '' => '徾', - '' => '徻', - '' => '懃', - '' => '憵', - '' => '憼', - '' => '懧', - '' => '懠', - '' => '懥', - '' => '懤', - '' => '懨', - '' => '懞', - '' => '擯', - '' => '擩', - '' => '擣', - '' => '擫', - '' => '擤', - '' => '擨', - '' => '斁', - '' => '斀', - '' => '斶', - '' => '旚', - '' => '曒', - '' => '檍', - '' => '檖', - '' => '檁', - '' => '檥', - '' => '檉', - '' => '檟', - '' => '檛', - '' => '檡', - '' => '檞', - '' => '檇', - '' => '檓', - '' => '檎', - '@' => '檕', - 'A' => '檃', - 'B' => '檨', - 'C' => '檤', - 'D' => '檑', - 'E' => '橿', - 'F' => '檦', - 'G' => '檚', - 'H' => '檅', - 'I' => '檌', - 'J' => '檒', - 'K' => '歛', - 'L' => '殭', - 'M' => '氉', - 'N' => '濌', - 'O' => '澩', - 'P' => '濴', - 'Q' => '濔', - 'R' => '濣', - 'S' => '濜', - 'T' => '濭', - 'U' => '濧', - 'V' => '濦', - 'W' => '濞', - 'X' => '濲', - 'Y' => '濝', - 'Z' => '濢', - '[' => '濨', - '\\' => '燡', - ']' => '燱', - '^' => '燨', - '_' => '燲', - '`' => '燤', - 'a' => '燰', - 'b' => '燢', - 'c' => '獳', - 'd' => '獮', - 'e' => '獯', - 'f' => '璗', - 'g' => '璲', - 'h' => '璫', - 'i' => '璐', - 'j' => '璪', - 'k' => '璭', - 'l' => '璱', - 'm' => '璥', - 'n' => '璯', - 'o' => '甐', - 'p' => '甑', - 'q' => '甒', - 'r' => '甏', - 's' => '疄', - 't' => '癃', - 'u' => '癈', - 'v' => '癉', - 'w' => '癇', - 'x' => '皤', - 'y' => '盩', - 'z' => '瞵', - '{' => '瞫', - '|' => '瞲', - '}' => '瞷', - '~' => '瞶', - '' => '瞴', - '' => '瞱', - '' => '瞨', - '' => '矰', - '' => '磳', - '' => '磽', - '' => '礂', - '' => '磻', - '' => '磼', - '' => '磲', - '' => '礅', - '' => '磹', - '' => '磾', - '' => '礄', - '' => '禫', - '' => '禨', - '' => '穜', - '' => '穛', - '' => '穖', - '' => '穘', - '' => '穔', - '' => '穚', - '' => '窾', - '' => '竀', - '' => '竁', - '' => '簅', - '' => '簏', - '' => '篲', - '' => '簀', - '' => '篿', - '' => '篻', - '' => '簎', - '' => '篴', - '' => '簋', - '' => '篳', - '' => '簂', - '' => '簉', - '' => '簃', - '' => '簁', - '' => '篸', - '' => '篽', - '' => '簆', - '' => '篰', - '' => '篱', - '' => '簐', - '' => '簊', - '' => '糨', - '' => '縭', - '' => '縼', - '' => '繂', - '' => '縳', - '' => '顈', - '' => '縸', - '' => '縪', - '' => '繉', - '' => '繀', - '' => '繇', - '' => '縩', - '' => '繌', - '' => '縰', - '' => '縻', - '' => '縶', - '' => '繄', - '' => '縺', - '' => '罅', - '' => '罿', - '' => '罾', - '' => '罽', - '' => '翴', - '' => '翲', - '' => '耬', - '' => '膻', - '' => '臄', - '' => '臌', - '' => '臊', - '' => '臅', - '' => '臇', - '' => '膼', - '' => '臩', - '' => '艛', - '' => '艚', - '' => '艜', - '' => '薃', - '' => '薀', - '' => '薏', - '' => '薧', - '' => '薕', - '' => '薠', - '' => '薋', - '' => '薣', - '' => '蕻', - '' => '薤', - '' => '薚', - '' => '薞', - '@' => '蕷', - 'A' => '蕼', - 'B' => '薉', - 'C' => '薡', - 'D' => '蕺', - 'E' => '蕸', - 'F' => '蕗', - 'G' => '薎', - 'H' => '薖', - 'I' => '薆', - 'J' => '薍', - 'K' => '薙', - 'L' => '薝', - 'M' => '薁', - 'N' => '薢', - 'O' => '薂', - 'P' => '薈', - 'Q' => '薅', - 'R' => '蕹', - 'S' => '蕶', - 'T' => '薘', - 'U' => '薐', - 'V' => '薟', - 'W' => '虨', - 'X' => '螾', - 'Y' => '螪', - 'Z' => '螭', - '[' => '蟅', - '\\' => '螰', - ']' => '螬', - '^' => '螹', - '_' => '螵', - '`' => '螼', - 'a' => '螮', - 'b' => '蟉', - 'c' => '蟃', - 'd' => '蟂', - 'e' => '蟌', - 'f' => '螷', - 'g' => '螯', - 'h' => '蟄', - 'i' => '蟊', - 'j' => '螴', - 'k' => '螶', - 'l' => '螿', - 'm' => '螸', - 'n' => '螽', - 'o' => '蟞', - 'p' => '螲', - 'q' => '褵', - 'r' => '褳', - 's' => '褼', - 't' => '褾', - 'u' => '襁', - 'v' => '襒', - 'w' => '褷', - 'x' => '襂', - 'y' => '覭', - 'z' => '覯', - '{' => '覮', - '|' => '觲', - '}' => '觳', - '~' => '謞', - '' => '謘', - '' => '謖', - '' => '謑', - '' => '謅', - '' => '謋', - '' => '謢', - '' => '謏', - '' => '謒', - '' => '謕', - '' => '謇', - '' => '謍', - '' => '謈', - '' => '謆', - '' => '謜', - '' => '謓', - '' => '謚', - '' => '豏', - '' => '豰', - '' => '豲', - '' => '豱', - '' => '豯', - '' => '貕', - '' => '貔', - '' => '賹', - '' => '赯', - '' => '蹎', - '' => '蹍', - '' => '蹓', - '' => '蹐', - '' => '蹌', - '' => '蹇', - '' => '轃', - '' => '轀', - '' => '邅', - '' => '遾', - '' => '鄸', - '' => '醚', - '' => '醢', - '' => '醛', - '' => '醙', - '' => '醟', - '' => '醡', - '' => '醝', - '' => '醠', - '' => '鎡', - '' => '鎃', - '' => '鎯', - '' => '鍤', - '' => '鍖', - '' => '鍇', - '' => '鍼', - '' => '鍘', - '' => '鍜', - '' => '鍶', - '' => '鍉', - '' => '鍐', - '' => '鍑', - '' => '鍠', - '' => '鍭', - '' => '鎏', - '' => '鍌', - '' => '鍪', - '' => '鍹', - '' => '鍗', - '' => '鍕', - '' => '鍒', - '' => '鍏', - '' => '鍱', - '' => '鍷', - '' => '鍻', - '' => '鍡', - '' => '鍞', - '' => '鍣', - '' => '鍧', - '' => '鎀', - '' => '鍎', - '' => '鍙', - '' => '闇', - '' => '闀', - '' => '闉', - '' => '闃', - '' => '闅', - '' => '閷', - '' => '隮', - '' => '隰', - '' => '隬', - '' => '霠', - '' => '霟', - '' => '霘', - '' => '霝', - '' => '霙', - '' => '鞚', - '' => '鞡', - '' => '鞜', - '@' => '鞞', - 'A' => '鞝', - 'B' => '韕', - 'C' => '韔', - 'D' => '韱', - 'E' => '顁', - 'F' => '顄', - 'G' => '顊', - 'H' => '顉', - 'I' => '顅', - 'J' => '顃', - 'K' => '餥', - 'L' => '餫', - 'M' => '餬', - 'N' => '餪', - 'O' => '餳', - 'P' => '餲', - 'Q' => '餯', - 'R' => '餭', - 'S' => '餱', - 'T' => '餰', - 'U' => '馘', - 'V' => '馣', - 'W' => '馡', - 'X' => '騂', - 'Y' => '駺', - 'Z' => '駴', - '[' => '駷', - '\\' => '駹', - ']' => '駸', - '^' => '駶', - '_' => '駻', - '`' => '駽', - 'a' => '駾', - 'b' => '駼', - 'c' => '騃', - 'd' => '骾', - 'e' => '髾', - 'f' => '髽', - 'g' => '鬁', - 'h' => '髼', - 'i' => '魈', - 'j' => '鮚', - 'k' => '鮨', - 'l' => '鮞', - 'm' => '鮛', - 'n' => '鮦', - 'o' => '鮡', - 'p' => '鮥', - 'q' => '鮤', - 'r' => '鮆', - 's' => '鮢', - 't' => '鮠', - 'u' => '鮯', - 'v' => '鴳', - 'w' => '鵁', - 'x' => '鵧', - 'y' => '鴶', - 'z' => '鴮', - '{' => '鴯', - '|' => '鴱', - '}' => '鴸', - '~' => '鴰', - '' => '鵅', - '' => '鵂', - '' => '鵃', - '' => '鴾', - '' => '鴷', - '' => '鵀', - '' => '鴽', - '' => '翵', - '' => '鴭', - '' => '麊', - '' => '麉', - '' => '麍', - '' => '麰', - '' => '黈', - '' => '黚', - '' => '黻', - '' => '黿', - '' => '鼤', - '' => '鼣', - '' => '鼢', - '' => '齔', - '' => '龠', - '' => '儱', - '' => '儭', - '' => '儮', - '' => '嚘', - '' => '嚜', - '' => '嚗', - '' => '嚚', - '' => '嚝', - '' => '嚙', - '' => '奰', - '' => '嬼', - '' => '屩', - '' => '屪', - '' => '巀', - '' => '幭', - '' => '幮', - '' => '懘', - '' => '懟', - '' => '懭', - '' => '懮', - '' => '懱', - '' => '懪', - '' => '懰', - '' => '懫', - '' => '懖', - '' => '懩', - '' => '擿', - '' => '攄', - '' => '擽', - '' => '擸', - '' => '攁', - '' => '攃', - '' => '擼', - '' => '斔', - '' => '旛', - '' => '曚', - '' => '曛', - '' => '曘', - '' => '櫅', - '' => '檹', - '' => '檽', - '' => '櫡', - '' => '櫆', - '' => '檺', - '' => '檶', - '' => '檷', - '' => '櫇', - '' => '檴', - '' => '檭', - '' => '歞', - '' => '毉', - '' => '氋', - '' => '瀇', - '' => '瀌', - '' => '瀍', - '' => '瀁', - '' => '瀅', - '' => '瀔', - '' => '瀎', - '' => '濿', - '' => '瀀', - '' => '濻', - '' => '瀦', - '' => '濼', - '' => '濷', - '' => '瀊', - '' => '爁', - '' => '燿', - '' => '燹', - '' => '爃', - '' => '燽', - '' => '獶', - '@' => '璸', - 'A' => '瓀', - 'B' => '璵', - 'C' => '瓁', - 'D' => '璾', - 'E' => '璶', - 'F' => '璻', - 'G' => '瓂', - 'H' => '甔', - 'I' => '甓', - 'J' => '癜', - 'K' => '癤', - 'L' => '癙', - 'M' => '癐', - 'N' => '癓', - 'O' => '癗', - 'P' => '癚', - 'Q' => '皦', - 'R' => '皽', - 'S' => '盬', - 'T' => '矂', - 'U' => '瞺', - 'V' => '磿', - 'W' => '礌', - 'X' => '礓', - 'Y' => '礔', - 'Z' => '礉', - '[' => '礐', - '\\' => '礒', - ']' => '礑', - '^' => '禭', - '_' => '禬', - '`' => '穟', - 'a' => '簜', - 'b' => '簩', - 'c' => '簙', - 'd' => '簠', - 'e' => '簟', - 'f' => '簭', - 'g' => '簝', - 'h' => '簦', - 'i' => '簨', - 'j' => '簢', - 'k' => '簥', - 'l' => '簰', - 'm' => '繜', - 'n' => '繐', - 'o' => '繖', - 'p' => '繣', - 'q' => '繘', - 'r' => '繢', - 's' => '繟', - 't' => '繑', - 'u' => '繠', - 'v' => '繗', - 'w' => '繓', - 'x' => '羵', - 'y' => '羳', - 'z' => '翷', - '{' => '翸', - '|' => '聵', - '}' => '臑', - '~' => '臒', - '' => '臐', - '' => '艟', - '' => '艞', - '' => '薴', - '' => '藆', - '' => '藀', - '' => '藃', - '' => '藂', - '' => '薳', - '' => '薵', - '' => '薽', - '' => '藇', - '' => '藄', - '' => '薿', - '' => '藋', - '' => '藎', - '' => '藈', - '' => '藅', - '' => '薱', - '' => '薶', - '' => '藒', - '' => '蘤', - '' => '薸', - '' => '薷', - '' => '薾', - '' => '虩', - '' => '蟧', - '' => '蟦', - '' => '蟢', - '' => '蟛', - '' => '蟫', - '' => '蟪', - '' => '蟥', - '' => '蟟', - '' => '蟳', - '' => '蟤', - '' => '蟔', - '' => '蟜', - '' => '蟓', - '' => '蟭', - '' => '蟘', - '' => '蟣', - '' => '螤', - '' => '蟗', - '' => '蟙', - '' => '蠁', - '' => '蟴', - '' => '蟨', - '' => '蟝', - '' => '襓', - '' => '襋', - '' => '襏', - '' => '襌', - '' => '襆', - '' => '襐', - '' => '襑', - '' => '襉', - '' => '謪', - '' => '謧', - '' => '謣', - '' => '謳', - '' => '謰', - '' => '謵', - '' => '譇', - '' => '謯', - '' => '謼', - '' => '謾', - '' => '謱', - '' => '謥', - '' => '謷', - '' => '謦', - '' => '謶', - '' => '謮', - '' => '謤', - '' => '謻', - '' => '謽', - '' => '謺', - '' => '豂', - '' => '豵', - '' => '貙', - '' => '貘', - '' => '貗', - '' => '賾', - '' => '贄', - '' => '贂', - '' => '贀', - '' => '蹜', - '' => '蹢', - '' => '蹠', - '' => '蹗', - '' => '蹖', - '' => '蹞', - '' => '蹥', - '' => '蹧', - '@' => '蹛', - 'A' => '蹚', - 'B' => '蹡', - 'C' => '蹝', - 'D' => '蹩', - 'E' => '蹔', - 'F' => '轆', - 'G' => '轇', - 'H' => '轈', - 'I' => '轋', - 'J' => '鄨', - 'K' => '鄺', - 'L' => '鄻', - 'M' => '鄾', - 'N' => '醨', - 'O' => '醥', - 'P' => '醧', - 'Q' => '醯', - 'R' => '醪', - 'S' => '鎵', - 'T' => '鎌', - 'U' => '鎒', - 'V' => '鎷', - 'W' => '鎛', - 'X' => '鎝', - 'Y' => '鎉', - 'Z' => '鎧', - '[' => '鎎', - '\\' => '鎪', - ']' => '鎞', - '^' => '鎦', - '_' => '鎕', - '`' => '鎈', - 'a' => '鎙', - 'b' => '鎟', - 'c' => '鎍', - 'd' => '鎱', - 'e' => '鎑', - 'f' => '鎲', - 'g' => '鎤', - 'h' => '鎨', - 'i' => '鎴', - 'j' => '鎣', - 'k' => '鎥', - 'l' => '闒', - 'm' => '闓', - 'n' => '闑', - 'o' => '隳', - 'p' => '雗', - 'q' => '雚', - 'r' => '巂', - 's' => '雟', - 't' => '雘', - 'u' => '雝', - 'v' => '霣', - 'w' => '霢', - 'x' => '霥', - 'y' => '鞬', - 'z' => '鞮', - '{' => '鞨', - '|' => '鞫', - '}' => '鞤', - '~' => '鞪', - '' => '鞢', - '' => '鞥', - '' => '韗', - '' => '韙', - '' => '韖', - '' => '韘', - '' => '韺', - '' => '顐', - '' => '顑', - '' => '顒', - '' => '颸', - '' => '饁', - '' => '餼', - '' => '餺', - '' => '騏', - '' => '騋', - '' => '騉', - '' => '騍', - '' => '騄', - '' => '騑', - '' => '騊', - '' => '騅', - '' => '騇', - '' => '騆', - '' => '髀', - '' => '髜', - '' => '鬈', - '' => '鬄', - '' => '鬅', - '' => '鬩', - '' => '鬵', - '' => '魊', - '' => '魌', - '' => '魋', - '' => '鯇', - '' => '鯆', - '' => '鯃', - '' => '鮿', - '' => '鯁', - '' => '鮵', - '' => '鮸', - '' => '鯓', - '' => '鮶', - '' => '鯄', - '' => '鮹', - '' => '鮽', - '' => '鵜', - '' => '鵓', - '' => '鵏', - '' => '鵊', - '' => '鵛', - '' => '鵋', - '' => '鵙', - '' => '鵖', - '' => '鵌', - '' => '鵗', - '' => '鵒', - '' => '鵔', - '' => '鵟', - '' => '鵘', - '' => '鵚', - '' => '麎', - '' => '麌', - '' => '黟', - '' => '鼁', - '' => '鼀', - '' => '鼖', - '' => '鼥', - '' => '鼫', - '' => '鼪', - '' => '鼩', - '' => '鼨', - '' => '齌', - '' => '齕', - '' => '儴', - '' => '儵', - '' => '劖', - '' => '勷', - '' => '厴', - '' => '嚫', - '' => '嚭', - '' => '嚦', - '' => '嚧', - '' => '嚪', - '' => '嚬', - '' => '壚', - '' => '壝', - '' => '壛', - '' => '夒', - '' => '嬽', - '' => '嬾', - '' => '嬿', - '' => '巃', - '' => '幰', - '@' => '徿', - 'A' => '懻', - 'B' => '攇', - 'C' => '攐', - 'D' => '攍', - 'E' => '攉', - 'F' => '攌', - 'G' => '攎', - 'H' => '斄', - 'I' => '旞', - 'J' => '旝', - 'K' => '曞', - 'L' => '櫧', - 'M' => '櫠', - 'N' => '櫌', - 'O' => '櫑', - 'P' => '櫙', - 'Q' => '櫋', - 'R' => '櫟', - 'S' => '櫜', - 'T' => '櫐', - 'U' => '櫫', - 'V' => '櫏', - 'W' => '櫍', - 'X' => '櫞', - 'Y' => '歠', - 'Z' => '殰', - '[' => '氌', - '\\' => '瀙', - ']' => '瀧', - '^' => '瀠', - '_' => '瀖', - '`' => '瀫', - 'a' => '瀡', - 'b' => '瀢', - 'c' => '瀣', - 'd' => '瀩', - 'e' => '瀗', - 'f' => '瀤', - 'g' => '瀜', - 'h' => '瀪', - 'i' => '爌', - 'j' => '爊', - 'k' => '爇', - 'l' => '爂', - 'm' => '爅', - 'n' => '犥', - 'o' => '犦', - 'p' => '犤', - 'q' => '犣', - 'r' => '犡', - 's' => '瓋', - 't' => '瓅', - 'u' => '璷', - 'v' => '瓃', - 'w' => '甖', - 'x' => '癠', - 'y' => '矉', - 'z' => '矊', - '{' => '矄', - '|' => '矱', - '}' => '礝', - '~' => '礛', - '' => '礡', - '' => '礜', - '' => '礗', - '' => '礞', - '' => '禰', - '' => '穧', - '' => '穨', - '' => '簳', - '' => '簼', - '' => '簹', - '' => '簬', - '' => '簻', - '' => '糬', - '' => '糪', - '' => '繶', - '' => '繵', - '' => '繸', - '' => '繰', - '' => '繷', - '' => '繯', - '' => '繺', - '' => '繲', - '' => '繴', - '' => '繨', - '' => '罋', - '' => '罊', - '' => '羃', - '' => '羆', - '' => '羷', - '' => '翽', - '' => '翾', - '' => '聸', - '' => '臗', - '' => '臕', - '' => '艤', - '' => '艡', - '' => '艣', - '' => '藫', - '' => '藱', - '' => '藭', - '' => '藙', - '' => '藡', - '' => '藨', - '' => '藚', - '' => '藗', - '' => '藬', - '' => '藲', - '' => '藸', - '' => '藘', - '' => '藟', - '' => '藣', - '' => '藜', - '' => '藑', - '' => '藰', - '' => '藦', - '' => '藯', - '' => '藞', - '' => '藢', - '' => '蠀', - '' => '蟺', - '' => '蠃', - '' => '蟶', - '' => '蟷', - '' => '蠉', - '' => '蠌', - '' => '蠋', - '' => '蠆', - '' => '蟼', - '' => '蠈', - '' => '蟿', - '' => '蠊', - '' => '蠂', - '' => '襢', - '' => '襚', - '' => '襛', - '' => '襗', - '' => '襡', - '' => '襜', - '' => '襘', - '' => '襝', - '' => '襙', - '' => '覈', - '' => '覷', - '' => '覶', - '' => '觶', - '' => '譐', - '' => '譈', - '' => '譊', - '' => '譀', - '' => '譓', - '' => '譖', - '' => '譔', - '' => '譋', - '' => '譕', - '@' => '譑', - 'A' => '譂', - 'B' => '譒', - 'C' => '譗', - 'D' => '豃', - 'E' => '豷', - 'F' => '豶', - 'G' => '貚', - 'H' => '贆', - 'I' => '贇', - 'J' => '贉', - 'K' => '趬', - 'L' => '趪', - 'M' => '趭', - 'N' => '趫', - 'O' => '蹭', - 'P' => '蹸', - 'Q' => '蹳', - 'R' => '蹪', - 'S' => '蹯', - 'T' => '蹻', - 'U' => '軂', - 'V' => '轒', - 'W' => '轑', - 'X' => '轏', - 'Y' => '轐', - 'Z' => '轓', - '[' => '辴', - '\\' => '酀', - ']' => '鄿', - '^' => '醰', - '_' => '醭', - '`' => '鏞', - 'a' => '鏇', - 'b' => '鏏', - 'c' => '鏂', - 'd' => '鏚', - 'e' => '鏐', - 'f' => '鏹', - 'g' => '鏬', - 'h' => '鏌', - 'i' => '鏙', - 'j' => '鎩', - 'k' => '鏦', - 'l' => '鏊', - 'm' => '鏔', - 'n' => '鏮', - 'o' => '鏣', - 'p' => '鏕', - 'q' => '鏄', - 'r' => '鏎', - 's' => '鏀', - 't' => '鏒', - 'u' => '鏧', - 'v' => '镽', - 'w' => '闚', - 'x' => '闛', - 'y' => '雡', - 'z' => '霩', - '{' => '霫', - '|' => '霬', - '}' => '霨', - '~' => '霦', - '' => '鞳', - '' => '鞷', - '' => '鞶', - '' => '韝', - '' => '韞', - '' => '韟', - '' => '顜', - '' => '顙', - '' => '顝', - '' => '顗', - '' => '颿', - '' => '颽', - '' => '颻', - '' => '颾', - '' => '饈', - '' => '饇', - '' => '饃', - '' => '馦', - '' => '馧', - '' => '騚', - '' => '騕', - '' => '騥', - '' => '騝', - '' => '騤', - '' => '騛', - '' => '騢', - '' => '騠', - '' => '騧', - '' => '騣', - '' => '騞', - '' => '騜', - '' => '騔', - '' => '髂', - '' => '鬋', - '' => '鬊', - '' => '鬎', - '' => '鬌', - '' => '鬷', - '' => '鯪', - '' => '鯫', - '' => '鯠', - '' => '鯞', - '' => '鯤', - '' => '鯦', - '' => '鯢', - '' => '鯰', - '' => '鯔', - '' => '鯗', - '' => '鯬', - '' => '鯜', - '' => '鯙', - '' => '鯥', - '' => '鯕', - '' => '鯡', - '' => '鯚', - '' => '鵷', - '' => '鶁', - '' => '鶊', - '' => '鶄', - '' => '鶈', - '' => '鵱', - '' => '鶀', - '' => '鵸', - '' => '鶆', - '' => '鶋', - '' => '鶌', - '' => '鵽', - '' => '鵫', - '' => '鵴', - '' => '鵵', - '' => '鵰', - '' => '鵩', - '' => '鶅', - '' => '鵳', - '' => '鵻', - '' => '鶂', - '' => '鵯', - '' => '鵹', - '' => '鵿', - '' => '鶇', - '' => '鵨', - '' => '麔', - '' => '麑', - '' => '黀', - '' => '黼', - '' => '鼭', - '' => '齀', - '' => '齁', - '' => '齍', - '' => '齖', - '' => '齗', - '' => '齘', - '' => '匷', - '' => '嚲', - '@' => '嚵', - 'A' => '嚳', - 'B' => '壣', - 'C' => '孅', - 'D' => '巆', - 'E' => '巇', - 'F' => '廮', - 'G' => '廯', - 'H' => '忀', - 'I' => '忁', - 'J' => '懹', - 'K' => '攗', - 'L' => '攖', - 'M' => '攕', - 'N' => '攓', - 'O' => '旟', - 'P' => '曨', - 'Q' => '曣', - 'R' => '曤', - 'S' => '櫳', - 'T' => '櫰', - 'U' => '櫪', - 'V' => '櫨', - 'W' => '櫹', - 'X' => '櫱', - 'Y' => '櫮', - 'Z' => '櫯', - '[' => '瀼', - '\\' => '瀵', - ']' => '瀯', - '^' => '瀷', - '_' => '瀴', - '`' => '瀱', - 'a' => '灂', - 'b' => '瀸', - 'c' => '瀿', - 'd' => '瀺', - 'e' => '瀹', - 'f' => '灀', - 'g' => '瀻', - 'h' => '瀳', - 'i' => '灁', - 'j' => '爓', - 'k' => '爔', - 'l' => '犨', - 'm' => '獽', - 'n' => '獼', - 'o' => '璺', - 'p' => '皫', - 'q' => '皪', - 'r' => '皾', - 's' => '盭', - 't' => '矌', - 'u' => '矎', - 'v' => '矏', - 'w' => '矍', - 'x' => '矲', - 'y' => '礥', - 'z' => '礣', - '{' => '礧', - '|' => '礨', - '}' => '礤', - '~' => '礩', - '' => '禲', - '' => '穮', - '' => '穬', - '' => '穭', - '' => '竷', - '' => '籉', - '' => '籈', - '' => '籊', - '' => '籇', - '' => '籅', - '' => '糮', - '' => '繻', - '' => '繾', - '' => '纁', - '' => '纀', - '' => '羺', - '' => '翿', - '' => '聹', - '' => '臛', - '' => '臙', - '' => '舋', - '' => '艨', - '' => '艩', - '' => '蘢', - '' => '藿', - '' => '蘁', - '' => '藾', - '' => '蘛', - '' => '蘀', - '' => '藶', - '' => '蘄', - '' => '蘉', - '' => '蘅', - '' => '蘌', - '' => '藽', - '' => '蠙', - '' => '蠐', - '' => '蠑', - '' => '蠗', - '' => '蠓', - '' => '蠖', - '' => '襣', - '' => '襦', - '' => '覹', - '' => '觷', - '' => '譠', - '' => '譪', - '' => '譝', - '' => '譨', - '' => '譣', - '' => '譥', - '' => '譧', - '' => '譭', - '' => '趮', - '' => '躆', - '' => '躈', - '' => '躄', - '' => '轙', - '' => '轖', - '' => '轗', - '' => '轕', - '' => '轘', - '' => '轚', - '' => '邍', - '' => '酃', - '' => '酁', - '' => '醷', - '' => '醵', - '' => '醲', - '' => '醳', - '' => '鐋', - '' => '鐓', - '' => '鏻', - '' => '鐠', - '' => '鐏', - '' => '鐔', - '' => '鏾', - '' => '鐕', - '' => '鐐', - '' => '鐨', - '' => '鐙', - '' => '鐍', - '' => '鏵', - '' => '鐀', - '' => '鏷', - '' => '鐇', - '' => '鐎', - '' => '鐖', - '' => '鐒', - '' => '鏺', - '' => '鐉', - '' => '鏸', - '' => '鐊', - '' => '鏿', - '@' => '鏼', - 'A' => '鐌', - 'B' => '鏶', - 'C' => '鐑', - 'D' => '鐆', - 'E' => '闞', - 'F' => '闠', - 'G' => '闟', - 'H' => '霮', - 'I' => '霯', - 'J' => '鞹', - 'K' => '鞻', - 'L' => '韽', - 'M' => '韾', - 'N' => '顠', - 'O' => '顢', - 'P' => '顣', - 'Q' => '顟', - 'R' => '飁', - 'S' => '飂', - 'T' => '饐', - 'U' => '饎', - 'V' => '饙', - 'W' => '饌', - 'X' => '饋', - 'Y' => '饓', - 'Z' => '騲', - '[' => '騴', - '\\' => '騱', - ']' => '騬', - '^' => '騪', - '_' => '騶', - '`' => '騩', - 'a' => '騮', - 'b' => '騸', - 'c' => '騭', - 'd' => '髇', - 'e' => '髊', - 'f' => '髆', - 'g' => '鬐', - 'h' => '鬒', - 'i' => '鬑', - 'j' => '鰋', - 'k' => '鰈', - 'l' => '鯷', - 'm' => '鰅', - 'n' => '鰒', - 'o' => '鯸', - 'p' => '鱀', - 'q' => '鰇', - 'r' => '鰎', - 's' => '鰆', - 't' => '鰗', - 'u' => '鰔', - 'v' => '鰉', - 'w' => '鶟', - 'x' => '鶙', - 'y' => '鶤', - 'z' => '鶝', - '{' => '鶒', - '|' => '鶘', - '}' => '鶐', - '~' => '鶛', - '' => '鶠', - '' => '鶔', - '' => '鶜', - '' => '鶪', - '' => '鶗', - '' => '鶡', - '' => '鶚', - '' => '鶢', - '' => '鶨', - '' => '鶞', - '' => '鶣', - '' => '鶿', - '' => '鶩', - '' => '鶖', - '' => '鶦', - '' => '鶧', - '' => '麙', - '' => '麛', - '' => '麚', - '' => '黥', - '' => '黤', - '' => '黧', - '' => '黦', - '' => '鼰', - '' => '鼮', - '' => '齛', - '' => '齠', - '' => '齞', - '' => '齝', - '' => '齙', - '' => '龑', - '' => '儺', - '' => '儹', - '' => '劘', - '' => '劗', - '' => '囃', - '' => '嚽', - '' => '嚾', - '' => '孈', - '' => '孇', - '' => '巋', - '' => '巏', - '' => '廱', - '' => '懽', - '' => '攛', - '' => '欂', - '' => '櫼', - '' => '欃', - '' => '櫸', - '' => '欀', - '' => '灃', - '' => '灄', - '' => '灊', - '' => '灈', - '' => '灉', - '' => '灅', - '' => '灆', - '' => '爝', - '' => '爚', - '' => '爙', - '' => '獾', - '' => '甗', - '' => '癪', - '' => '矐', - '' => '礭', - '' => '礱', - '' => '礯', - '' => '籔', - '' => '籓', - '' => '糲', - '' => '纊', - '' => '纇', - '' => '纈', - '' => '纋', - '' => '纆', - '' => '纍', - '' => '罍', - '' => '羻', - '' => '耰', - '' => '臝', - '' => '蘘', - '' => '蘪', - '' => '蘦', - '' => '蘟', - '' => '蘣', - '' => '蘜', - '' => '蘙', - '' => '蘧', - '' => '蘮', - '' => '蘡', - '' => '蘠', - '' => '蘩', - '' => '蘞', - '' => '蘥', - '@' => '蠩', - 'A' => '蠝', - 'B' => '蠛', - 'C' => '蠠', - 'D' => '蠤', - 'E' => '蠜', - 'F' => '蠫', - 'G' => '衊', - 'H' => '襭', - 'I' => '襩', - 'J' => '襮', - 'K' => '襫', - 'L' => '觺', - 'M' => '譹', - 'N' => '譸', - 'O' => '譅', - 'P' => '譺', - 'Q' => '譻', - 'R' => '贐', - 'S' => '贔', - 'T' => '趯', - 'U' => '躎', - 'V' => '躌', - 'W' => '轞', - 'X' => '轛', - 'Y' => '轝', - 'Z' => '酆', - '[' => '酄', - '\\' => '酅', - ']' => '醹', - '^' => '鐿', - '_' => '鐻', - '`' => '鐶', - 'a' => '鐩', - 'b' => '鐽', - 'c' => '鐼', - 'd' => '鐰', - 'e' => '鐹', - 'f' => '鐪', - 'g' => '鐷', - 'h' => '鐬', - 'i' => '鑀', - 'j' => '鐱', - 'k' => '闥', - 'l' => '闤', - 'm' => '闣', - 'n' => '霵', - 'o' => '霺', - 'p' => '鞿', - 'q' => '韡', - 'r' => '顤', - 's' => '飉', - 't' => '飆', - 'u' => '飀', - 'v' => '饘', - 'w' => '饖', - 'x' => '騹', - 'y' => '騽', - 'z' => '驆', - '{' => '驄', - '|' => '驂', - '}' => '驁', - '~' => '騺', - '' => '騿', - '' => '髍', - '' => '鬕', - '' => '鬗', - '' => '鬘', - '' => '鬖', - '' => '鬺', - '' => '魒', - '' => '鰫', - '' => '鰝', - '' => '鰜', - '' => '鰬', - '' => '鰣', - '' => '鰨', - '' => '鰩', - '' => '鰤', - '' => '鰡', - '' => '鶷', - '' => '鶶', - '' => '鶼', - '' => '鷁', - '' => '鷇', - '' => '鷊', - '' => '鷏', - '' => '鶾', - '' => '鷅', - '' => '鷃', - '' => '鶻', - '' => '鶵', - '' => '鷎', - '' => '鶹', - '' => '鶺', - '' => '鶬', - '' => '鷈', - '' => '鶱', - '' => '鶭', - '' => '鷌', - '' => '鶳', - '' => '鷍', - '' => '鶲', - '' => '鹺', - '' => '麜', - '' => '黫', - '' => '黮', - '' => '黭', - '' => '鼛', - '' => '鼘', - '' => '鼚', - '' => '鼱', - '' => '齎', - '' => '齥', - '' => '齤', - '' => '龒', - '' => '亹', - '' => '囆', - '' => '囅', - '' => '囋', - '' => '奱', - '' => '孋', - '' => '孌', - '' => '巕', - '' => '巑', - '' => '廲', - '' => '攡', - '' => '攠', - '' => '攦', - '' => '攢', - '' => '欋', - '' => '欈', - '' => '欉', - '' => '氍', - '' => '灕', - '' => '灖', - '' => '灗', - '' => '灒', - '' => '爞', - '' => '爟', - '' => '犩', - '' => '獿', - '' => '瓘', - '' => '瓕', - '' => '瓙', - '' => '瓗', - '' => '癭', - '' => '皭', - '' => '礵', - '' => '禴', - '' => '穰', - '' => '穱', - '' => '籗', - '' => '籜', - '' => '籙', - '' => '籛', - '' => '籚', - '@' => '糴', - 'A' => '糱', - 'B' => '纑', - 'C' => '罏', - 'D' => '羇', - 'E' => '臞', - 'F' => '艫', - 'G' => '蘴', - 'H' => '蘵', - 'I' => '蘳', - 'J' => '蘬', - 'K' => '蘲', - 'L' => '蘶', - 'M' => '蠬', - 'N' => '蠨', - 'O' => '蠦', - 'P' => '蠪', - 'Q' => '蠥', - 'R' => '襱', - 'S' => '覿', - 'T' => '覾', - 'U' => '觻', - 'V' => '譾', - 'W' => '讄', - 'X' => '讂', - 'Y' => '讆', - 'Z' => '讅', - '[' => '譿', - '\\' => '贕', - ']' => '躕', - '^' => '躔', - '_' => '躚', - '`' => '躒', - 'a' => '躐', - 'b' => '躖', - 'c' => '躗', - 'd' => '轠', - 'e' => '轢', - 'f' => '酇', - 'g' => '鑌', - 'h' => '鑐', - 'i' => '鑊', - 'j' => '鑋', - 'k' => '鑏', - 'l' => '鑇', - 'm' => '鑅', - 'n' => '鑈', - 'o' => '鑉', - 'p' => '鑆', - 'q' => '霿', - 'r' => '韣', - 's' => '顪', - 't' => '顩', - 'u' => '飋', - 'v' => '饔', - 'w' => '饛', - 'x' => '驎', - 'y' => '驓', - 'z' => '驔', - '{' => '驌', - '|' => '驏', - '}' => '驈', - '~' => '驊', - '' => '驉', - '' => '驒', - '' => '驐', - '' => '髐', - '' => '鬙', - '' => '鬫', - '' => '鬻', - '' => '魖', - '' => '魕', - '' => '鱆', - '' => '鱈', - '' => '鰿', - '' => '鱄', - '' => '鰹', - '' => '鰳', - '' => '鱁', - '' => '鰼', - '' => '鰷', - '' => '鰴', - '' => '鰲', - '' => '鰽', - '' => '鰶', - '' => '鷛', - '' => '鷒', - '' => '鷞', - '' => '鷚', - '' => '鷋', - '' => '鷐', - '' => '鷜', - '' => '鷑', - '' => '鷟', - '' => '鷩', - '' => '鷙', - '' => '鷘', - '' => '鷖', - '' => '鷵', - '' => '鷕', - '' => '鷝', - '' => '麶', - '' => '黰', - '' => '鼵', - '' => '鼳', - '' => '鼲', - '' => '齂', - '' => '齫', - '' => '龕', - '' => '龢', - '' => '儽', - '' => '劙', - '' => '壨', - '' => '壧', - '' => '奲', - '' => '孍', - '' => '巘', - '' => '蠯', - '' => '彏', - '' => '戁', - '' => '戃', - '' => '戄', - '' => '攩', - '' => '攥', - '' => '斖', - '' => '曫', - '' => '欑', - '' => '欒', - '' => '欏', - '' => '毊', - '' => '灛', - '' => '灚', - '' => '爢', - '' => '玂', - '' => '玁', - '' => '玃', - '' => '癰', - '' => '矔', - '' => '籧', - '' => '籦', - '' => '纕', - '' => '艬', - '' => '蘺', - '' => '虀', - '' => '蘹', - '' => '蘼', - '' => '蘱', - '' => '蘻', - '' => '蘾', - '' => '蠰', - '' => '蠲', - '' => '蠮', - '' => '蠳', - '' => '襶', - '' => '襴', - '' => '襳', - '' => '觾', - '@' => '讌', - 'A' => '讎', - 'B' => '讋', - 'C' => '讈', - 'D' => '豅', - 'E' => '贙', - 'F' => '躘', - 'G' => '轤', - 'H' => '轣', - 'I' => '醼', - 'J' => '鑢', - 'K' => '鑕', - 'L' => '鑝', - 'M' => '鑗', - 'N' => '鑞', - 'O' => '韄', - 'P' => '韅', - 'Q' => '頀', - 'R' => '驖', - 'S' => '驙', - 'T' => '鬞', - 'U' => '鬟', - 'V' => '鬠', - 'W' => '鱒', - 'X' => '鱘', - 'Y' => '鱐', - 'Z' => '鱊', - '[' => '鱍', - '\\' => '鱋', - ']' => '鱕', - '^' => '鱙', - '_' => '鱌', - '`' => '鱎', - 'a' => '鷻', - 'b' => '鷷', - 'c' => '鷯', - 'd' => '鷣', - 'e' => '鷫', - 'f' => '鷸', - 'g' => '鷤', - 'h' => '鷶', - 'i' => '鷡', - 'j' => '鷮', - 'k' => '鷦', - 'l' => '鷲', - 'm' => '鷰', - 'n' => '鷢', - 'o' => '鷬', - 'p' => '鷴', - 'q' => '鷳', - 'r' => '鷨', - 's' => '鷭', - 't' => '黂', - 'u' => '黐', - 'v' => '黲', - 'w' => '黳', - 'x' => '鼆', - 'y' => '鼜', - 'z' => '鼸', - '{' => '鼷', - '|' => '鼶', - '}' => '齃', - '~' => '齏', - '' => '齱', - '' => '齰', - '' => '齮', - '' => '齯', - '' => '囓', - '' => '囍', - '' => '孎', - '' => '屭', - '' => '攭', - '' => '曭', - '' => '曮', - '' => '欓', - '' => '灟', - '' => '灡', - '' => '灝', - '' => '灠', - '' => '爣', - '' => '瓛', - '' => '瓥', - '' => '矕', - '' => '礸', - '' => '禷', - '' => '禶', - '' => '籪', - '' => '纗', - '' => '羉', - '' => '艭', - '' => '虃', - '' => '蠸', - '' => '蠷', - '' => '蠵', - '' => '衋', - '' => '讔', - '' => '讕', - '' => '躞', - '' => '躟', - '' => '躠', - '' => '躝', - '' => '醾', - '' => '醽', - '' => '釂', - '' => '鑫', - '' => '鑨', - '' => '鑩', - '' => '雥', - '' => '靆', - '' => '靃', - '' => '靇', - '' => '韇', - '' => '韥', - '' => '驞', - '' => '髕', - '' => '魙', - '' => '鱣', - '' => '鱧', - '' => '鱦', - '' => '鱢', - '' => '鱞', - '' => '鱠', - '' => '鸂', - '' => '鷾', - '' => '鸇', - '' => '鸃', - '' => '鸆', - '' => '鸅', - '' => '鸀', - '' => '鸁', - '' => '鸉', - '' => '鷿', - '' => '鷽', - '' => '鸄', - '' => '麠', - '' => '鼞', - '' => '齆', - '' => '齴', - '' => '齵', - '' => '齶', - '' => '囔', - '' => '攮', - '' => '斸', - '' => '欘', - '' => '欙', - '' => '欗', - '' => '欚', - '' => '灢', - '' => '爦', - '' => '犪', - '' => '矘', - '' => '矙', - '' => '礹', - '' => '籩', - '' => '籫', - '' => '糶', - '' => '纚', - '@' => '纘', - 'A' => '纛', - 'B' => '纙', - 'C' => '臠', - 'D' => '臡', - 'E' => '虆', - 'F' => '虇', - 'G' => '虈', - 'H' => '襹', - 'I' => '襺', - 'J' => '襼', - 'K' => '襻', - 'L' => '觿', - 'M' => '讘', - 'N' => '讙', - 'O' => '躥', - 'P' => '躤', - 'Q' => '躣', - 'R' => '鑮', - 'S' => '鑭', - 'T' => '鑯', - 'U' => '鑱', - 'V' => '鑳', - 'W' => '靉', - 'X' => '顲', - 'Y' => '饟', - 'Z' => '鱨', - '[' => '鱮', - '\\' => '鱭', - ']' => '鸋', - '^' => '鸍', - '_' => '鸐', - '`' => '鸏', - 'a' => '鸒', - 'b' => '鸑', - 'c' => '麡', - 'd' => '黵', - 'e' => '鼉', - 'f' => '齇', - 'g' => '齸', - 'h' => '齻', - 'i' => '齺', - 'j' => '齹', - 'k' => '圞', - 'l' => '灦', - 'm' => '籯', - 'n' => '蠼', - 'o' => '趲', - 'p' => '躦', - 'q' => '釃', - 'r' => '鑴', - 's' => '鑸', - 't' => '鑶', - 'u' => '鑵', - 'v' => '驠', - 'w' => '鱴', - 'x' => '鱳', - 'y' => '鱱', - 'z' => '鱵', - '{' => '鸔', - '|' => '鸓', - '}' => '黶', - '~' => '鼊', - '' => '龤', - '' => '灨', - '' => '灥', - '' => '糷', - '' => '虪', - '' => '蠾', - '' => '蠽', - '' => '蠿', - '' => '讞', - '' => '貜', - '' => '躩', - '' => '軉', - '' => '靋', - '' => '顳', - '' => '顴', - '' => '飌', - '' => '饡', - '' => '馫', - '' => '驤', - '' => '驦', - '' => '驧', - '' => '鬤', - '' => '鸕', - '' => '鸗', - '' => '齈', - '' => '戇', - '' => '欞', - '' => '爧', - '' => '虌', - '' => '躨', - '' => '钂', - '' => '钀', - '' => '钁', - '' => '驩', - '' => '驨', - '' => '鬮', - '' => '鸙', - '' => '爩', - '' => '虋', - '' => '讟', - '' => '钃', - '' => '鱹', - '' => '麷', - '' => '癵', - '' => '驫', - '' => '鱺', - '' => '鸝', - '' => '灩', - '' => '灪', - '' => '麤', - '' => '齾', - '' => '齉', - '' => '龘', -); - -$result =& $data; -unset($data); - -return $result; diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp037.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp037.php deleted file mode 100644 index a014e4b..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp037.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp1006.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp1006.php deleted file mode 100644 index 2b5e7be..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp1006.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp1026.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp1026.php deleted file mode 100644 index aba455b..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp1026.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp424.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp424.php deleted file mode 100644 index e8e2370..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp424.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp437.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp437.php deleted file mode 100644 index e3ebb45..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp437.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp500.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp500.php deleted file mode 100644 index 3771c8f..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp500.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp737.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp737.php deleted file mode 100644 index 2d67d33..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp737.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp775.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp775.php deleted file mode 100644 index 1fbc4cd..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp775.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp850.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp850.php deleted file mode 100644 index 0b314c8..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp850.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp852.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp852.php deleted file mode 100644 index f8c318c..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp852.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp855.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp855.php deleted file mode 100644 index 48440ba..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp855.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp856.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp856.php deleted file mode 100644 index c9cac0c..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp856.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp857.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp857.php deleted file mode 100644 index 3e7770a..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp857.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp860.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp860.php deleted file mode 100644 index 2a52d47..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp860.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp861.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp861.php deleted file mode 100644 index 4ba6573..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp861.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp862.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp862.php deleted file mode 100644 index d2a29a2..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp862.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp863.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp863.php deleted file mode 100644 index 1f36b9a..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp863.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp864.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp864.php deleted file mode 100644 index 953e463..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp864.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp865.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp865.php deleted file mode 100644 index 2668bcc..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp865.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp866.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp866.php deleted file mode 100644 index a7b47f8..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp866.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp869.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp869.php deleted file mode 100644 index 0f04054..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp869.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp874.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp874.php deleted file mode 100644 index 4799456..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp874.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp875.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp875.php deleted file mode 100644 index 8561645..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp875.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp932.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp932.php deleted file mode 100644 index 0bf828f..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp932.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp936.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp936.php deleted file mode 100644 index a593d05..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp936.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp949.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp949.php deleted file mode 100644 index d4e99f1..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp949.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp950.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp950.php deleted file mode 100644 index 267b190..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.cp950.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-1.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-1.php deleted file mode 100644 index d7a217c..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-1.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-10.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-10.php deleted file mode 100644 index d60f647..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-10.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-11.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-11.php deleted file mode 100644 index d69220b..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-11.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-13.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-13.php deleted file mode 100644 index 838783f..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-13.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-14.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-14.php deleted file mode 100644 index 65a48ee..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-14.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-15.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-15.php deleted file mode 100644 index 42e50e0..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-15.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-16.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-16.php deleted file mode 100644 index 46758a6..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-16.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-2.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-2.php deleted file mode 100644 index 5f23f51..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-2.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-3.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-3.php deleted file mode 100644 index b31bb83..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-3.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-4.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-4.php deleted file mode 100644 index 9cbf9f3..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-4.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-5.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-5.php deleted file mode 100644 index fd03882..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-5.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-6.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-6.php deleted file mode 100644 index ed6f72f..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-6.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-7.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-7.php deleted file mode 100644 index cf723ac..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-7.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-8.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-8.php deleted file mode 100644 index c978731..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-8.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-9.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-9.php deleted file mode 100644 index 2a3e36a..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-9.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.koi8-r.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.koi8-r.php deleted file mode 100644 index d83c212..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.koi8-r.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.koi8-u.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.koi8-u.php deleted file mode 100644 index dbbf96b..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.koi8-u.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.us-ascii.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.us-ascii.php deleted file mode 100644 index 94a93b2..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.us-ascii.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1250.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1250.php deleted file mode 100644 index d1d5e6f..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1250.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1251.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1251.php deleted file mode 100644 index f422a71..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1251.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1252.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1252.php deleted file mode 100644 index ba6d203..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1252.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1253.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1253.php deleted file mode 100644 index c04dc8f..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1253.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1254.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1254.php deleted file mode 100644 index 1cfadcf..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1254.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1255.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1255.php deleted file mode 100644 index f73cbb6..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1255.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1256.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1256.php deleted file mode 100644 index 953704f..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1256.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1257.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1257.php deleted file mode 100644 index 78580ec..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1257.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1258.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1258.php deleted file mode 100644 index de1609d..0000000 Binary files a/source/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1258.php and /dev/null differ diff --git a/source/vendor/symfony/polyfill-iconv/Resources/charset/translit.php b/source/vendor/symfony/polyfill-iconv/Resources/charset/translit.php deleted file mode 100644 index f322ff0..0000000 --- a/source/vendor/symfony/polyfill-iconv/Resources/charset/translit.php +++ /dev/null @@ -1,4106 +0,0 @@ - 'μ', - '¼' => ' 1⁄4 ', - '½' => ' 1⁄2 ', - '¾' => ' 3⁄4 ', - 'IJ' => 'IJ', - 'ij' => 'ij', - 'Ŀ' => 'L·', - 'ŀ' => 'l·', - 'ʼn' => 'ʼn', - 'ſ' => 's', - 'DŽ' => 'DŽ', - 'Dž' => 'Dž', - 'dž' => 'dž', - 'LJ' => 'LJ', - 'Lj' => 'Lj', - 'lj' => 'lj', - 'NJ' => 'NJ', - 'Nj' => 'Nj', - 'nj' => 'nj', - 'DZ' => 'DZ', - 'Dz' => 'Dz', - 'dz' => 'dz', - 'ϐ' => 'β', - 'ϑ' => 'θ', - 'ϒ' => 'Υ', - 'ϕ' => 'φ', - 'ϖ' => 'π', - 'ϰ' => 'κ', - 'ϱ' => 'ρ', - 'ϲ' => 'ς', - 'ϴ' => 'Θ', - 'ϵ' => 'ε', - 'Ϲ' => 'Σ', - 'և' => 'եւ', - 'ٵ' => 'اٴ', - 'ٶ' => 'وٴ', - 'ٷ' => 'ۇٴ', - 'ٸ' => 'يٴ', - 'ำ' => 'ํา', - 'ຳ' => 'ໍາ', - 'ໜ' => 'ຫນ', - 'ໝ' => 'ຫມ', - 'ཷ' => 'ྲཱྀ', - 'ཹ' => 'ླཱྀ', - 'ẚ' => 'aʾ', - '․' => '.', - '‥' => '..', - '…' => '...', - '″' => '′′', - '‴' => '′′′', - '‶' => '‵‵', - '‷' => '‵‵‵', - '‼' => '!!', - '⁇' => '??', - '⁈' => '?!', - '⁉' => '!?', - '⁗' => '′′′′', - '₨' => 'Rs', - '℀' => 'a/c', - '℁' => 'a/s', - 'ℂ' => 'C', - '℃' => '°C', - '℅' => 'c/o', - '℆' => 'c/u', - 'ℇ' => 'Ɛ', - '℉' => '°F', - 'ℊ' => 'g', - 'ℋ' => 'H', - 'ℌ' => 'H', - 'ℍ' => 'H', - 'ℎ' => 'h', - 'ℏ' => 'ħ', - 'ℐ' => 'I', - 'ℑ' => 'I', - 'ℒ' => 'L', - 'ℓ' => 'l', - 'ℕ' => 'N', - '№' => 'No', - 'ℙ' => 'P', - 'ℚ' => 'Q', - 'ℛ' => 'R', - 'ℜ' => 'R', - 'ℝ' => 'R', - '℡' => 'TEL', - 'ℤ' => 'Z', - 'ℨ' => 'Z', - 'ℬ' => 'B', - 'ℭ' => 'C', - 'ℯ' => 'e', - 'ℰ' => 'E', - 'ℱ' => 'F', - 'ℳ' => 'M', - 'ℴ' => 'o', - 'ℵ' => 'א', - 'ℶ' => 'ב', - 'ℷ' => 'ג', - 'ℸ' => 'ד', - 'ℹ' => 'i', - '℻' => 'FAX', - 'ℼ' => 'π', - 'ℽ' => 'γ', - 'ℾ' => 'Γ', - 'ℿ' => 'Π', - '⅀' => '∑', - 'ⅅ' => 'D', - 'ⅆ' => 'd', - 'ⅇ' => 'e', - 'ⅈ' => 'i', - 'ⅉ' => 'j', - '⅐' => ' 1⁄7 ', - '⅑' => ' 1⁄9 ', - '⅒' => ' 1⁄10 ', - '⅓' => ' 1⁄3 ', - '⅔' => ' 2⁄3 ', - '⅕' => ' 1⁄5 ', - '⅖' => ' 2⁄5 ', - '⅗' => ' 3⁄5 ', - '⅘' => ' 4⁄5 ', - '⅙' => ' 1⁄6 ', - '⅚' => ' 5⁄6 ', - '⅛' => ' 1⁄8 ', - '⅜' => ' 3⁄8 ', - '⅝' => ' 5⁄8 ', - '⅞' => ' 7⁄8 ', - '⅟' => ' 1⁄ ', - 'Ⅰ' => 'I', - 'Ⅱ' => 'II', - 'Ⅲ' => 'III', - 'Ⅳ' => 'IV', - 'Ⅴ' => 'V', - 'Ⅵ' => 'VI', - 'Ⅶ' => 'VII', - 'Ⅷ' => 'VIII', - 'Ⅸ' => 'IX', - 'Ⅹ' => 'X', - 'Ⅺ' => 'XI', - 'Ⅻ' => 'XII', - 'Ⅼ' => 'L', - 'Ⅽ' => 'C', - 'Ⅾ' => 'D', - 'Ⅿ' => 'M', - 'ⅰ' => 'i', - 'ⅱ' => 'ii', - 'ⅲ' => 'iii', - 'ⅳ' => 'iv', - 'ⅴ' => 'v', - 'ⅵ' => 'vi', - 'ⅶ' => 'vii', - 'ⅷ' => 'viii', - 'ⅸ' => 'ix', - 'ⅹ' => 'x', - 'ⅺ' => 'xi', - 'ⅻ' => 'xii', - 'ⅼ' => 'l', - 'ⅽ' => 'c', - 'ⅾ' => 'd', - 'ⅿ' => 'm', - '↉' => ' 0⁄3 ', - '∬' => '∫∫', - '∭' => '∫∫∫', - '∯' => '∮∮', - '∰' => '∮∮∮', - '①' => '(1)', - '②' => '(2)', - '③' => '(3)', - '④' => '(4)', - '⑤' => '(5)', - '⑥' => '(6)', - '⑦' => '(7)', - '⑧' => '(8)', - '⑨' => '(9)', - '⑩' => '(10)', - '⑪' => '(11)', - '⑫' => '(12)', - '⑬' => '(13)', - '⑭' => '(14)', - '⑮' => '(15)', - '⑯' => '(16)', - '⑰' => '(17)', - '⑱' => '(18)', - '⑲' => '(19)', - '⑳' => '(20)', - '⑴' => '(1)', - '⑵' => '(2)', - '⑶' => '(3)', - '⑷' => '(4)', - '⑸' => '(5)', - '⑹' => '(6)', - '⑺' => '(7)', - '⑻' => '(8)', - '⑼' => '(9)', - '⑽' => '(10)', - '⑾' => '(11)', - '⑿' => '(12)', - '⒀' => '(13)', - '⒁' => '(14)', - '⒂' => '(15)', - '⒃' => '(16)', - '⒄' => '(17)', - '⒅' => '(18)', - '⒆' => '(19)', - '⒇' => '(20)', - '⒈' => '1.', - '⒉' => '2.', - '⒊' => '3.', - '⒋' => '4.', - '⒌' => '5.', - '⒍' => '6.', - '⒎' => '7.', - '⒏' => '8.', - '⒐' => '9.', - '⒑' => '10.', - '⒒' => '11.', - '⒓' => '12.', - '⒔' => '13.', - '⒕' => '14.', - '⒖' => '15.', - '⒗' => '16.', - '⒘' => '17.', - '⒙' => '18.', - '⒚' => '19.', - '⒛' => '20.', - '⒜' => '(a)', - '⒝' => '(b)', - '⒞' => '(c)', - '⒟' => '(d)', - '⒠' => '(e)', - '⒡' => '(f)', - '⒢' => '(g)', - '⒣' => '(h)', - '⒤' => '(i)', - '⒥' => '(j)', - '⒦' => '(k)', - '⒧' => '(l)', - '⒨' => '(m)', - '⒩' => '(n)', - '⒪' => '(o)', - '⒫' => '(p)', - '⒬' => '(q)', - '⒭' => '(r)', - '⒮' => '(s)', - '⒯' => '(t)', - '⒰' => '(u)', - '⒱' => '(v)', - '⒲' => '(w)', - '⒳' => '(x)', - '⒴' => '(y)', - '⒵' => '(z)', - 'Ⓐ' => '(A)', - 'Ⓑ' => '(B)', - 'Ⓒ' => '(C)', - 'Ⓓ' => '(D)', - 'Ⓔ' => '(E)', - 'Ⓕ' => '(F)', - 'Ⓖ' => '(G)', - 'Ⓗ' => '(H)', - 'Ⓘ' => '(I)', - 'Ⓙ' => '(J)', - 'Ⓚ' => '(K)', - 'Ⓛ' => '(L)', - 'Ⓜ' => '(M)', - 'Ⓝ' => '(N)', - 'Ⓞ' => '(O)', - 'Ⓟ' => '(P)', - 'Ⓠ' => '(Q)', - 'Ⓡ' => '(R)', - 'Ⓢ' => '(S)', - 'Ⓣ' => '(T)', - 'Ⓤ' => '(U)', - 'Ⓥ' => '(V)', - 'Ⓦ' => '(W)', - 'Ⓧ' => '(X)', - 'Ⓨ' => '(Y)', - 'Ⓩ' => '(Z)', - 'ⓐ' => '(a)', - 'ⓑ' => '(b)', - 'ⓒ' => '(c)', - 'ⓓ' => '(d)', - 'ⓔ' => '(e)', - 'ⓕ' => '(f)', - 'ⓖ' => '(g)', - 'ⓗ' => '(h)', - 'ⓘ' => '(i)', - 'ⓙ' => '(j)', - 'ⓚ' => '(k)', - 'ⓛ' => '(l)', - 'ⓜ' => '(m)', - 'ⓝ' => '(n)', - 'ⓞ' => '(o)', - 'ⓟ' => '(p)', - 'ⓠ' => '(q)', - 'ⓡ' => '(r)', - 'ⓢ' => '(s)', - 'ⓣ' => '(t)', - 'ⓤ' => '(u)', - 'ⓥ' => '(v)', - 'ⓦ' => '(w)', - 'ⓧ' => '(x)', - 'ⓨ' => '(y)', - 'ⓩ' => '(z)', - '⓪' => '(0)', - '⨌' => '∫∫∫∫', - '⩴' => '::=', - '⩵' => '==', - '⩶' => '===', - '⺟' => '母', - '⻳' => '龟', - '⼀' => '一', - '⼁' => '丨', - '⼂' => '丶', - '⼃' => '丿', - '⼄' => '乙', - '⼅' => '亅', - '⼆' => '二', - '⼇' => '亠', - '⼈' => '人', - '⼉' => '儿', - '⼊' => '入', - '⼋' => '八', - '⼌' => '冂', - '⼍' => '冖', - '⼎' => '冫', - '⼏' => '几', - '⼐' => '凵', - '⼑' => '刀', - '⼒' => '力', - '⼓' => '勹', - '⼔' => '匕', - '⼕' => '匚', - '⼖' => '匸', - '⼗' => '十', - '⼘' => '卜', - '⼙' => '卩', - '⼚' => '厂', - '⼛' => '厶', - '⼜' => '又', - '⼝' => '口', - '⼞' => '囗', - '⼟' => '土', - '⼠' => '士', - '⼡' => '夂', - '⼢' => '夊', - '⼣' => '夕', - '⼤' => '大', - '⼥' => '女', - '⼦' => '子', - '⼧' => '宀', - '⼨' => '寸', - '⼩' => '小', - '⼪' => '尢', - '⼫' => '尸', - '⼬' => '屮', - '⼭' => '山', - '⼮' => '巛', - '⼯' => '工', - '⼰' => '己', - '⼱' => '巾', - '⼲' => '干', - '⼳' => '幺', - '⼴' => '广', - '⼵' => '廴', - '⼶' => '廾', - '⼷' => '弋', - '⼸' => '弓', - '⼹' => '彐', - '⼺' => '彡', - '⼻' => '彳', - '⼼' => '心', - '⼽' => '戈', - '⼾' => '戶', - '⼿' => '手', - '⽀' => '支', - '⽁' => '攴', - '⽂' => '文', - '⽃' => '斗', - '⽄' => '斤', - '⽅' => '方', - '⽆' => '无', - '⽇' => '日', - '⽈' => '曰', - '⽉' => '月', - '⽊' => '木', - '⽋' => '欠', - '⽌' => '止', - '⽍' => '歹', - '⽎' => '殳', - '⽏' => '毋', - '⽐' => '比', - '⽑' => '毛', - '⽒' => '氏', - '⽓' => '气', - '⽔' => '水', - '⽕' => '火', - '⽖' => '爪', - '⽗' => '父', - '⽘' => '爻', - '⽙' => '爿', - '⽚' => '片', - '⽛' => '牙', - '⽜' => '牛', - '⽝' => '犬', - '⽞' => '玄', - '⽟' => '玉', - '⽠' => '瓜', - '⽡' => '瓦', - '⽢' => '甘', - '⽣' => '生', - '⽤' => '用', - '⽥' => '田', - '⽦' => '疋', - '⽧' => '疒', - '⽨' => '癶', - '⽩' => '白', - '⽪' => '皮', - '⽫' => '皿', - '⽬' => '目', - '⽭' => '矛', - '⽮' => '矢', - '⽯' => '石', - '⽰' => '示', - '⽱' => '禸', - '⽲' => '禾', - '⽳' => '穴', - '⽴' => '立', - '⽵' => '竹', - '⽶' => '米', - '⽷' => '糸', - '⽸' => '缶', - '⽹' => '网', - '⽺' => '羊', - '⽻' => '羽', - '⽼' => '老', - '⽽' => '而', - '⽾' => '耒', - '⽿' => '耳', - '⾀' => '聿', - '⾁' => '肉', - '⾂' => '臣', - '⾃' => '自', - '⾄' => '至', - '⾅' => '臼', - '⾆' => '舌', - '⾇' => '舛', - '⾈' => '舟', - '⾉' => '艮', - '⾊' => '色', - '⾋' => '艸', - '⾌' => '虍', - '⾍' => '虫', - '⾎' => '血', - '⾏' => '行', - '⾐' => '衣', - '⾑' => '襾', - '⾒' => '見', - '⾓' => '角', - '⾔' => '言', - '⾕' => '谷', - '⾖' => '豆', - '⾗' => '豕', - '⾘' => '豸', - '⾙' => '貝', - '⾚' => '赤', - '⾛' => '走', - '⾜' => '足', - '⾝' => '身', - '⾞' => '車', - '⾟' => '辛', - '⾠' => '辰', - '⾡' => '辵', - '⾢' => '邑', - '⾣' => '酉', - '⾤' => '釆', - '⾥' => '里', - '⾦' => '金', - '⾧' => '長', - '⾨' => '門', - '⾩' => '阜', - '⾪' => '隶', - '⾫' => '隹', - '⾬' => '雨', - '⾭' => '靑', - '⾮' => '非', - '⾯' => '面', - '⾰' => '革', - '⾱' => '韋', - '⾲' => '韭', - '⾳' => '音', - '⾴' => '頁', - '⾵' => '風', - '⾶' => '飛', - '⾷' => '食', - '⾸' => '首', - '⾹' => '香', - '⾺' => '馬', - '⾻' => '骨', - '⾼' => '高', - '⾽' => '髟', - '⾾' => '鬥', - '⾿' => '鬯', - '⿀' => '鬲', - '⿁' => '鬼', - '⿂' => '魚', - '⿃' => '鳥', - '⿄' => '鹵', - '⿅' => '鹿', - '⿆' => '麥', - '⿇' => '麻', - '⿈' => '黃', - '⿉' => '黍', - '⿊' => '黑', - '⿋' => '黹', - '⿌' => '黽', - '⿍' => '鼎', - '⿎' => '鼓', - '⿏' => '鼠', - '⿐' => '鼻', - '⿑' => '齊', - '⿒' => '齒', - '⿓' => '龍', - '⿔' => '龜', - '⿕' => '龠', - ' ' => ' ', - '〶' => '〒', - '〸' => '十', - '〹' => '卄', - '〺' => '卅', - 'ㄱ' => 'ᄀ', - 'ㄲ' => 'ᄁ', - 'ㄳ' => 'ᆪ', - 'ㄴ' => 'ᄂ', - 'ㄵ' => 'ᆬ', - 'ㄶ' => 'ᆭ', - 'ㄷ' => 'ᄃ', - 'ㄸ' => 'ᄄ', - 'ㄹ' => 'ᄅ', - 'ㄺ' => 'ᆰ', - 'ㄻ' => 'ᆱ', - 'ㄼ' => 'ᆲ', - 'ㄽ' => 'ᆳ', - 'ㄾ' => 'ᆴ', - 'ㄿ' => 'ᆵ', - 'ㅀ' => 'ᄚ', - 'ㅁ' => 'ᄆ', - 'ㅂ' => 'ᄇ', - 'ㅃ' => 'ᄈ', - 'ㅄ' => 'ᄡ', - 'ㅅ' => 'ᄉ', - 'ㅆ' => 'ᄊ', - 'ㅇ' => 'ᄋ', - 'ㅈ' => 'ᄌ', - 'ㅉ' => 'ᄍ', - 'ㅊ' => 'ᄎ', - 'ㅋ' => 'ᄏ', - 'ㅌ' => 'ᄐ', - 'ㅍ' => 'ᄑ', - 'ㅎ' => 'ᄒ', - 'ㅏ' => 'ᅡ', - 'ㅐ' => 'ᅢ', - 'ㅑ' => 'ᅣ', - 'ㅒ' => 'ᅤ', - 'ㅓ' => 'ᅥ', - 'ㅔ' => 'ᅦ', - 'ㅕ' => 'ᅧ', - 'ㅖ' => 'ᅨ', - 'ㅗ' => 'ᅩ', - 'ㅘ' => 'ᅪ', - 'ㅙ' => 'ᅫ', - 'ㅚ' => 'ᅬ', - 'ㅛ' => 'ᅭ', - 'ㅜ' => 'ᅮ', - 'ㅝ' => 'ᅯ', - 'ㅞ' => 'ᅰ', - 'ㅟ' => 'ᅱ', - 'ㅠ' => 'ᅲ', - 'ㅡ' => 'ᅳ', - 'ㅢ' => 'ᅴ', - 'ㅣ' => 'ᅵ', - 'ㅤ' => 'ᅠ', - 'ㅥ' => 'ᄔ', - 'ㅦ' => 'ᄕ', - 'ㅧ' => 'ᇇ', - 'ㅨ' => 'ᇈ', - 'ㅩ' => 'ᇌ', - 'ㅪ' => 'ᇎ', - 'ㅫ' => 'ᇓ', - 'ㅬ' => 'ᇗ', - 'ㅭ' => 'ᇙ', - 'ㅮ' => 'ᄜ', - 'ㅯ' => 'ᇝ', - 'ㅰ' => 'ᇟ', - 'ㅱ' => 'ᄝ', - 'ㅲ' => 'ᄞ', - 'ㅳ' => 'ᄠ', - 'ㅴ' => 'ᄢ', - 'ㅵ' => 'ᄣ', - 'ㅶ' => 'ᄧ', - 'ㅷ' => 'ᄩ', - 'ㅸ' => 'ᄫ', - 'ㅹ' => 'ᄬ', - 'ㅺ' => 'ᄭ', - 'ㅻ' => 'ᄮ', - 'ㅼ' => 'ᄯ', - 'ㅽ' => 'ᄲ', - 'ㅾ' => 'ᄶ', - 'ㅿ' => 'ᅀ', - 'ㆀ' => 'ᅇ', - 'ㆁ' => 'ᅌ', - 'ㆂ' => 'ᇱ', - 'ㆃ' => 'ᇲ', - 'ㆄ' => 'ᅗ', - 'ㆅ' => 'ᅘ', - 'ㆆ' => 'ᅙ', - 'ㆇ' => 'ᆄ', - 'ㆈ' => 'ᆅ', - 'ㆉ' => 'ᆈ', - 'ㆊ' => 'ᆑ', - 'ㆋ' => 'ᆒ', - 'ㆌ' => 'ᆔ', - 'ㆍ' => 'ᆞ', - 'ㆎ' => 'ᆡ', - '㈀' => '(ᄀ)', - '㈁' => '(ᄂ)', - '㈂' => '(ᄃ)', - '㈃' => '(ᄅ)', - '㈄' => '(ᄆ)', - '㈅' => '(ᄇ)', - '㈆' => '(ᄉ)', - '㈇' => '(ᄋ)', - '㈈' => '(ᄌ)', - '㈉' => '(ᄎ)', - '㈊' => '(ᄏ)', - '㈋' => '(ᄐ)', - '㈌' => '(ᄑ)', - '㈍' => '(ᄒ)', - '㈎' => '(가)', - '㈏' => '(나)', - '㈐' => '(다)', - '㈑' => '(라)', - '㈒' => '(마)', - '㈓' => '(바)', - '㈔' => '(사)', - '㈕' => '(아)', - '㈖' => '(자)', - '㈗' => '(차)', - '㈘' => '(카)', - '㈙' => '(타)', - '㈚' => '(파)', - '㈛' => '(하)', - '㈜' => '(주)', - '㈝' => '(오전)', - '㈞' => '(오후)', - '㈠' => '(一)', - '㈡' => '(二)', - '㈢' => '(三)', - '㈣' => '(四)', - '㈤' => '(五)', - '㈥' => '(六)', - '㈦' => '(七)', - '㈧' => '(八)', - '㈨' => '(九)', - '㈩' => '(十)', - '㈪' => '(月)', - '㈫' => '(火)', - '㈬' => '(水)', - '㈭' => '(木)', - '㈮' => '(金)', - '㈯' => '(土)', - '㈰' => '(日)', - '㈱' => '(株)', - '㈲' => '(有)', - '㈳' => '(社)', - '㈴' => '(名)', - '㈵' => '(特)', - '㈶' => '(財)', - '㈷' => '(祝)', - '㈸' => '(労)', - '㈹' => '(代)', - '㈺' => '(呼)', - '㈻' => '(学)', - '㈼' => '(監)', - '㈽' => '(企)', - '㈾' => '(資)', - '㈿' => '(協)', - '㉀' => '(祭)', - '㉁' => '(休)', - '㉂' => '(自)', - '㉃' => '(至)', - '㉄' => '(問)', - '㉅' => '(幼)', - '㉆' => '(文)', - '㉇' => '(箏)', - '㉐' => 'PTE', - '㉑' => '(21)', - '㉒' => '(22)', - '㉓' => '(23)', - '㉔' => '(24)', - '㉕' => '(25)', - '㉖' => '(26)', - '㉗' => '(27)', - '㉘' => '(28)', - '㉙' => '(29)', - '㉚' => '(30)', - '㉛' => '(31)', - '㉜' => '(32)', - '㉝' => '(33)', - '㉞' => '(34)', - '㉟' => '(35)', - '㉠' => '(ᄀ)', - '㉡' => '(ᄂ)', - '㉢' => '(ᄃ)', - '㉣' => '(ᄅ)', - '㉤' => '(ᄆ)', - '㉥' => '(ᄇ)', - '㉦' => '(ᄉ)', - '㉧' => '(ᄋ)', - '㉨' => '(ᄌ)', - '㉩' => '(ᄎ)', - '㉪' => '(ᄏ)', - '㉫' => '(ᄐ)', - '㉬' => '(ᄑ)', - '㉭' => '(ᄒ)', - '㉮' => '(가)', - '㉯' => '(나)', - '㉰' => '(다)', - '㉱' => '(라)', - '㉲' => '(마)', - '㉳' => '(바)', - '㉴' => '(사)', - '㉵' => '(아)', - '㉶' => '(자)', - '㉷' => '(차)', - '㉸' => '(카)', - '㉹' => '(타)', - '㉺' => '(파)', - '㉻' => '(하)', - '㉼' => '(참고)', - '㉽' => '(주의)', - '㉾' => '(우)', - '㊀' => '(一)', - '㊁' => '(二)', - '㊂' => '(三)', - '㊃' => '(四)', - '㊄' => '(五)', - '㊅' => '(六)', - '㊆' => '(七)', - '㊇' => '(八)', - '㊈' => '(九)', - '㊉' => '(十)', - '㊊' => '(月)', - '㊋' => '(火)', - '㊌' => '(水)', - '㊍' => '(木)', - '㊎' => '(金)', - '㊏' => '(土)', - '㊐' => '(日)', - '㊑' => '(株)', - '㊒' => '(有)', - '㊓' => '(社)', - '㊔' => '(名)', - '㊕' => '(特)', - '㊖' => '(財)', - '㊗' => '(祝)', - '㊘' => '(労)', - '㊙' => '(秘)', - '㊚' => '(男)', - '㊛' => '(女)', - '㊜' => '(適)', - '㊝' => '(優)', - '㊞' => '(印)', - '㊟' => '(注)', - '㊠' => '(項)', - '㊡' => '(休)', - '㊢' => '(写)', - '㊣' => '(正)', - '㊤' => '(上)', - '㊥' => '(中)', - '㊦' => '(下)', - '㊧' => '(左)', - '㊨' => '(右)', - '㊩' => '(医)', - '㊪' => '(宗)', - '㊫' => '(学)', - '㊬' => '(監)', - '㊭' => '(企)', - '㊮' => '(資)', - '㊯' => '(協)', - '㊰' => '(夜)', - '㊱' => '(36)', - '㊲' => '(37)', - '㊳' => '(38)', - '㊴' => '(39)', - '㊵' => '(40)', - '㊶' => '(41)', - '㊷' => '(42)', - '㊸' => '(43)', - '㊹' => '(44)', - '㊺' => '(45)', - '㊻' => '(46)', - '㊼' => '(47)', - '㊽' => '(48)', - '㊾' => '(49)', - '㊿' => '(50)', - '㋀' => '1月', - '㋁' => '2月', - '㋂' => '3月', - '㋃' => '4月', - '㋄' => '5月', - '㋅' => '6月', - '㋆' => '7月', - '㋇' => '8月', - '㋈' => '9月', - '㋉' => '10月', - '㋊' => '11月', - '㋋' => '12月', - '㋌' => 'Hg', - '㋍' => 'erg', - '㋎' => 'eV', - '㋏' => 'LTD', - '㋐' => '(ア)', - '㋑' => '(イ)', - '㋒' => '(ウ)', - '㋓' => '(エ)', - '㋔' => '(オ)', - '㋕' => '(カ)', - '㋖' => '(キ)', - '㋗' => '(ク)', - '㋘' => '(ケ)', - '㋙' => '(コ)', - '㋚' => '(サ)', - '㋛' => '(シ)', - '㋜' => '(ス)', - '㋝' => '(セ)', - '㋞' => '(ソ)', - '㋟' => '(タ)', - '㋠' => '(チ)', - '㋡' => '(ツ)', - '㋢' => '(テ)', - '㋣' => '(ト)', - '㋤' => '(ナ)', - '㋥' => '(ニ)', - '㋦' => '(ヌ)', - '㋧' => '(ネ)', - '㋨' => '(ノ)', - '㋩' => '(ハ)', - '㋪' => '(ヒ)', - '㋫' => '(フ)', - '㋬' => '(ヘ)', - '㋭' => '(ホ)', - '㋮' => '(マ)', - '㋯' => '(ミ)', - '㋰' => '(ム)', - '㋱' => '(メ)', - '㋲' => '(モ)', - '㋳' => '(ヤ)', - '㋴' => '(ユ)', - '㋵' => '(ヨ)', - '㋶' => '(ラ)', - '㋷' => '(リ)', - '㋸' => '(ル)', - '㋹' => '(レ)', - '㋺' => '(ロ)', - '㋻' => '(ワ)', - '㋼' => '(ヰ)', - '㋽' => '(ヱ)', - '㋾' => '(ヲ)', - '㋿' => '令和', - '㌀' => 'アパート', - '㌁' => 'アルファ', - '㌂' => 'アンペア', - '㌃' => 'アール', - '㌄' => 'イニング', - '㌅' => 'インチ', - '㌆' => 'ウォン', - '㌇' => 'エスクード', - '㌈' => 'エーカー', - '㌉' => 'オンス', - '㌊' => 'オーム', - '㌋' => 'カイリ', - '㌌' => 'カラット', - '㌍' => 'カロリー', - '㌎' => 'ガロン', - '㌏' => 'ガンマ', - '㌐' => 'ギガ', - '㌑' => 'ギニー', - '㌒' => 'キュリー', - '㌓' => 'ギルダー', - '㌔' => 'キロ', - '㌕' => 'キログラム', - '㌖' => 'キロメートル', - '㌗' => 'キロワット', - '㌘' => 'グラム', - '㌙' => 'グラムトン', - '㌚' => 'クルゼイロ', - '㌛' => 'クローネ', - '㌜' => 'ケース', - '㌝' => 'コルナ', - '㌞' => 'コーポ', - '㌟' => 'サイクル', - '㌠' => 'サンチーム', - '㌡' => 'シリング', - '㌢' => 'センチ', - '㌣' => 'セント', - '㌤' => 'ダース', - '㌥' => 'デシ', - '㌦' => 'ドル', - '㌧' => 'トン', - '㌨' => 'ナノ', - '㌩' => 'ノット', - '㌪' => 'ハイツ', - '㌫' => 'パーセント', - '㌬' => 'パーツ', - '㌭' => 'バーレル', - '㌮' => 'ピアストル', - '㌯' => 'ピクル', - '㌰' => 'ピコ', - '㌱' => 'ビル', - '㌲' => 'ファラッド', - '㌳' => 'フィート', - '㌴' => 'ブッシェル', - '㌵' => 'フラン', - '㌶' => 'ヘクタール', - '㌷' => 'ペソ', - '㌸' => 'ペニヒ', - '㌹' => 'ヘルツ', - '㌺' => 'ペンス', - '㌻' => 'ページ', - '㌼' => 'ベータ', - '㌽' => 'ポイント', - '㌾' => 'ボルト', - '㌿' => 'ホン', - '㍀' => 'ポンド', - '㍁' => 'ホール', - '㍂' => 'ホーン', - '㍃' => 'マイクロ', - '㍄' => 'マイル', - '㍅' => 'マッハ', - '㍆' => 'マルク', - '㍇' => 'マンション', - '㍈' => 'ミクロン', - '㍉' => 'ミリ', - '㍊' => 'ミリバール', - '㍋' => 'メガ', - '㍌' => 'メガトン', - '㍍' => 'メートル', - '㍎' => 'ヤード', - '㍏' => 'ヤール', - '㍐' => 'ユアン', - '㍑' => 'リットル', - '㍒' => 'リラ', - '㍓' => 'ルピー', - '㍔' => 'ルーブル', - '㍕' => 'レム', - '㍖' => 'レントゲン', - '㍗' => 'ワット', - '㍘' => '0点', - '㍙' => '1点', - '㍚' => '2点', - '㍛' => '3点', - '㍜' => '4点', - '㍝' => '5点', - '㍞' => '6点', - '㍟' => '7点', - '㍠' => '8点', - '㍡' => '9点', - '㍢' => '10点', - '㍣' => '11点', - '㍤' => '12点', - '㍥' => '13点', - '㍦' => '14点', - '㍧' => '15点', - '㍨' => '16点', - '㍩' => '17点', - '㍪' => '18点', - '㍫' => '19点', - '㍬' => '20点', - '㍭' => '21点', - '㍮' => '22点', - '㍯' => '23点', - '㍰' => '24点', - '㍱' => 'hPa', - '㍲' => 'da', - '㍳' => 'AU', - '㍴' => 'bar', - '㍵' => 'oV', - '㍶' => 'pc', - '㍷' => 'dm', - '㍸' => 'dm²', - '㍹' => 'dm³', - '㍺' => 'IU', - '㍻' => '平成', - '㍼' => '昭和', - '㍽' => '大正', - '㍾' => '明治', - '㍿' => '株式会社', - '㎀' => 'pA', - '㎁' => 'nA', - '㎂' => 'μA', - '㎃' => 'mA', - '㎄' => 'kA', - '㎅' => 'KB', - '㎆' => 'MB', - '㎇' => 'GB', - '㎈' => 'cal', - '㎉' => 'kcal', - '㎊' => 'pF', - '㎋' => 'nF', - '㎌' => 'μF', - '㎍' => 'μg', - '㎎' => 'mg', - '㎏' => 'kg', - '㎐' => 'Hz', - '㎑' => 'kHz', - '㎒' => 'MHz', - '㎓' => 'GHz', - '㎔' => 'THz', - '㎕' => 'μℓ', - '㎖' => 'mℓ', - '㎗' => 'dℓ', - '㎘' => 'kℓ', - '㎙' => 'fm', - '㎚' => 'nm', - '㎛' => 'μm', - '㎜' => 'mm', - '㎝' => 'cm', - '㎞' => 'km', - '㎟' => 'mm²', - '㎠' => 'cm²', - '㎡' => 'm²', - '㎢' => 'km²', - '㎣' => 'mm³', - '㎤' => 'cm³', - '㎥' => 'm³', - '㎦' => 'km³', - '㎧' => 'm∕s', - '㎨' => 'm∕s²', - '㎩' => 'Pa', - '㎪' => 'kPa', - '㎫' => 'MPa', - '㎬' => 'GPa', - '㎭' => 'rad', - '㎮' => 'rad∕s', - '㎯' => 'rad∕s²', - '㎰' => 'ps', - '㎱' => 'ns', - '㎲' => 'μs', - '㎳' => 'ms', - '㎴' => 'pV', - '㎵' => 'nV', - '㎶' => 'μV', - '㎷' => 'mV', - '㎸' => 'kV', - '㎹' => 'MV', - '㎺' => 'pW', - '㎻' => 'nW', - '㎼' => 'μW', - '㎽' => 'mW', - '㎾' => 'kW', - '㎿' => 'MW', - '㏀' => 'kΩ', - '㏁' => 'MΩ', - '㏂' => 'a.m.', - '㏃' => 'Bq', - '㏄' => 'cc', - '㏅' => 'cd', - '㏆' => 'C∕kg', - '㏇' => 'Co.', - '㏈' => 'dB', - '㏉' => 'Gy', - '㏊' => 'ha', - '㏋' => 'HP', - '㏌' => 'in', - '㏍' => 'KK', - '㏎' => 'KM', - '㏏' => 'kt', - '㏐' => 'lm', - '㏑' => 'ln', - '㏒' => 'log', - '㏓' => 'lx', - '㏔' => 'mb', - '㏕' => 'mil', - '㏖' => 'mol', - '㏗' => 'PH', - '㏘' => 'p.m.', - '㏙' => 'PPM', - '㏚' => 'PR', - '㏛' => 'sr', - '㏜' => 'Sv', - '㏝' => 'Wb', - '㏞' => 'V∕m', - '㏟' => 'A∕m', - '㏠' => '1日', - '㏡' => '2日', - '㏢' => '3日', - '㏣' => '4日', - '㏤' => '5日', - '㏥' => '6日', - '㏦' => '7日', - '㏧' => '8日', - '㏨' => '9日', - '㏩' => '10日', - '㏪' => '11日', - '㏫' => '12日', - '㏬' => '13日', - '㏭' => '14日', - '㏮' => '15日', - '㏯' => '16日', - '㏰' => '17日', - '㏱' => '18日', - '㏲' => '19日', - '㏳' => '20日', - '㏴' => '21日', - '㏵' => '22日', - '㏶' => '23日', - '㏷' => '24日', - '㏸' => '25日', - '㏹' => '26日', - '㏺' => '27日', - '㏻' => '28日', - '㏼' => '29日', - '㏽' => '30日', - '㏾' => '31日', - '㏿' => 'gal', - '豈' => '豈', - '更' => '更', - '車' => '車', - '賈' => '賈', - '滑' => '滑', - '串' => '串', - '句' => '句', - '龜' => '龜', - '龜' => '龜', - '契' => '契', - '金' => '金', - '喇' => '喇', - '奈' => '奈', - '懶' => '懶', - '癩' => '癩', - '羅' => '羅', - '蘿' => '蘿', - '螺' => '螺', - '裸' => '裸', - '邏' => '邏', - '樂' => '樂', - '洛' => '洛', - '烙' => '烙', - '珞' => '珞', - '落' => '落', - '酪' => '酪', - '駱' => '駱', - '亂' => '亂', - '卵' => '卵', - '欄' => '欄', - '爛' => '爛', - '蘭' => '蘭', - '鸞' => '鸞', - '嵐' => '嵐', - '濫' => '濫', - '藍' => '藍', - '襤' => '襤', - '拉' => '拉', - '臘' => '臘', - '蠟' => '蠟', - '廊' => '廊', - '朗' => '朗', - '浪' => '浪', - '狼' => '狼', - '郎' => '郎', - '來' => '來', - '冷' => '冷', - '勞' => '勞', - '擄' => '擄', - '櫓' => '櫓', - '爐' => '爐', - '盧' => '盧', - '老' => '老', - '蘆' => '蘆', - '虜' => '虜', - '路' => '路', - '露' => '露', - '魯' => '魯', - '鷺' => '鷺', - '碌' => '碌', - '祿' => '祿', - '綠' => '綠', - '菉' => '菉', - '錄' => '錄', - '鹿' => '鹿', - '論' => '論', - '壟' => '壟', - '弄' => '弄', - '籠' => '籠', - '聾' => '聾', - '牢' => '牢', - '磊' => '磊', - '賂' => '賂', - '雷' => '雷', - '壘' => '壘', - '屢' => '屢', - '樓' => '樓', - '淚' => '淚', - '漏' => '漏', - '累' => '累', - '縷' => '縷', - '陋' => '陋', - '勒' => '勒', - '肋' => '肋', - '凜' => '凜', - '凌' => '凌', - '稜' => '稜', - '綾' => '綾', - '菱' => '菱', - '陵' => '陵', - '讀' => '讀', - '拏' => '拏', - '樂' => '樂', - '諾' => '諾', - '丹' => '丹', - '寧' => '寧', - '怒' => '怒', - '率' => '率', - '異' => '異', - '北' => '北', - '磻' => '磻', - '便' => '便', - '復' => '復', - '不' => '不', - '泌' => '泌', - '數' => '數', - '索' => '索', - '參' => '參', - '塞' => '塞', - '省' => '省', - '葉' => '葉', - '說' => '說', - '殺' => '殺', - '辰' => '辰', - '沈' => '沈', - '拾' => '拾', - '若' => '若', - '掠' => '掠', - '略' => '略', - '亮' => '亮', - '兩' => '兩', - '凉' => '凉', - '梁' => '梁', - '糧' => '糧', - '良' => '良', - '諒' => '諒', - '量' => '量', - '勵' => '勵', - '呂' => '呂', - '女' => '女', - '廬' => '廬', - '旅' => '旅', - '濾' => '濾', - '礪' => '礪', - '閭' => '閭', - '驪' => '驪', - '麗' => '麗', - '黎' => '黎', - '力' => '力', - '曆' => '曆', - '歷' => '歷', - '轢' => '轢', - '年' => '年', - '憐' => '憐', - '戀' => '戀', - '撚' => '撚', - '漣' => '漣', - '煉' => '煉', - '璉' => '璉', - '秊' => '秊', - '練' => '練', - '聯' => '聯', - '輦' => '輦', - '蓮' => '蓮', - '連' => '連', - '鍊' => '鍊', - '列' => '列', - '劣' => '劣', - '咽' => '咽', - '烈' => '烈', - '裂' => '裂', - '說' => '說', - '廉' => '廉', - '念' => '念', - '捻' => '捻', - '殮' => '殮', - '簾' => '簾', - '獵' => '獵', - '令' => '令', - '囹' => '囹', - '寧' => '寧', - '嶺' => '嶺', - '怜' => '怜', - '玲' => '玲', - '瑩' => '瑩', - '羚' => '羚', - '聆' => '聆', - '鈴' => '鈴', - '零' => '零', - '靈' => '靈', - '領' => '領', - '例' => '例', - '禮' => '禮', - '醴' => '醴', - '隸' => '隸', - '惡' => '惡', - '了' => '了', - '僚' => '僚', - '寮' => '寮', - '尿' => '尿', - '料' => '料', - '樂' => '樂', - '燎' => '燎', - '療' => '療', - '蓼' => '蓼', - '遼' => '遼', - '龍' => '龍', - '暈' => '暈', - '阮' => '阮', - '劉' => '劉', - '杻' => '杻', - '柳' => '柳', - '流' => '流', - '溜' => '溜', - '琉' => '琉', - '留' => '留', - '硫' => '硫', - '紐' => '紐', - '類' => '類', - '六' => '六', - '戮' => '戮', - '陸' => '陸', - '倫' => '倫', - '崙' => '崙', - '淪' => '淪', - '輪' => '輪', - '律' => '律', - '慄' => '慄', - '栗' => '栗', - '率' => '率', - '隆' => '隆', - '利' => '利', - '吏' => '吏', - '履' => '履', - '易' => '易', - '李' => '李', - '梨' => '梨', - '泥' => '泥', - '理' => '理', - '痢' => '痢', - '罹' => '罹', - '裏' => '裏', - '裡' => '裡', - '里' => '里', - '離' => '離', - '匿' => '匿', - '溺' => '溺', - '吝' => '吝', - '燐' => '燐', - '璘' => '璘', - '藺' => '藺', - '隣' => '隣', - '鱗' => '鱗', - '麟' => '麟', - '林' => '林', - '淋' => '淋', - '臨' => '臨', - '立' => '立', - '笠' => '笠', - '粒' => '粒', - '狀' => '狀', - '炙' => '炙', - '識' => '識', - '什' => '什', - '茶' => '茶', - '刺' => '刺', - '切' => '切', - '度' => '度', - '拓' => '拓', - '糖' => '糖', - '宅' => '宅', - '洞' => '洞', - '暴' => '暴', - '輻' => '輻', - '行' => '行', - '降' => '降', - '見' => '見', - '廓' => '廓', - '兀' => '兀', - '嗀' => '嗀', - '﨎' => '' . "\0" . '', - '﨏' => '' . "\0" . '', - '塚' => '塚', - '﨑' => '' . "\0" . '', - '晴' => '晴', - '﨓' => '' . "\0" . '', - '﨔' => '' . "\0" . '', - '凞' => '凞', - '猪' => '猪', - '益' => '益', - '礼' => '礼', - '神' => '神', - '祥' => '祥', - '福' => '福', - '靖' => '靖', - '精' => '精', - '羽' => '羽', - '﨟' => '' . "\0" . '', - '蘒' => '蘒', - '﨡' => '' . "\0" . '', - '諸' => '諸', - '﨣' => '' . "\0" . '', - '﨤' => '' . "\0" . '', - '逸' => '逸', - '都' => '都', - '﨧' => '' . "\0" . '', - '﨨' => '' . "\0" . '', - '﨩' => '' . "\0" . '', - '飯' => '飯', - '飼' => '飼', - '館' => '館', - '鶴' => '鶴', - '郞' => '郞', - '隷' => '隷', - '侮' => '侮', - '僧' => '僧', - '免' => '免', - '勉' => '勉', - '勤' => '勤', - '卑' => '卑', - '喝' => '喝', - '嘆' => '嘆', - '器' => '器', - '塀' => '塀', - '墨' => '墨', - '層' => '層', - '屮' => '屮', - '悔' => '悔', - '慨' => '慨', - '憎' => '憎', - '懲' => '懲', - '敏' => '敏', - '既' => '既', - '暑' => '暑', - '梅' => '梅', - '海' => '海', - '渚' => '渚', - '漢' => '漢', - '煮' => '煮', - '爫' => '爫', - '琢' => '琢', - '碑' => '碑', - '社' => '社', - '祉' => '祉', - '祈' => '祈', - '祐' => '祐', - '祖' => '祖', - '祝' => '祝', - '禍' => '禍', - '禎' => '禎', - '穀' => '穀', - '突' => '突', - '節' => '節', - '練' => '練', - '縉' => '縉', - '繁' => '繁', - '署' => '署', - '者' => '者', - '臭' => '臭', - '艹' => '艹', - '艹' => '艹', - '著' => '著', - '褐' => '褐', - '視' => '視', - '謁' => '謁', - '謹' => '謹', - '賓' => '賓', - '贈' => '贈', - '辶' => '辶', - '逸' => '逸', - '難' => '難', - '響' => '響', - '頻' => '頻', - '恵' => '恵', - '𤋮' => '𤋮', - '舘' => '舘', - '並' => '並', - '况' => '况', - '全' => '全', - '侀' => '侀', - '充' => '充', - '冀' => '冀', - '勇' => '勇', - '勺' => '勺', - '喝' => '喝', - '啕' => '啕', - '喙' => '喙', - '嗢' => '嗢', - '塚' => '塚', - '墳' => '墳', - '奄' => '奄', - '奔' => '奔', - '婢' => '婢', - '嬨' => '嬨', - '廒' => '廒', - '廙' => '廙', - '彩' => '彩', - '徭' => '徭', - '惘' => '惘', - '慎' => '慎', - '愈' => '愈', - '憎' => '憎', - '慠' => '慠', - '懲' => '懲', - '戴' => '戴', - '揄' => '揄', - '搜' => '搜', - '摒' => '摒', - '敖' => '敖', - '晴' => '晴', - '朗' => '朗', - '望' => '望', - '杖' => '杖', - '歹' => '歹', - '殺' => '殺', - '流' => '流', - '滛' => '滛', - '滋' => '滋', - '漢' => '漢', - '瀞' => '瀞', - '煮' => '煮', - '瞧' => '瞧', - '爵' => '爵', - '犯' => '犯', - '猪' => '猪', - '瑱' => '瑱', - '甆' => '甆', - '画' => '画', - '瘝' => '瘝', - '瘟' => '瘟', - '益' => '益', - '盛' => '盛', - '直' => '直', - '睊' => '睊', - '着' => '着', - '磌' => '磌', - '窱' => '窱', - '節' => '節', - '类' => '类', - '絛' => '絛', - '練' => '練', - '缾' => '缾', - '者' => '者', - '荒' => '荒', - '華' => '華', - '蝹' => '蝹', - '襁' => '襁', - '覆' => '覆', - '視' => '視', - '調' => '調', - '諸' => '諸', - '請' => '請', - '謁' => '謁', - '諾' => '諾', - '諭' => '諭', - '謹' => '謹', - '變' => '變', - '贈' => '贈', - '輸' => '輸', - '遲' => '遲', - '醙' => '醙', - '鉶' => '鉶', - '陼' => '陼', - '難' => '難', - '靖' => '靖', - '韛' => '韛', - '響' => '響', - '頋' => '頋', - '頻' => '頻', - '鬒' => '鬒', - '龜' => '龜', - '𢡊' => '𢡊', - '𢡄' => '𢡄', - '𣏕' => '𣏕', - '㮝' => '㮝', - '䀘' => '䀘', - '䀹' => '䀹', - '𥉉' => '𥉉', - '𥳐' => '𥳐', - '𧻓' => '𧻓', - '齃' => '齃', - '龎' => '龎', - 'ff' => 'ff', - 'fi' => 'fi', - 'fl' => 'fl', - 'ffi' => 'ffi', - 'ffl' => 'ffl', - 'ſt' => 'ſt', - 'st' => 'st', - 'ﬓ' => 'մն', - 'ﬔ' => 'մե', - 'ﬕ' => 'մի', - 'ﬖ' => 'վն', - 'ﬗ' => 'մխ', - 'ﬠ' => 'ע', - 'ﬡ' => 'א', - 'ﬢ' => 'ד', - 'ﬣ' => 'ה', - 'ﬤ' => 'כ', - 'ﬥ' => 'ל', - 'ﬦ' => 'ם', - 'ﬧ' => 'ר', - 'ﬨ' => 'ת', - '﬩' => '+', - 'ﭏ' => 'אל', - '﹉' => '‾', - '﹊' => '‾', - '﹋' => '‾', - '﹌' => '‾', - '﹍' => '_', - '﹎' => '_', - '﹏' => '_', - '﹐' => ',', - '﹑' => '、', - '﹒' => '.', - '﹔' => ';', - '﹕' => ':', - '﹖' => '?', - '﹗' => '!', - '﹘' => '—', - '﹙' => '(', - '﹚' => ')', - '﹛' => '{', - '﹜' => '}', - '﹝' => '〔', - '﹞' => '〕', - '﹟' => '#', - '﹠' => '&', - '﹡' => '*', - '﹢' => '+', - '﹣' => '-', - '﹤' => '<', - '﹥' => '>', - '﹦' => '=', - '﹨' => '\\', - '﹩' => '$', - '﹪' => '%', - '﹫' => '@', - '!' => '!', - '"' => '"', - '#' => '#', - '$' => '$', - '%' => '%', - '&' => '&', - ''' => '\'', - '(' => '(', - ')' => ')', - '*' => '*', - '+' => '+', - ',' => ',', - '-' => '-', - '.' => '.', - '/' => '/', - '0' => '0', - '1' => '1', - '2' => '2', - '3' => '3', - '4' => '4', - '5' => '5', - '6' => '6', - '7' => '7', - '8' => '8', - '9' => '9', - ':' => ':', - ';' => ';', - '<' => '<', - '=' => '=', - '>' => '>', - '?' => '?', - '@' => '@', - 'A' => 'A', - 'B' => 'B', - 'C' => 'C', - 'D' => 'D', - 'E' => 'E', - 'F' => 'F', - 'G' => 'G', - 'H' => 'H', - 'I' => 'I', - 'J' => 'J', - 'K' => 'K', - 'L' => 'L', - 'M' => 'M', - 'N' => 'N', - 'O' => 'O', - 'P' => 'P', - 'Q' => 'Q', - 'R' => 'R', - 'S' => 'S', - 'T' => 'T', - 'U' => 'U', - 'V' => 'V', - 'W' => 'W', - 'X' => 'X', - 'Y' => 'Y', - 'Z' => 'Z', - '[' => '[', - '\' => '\\', - ']' => ']', - '^' => '^', - '_' => '_', - '`' => '`', - 'a' => 'a', - 'b' => 'b', - 'c' => 'c', - 'd' => 'd', - 'e' => 'e', - 'f' => 'f', - 'g' => 'g', - 'h' => 'h', - 'i' => 'i', - 'j' => 'j', - 'k' => 'k', - 'l' => 'l', - 'm' => 'm', - 'n' => 'n', - 'o' => 'o', - 'p' => 'p', - 'q' => 'q', - 'r' => 'r', - 's' => 's', - 't' => 't', - 'u' => 'u', - 'v' => 'v', - 'w' => 'w', - 'x' => 'x', - 'y' => 'y', - 'z' => 'z', - '{' => '{', - '|' => '|', - '}' => '}', - '~' => '~', - '⦅' => '⦅', - '⦆' => '⦆', - '。' => '。', - '「' => '「', - '」' => '」', - '、' => '、', - '・' => '・', - 'ヲ' => 'ヲ', - 'ァ' => 'ァ', - 'ィ' => 'ィ', - 'ゥ' => 'ゥ', - 'ェ' => 'ェ', - 'ォ' => 'ォ', - 'ャ' => 'ャ', - 'ュ' => 'ュ', - 'ョ' => 'ョ', - 'ッ' => 'ッ', - 'ー' => 'ー', - 'ア' => 'ア', - 'イ' => 'イ', - 'ウ' => 'ウ', - 'エ' => 'エ', - 'オ' => 'オ', - 'カ' => 'カ', - 'キ' => 'キ', - 'ク' => 'ク', - 'ケ' => 'ケ', - 'コ' => 'コ', - 'サ' => 'サ', - 'シ' => 'シ', - 'ス' => 'ス', - 'セ' => 'セ', - 'ソ' => 'ソ', - 'タ' => 'タ', - 'チ' => 'チ', - 'ツ' => 'ツ', - 'テ' => 'テ', - 'ト' => 'ト', - 'ナ' => 'ナ', - 'ニ' => 'ニ', - 'ヌ' => 'ヌ', - 'ネ' => 'ネ', - 'ノ' => 'ノ', - 'ハ' => 'ハ', - 'ヒ' => 'ヒ', - 'フ' => 'フ', - 'ヘ' => 'ヘ', - 'ホ' => 'ホ', - 'マ' => 'マ', - 'ミ' => 'ミ', - 'ム' => 'ム', - 'メ' => 'メ', - 'モ' => 'モ', - 'ヤ' => 'ヤ', - 'ユ' => 'ユ', - 'ヨ' => 'ヨ', - 'ラ' => 'ラ', - 'リ' => 'リ', - 'ル' => 'ル', - 'レ' => 'レ', - 'ロ' => 'ロ', - 'ワ' => 'ワ', - 'ン' => 'ン', - '゙' => '゙', - '゚' => '゚', - 'ᅠ' => 'ㅤ', - 'ᄀ' => 'ㄱ', - 'ᄁ' => 'ㄲ', - 'ᆪ' => 'ㄳ', - 'ᄂ' => 'ㄴ', - 'ᆬ' => 'ㄵ', - 'ᆭ' => 'ㄶ', - 'ᄃ' => 'ㄷ', - 'ᄄ' => 'ㄸ', - 'ᄅ' => 'ㄹ', - 'ᆰ' => 'ㄺ', - 'ᆱ' => 'ㄻ', - 'ᆲ' => 'ㄼ', - 'ᆳ' => 'ㄽ', - 'ᆴ' => 'ㄾ', - 'ᆵ' => 'ㄿ', - 'ᄚ' => 'ㅀ', - 'ᄆ' => 'ㅁ', - 'ᄇ' => 'ㅂ', - 'ᄈ' => 'ㅃ', - 'ᄡ' => 'ㅄ', - 'ᄉ' => 'ㅅ', - 'ᄊ' => 'ㅆ', - 'ᄋ' => 'ㅇ', - 'ᄌ' => 'ㅈ', - 'ᄍ' => 'ㅉ', - 'ᄎ' => 'ㅊ', - 'ᄏ' => 'ㅋ', - 'ᄐ' => 'ㅌ', - 'ᄑ' => 'ㅍ', - 'ᄒ' => 'ㅎ', - 'ᅡ' => 'ㅏ', - 'ᅢ' => 'ㅐ', - 'ᅣ' => 'ㅑ', - 'ᅤ' => 'ㅒ', - 'ᅥ' => 'ㅓ', - 'ᅦ' => 'ㅔ', - 'ᅧ' => 'ㅕ', - 'ᅨ' => 'ㅖ', - 'ᅩ' => 'ㅗ', - 'ᅪ' => 'ㅘ', - 'ᅫ' => 'ㅙ', - 'ᅬ' => 'ㅚ', - 'ᅭ' => 'ㅛ', - 'ᅮ' => 'ㅜ', - 'ᅯ' => 'ㅝ', - 'ᅰ' => 'ㅞ', - 'ᅱ' => 'ㅟ', - 'ᅲ' => 'ㅠ', - 'ᅳ' => 'ㅡ', - 'ᅴ' => 'ㅢ', - 'ᅵ' => 'ㅣ', - '¢' => '¢', - '£' => '£', - '¬' => '¬', - ' ̄' => '¯', - '¦' => '¦', - '¥' => '¥', - '₩' => '₩', - '│' => '│', - '←' => '←', - '↑' => '↑', - '→' => '→', - '↓' => '↓', - '■' => '■', - '○' => '○', - '𝐀' => 'A', - '𝐁' => 'B', - '𝐂' => 'C', - '𝐃' => 'D', - '𝐄' => 'E', - '𝐅' => 'F', - '𝐆' => 'G', - '𝐇' => 'H', - '𝐈' => 'I', - '𝐉' => 'J', - '𝐊' => 'K', - '𝐋' => 'L', - '𝐌' => 'M', - '𝐍' => 'N', - '𝐎' => 'O', - '𝐏' => 'P', - '𝐐' => 'Q', - '𝐑' => 'R', - '𝐒' => 'S', - '𝐓' => 'T', - '𝐔' => 'U', - '𝐕' => 'V', - '𝐖' => 'W', - '𝐗' => 'X', - '𝐘' => 'Y', - '𝐙' => 'Z', - '𝐚' => 'a', - '𝐛' => 'b', - '𝐜' => 'c', - '𝐝' => 'd', - '𝐞' => 'e', - '𝐟' => 'f', - '𝐠' => 'g', - '𝐡' => 'h', - '𝐢' => 'i', - '𝐣' => 'j', - '𝐤' => 'k', - '𝐥' => 'l', - '𝐦' => 'm', - '𝐧' => 'n', - '𝐨' => 'o', - '𝐩' => 'p', - '𝐪' => 'q', - '𝐫' => 'r', - '𝐬' => 's', - '𝐭' => 't', - '𝐮' => 'u', - '𝐯' => 'v', - '𝐰' => 'w', - '𝐱' => 'x', - '𝐲' => 'y', - '𝐳' => 'z', - '𝐴' => 'A', - '𝐵' => 'B', - '𝐶' => 'C', - '𝐷' => 'D', - '𝐸' => 'E', - '𝐹' => 'F', - '𝐺' => 'G', - '𝐻' => 'H', - '𝐼' => 'I', - '𝐽' => 'J', - '𝐾' => 'K', - '𝐿' => 'L', - '𝑀' => 'M', - '𝑁' => 'N', - '𝑂' => 'O', - '𝑃' => 'P', - '𝑄' => 'Q', - '𝑅' => 'R', - '𝑆' => 'S', - '𝑇' => 'T', - '𝑈' => 'U', - '𝑉' => 'V', - '𝑊' => 'W', - '𝑋' => 'X', - '𝑌' => 'Y', - '𝑍' => 'Z', - '𝑎' => 'a', - '𝑏' => 'b', - '𝑐' => 'c', - '𝑑' => 'd', - '𝑒' => 'e', - '𝑓' => 'f', - '𝑔' => 'g', - '𝑖' => 'i', - '𝑗' => 'j', - '𝑘' => 'k', - '𝑙' => 'l', - '𝑚' => 'm', - '𝑛' => 'n', - '𝑜' => 'o', - '𝑝' => 'p', - '𝑞' => 'q', - '𝑟' => 'r', - '𝑠' => 's', - '𝑡' => 't', - '𝑢' => 'u', - '𝑣' => 'v', - '𝑤' => 'w', - '𝑥' => 'x', - '𝑦' => 'y', - '𝑧' => 'z', - '𝑨' => 'A', - '𝑩' => 'B', - '𝑪' => 'C', - '𝑫' => 'D', - '𝑬' => 'E', - '𝑭' => 'F', - '𝑮' => 'G', - '𝑯' => 'H', - '𝑰' => 'I', - '𝑱' => 'J', - '𝑲' => 'K', - '𝑳' => 'L', - '𝑴' => 'M', - '𝑵' => 'N', - '𝑶' => 'O', - '𝑷' => 'P', - '𝑸' => 'Q', - '𝑹' => 'R', - '𝑺' => 'S', - '𝑻' => 'T', - '𝑼' => 'U', - '𝑽' => 'V', - '𝑾' => 'W', - '𝑿' => 'X', - '𝒀' => 'Y', - '𝒁' => 'Z', - '𝒂' => 'a', - '𝒃' => 'b', - '𝒄' => 'c', - '𝒅' => 'd', - '𝒆' => 'e', - '𝒇' => 'f', - '𝒈' => 'g', - '𝒉' => 'h', - '𝒊' => 'i', - '𝒋' => 'j', - '𝒌' => 'k', - '𝒍' => 'l', - '𝒎' => 'm', - '𝒏' => 'n', - '𝒐' => 'o', - '𝒑' => 'p', - '𝒒' => 'q', - '𝒓' => 'r', - '𝒔' => 's', - '𝒕' => 't', - '𝒖' => 'u', - '𝒗' => 'v', - '𝒘' => 'w', - '𝒙' => 'x', - '𝒚' => 'y', - '𝒛' => 'z', - '𝒜' => 'A', - '𝒞' => 'C', - '𝒟' => 'D', - '𝒢' => 'G', - '𝒥' => 'J', - '𝒦' => 'K', - '𝒩' => 'N', - '𝒪' => 'O', - '𝒫' => 'P', - '𝒬' => 'Q', - '𝒮' => 'S', - '𝒯' => 'T', - '𝒰' => 'U', - '𝒱' => 'V', - '𝒲' => 'W', - '𝒳' => 'X', - '𝒴' => 'Y', - '𝒵' => 'Z', - '𝒶' => 'a', - '𝒷' => 'b', - '𝒸' => 'c', - '𝒹' => 'd', - '𝒻' => 'f', - '𝒽' => 'h', - '𝒾' => 'i', - '𝒿' => 'j', - '𝓀' => 'k', - '𝓁' => 'l', - '𝓂' => 'm', - '𝓃' => 'n', - '𝓅' => 'p', - '𝓆' => 'q', - '𝓇' => 'r', - '𝓈' => 's', - '𝓉' => 't', - '𝓊' => 'u', - '𝓋' => 'v', - '𝓌' => 'w', - '𝓍' => 'x', - '𝓎' => 'y', - '𝓏' => 'z', - '𝓐' => 'A', - '𝓑' => 'B', - '𝓒' => 'C', - '𝓓' => 'D', - '𝓔' => 'E', - '𝓕' => 'F', - '𝓖' => 'G', - '𝓗' => 'H', - '𝓘' => 'I', - '𝓙' => 'J', - '𝓚' => 'K', - '𝓛' => 'L', - '𝓜' => 'M', - '𝓝' => 'N', - '𝓞' => 'O', - '𝓟' => 'P', - '𝓠' => 'Q', - '𝓡' => 'R', - '𝓢' => 'S', - '𝓣' => 'T', - '𝓤' => 'U', - '𝓥' => 'V', - '𝓦' => 'W', - '𝓧' => 'X', - '𝓨' => 'Y', - '𝓩' => 'Z', - '𝓪' => 'a', - '𝓫' => 'b', - '𝓬' => 'c', - '𝓭' => 'd', - '𝓮' => 'e', - '𝓯' => 'f', - '𝓰' => 'g', - '𝓱' => 'h', - '𝓲' => 'i', - '𝓳' => 'j', - '𝓴' => 'k', - '𝓵' => 'l', - '𝓶' => 'm', - '𝓷' => 'n', - '𝓸' => 'o', - '𝓹' => 'p', - '𝓺' => 'q', - '𝓻' => 'r', - '𝓼' => 's', - '𝓽' => 't', - '𝓾' => 'u', - '𝓿' => 'v', - '𝔀' => 'w', - '𝔁' => 'x', - '𝔂' => 'y', - '𝔃' => 'z', - '𝔄' => 'A', - '𝔅' => 'B', - '𝔇' => 'D', - '𝔈' => 'E', - '𝔉' => 'F', - '𝔊' => 'G', - '𝔍' => 'J', - '𝔎' => 'K', - '𝔏' => 'L', - '𝔐' => 'M', - '𝔑' => 'N', - '𝔒' => 'O', - '𝔓' => 'P', - '𝔔' => 'Q', - '𝔖' => 'S', - '𝔗' => 'T', - '𝔘' => 'U', - '𝔙' => 'V', - '𝔚' => 'W', - '𝔛' => 'X', - '𝔜' => 'Y', - '𝔞' => 'a', - '𝔟' => 'b', - '𝔠' => 'c', - '𝔡' => 'd', - '𝔢' => 'e', - '𝔣' => 'f', - '𝔤' => 'g', - '𝔥' => 'h', - '𝔦' => 'i', - '𝔧' => 'j', - '𝔨' => 'k', - '𝔩' => 'l', - '𝔪' => 'm', - '𝔫' => 'n', - '𝔬' => 'o', - '𝔭' => 'p', - '𝔮' => 'q', - '𝔯' => 'r', - '𝔰' => 's', - '𝔱' => 't', - '𝔲' => 'u', - '𝔳' => 'v', - '𝔴' => 'w', - '𝔵' => 'x', - '𝔶' => 'y', - '𝔷' => 'z', - '𝔸' => 'A', - '𝔹' => 'B', - '𝔻' => 'D', - '𝔼' => 'E', - '𝔽' => 'F', - '𝔾' => 'G', - '𝕀' => 'I', - '𝕁' => 'J', - '𝕂' => 'K', - '𝕃' => 'L', - '𝕄' => 'M', - '𝕆' => 'O', - '𝕊' => 'S', - '𝕋' => 'T', - '𝕌' => 'U', - '𝕍' => 'V', - '𝕎' => 'W', - '𝕏' => 'X', - '𝕐' => 'Y', - '𝕒' => 'a', - '𝕓' => 'b', - '𝕔' => 'c', - '𝕕' => 'd', - '𝕖' => 'e', - '𝕗' => 'f', - '𝕘' => 'g', - '𝕙' => 'h', - '𝕚' => 'i', - '𝕛' => 'j', - '𝕜' => 'k', - '𝕝' => 'l', - '𝕞' => 'm', - '𝕟' => 'n', - '𝕠' => 'o', - '𝕡' => 'p', - '𝕢' => 'q', - '𝕣' => 'r', - '𝕤' => 's', - '𝕥' => 't', - '𝕦' => 'u', - '𝕧' => 'v', - '𝕨' => 'w', - '𝕩' => 'x', - '𝕪' => 'y', - '𝕫' => 'z', - '𝕬' => 'A', - '𝕭' => 'B', - '𝕮' => 'C', - '𝕯' => 'D', - '𝕰' => 'E', - '𝕱' => 'F', - '𝕲' => 'G', - '𝕳' => 'H', - '𝕴' => 'I', - '𝕵' => 'J', - '𝕶' => 'K', - '𝕷' => 'L', - '𝕸' => 'M', - '𝕹' => 'N', - '𝕺' => 'O', - '𝕻' => 'P', - '𝕼' => 'Q', - '𝕽' => 'R', - '𝕾' => 'S', - '𝕿' => 'T', - '𝖀' => 'U', - '𝖁' => 'V', - '𝖂' => 'W', - '𝖃' => 'X', - '𝖄' => 'Y', - '𝖅' => 'Z', - '𝖆' => 'a', - '𝖇' => 'b', - '𝖈' => 'c', - '𝖉' => 'd', - '𝖊' => 'e', - '𝖋' => 'f', - '𝖌' => 'g', - '𝖍' => 'h', - '𝖎' => 'i', - '𝖏' => 'j', - '𝖐' => 'k', - '𝖑' => 'l', - '𝖒' => 'm', - '𝖓' => 'n', - '𝖔' => 'o', - '𝖕' => 'p', - '𝖖' => 'q', - '𝖗' => 'r', - '𝖘' => 's', - '𝖙' => 't', - '𝖚' => 'u', - '𝖛' => 'v', - '𝖜' => 'w', - '𝖝' => 'x', - '𝖞' => 'y', - '𝖟' => 'z', - '𝖠' => 'A', - '𝖡' => 'B', - '𝖢' => 'C', - '𝖣' => 'D', - '𝖤' => 'E', - '𝖥' => 'F', - '𝖦' => 'G', - '𝖧' => 'H', - '𝖨' => 'I', - '𝖩' => 'J', - '𝖪' => 'K', - '𝖫' => 'L', - '𝖬' => 'M', - '𝖭' => 'N', - '𝖮' => 'O', - '𝖯' => 'P', - '𝖰' => 'Q', - '𝖱' => 'R', - '𝖲' => 'S', - '𝖳' => 'T', - '𝖴' => 'U', - '𝖵' => 'V', - '𝖶' => 'W', - '𝖷' => 'X', - '𝖸' => 'Y', - '𝖹' => 'Z', - '𝖺' => 'a', - '𝖻' => 'b', - '𝖼' => 'c', - '𝖽' => 'd', - '𝖾' => 'e', - '𝖿' => 'f', - '𝗀' => 'g', - '𝗁' => 'h', - '𝗂' => 'i', - '𝗃' => 'j', - '𝗄' => 'k', - '𝗅' => 'l', - '𝗆' => 'm', - '𝗇' => 'n', - '𝗈' => 'o', - '𝗉' => 'p', - '𝗊' => 'q', - '𝗋' => 'r', - '𝗌' => 's', - '𝗍' => 't', - '𝗎' => 'u', - '𝗏' => 'v', - '𝗐' => 'w', - '𝗑' => 'x', - '𝗒' => 'y', - '𝗓' => 'z', - '𝗔' => 'A', - '𝗕' => 'B', - '𝗖' => 'C', - '𝗗' => 'D', - '𝗘' => 'E', - '𝗙' => 'F', - '𝗚' => 'G', - '𝗛' => 'H', - '𝗜' => 'I', - '𝗝' => 'J', - '𝗞' => 'K', - '𝗟' => 'L', - '𝗠' => 'M', - '𝗡' => 'N', - '𝗢' => 'O', - '𝗣' => 'P', - '𝗤' => 'Q', - '𝗥' => 'R', - '𝗦' => 'S', - '𝗧' => 'T', - '𝗨' => 'U', - '𝗩' => 'V', - '𝗪' => 'W', - '𝗫' => 'X', - '𝗬' => 'Y', - '𝗭' => 'Z', - '𝗮' => 'a', - '𝗯' => 'b', - '𝗰' => 'c', - '𝗱' => 'd', - '𝗲' => 'e', - '𝗳' => 'f', - '𝗴' => 'g', - '𝗵' => 'h', - '𝗶' => 'i', - '𝗷' => 'j', - '𝗸' => 'k', - '𝗹' => 'l', - '𝗺' => 'm', - '𝗻' => 'n', - '𝗼' => 'o', - '𝗽' => 'p', - '𝗾' => 'q', - '𝗿' => 'r', - '𝘀' => 's', - '𝘁' => 't', - '𝘂' => 'u', - '𝘃' => 'v', - '𝘄' => 'w', - '𝘅' => 'x', - '𝘆' => 'y', - '𝘇' => 'z', - '𝘈' => 'A', - '𝘉' => 'B', - '𝘊' => 'C', - '𝘋' => 'D', - '𝘌' => 'E', - '𝘍' => 'F', - '𝘎' => 'G', - '𝘏' => 'H', - '𝘐' => 'I', - '𝘑' => 'J', - '𝘒' => 'K', - '𝘓' => 'L', - '𝘔' => 'M', - '𝘕' => 'N', - '𝘖' => 'O', - '𝘗' => 'P', - '𝘘' => 'Q', - '𝘙' => 'R', - '𝘚' => 'S', - '𝘛' => 'T', - '𝘜' => 'U', - '𝘝' => 'V', - '𝘞' => 'W', - '𝘟' => 'X', - '𝘠' => 'Y', - '𝘡' => 'Z', - '𝘢' => 'a', - '𝘣' => 'b', - '𝘤' => 'c', - '𝘥' => 'd', - '𝘦' => 'e', - '𝘧' => 'f', - '𝘨' => 'g', - '𝘩' => 'h', - '𝘪' => 'i', - '𝘫' => 'j', - '𝘬' => 'k', - '𝘭' => 'l', - '𝘮' => 'm', - '𝘯' => 'n', - '𝘰' => 'o', - '𝘱' => 'p', - '𝘲' => 'q', - '𝘳' => 'r', - '𝘴' => 's', - '𝘵' => 't', - '𝘶' => 'u', - '𝘷' => 'v', - '𝘸' => 'w', - '𝘹' => 'x', - '𝘺' => 'y', - '𝘻' => 'z', - '𝘼' => 'A', - '𝘽' => 'B', - '𝘾' => 'C', - '𝘿' => 'D', - '𝙀' => 'E', - '𝙁' => 'F', - '𝙂' => 'G', - '𝙃' => 'H', - '𝙄' => 'I', - '𝙅' => 'J', - '𝙆' => 'K', - '𝙇' => 'L', - '𝙈' => 'M', - '𝙉' => 'N', - '𝙊' => 'O', - '𝙋' => 'P', - '𝙌' => 'Q', - '𝙍' => 'R', - '𝙎' => 'S', - '𝙏' => 'T', - '𝙐' => 'U', - '𝙑' => 'V', - '𝙒' => 'W', - '𝙓' => 'X', - '𝙔' => 'Y', - '𝙕' => 'Z', - '𝙖' => 'a', - '𝙗' => 'b', - '𝙘' => 'c', - '𝙙' => 'd', - '𝙚' => 'e', - '𝙛' => 'f', - '𝙜' => 'g', - '𝙝' => 'h', - '𝙞' => 'i', - '𝙟' => 'j', - '𝙠' => 'k', - '𝙡' => 'l', - '𝙢' => 'm', - '𝙣' => 'n', - '𝙤' => 'o', - '𝙥' => 'p', - '𝙦' => 'q', - '𝙧' => 'r', - '𝙨' => 's', - '𝙩' => 't', - '𝙪' => 'u', - '𝙫' => 'v', - '𝙬' => 'w', - '𝙭' => 'x', - '𝙮' => 'y', - '𝙯' => 'z', - '𝙰' => 'A', - '𝙱' => 'B', - '𝙲' => 'C', - '𝙳' => 'D', - '𝙴' => 'E', - '𝙵' => 'F', - '𝙶' => 'G', - '𝙷' => 'H', - '𝙸' => 'I', - '𝙹' => 'J', - '𝙺' => 'K', - '𝙻' => 'L', - '𝙼' => 'M', - '𝙽' => 'N', - '𝙾' => 'O', - '𝙿' => 'P', - '𝚀' => 'Q', - '𝚁' => 'R', - '𝚂' => 'S', - '𝚃' => 'T', - '𝚄' => 'U', - '𝚅' => 'V', - '𝚆' => 'W', - '𝚇' => 'X', - '𝚈' => 'Y', - '𝚉' => 'Z', - '𝚊' => 'a', - '𝚋' => 'b', - '𝚌' => 'c', - '𝚍' => 'd', - '𝚎' => 'e', - '𝚏' => 'f', - '𝚐' => 'g', - '𝚑' => 'h', - '𝚒' => 'i', - '𝚓' => 'j', - '𝚔' => 'k', - '𝚕' => 'l', - '𝚖' => 'm', - '𝚗' => 'n', - '𝚘' => 'o', - '𝚙' => 'p', - '𝚚' => 'q', - '𝚛' => 'r', - '𝚜' => 's', - '𝚝' => 't', - '𝚞' => 'u', - '𝚟' => 'v', - '𝚠' => 'w', - '𝚡' => 'x', - '𝚢' => 'y', - '𝚣' => 'z', - '𝚤' => 'ı', - '𝚥' => 'ȷ', - '𝚨' => 'Α', - '𝚩' => 'Β', - '𝚪' => 'Γ', - '𝚫' => 'Δ', - '𝚬' => 'Ε', - '𝚭' => 'Ζ', - '𝚮' => 'Η', - '𝚯' => 'Θ', - '𝚰' => 'Ι', - '𝚱' => 'Κ', - '𝚲' => 'Λ', - '𝚳' => 'Μ', - '𝚴' => 'Ν', - '𝚵' => 'Ξ', - '𝚶' => 'Ο', - '𝚷' => 'Π', - '𝚸' => 'Ρ', - '𝚹' => 'ϴ', - '𝚺' => 'Σ', - '𝚻' => 'Τ', - '𝚼' => 'Υ', - '𝚽' => 'Φ', - '𝚾' => 'Χ', - '𝚿' => 'Ψ', - '𝛀' => 'Ω', - '𝛁' => '∇', - '𝛂' => 'α', - '𝛃' => 'β', - '𝛄' => 'γ', - '𝛅' => 'δ', - '𝛆' => 'ε', - '𝛇' => 'ζ', - '𝛈' => 'η', - '𝛉' => 'θ', - '𝛊' => 'ι', - '𝛋' => 'κ', - '𝛌' => 'λ', - '𝛍' => 'μ', - '𝛎' => 'ν', - '𝛏' => 'ξ', - '𝛐' => 'ο', - '𝛑' => 'π', - '𝛒' => 'ρ', - '𝛓' => 'ς', - '𝛔' => 'σ', - '𝛕' => 'τ', - '𝛖' => 'υ', - '𝛗' => 'φ', - '𝛘' => 'χ', - '𝛙' => 'ψ', - '𝛚' => 'ω', - '𝛛' => '∂', - '𝛜' => 'ϵ', - '𝛝' => 'ϑ', - '𝛞' => 'ϰ', - '𝛟' => 'ϕ', - '𝛠' => 'ϱ', - '𝛡' => 'ϖ', - '𝛢' => 'Α', - '𝛣' => 'Β', - '𝛤' => 'Γ', - '𝛥' => 'Δ', - '𝛦' => 'Ε', - '𝛧' => 'Ζ', - '𝛨' => 'Η', - '𝛩' => 'Θ', - '𝛪' => 'Ι', - '𝛫' => 'Κ', - '𝛬' => 'Λ', - '𝛭' => 'Μ', - '𝛮' => 'Ν', - '𝛯' => 'Ξ', - '𝛰' => 'Ο', - '𝛱' => 'Π', - '𝛲' => 'Ρ', - '𝛳' => 'ϴ', - '𝛴' => 'Σ', - '𝛵' => 'Τ', - '𝛶' => 'Υ', - '𝛷' => 'Φ', - '𝛸' => 'Χ', - '𝛹' => 'Ψ', - '𝛺' => 'Ω', - '𝛻' => '∇', - '𝛼' => 'α', - '𝛽' => 'β', - '𝛾' => 'γ', - '𝛿' => 'δ', - '𝜀' => 'ε', - '𝜁' => 'ζ', - '𝜂' => 'η', - '𝜃' => 'θ', - '𝜄' => 'ι', - '𝜅' => 'κ', - '𝜆' => 'λ', - '𝜇' => 'μ', - '𝜈' => 'ν', - '𝜉' => 'ξ', - '𝜊' => 'ο', - '𝜋' => 'π', - '𝜌' => 'ρ', - '𝜍' => 'ς', - '𝜎' => 'σ', - '𝜏' => 'τ', - '𝜐' => 'υ', - '𝜑' => 'φ', - '𝜒' => 'χ', - '𝜓' => 'ψ', - '𝜔' => 'ω', - '𝜕' => '∂', - '𝜖' => 'ϵ', - '𝜗' => 'ϑ', - '𝜘' => 'ϰ', - '𝜙' => 'ϕ', - '𝜚' => 'ϱ', - '𝜛' => 'ϖ', - '𝜜' => 'Α', - '𝜝' => 'Β', - '𝜞' => 'Γ', - '𝜟' => 'Δ', - '𝜠' => 'Ε', - '𝜡' => 'Ζ', - '𝜢' => 'Η', - '𝜣' => 'Θ', - '𝜤' => 'Ι', - '𝜥' => 'Κ', - '𝜦' => 'Λ', - '𝜧' => 'Μ', - '𝜨' => 'Ν', - '𝜩' => 'Ξ', - '𝜪' => 'Ο', - '𝜫' => 'Π', - '𝜬' => 'Ρ', - '𝜭' => 'ϴ', - '𝜮' => 'Σ', - '𝜯' => 'Τ', - '𝜰' => 'Υ', - '𝜱' => 'Φ', - '𝜲' => 'Χ', - '𝜳' => 'Ψ', - '𝜴' => 'Ω', - '𝜵' => '∇', - '𝜶' => 'α', - '𝜷' => 'β', - '𝜸' => 'γ', - '𝜹' => 'δ', - '𝜺' => 'ε', - '𝜻' => 'ζ', - '𝜼' => 'η', - '𝜽' => 'θ', - '𝜾' => 'ι', - '𝜿' => 'κ', - '𝝀' => 'λ', - '𝝁' => 'μ', - '𝝂' => 'ν', - '𝝃' => 'ξ', - '𝝄' => 'ο', - '𝝅' => 'π', - '𝝆' => 'ρ', - '𝝇' => 'ς', - '𝝈' => 'σ', - '𝝉' => 'τ', - '𝝊' => 'υ', - '𝝋' => 'φ', - '𝝌' => 'χ', - '𝝍' => 'ψ', - '𝝎' => 'ω', - '𝝏' => '∂', - '𝝐' => 'ϵ', - '𝝑' => 'ϑ', - '𝝒' => 'ϰ', - '𝝓' => 'ϕ', - '𝝔' => 'ϱ', - '𝝕' => 'ϖ', - '𝝖' => 'Α', - '𝝗' => 'Β', - '𝝘' => 'Γ', - '𝝙' => 'Δ', - '𝝚' => 'Ε', - '𝝛' => 'Ζ', - '𝝜' => 'Η', - '𝝝' => 'Θ', - '𝝞' => 'Ι', - '𝝟' => 'Κ', - '𝝠' => 'Λ', - '𝝡' => 'Μ', - '𝝢' => 'Ν', - '𝝣' => 'Ξ', - '𝝤' => 'Ο', - '𝝥' => 'Π', - '𝝦' => 'Ρ', - '𝝧' => 'ϴ', - '𝝨' => 'Σ', - '𝝩' => 'Τ', - '𝝪' => 'Υ', - '𝝫' => 'Φ', - '𝝬' => 'Χ', - '𝝭' => 'Ψ', - '𝝮' => 'Ω', - '𝝯' => '∇', - '𝝰' => 'α', - '𝝱' => 'β', - '𝝲' => 'γ', - '𝝳' => 'δ', - '𝝴' => 'ε', - '𝝵' => 'ζ', - '𝝶' => 'η', - '𝝷' => 'θ', - '𝝸' => 'ι', - '𝝹' => 'κ', - '𝝺' => 'λ', - '𝝻' => 'μ', - '𝝼' => 'ν', - '𝝽' => 'ξ', - '𝝾' => 'ο', - '𝝿' => 'π', - '𝞀' => 'ρ', - '𝞁' => 'ς', - '𝞂' => 'σ', - '𝞃' => 'τ', - '𝞄' => 'υ', - '𝞅' => 'φ', - '𝞆' => 'χ', - '𝞇' => 'ψ', - '𝞈' => 'ω', - '𝞉' => '∂', - '𝞊' => 'ϵ', - '𝞋' => 'ϑ', - '𝞌' => 'ϰ', - '𝞍' => 'ϕ', - '𝞎' => 'ϱ', - '𝞏' => 'ϖ', - '𝞐' => 'Α', - '𝞑' => 'Β', - '𝞒' => 'Γ', - '𝞓' => 'Δ', - '𝞔' => 'Ε', - '𝞕' => 'Ζ', - '𝞖' => 'Η', - '𝞗' => 'Θ', - '𝞘' => 'Ι', - '𝞙' => 'Κ', - '𝞚' => 'Λ', - '𝞛' => 'Μ', - '𝞜' => 'Ν', - '𝞝' => 'Ξ', - '𝞞' => 'Ο', - '𝞟' => 'Π', - '𝞠' => 'Ρ', - '𝞡' => 'ϴ', - '𝞢' => 'Σ', - '𝞣' => 'Τ', - '𝞤' => 'Υ', - '𝞥' => 'Φ', - '𝞦' => 'Χ', - '𝞧' => 'Ψ', - '𝞨' => 'Ω', - '𝞩' => '∇', - '𝞪' => 'α', - '𝞫' => 'β', - '𝞬' => 'γ', - '𝞭' => 'δ', - '𝞮' => 'ε', - '𝞯' => 'ζ', - '𝞰' => 'η', - '𝞱' => 'θ', - '𝞲' => 'ι', - '𝞳' => 'κ', - '𝞴' => 'λ', - '𝞵' => 'μ', - '𝞶' => 'ν', - '𝞷' => 'ξ', - '𝞸' => 'ο', - '𝞹' => 'π', - '𝞺' => 'ρ', - '𝞻' => 'ς', - '𝞼' => 'σ', - '𝞽' => 'τ', - '𝞾' => 'υ', - '𝞿' => 'φ', - '𝟀' => 'χ', - '𝟁' => 'ψ', - '𝟂' => 'ω', - '𝟃' => '∂', - '𝟄' => 'ϵ', - '𝟅' => 'ϑ', - '𝟆' => 'ϰ', - '𝟇' => 'ϕ', - '𝟈' => 'ϱ', - '𝟉' => 'ϖ', - '𝟊' => 'Ϝ', - '𝟋' => 'ϝ', - '𝟎' => '0', - '𝟏' => '1', - '𝟐' => '2', - '𝟑' => '3', - '𝟒' => '4', - '𝟓' => '5', - '𝟔' => '6', - '𝟕' => '7', - '𝟖' => '8', - '𝟗' => '9', - '𝟘' => '0', - '𝟙' => '1', - '𝟚' => '2', - '𝟛' => '3', - '𝟜' => '4', - '𝟝' => '5', - '𝟞' => '6', - '𝟟' => '7', - '𝟠' => '8', - '𝟡' => '9', - '𝟢' => '0', - '𝟣' => '1', - '𝟤' => '2', - '𝟥' => '3', - '𝟦' => '4', - '𝟧' => '5', - '𝟨' => '6', - '𝟩' => '7', - '𝟪' => '8', - '𝟫' => '9', - '𝟬' => '0', - '𝟭' => '1', - '𝟮' => '2', - '𝟯' => '3', - '𝟰' => '4', - '𝟱' => '5', - '𝟲' => '6', - '𝟳' => '7', - '𝟴' => '8', - '𝟵' => '9', - '𝟶' => '0', - '𝟷' => '1', - '𝟸' => '2', - '𝟹' => '3', - '𝟺' => '4', - '𝟻' => '5', - '𝟼' => '6', - '𝟽' => '7', - '𝟾' => '8', - '𝟿' => '9', - '𞸀' => 'ا', - '𞸁' => 'ب', - '𞸂' => 'ج', - '𞸃' => 'د', - '𞸅' => 'و', - '𞸆' => 'ز', - '𞸇' => 'ح', - '𞸈' => 'ط', - '𞸉' => 'ي', - '𞸊' => 'ك', - '𞸋' => 'ل', - '𞸌' => 'م', - '𞸍' => 'ن', - '𞸎' => 'س', - '𞸏' => 'ع', - '𞸐' => 'ف', - '𞸑' => 'ص', - '𞸒' => 'ق', - '𞸓' => 'ر', - '𞸔' => 'ش', - '𞸕' => 'ت', - '𞸖' => 'ث', - '𞸗' => 'خ', - '𞸘' => 'ذ', - '𞸙' => 'ض', - '𞸚' => 'ظ', - '𞸛' => 'غ', - '𞸜' => 'ٮ', - '𞸝' => 'ں', - '𞸞' => 'ڡ', - '𞸟' => 'ٯ', - '𞸡' => 'ب', - '𞸢' => 'ج', - '𞸤' => 'ه', - '𞸧' => 'ح', - '𞸩' => 'ي', - '𞸪' => 'ك', - '𞸫' => 'ل', - '𞸬' => 'م', - '𞸭' => 'ن', - '𞸮' => 'س', - '𞸯' => 'ع', - '𞸰' => 'ف', - '𞸱' => 'ص', - '𞸲' => 'ق', - '𞸴' => 'ش', - '𞸵' => 'ت', - '𞸶' => 'ث', - '𞸷' => 'خ', - '𞸹' => 'ض', - '𞸻' => 'غ', - '𞹂' => 'ج', - '𞹇' => 'ح', - '𞹉' => 'ي', - '𞹋' => 'ل', - '𞹍' => 'ن', - '𞹎' => 'س', - '𞹏' => 'ع', - '𞹑' => 'ص', - '𞹒' => 'ق', - '𞹔' => 'ش', - '𞹗' => 'خ', - '𞹙' => 'ض', - '𞹛' => 'غ', - '𞹝' => 'ں', - '𞹟' => 'ٯ', - '𞹡' => 'ب', - '𞹢' => 'ج', - '𞹤' => 'ه', - '𞹧' => 'ح', - '𞹨' => 'ط', - '𞹩' => 'ي', - '𞹪' => 'ك', - '𞹬' => 'م', - '𞹭' => 'ن', - '𞹮' => 'س', - '𞹯' => 'ع', - '𞹰' => 'ف', - '𞹱' => 'ص', - '𞹲' => 'ق', - '𞹴' => 'ش', - '𞹵' => 'ت', - '𞹶' => 'ث', - '𞹷' => 'خ', - '𞹹' => 'ض', - '𞹺' => 'ظ', - '𞹻' => 'غ', - '𞹼' => 'ٮ', - '𞹾' => 'ڡ', - '𞺀' => 'ا', - '𞺁' => 'ب', - '𞺂' => 'ج', - '𞺃' => 'د', - '𞺄' => 'ه', - '𞺅' => 'و', - '𞺆' => 'ز', - '𞺇' => 'ح', - '𞺈' => 'ط', - '𞺉' => 'ي', - '𞺋' => 'ل', - '𞺌' => 'م', - '𞺍' => 'ن', - '𞺎' => 'س', - '𞺏' => 'ع', - '𞺐' => 'ف', - '𞺑' => 'ص', - '𞺒' => 'ق', - '𞺓' => 'ر', - '𞺔' => 'ش', - '𞺕' => 'ت', - '𞺖' => 'ث', - '𞺗' => 'خ', - '𞺘' => 'ذ', - '𞺙' => 'ض', - '𞺚' => 'ظ', - '𞺛' => 'غ', - '𞺡' => 'ب', - '𞺢' => 'ج', - '𞺣' => 'د', - '𞺥' => 'و', - '𞺦' => 'ز', - '𞺧' => 'ح', - '𞺨' => 'ط', - '𞺩' => 'ي', - '𞺫' => 'ل', - '𞺬' => 'م', - '𞺭' => 'ن', - '𞺮' => 'س', - '𞺯' => 'ع', - '𞺰' => 'ف', - '𞺱' => 'ص', - '𞺲' => 'ق', - '𞺳' => 'ر', - '𞺴' => 'ش', - '𞺵' => 'ت', - '𞺶' => 'ث', - '𞺷' => 'خ', - '𞺸' => 'ذ', - '𞺹' => 'ض', - '𞺺' => 'ظ', - '𞺻' => 'غ', - '🄀' => '0.', - '🄁' => '0,', - '🄂' => '1,', - '🄃' => '2,', - '🄄' => '3,', - '🄅' => '4,', - '🄆' => '5,', - '🄇' => '6,', - '🄈' => '7,', - '🄉' => '8,', - '🄊' => '9,', - '🄐' => '(A)', - '🄑' => '(B)', - '🄒' => '(C)', - '🄓' => '(D)', - '🄔' => '(E)', - '🄕' => '(F)', - '🄖' => '(G)', - '🄗' => '(H)', - '🄘' => '(I)', - '🄙' => '(J)', - '🄚' => '(K)', - '🄛' => '(L)', - '🄜' => '(M)', - '🄝' => '(N)', - '🄞' => '(O)', - '🄟' => '(P)', - '🄠' => '(Q)', - '🄡' => '(R)', - '🄢' => '(S)', - '🄣' => '(T)', - '🄤' => '(U)', - '🄥' => '(V)', - '🄦' => '(W)', - '🄧' => '(X)', - '🄨' => '(Y)', - '🄩' => '(Z)', - '🄪' => '〔S〕', - '🄫' => '(C)', - '🄬' => '(R)', - '🄭' => '(CD)', - '🄮' => '(WZ)', - '🄰' => 'A', - '🄱' => 'B', - '🄲' => 'C', - '🄳' => 'D', - '🄴' => 'E', - '🄵' => 'F', - '🄶' => 'G', - '🄷' => 'H', - '🄸' => 'I', - '🄹' => 'J', - '🄺' => 'K', - '🄻' => 'L', - '🄼' => 'M', - '🄽' => 'N', - '🄾' => 'O', - '🄿' => 'P', - '🅀' => 'Q', - '🅁' => 'R', - '🅂' => 'S', - '🅃' => 'T', - '🅄' => 'U', - '🅅' => 'V', - '🅆' => 'W', - '🅇' => 'X', - '🅈' => 'Y', - '🅉' => 'Z', - '🅊' => 'HV', - '🅋' => 'MV', - '🅌' => 'SD', - '🅍' => 'SS', - '🅎' => 'PPV', - '🅏' => 'WC', - '🆐' => 'DJ', - '🈀' => 'ほか', - '🈁' => 'ココ', - '🈂' => 'サ', - '🈐' => '手', - '🈑' => '字', - '🈒' => '双', - '🈓' => 'デ', - '🈔' => '二', - '🈕' => '多', - '🈖' => '解', - '🈗' => '天', - '🈘' => '交', - '🈙' => '映', - '🈚' => '無', - '🈛' => '料', - '🈜' => '前', - '🈝' => '後', - '🈞' => '再', - '🈟' => '新', - '🈠' => '初', - '🈡' => '終', - '🈢' => '生', - '🈣' => '販', - '🈤' => '声', - '🈥' => '吹', - '🈦' => '演', - '🈧' => '投', - '🈨' => '捕', - '🈩' => '一', - '🈪' => '三', - '🈫' => '遊', - '🈬' => '左', - '🈭' => '中', - '🈮' => '右', - '🈯' => '指', - '🈰' => '走', - '🈱' => '打', - '🈲' => '禁', - '🈳' => '空', - '🈴' => '合', - '🈵' => '満', - '🈶' => '有', - '🈷' => '月', - '🈸' => '申', - '🈹' => '割', - '🈺' => '営', - '🈻' => '配', - '🉀' => '〔本〕', - '🉁' => '〔三〕', - '🉂' => '〔二〕', - '🉃' => '〔安〕', - '🉄' => '〔点〕', - '🉅' => '〔打〕', - '🉆' => '〔盗〕', - '🉇' => '〔勝〕', - '🉈' => '〔敗〕', - '🉐' => '(得)', - '🉑' => '(可)', - '🯰' => '0', - '🯱' => '1', - '🯲' => '2', - '🯳' => '3', - '🯴' => '4', - '🯵' => '5', - '🯶' => '6', - '🯷' => '7', - '🯸' => '8', - '🯹' => '9', - '丽' => '丽', - '丸' => '丸', - '乁' => '乁', - '𠄢' => '𠄢', - '你' => '你', - '侮' => '侮', - '侻' => '侻', - '倂' => '倂', - '偺' => '偺', - '備' => '備', - '僧' => '僧', - '像' => '像', - '㒞' => '㒞', - '𠘺' => '𠘺', - '免' => '免', - '兔' => '兔', - '兤' => '兤', - '具' => '具', - '𠔜' => '𠔜', - '㒹' => '㒹', - '內' => '內', - '再' => '再', - '𠕋' => '𠕋', - '冗' => '冗', - '冤' => '冤', - '仌' => '仌', - '冬' => '冬', - '况' => '况', - '𩇟' => '𩇟', - '凵' => '凵', - '刃' => '刃', - '㓟' => '㓟', - '刻' => '刻', - '剆' => '剆', - '割' => '割', - '剷' => '剷', - '㔕' => '㔕', - '勇' => '勇', - '勉' => '勉', - '勤' => '勤', - '勺' => '勺', - '包' => '包', - '匆' => '匆', - '北' => '北', - '卉' => '卉', - '卑' => '卑', - '博' => '博', - '即' => '即', - '卽' => '卽', - '卿' => '卿', - '卿' => '卿', - '卿' => '卿', - '𠨬' => '𠨬', - '灰' => '灰', - '及' => '及', - '叟' => '叟', - '𠭣' => '𠭣', - '叫' => '叫', - '叱' => '叱', - '吆' => '吆', - '咞' => '咞', - '吸' => '吸', - '呈' => '呈', - '周' => '周', - '咢' => '咢', - '哶' => '哶', - '唐' => '唐', - '啓' => '啓', - '啣' => '啣', - '善' => '善', - '善' => '善', - '喙' => '喙', - '喫' => '喫', - '喳' => '喳', - '嗂' => '嗂', - '圖' => '圖', - '嘆' => '嘆', - '圗' => '圗', - '噑' => '噑', - '噴' => '噴', - '切' => '切', - '壮' => '壮', - '城' => '城', - '埴' => '埴', - '堍' => '堍', - '型' => '型', - '堲' => '堲', - '報' => '報', - '墬' => '墬', - '𡓤' => '𡓤', - '売' => '売', - '壷' => '壷', - '夆' => '夆', - '多' => '多', - '夢' => '夢', - '奢' => '奢', - '𡚨' => '𡚨', - '𡛪' => '𡛪', - '姬' => '姬', - '娛' => '娛', - '娧' => '娧', - '姘' => '姘', - '婦' => '婦', - '㛮' => '㛮', - '㛼' => '㛼', - '嬈' => '嬈', - '嬾' => '嬾', - '嬾' => '嬾', - '𡧈' => '𡧈', - '寃' => '寃', - '寘' => '寘', - '寧' => '寧', - '寳' => '寳', - '𡬘' => '𡬘', - '寿' => '寿', - '将' => '将', - '当' => '当', - '尢' => '尢', - '㞁' => '㞁', - '屠' => '屠', - '屮' => '屮', - '峀' => '峀', - '岍' => '岍', - '𡷤' => '𡷤', - '嵃' => '嵃', - '𡷦' => '𡷦', - '嵮' => '嵮', - '嵫' => '嵫', - '嵼' => '嵼', - '巡' => '巡', - '巢' => '巢', - '㠯' => '㠯', - '巽' => '巽', - '帨' => '帨', - '帽' => '帽', - '幩' => '幩', - '㡢' => '㡢', - '𢆃' => '𢆃', - '㡼' => '㡼', - '庰' => '庰', - '庳' => '庳', - '庶' => '庶', - '廊' => '廊', - '𪎒' => '𪎒', - '廾' => '廾', - '𢌱' => '𢌱', - '𢌱' => '𢌱', - '舁' => '舁', - '弢' => '弢', - '弢' => '弢', - '㣇' => '㣇', - '𣊸' => '𣊸', - '𦇚' => '𦇚', - '形' => '形', - '彫' => '彫', - '㣣' => '㣣', - '徚' => '徚', - '忍' => '忍', - '志' => '志', - '忹' => '忹', - '悁' => '悁', - '㤺' => '㤺', - '㤜' => '㤜', - '悔' => '悔', - '𢛔' => '𢛔', - '惇' => '惇', - '慈' => '慈', - '慌' => '慌', - '慎' => '慎', - '慌' => '慌', - '慺' => '慺', - '憎' => '憎', - '憲' => '憲', - '憤' => '憤', - '憯' => '憯', - '懞' => '懞', - '懲' => '懲', - '懶' => '懶', - '成' => '成', - '戛' => '戛', - '扝' => '扝', - '抱' => '抱', - '拔' => '拔', - '捐' => '捐', - '𢬌' => '𢬌', - '挽' => '挽', - '拼' => '拼', - '捨' => '捨', - '掃' => '掃', - '揤' => '揤', - '𢯱' => '𢯱', - '搢' => '搢', - '揅' => '揅', - '掩' => '掩', - '㨮' => '㨮', - '摩' => '摩', - '摾' => '摾', - '撝' => '撝', - '摷' => '摷', - '㩬' => '㩬', - '敏' => '敏', - '敬' => '敬', - '𣀊' => '𣀊', - '旣' => '旣', - '書' => '書', - '晉' => '晉', - '㬙' => '㬙', - '暑' => '暑', - '㬈' => '㬈', - '㫤' => '㫤', - '冒' => '冒', - '冕' => '冕', - '最' => '最', - '暜' => '暜', - '肭' => '肭', - '䏙' => '䏙', - '朗' => '朗', - '望' => '望', - '朡' => '朡', - '杞' => '杞', - '杓' => '杓', - '𣏃' => '𣏃', - '㭉' => '㭉', - '柺' => '柺', - '枅' => '枅', - '桒' => '桒', - '梅' => '梅', - '𣑭' => '𣑭', - '梎' => '梎', - '栟' => '栟', - '椔' => '椔', - '㮝' => '㮝', - '楂' => '楂', - '榣' => '榣', - '槪' => '槪', - '檨' => '檨', - '𣚣' => '𣚣', - '櫛' => '櫛', - '㰘' => '㰘', - '次' => '次', - '𣢧' => '𣢧', - '歔' => '歔', - '㱎' => '㱎', - '歲' => '歲', - '殟' => '殟', - '殺' => '殺', - '殻' => '殻', - '𣪍' => '𣪍', - '𡴋' => '𡴋', - '𣫺' => '𣫺', - '汎' => '汎', - '𣲼' => '𣲼', - '沿' => '沿', - '泍' => '泍', - '汧' => '汧', - '洖' => '洖', - '派' => '派', - '海' => '海', - '流' => '流', - '浩' => '浩', - '浸' => '浸', - '涅' => '涅', - '𣴞' => '𣴞', - '洴' => '洴', - '港' => '港', - '湮' => '湮', - '㴳' => '㴳', - '滋' => '滋', - '滇' => '滇', - '𣻑' => '𣻑', - '淹' => '淹', - '潮' => '潮', - '𣽞' => '𣽞', - '𣾎' => '𣾎', - '濆' => '濆', - '瀹' => '瀹', - '瀞' => '瀞', - '瀛' => '瀛', - '㶖' => '㶖', - '灊' => '灊', - '災' => '災', - '灷' => '灷', - '炭' => '炭', - '𠔥' => '𠔥', - '煅' => '煅', - '𤉣' => '𤉣', - '熜' => '熜', - '𤎫' => '𤎫', - '爨' => '爨', - '爵' => '爵', - '牐' => '牐', - '𤘈' => '𤘈', - '犀' => '犀', - '犕' => '犕', - '𤜵' => '𤜵', - '𤠔' => '𤠔', - '獺' => '獺', - '王' => '王', - '㺬' => '㺬', - '玥' => '玥', - '㺸' => '㺸', - '㺸' => '㺸', - '瑇' => '瑇', - '瑜' => '瑜', - '瑱' => '瑱', - '璅' => '璅', - '瓊' => '瓊', - '㼛' => '㼛', - '甤' => '甤', - '𤰶' => '𤰶', - '甾' => '甾', - '𤲒' => '𤲒', - '異' => '異', - '𢆟' => '𢆟', - '瘐' => '瘐', - '𤾡' => '𤾡', - '𤾸' => '𤾸', - '𥁄' => '𥁄', - '㿼' => '㿼', - '䀈' => '䀈', - '直' => '直', - '𥃳' => '𥃳', - '𥃲' => '𥃲', - '𥄙' => '𥄙', - '𥄳' => '𥄳', - '眞' => '眞', - '真' => '真', - '真' => '真', - '睊' => '睊', - '䀹' => '䀹', - '瞋' => '瞋', - '䁆' => '䁆', - '䂖' => '䂖', - '𥐝' => '𥐝', - '硎' => '硎', - '碌' => '碌', - '磌' => '磌', - '䃣' => '䃣', - '𥘦' => '𥘦', - '祖' => '祖', - '𥚚' => '𥚚', - '𥛅' => '𥛅', - '福' => '福', - '秫' => '秫', - '䄯' => '䄯', - '穀' => '穀', - '穊' => '穊', - '穏' => '穏', - '𥥼' => '𥥼', - '𥪧' => '𥪧', - '𥪧' => '𥪧', - '竮' => '竮', - '䈂' => '䈂', - '𥮫' => '𥮫', - '篆' => '篆', - '築' => '築', - '䈧' => '䈧', - '𥲀' => '𥲀', - '糒' => '糒', - '䊠' => '䊠', - '糨' => '糨', - '糣' => '糣', - '紀' => '紀', - '𥾆' => '𥾆', - '絣' => '絣', - '䌁' => '䌁', - '緇' => '緇', - '縂' => '縂', - '繅' => '繅', - '䌴' => '䌴', - '𦈨' => '𦈨', - '𦉇' => '𦉇', - '䍙' => '䍙', - '𦋙' => '𦋙', - '罺' => '罺', - '𦌾' => '𦌾', - '羕' => '羕', - '翺' => '翺', - '者' => '者', - '𦓚' => '𦓚', - '𦔣' => '𦔣', - '聠' => '聠', - '𦖨' => '𦖨', - '聰' => '聰', - '𣍟' => '𣍟', - '䏕' => '䏕', - '育' => '育', - '脃' => '脃', - '䐋' => '䐋', - '脾' => '脾', - '媵' => '媵', - '𦞧' => '𦞧', - '𦞵' => '𦞵', - '𣎓' => '𣎓', - '𣎜' => '𣎜', - '舁' => '舁', - '舄' => '舄', - '辞' => '辞', - '䑫' => '䑫', - '芑' => '芑', - '芋' => '芋', - '芝' => '芝', - '劳' => '劳', - '花' => '花', - '芳' => '芳', - '芽' => '芽', - '苦' => '苦', - '𦬼' => '𦬼', - '若' => '若', - '茝' => '茝', - '荣' => '荣', - '莭' => '莭', - '茣' => '茣', - '莽' => '莽', - '菧' => '菧', - '著' => '著', - '荓' => '荓', - '菊' => '菊', - '菌' => '菌', - '菜' => '菜', - '𦰶' => '𦰶', - '𦵫' => '𦵫', - '𦳕' => '𦳕', - '䔫' => '䔫', - '蓱' => '蓱', - '蓳' => '蓳', - '蔖' => '蔖', - '𧏊' => '𧏊', - '蕤' => '蕤', - '𦼬' => '𦼬', - '䕝' => '䕝', - '䕡' => '䕡', - '𦾱' => '𦾱', - '𧃒' => '𧃒', - '䕫' => '䕫', - '虐' => '虐', - '虜' => '虜', - '虧' => '虧', - '虩' => '虩', - '蚩' => '蚩', - '蚈' => '蚈', - '蜎' => '蜎', - '蛢' => '蛢', - '蝹' => '蝹', - '蜨' => '蜨', - '蝫' => '蝫', - '螆' => '螆', - '䗗' => '䗗', - '蟡' => '蟡', - '蠁' => '蠁', - '䗹' => '䗹', - '衠' => '衠', - '衣' => '衣', - '𧙧' => '𧙧', - '裗' => '裗', - '裞' => '裞', - '䘵' => '䘵', - '裺' => '裺', - '㒻' => '㒻', - '𧢮' => '𧢮', - '𧥦' => '𧥦', - '䚾' => '䚾', - '䛇' => '䛇', - '誠' => '誠', - '諭' => '諭', - '變' => '變', - '豕' => '豕', - '𧲨' => '𧲨', - '貫' => '貫', - '賁' => '賁', - '贛' => '贛', - '起' => '起', - '𧼯' => '𧼯', - '𠠄' => '𠠄', - '跋' => '跋', - '趼' => '趼', - '跰' => '跰', - '𠣞' => '𠣞', - '軔' => '軔', - '輸' => '輸', - '𨗒' => '𨗒', - '𨗭' => '𨗭', - '邔' => '邔', - '郱' => '郱', - '鄑' => '鄑', - '𨜮' => '𨜮', - '鄛' => '鄛', - '鈸' => '鈸', - '鋗' => '鋗', - '鋘' => '鋘', - '鉼' => '鉼', - '鏹' => '鏹', - '鐕' => '鐕', - '𨯺' => '𨯺', - '開' => '開', - '䦕' => '䦕', - '閷' => '閷', - '𨵷' => '𨵷', - '䧦' => '䧦', - '雃' => '雃', - '嶲' => '嶲', - '霣' => '霣', - '𩅅' => '𩅅', - '𩈚' => '𩈚', - '䩮' => '䩮', - '䩶' => '䩶', - '韠' => '韠', - '𩐊' => '𩐊', - '䪲' => '䪲', - '𩒖' => '𩒖', - '頋' => '頋', - '頋' => '頋', - '頩' => '頩', - '𩖶' => '𩖶', - '飢' => '飢', - '䬳' => '䬳', - '餩' => '餩', - '馧' => '馧', - '駂' => '駂', - '駾' => '駾', - '䯎' => '䯎', - '𩬰' => '𩬰', - '鬒' => '鬒', - '鱀' => '鱀', - '鳽' => '鳽', - '䳎' => '䳎', - '䳭' => '䳭', - '鵧' => '鵧', - '𪃎' => '𪃎', - '䳸' => '䳸', - '𪄅' => '𪄅', - '𪈎' => '𪈎', - '𪊑' => '𪊑', - '麻' => '麻', - '䵖' => '䵖', - '黹' => '黹', - '黾' => '黾', - '鼅' => '鼅', - '鼏' => '鼏', - '鼖' => '鼖', - '鼻' => '鼻', - '𪘀' => '𪘀', - 'Æ' => 'AE', - 'Ð' => 'D', - 'Ø' => 'O', - 'Þ' => 'TH', - 'ß' => 'ss', - 'æ' => 'ae', - 'ð' => 'd', - 'ø' => 'o', - 'þ' => 'th', - 'Đ' => 'D', - 'đ' => 'd', - 'Ħ' => 'H', - 'ħ' => 'h', - 'ı' => 'i', - 'ĸ' => 'q', - 'Ł' => 'L', - 'ł' => 'l', - 'Ŋ' => 'N', - 'ŋ' => 'n', - 'Œ' => 'OE', - 'œ' => 'oe', - 'Ŧ' => 'T', - 'ŧ' => 't', - 'ƀ' => 'b', - 'Ɓ' => 'B', - 'Ƃ' => 'B', - 'ƃ' => 'b', - 'Ƈ' => 'C', - 'ƈ' => 'c', - 'Ɖ' => 'D', - 'Ɗ' => 'D', - 'Ƌ' => 'D', - 'ƌ' => 'd', - 'Ɛ' => 'E', - 'Ƒ' => 'F', - 'ƒ' => 'f', - 'Ɠ' => 'G', - 'ƕ' => 'hv', - 'Ɩ' => 'I', - 'Ɨ' => 'I', - 'Ƙ' => 'K', - 'ƙ' => 'k', - 'ƚ' => 'l', - 'Ɲ' => 'N', - 'ƞ' => 'n', - 'Ƣ' => 'OI', - 'ƣ' => 'oi', - 'Ƥ' => 'P', - 'ƥ' => 'p', - 'ƫ' => 't', - 'Ƭ' => 'T', - 'ƭ' => 't', - 'Ʈ' => 'T', - 'Ʋ' => 'V', - 'Ƴ' => 'Y', - 'ƴ' => 'y', - 'Ƶ' => 'Z', - 'ƶ' => 'z', - 'Ǥ' => 'G', - 'ǥ' => 'g', - 'ȡ' => 'd', - 'Ȥ' => 'Z', - 'ȥ' => 'z', - 'ȴ' => 'l', - 'ȵ' => 'n', - 'ȶ' => 't', - 'ȷ' => 'j', - 'ȸ' => 'db', - 'ȹ' => 'qp', - 'Ⱥ' => 'A', - 'Ȼ' => 'C', - 'ȼ' => 'c', - 'Ƚ' => 'L', - 'Ⱦ' => 'T', - 'ȿ' => 's', - 'ɀ' => 'z', - 'Ƀ' => 'B', - 'Ʉ' => 'U', - 'Ɇ' => 'E', - 'ɇ' => 'e', - 'Ɉ' => 'J', - 'ɉ' => 'j', - 'Ɍ' => 'R', - 'ɍ' => 'r', - 'Ɏ' => 'Y', - 'ɏ' => 'y', - 'ɓ' => 'b', - 'ɕ' => 'c', - 'ɖ' => 'd', - 'ɗ' => 'd', - 'ɛ' => 'e', - 'ɟ' => 'j', - 'ɠ' => 'g', - 'ɡ' => 'g', - 'ɢ' => 'G', - 'ɦ' => 'h', - 'ɧ' => 'h', - 'ɨ' => 'i', - 'ɪ' => 'I', - 'ɫ' => 'l', - 'ɬ' => 'l', - 'ɭ' => 'l', - 'ɱ' => 'm', - 'ɲ' => 'n', - 'ɳ' => 'n', - 'ɴ' => 'N', - 'ɶ' => 'OE', - 'ɼ' => 'r', - 'ɽ' => 'r', - 'ɾ' => 'r', - 'ʀ' => 'R', - 'ʂ' => 's', - 'ʈ' => 't', - 'ʉ' => 'u', - 'ʋ' => 'v', - 'ʏ' => 'Y', - 'ʐ' => 'z', - 'ʑ' => 'z', - 'ʙ' => 'B', - 'ʛ' => 'G', - 'ʜ' => 'H', - 'ʝ' => 'j', - 'ʟ' => 'L', - 'ʠ' => 'q', - 'ʣ' => 'dz', - 'ʥ' => 'dz', - 'ʦ' => 'ts', - 'ʪ' => 'ls', - 'ʫ' => 'lz', - 'ᴀ' => 'A', - 'ᴁ' => 'AE', - 'ᴃ' => 'B', - 'ᴄ' => 'C', - 'ᴅ' => 'D', - 'ᴆ' => 'D', - 'ᴇ' => 'E', - 'ᴊ' => 'J', - 'ᴋ' => 'K', - 'ᴌ' => 'L', - 'ᴍ' => 'M', - 'ᴏ' => 'O', - 'ᴘ' => 'P', - 'ᴛ' => 'T', - 'ᴜ' => 'U', - 'ᴠ' => 'V', - 'ᴡ' => 'W', - 'ᴢ' => 'Z', - 'ᵫ' => 'ue', - 'ᵬ' => 'b', - 'ᵭ' => 'd', - 'ᵮ' => 'f', - 'ᵯ' => 'm', - 'ᵰ' => 'n', - 'ᵱ' => 'p', - 'ᵲ' => 'r', - 'ᵳ' => 'r', - 'ᵴ' => 's', - 'ᵵ' => 't', - 'ᵶ' => 'z', - 'ᵺ' => 'th', - 'ᵻ' => 'I', - 'ᵽ' => 'p', - 'ᵾ' => 'U', - 'ᶀ' => 'b', - 'ᶁ' => 'd', - 'ᶂ' => 'f', - 'ᶃ' => 'g', - 'ᶄ' => 'k', - 'ᶅ' => 'l', - 'ᶆ' => 'm', - 'ᶇ' => 'n', - 'ᶈ' => 'p', - 'ᶉ' => 'r', - 'ᶊ' => 's', - 'ᶌ' => 'v', - 'ᶍ' => 'x', - 'ᶎ' => 'z', - 'ᶏ' => 'a', - 'ᶑ' => 'd', - 'ᶒ' => 'e', - 'ᶓ' => 'e', - 'ᶖ' => 'i', - 'ᶙ' => 'u', - 'ẜ' => 's', - 'ẝ' => 's', - 'ẞ' => 'SS', - 'Ỻ' => 'LL', - 'ỻ' => 'll', - 'Ỽ' => 'V', - 'ỽ' => 'v', - 'Ỿ' => 'Y', - 'ỿ' => 'y', - 'Ⱡ' => 'L', - 'ⱡ' => 'l', - 'Ɫ' => 'L', - 'Ᵽ' => 'P', - 'Ɽ' => 'R', - 'ⱥ' => 'a', - 'ⱦ' => 't', - 'Ⱨ' => 'H', - 'ⱨ' => 'h', - 'Ⱪ' => 'K', - 'ⱪ' => 'k', - 'Ⱬ' => 'Z', - 'ⱬ' => 'z', - 'Ɱ' => 'M', - 'ⱱ' => 'v', - 'Ⱳ' => 'W', - 'ⱳ' => 'w', - 'ⱴ' => 'v', - 'ⱸ' => 'e', - 'ⱺ' => 'o', - 'Ȿ' => 'S', - 'Ɀ' => 'Z', - 'ꜰ' => 'F', - 'ꜱ' => 'S', - 'Ꜳ' => 'AA', - 'ꜳ' => 'aa', - 'Ꜵ' => 'AO', - 'ꜵ' => 'ao', - 'Ꜷ' => 'AU', - 'ꜷ' => 'au', - 'Ꜹ' => 'AV', - 'ꜹ' => 'av', - 'Ꜻ' => 'AV', - 'ꜻ' => 'av', - 'Ꜽ' => 'AY', - 'ꜽ' => 'ay', - 'Ꝁ' => 'K', - 'ꝁ' => 'k', - 'Ꝃ' => 'K', - 'ꝃ' => 'k', - 'Ꝅ' => 'K', - 'ꝅ' => 'k', - 'Ꝇ' => 'L', - 'ꝇ' => 'l', - 'Ꝉ' => 'L', - 'ꝉ' => 'l', - 'Ꝋ' => 'O', - 'ꝋ' => 'o', - 'Ꝍ' => 'O', - 'ꝍ' => 'o', - 'Ꝏ' => 'OO', - 'ꝏ' => 'oo', - 'Ꝑ' => 'P', - 'ꝑ' => 'p', - 'Ꝓ' => 'P', - 'ꝓ' => 'p', - 'Ꝕ' => 'P', - 'ꝕ' => 'p', - 'Ꝗ' => 'Q', - 'ꝗ' => 'q', - 'Ꝙ' => 'Q', - 'ꝙ' => 'q', - 'Ꝟ' => 'V', - 'ꝟ' => 'v', - 'Ꝡ' => 'VY', - 'ꝡ' => 'vy', - 'Ꝥ' => 'TH', - 'ꝥ' => 'th', - 'Ꝧ' => 'TH', - 'ꝧ' => 'th', - 'ꝱ' => 'd', - 'ꝲ' => 'l', - 'ꝳ' => 'm', - 'ꝴ' => 'n', - 'ꝵ' => 'r', - 'ꝶ' => 'R', - 'ꝷ' => 't', - 'Ꝺ' => 'D', - 'ꝺ' => 'd', - 'Ꝼ' => 'F', - 'ꝼ' => 'f', - 'Ꞇ' => 'T', - 'ꞇ' => 't', - 'Ꞑ' => 'N', - 'ꞑ' => 'n', - 'Ꞓ' => 'C', - 'ꞓ' => 'c', - 'Ꞡ' => 'G', - 'ꞡ' => 'g', - 'Ꞣ' => 'K', - 'ꞣ' => 'k', - 'Ꞥ' => 'N', - 'ꞥ' => 'n', - 'Ꞧ' => 'R', - 'ꞧ' => 'r', - 'Ꞩ' => 'S', - 'ꞩ' => 's', - 'Ɦ' => 'H', - '©' => '(C)', - '®' => '(R)', - '₠' => 'CE', - '₢' => 'Cr', - '₣' => 'Fr.', - '₤' => 'L.', - '₧' => 'Pts', - '₹' => 'Rs', - '₺' => 'TL', - '℗' => '(P)', - '℘' => 'P', - '℞' => 'Rx', - '〇' => '0', - ' ' => ' ', - ' ' => ' ', - ' ' => ' ', - ' ' => ' ', - ' ' => ' ', - ' ' => ' ', - ' ' => ' ', - ' ' => ' ', - ' ' => ' ', - ' ' => ' ', - ' ' => ' ', - 'ʹ' => '\'', - 'ʺ' => '"', - 'ʻ' => '\'', - 'ʼ' => '\'', - 'ʽ' => '\'', - 'ˈ' => '\'', - 'ˋ' => '`', - '‘' => '\'', - '’' => '\'', - '‚' => ',', - '‛' => '\'', - '“' => '"', - '”' => '"', - '„' => ',,', - '‟' => '"', - '′' => '\'', - '〝' => '"', - '〞' => '"', - '«' => '<<', - '»' => '>>', - '‹' => '<', - '›' => '>', - '­' => '-', - '‐' => '-', - '‑' => '-', - '‒' => '-', - '–' => '-', - '—' => '-', - '―' => '-', - '︱' => '-', - '︲' => '-', - '¡' => '!', - '¿' => '?', - '˂' => '<', - '˃' => '>', - '˄' => '^', - 'ˆ' => '^', - 'ː' => ':', - '˜' => '~', - '‖' => '||', - '⁄' => '/', - '⁅' => '[', - '⁆' => ']', - '⁎' => '*', - '、' => ',', - '。' => '.', - '〈' => '<', - '〉' => '>', - '《' => '<<', - '》' => '>>', - '〔' => '[', - '〕' => ']', - '〘' => '[', - '〙' => ']', - '〚' => '[', - '〛' => ']', - '︐' => ',', - '︑' => ',', - '︒' => '.', - '︓' => ':', - '︔' => ';', - '︕' => '!', - '︖' => '?', - '︙' => '...', - '︰' => '..', - '︵' => '(', - '︶' => ')', - '︷' => '{', - '︸' => '}', - '︹' => '[', - '︺' => ']', - '︽' => '<<', - '︾' => '>>', - '︿' => '<', - '﹀' => '>', - '﹇' => '[', - '﹈' => ']', - '±' => '+/-', - '×' => '*', - '÷' => '/', - '˖' => '+', - '˗' => '-', - '−' => '-', - '∕' => '/', - '∖' => '\\', - '∣' => '|', - '∥' => '||', - '≪' => '<<', - '≫' => '>>', - '⦅' => '((', - '⦆' => '))', -); diff --git a/source/vendor/symfony/polyfill-iconv/bootstrap.php b/source/vendor/symfony/polyfill-iconv/bootstrap.php deleted file mode 100644 index 91fdba0..0000000 --- a/source/vendor/symfony/polyfill-iconv/bootstrap.php +++ /dev/null @@ -1,88 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Iconv as p; - -if (extension_loaded('iconv')) { - return; -} - -if (\PHP_VERSION_ID >= 80000) { - return require __DIR__.'/bootstrap80.php'; -} - -if (!defined('ICONV_IMPL')) { - define('ICONV_IMPL', 'Symfony'); -} -if (!defined('ICONV_VERSION')) { - define('ICONV_VERSION', '1.0'); -} -if (!defined('ICONV_MIME_DECODE_STRICT')) { - define('ICONV_MIME_DECODE_STRICT', 1); -} -if (!defined('ICONV_MIME_DECODE_CONTINUE_ON_ERROR')) { - define('ICONV_MIME_DECODE_CONTINUE_ON_ERROR', 2); -} - -if (!function_exists('iconv')) { - function iconv($from_encoding, $to_encoding, $string) { return p\Iconv::iconv($from_encoding, $to_encoding, $string); } -} -if (!function_exists('iconv_get_encoding')) { - function iconv_get_encoding($type = 'all') { return p\Iconv::iconv_get_encoding($type); } -} -if (!function_exists('iconv_set_encoding')) { - function iconv_set_encoding($type, $encoding) { return p\Iconv::iconv_set_encoding($type, $encoding); } -} -if (!function_exists('iconv_mime_encode')) { - function iconv_mime_encode($field_name, $field_value, $options = []) { return p\Iconv::iconv_mime_encode($field_name, $field_value, $options); } -} -if (!function_exists('iconv_mime_decode_headers')) { - function iconv_mime_decode_headers($headers, $mode = 0, $encoding = null) { return p\Iconv::iconv_mime_decode_headers($headers, $mode, $encoding); } -} - -if (extension_loaded('mbstring')) { - if (!function_exists('iconv_strlen')) { - function iconv_strlen($string, $encoding = null) { null === $encoding && $encoding = p\Iconv::$internalEncoding; return mb_strlen($string, $encoding); } - } - if (!function_exists('iconv_strpos')) { - function iconv_strpos($haystack, $needle, $offset = 0, $encoding = null) { null === $encoding && $encoding = p\Iconv::$internalEncoding; return mb_strpos($haystack, $needle, $offset, $encoding); } - } - if (!function_exists('iconv_strrpos')) { - function iconv_strrpos($haystack, $needle, $encoding = null) { null === $encoding && $encoding = p\Iconv::$internalEncoding; return mb_strrpos($haystack, $needle, 0, $encoding); } - } - if (!function_exists('iconv_substr')) { - function iconv_substr($string, $offset, $length = 2147483647, $encoding = null) { null === $encoding && $encoding = p\Iconv::$internalEncoding; return mb_substr($string, $offset, $length, $encoding); } - } - if (!function_exists('iconv_mime_decode')) { - function iconv_mime_decode($string, $mode = 0, $encoding = null) { null === $encoding && $encoding = p\Iconv::$internalEncoding; return mb_decode_mimeheader($string, $mode, $encoding); } - } -} else { - if (!function_exists('iconv_strlen')) { - if (extension_loaded('xml')) { - function iconv_strlen($string, $encoding = null) { return p\Iconv::strlen1($string, $encoding); } - } else { - function iconv_strlen($string, $encoding = null) { return p\Iconv::strlen2($string, $encoding); } - } - } - - if (!function_exists('iconv_strpos')) { - function iconv_strpos($haystack, $needle, $offset = 0, $encoding = null) { return p\Iconv::iconv_strpos($haystack, $needle, $offset, $encoding); } - } - if (!function_exists('iconv_strrpos')) { - function iconv_strrpos($haystack, $needle, $encoding = null) { return p\Iconv::iconv_strrpos($haystack, $needle, $encoding); } - } - if (!function_exists('iconv_substr')) { - function iconv_substr($string, $offset, $length = 2147483647, $encoding = null) { return p\Iconv::iconv_substr($string, $offset, $length, $encoding); } - } - if (!function_exists('iconv_mime_decode')) { - function iconv_mime_decode($string, $mode = 0, $encoding = null) { return p\Iconv::iconv_mime_decode($string, $mode, $encoding); } - } -} diff --git a/source/vendor/symfony/polyfill-iconv/bootstrap80.php b/source/vendor/symfony/polyfill-iconv/bootstrap80.php deleted file mode 100644 index cf89557..0000000 --- a/source/vendor/symfony/polyfill-iconv/bootstrap80.php +++ /dev/null @@ -1,80 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Iconv as p; - -if (!defined('ICONV_IMPL')) { - define('ICONV_IMPL', 'Symfony'); -} -if (!defined('ICONV_VERSION')) { - define('ICONV_VERSION', '1.0'); -} -if (!defined('ICONV_MIME_DECODE_STRICT')) { - define('ICONV_MIME_DECODE_STRICT', 1); -} -if (!defined('ICONV_MIME_DECODE_CONTINUE_ON_ERROR')) { - define('ICONV_MIME_DECODE_CONTINUE_ON_ERROR', 2); -} - -if (!function_exists('iconv')) { - function iconv(?string $from_encoding, ?string $to_encoding, ?string $string): string|false { return p\Iconv::iconv((string) $from_encoding, (string) $to_encoding, (string) $string); } -} -if (!function_exists('iconv_get_encoding')) { - function iconv_get_encoding(?string $type = 'all'): array|string|false { return p\Iconv::iconv_get_encoding((string) $type); } -} -if (!function_exists('iconv_set_encoding')) { - function iconv_set_encoding(?string $type, ?string $encoding): bool { return p\Iconv::iconv_set_encoding((string) $type, (string) $encoding); } -} -if (!function_exists('iconv_mime_encode')) { - function iconv_mime_encode(?string $field_name, ?string $field_value, ?array $options = []): string|false { return p\Iconv::iconv_mime_encode((string) $field_name, (string) $field_value, (array) $options); } -} -if (!function_exists('iconv_mime_decode_headers')) { - function iconv_mime_decode_headers(?string $headers, ?int $mode = 0, ?string $encoding = null): array|false { return p\Iconv::iconv_mime_decode_headers((string) $headers, (int) $mode, $encoding); } -} - -if (extension_loaded('mbstring')) { - if (!function_exists('iconv_strlen')) { - function iconv_strlen(?string $string, ?string $encoding = null): int|false { null === $encoding && $encoding = p\Iconv::$internalEncoding; return mb_strlen((string) $string, $encoding); } - } - if (!function_exists('iconv_strpos')) { - function iconv_strpos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { null === $encoding && $encoding = p\Iconv::$internalEncoding; return mb_strpos((string) $haystack, (string) $needle, (int) $offset, $encoding); } - } - if (!function_exists('iconv_strrpos')) { - function iconv_strrpos(?string $haystack, ?string $needle, ?string $encoding = null): int|false { null === $encoding && $encoding = p\Iconv::$internalEncoding; return mb_strrpos((string) $haystack, (string) $needle, 0, $encoding); } - } - if (!function_exists('iconv_substr')) { - function iconv_substr(?string $string, ?int $offset, ?int $length = null, ?string $encoding = null): string|false { null === $encoding && $encoding = p\Iconv::$internalEncoding; return mb_substr((string) $string, (int) $offset, $length, $encoding); } - } - if (!function_exists('iconv_mime_decode')) { - function iconv_mime_decode($string, $mode = 0, $encoding = null) { null === $encoding && $encoding = p\Iconv::$internalEncoding; return mb_decode_mimeheader($string, $mode, $encoding); } - } -} else { - if (!function_exists('iconv_strlen')) { - if (extension_loaded('xml')) { - function iconv_strlen(?string $string, ?string $encoding = null): int|false { return p\Iconv::strlen1((string) $string, $encoding); } - } else { - function iconv_strlen(?string $string, ?string $encoding = null): int|false { return p\Iconv::strlen2((string) $string, $encoding); } - } - } - - if (!function_exists('iconv_strpos')) { - function iconv_strpos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Iconv::iconv_strpos((string) $haystack, (string) $needle, (int) $offset, $encoding); } - } - if (!function_exists('iconv_strrpos')) { - function iconv_strrpos(?string $haystack, ?string $needle, ?string $encoding = null): int|false { return p\Iconv::iconv_strrpos((string) $haystack, (string) $needle, $encoding); } - } - if (!function_exists('iconv_substr')) { - function iconv_substr(?string $string, ?int $offset, ?int $length = null, ?string $encoding = null): string|false { return p\Iconv::iconv_substr((string) $string, (string) $offset, $length, $encoding); } - } - if (!function_exists('iconv_mime_decode')) { - function iconv_mime_decode(?string $string, ?int $mode = 0, ?string $encoding = null): string|false { return p\Iconv::iconv_mime_decode((string) $string, (int) $mode, $encoding); } - } -} diff --git a/source/vendor/symfony/polyfill-mbstring/LICENSE b/source/vendor/symfony/polyfill-mbstring/LICENSE deleted file mode 100644 index 4cd8bdd..0000000 --- a/source/vendor/symfony/polyfill-mbstring/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2015-2019 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/source/vendor/symfony/polyfill-mbstring/Mbstring.php b/source/vendor/symfony/polyfill-mbstring/Mbstring.php deleted file mode 100644 index b599095..0000000 --- a/source/vendor/symfony/polyfill-mbstring/Mbstring.php +++ /dev/null @@ -1,870 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Mbstring; - -/** - * Partial mbstring implementation in PHP, iconv based, UTF-8 centric. - * - * Implemented: - * - mb_chr - Returns a specific character from its Unicode code point - * - mb_convert_encoding - Convert character encoding - * - mb_convert_variables - Convert character code in variable(s) - * - mb_decode_mimeheader - Decode string in MIME header field - * - mb_encode_mimeheader - Encode string for MIME header XXX NATIVE IMPLEMENTATION IS REALLY BUGGED - * - mb_decode_numericentity - Decode HTML numeric string reference to character - * - mb_encode_numericentity - Encode character to HTML numeric string reference - * - mb_convert_case - Perform case folding on a string - * - mb_detect_encoding - Detect character encoding - * - mb_get_info - Get internal settings of mbstring - * - mb_http_input - Detect HTTP input character encoding - * - mb_http_output - Set/Get HTTP output character encoding - * - mb_internal_encoding - Set/Get internal character encoding - * - mb_list_encodings - Returns an array of all supported encodings - * - mb_ord - Returns the Unicode code point of a character - * - mb_output_handler - Callback function converts character encoding in output buffer - * - mb_scrub - Replaces ill-formed byte sequences with substitute characters - * - mb_strlen - Get string length - * - mb_strpos - Find position of first occurrence of string in a string - * - mb_strrpos - Find position of last occurrence of a string in a string - * - mb_str_split - Convert a string to an array - * - mb_strtolower - Make a string lowercase - * - mb_strtoupper - Make a string uppercase - * - mb_substitute_character - Set/Get substitution character - * - mb_substr - Get part of string - * - mb_stripos - Finds position of first occurrence of a string within another, case insensitive - * - mb_stristr - Finds first occurrence of a string within another, case insensitive - * - mb_strrchr - Finds the last occurrence of a character in a string within another - * - mb_strrichr - Finds the last occurrence of a character in a string within another, case insensitive - * - mb_strripos - Finds position of last occurrence of a string within another, case insensitive - * - mb_strstr - Finds first occurrence of a string within another - * - mb_strwidth - Return width of string - * - mb_substr_count - Count the number of substring occurrences - * - * Not implemented: - * - mb_convert_kana - Convert "kana" one from another ("zen-kaku", "han-kaku" and more) - * - mb_ereg_* - Regular expression with multibyte support - * - mb_parse_str - Parse GET/POST/COOKIE data and set global variable - * - mb_preferred_mime_name - Get MIME charset string - * - mb_regex_encoding - Returns current encoding for multibyte regex as string - * - mb_regex_set_options - Set/Get the default options for mbregex functions - * - mb_send_mail - Send encoded mail - * - mb_split - Split multibyte string using regular expression - * - mb_strcut - Get part of string - * - mb_strimwidth - Get truncated string with specified width - * - * @author Nicolas Grekas - * - * @internal - */ -final class Mbstring -{ - public const MB_CASE_FOLD = \PHP_INT_MAX; - - private const CASE_FOLD = [ - ['µ', 'ſ', "\xCD\x85", 'ς', "\xCF\x90", "\xCF\x91", "\xCF\x95", "\xCF\x96", "\xCF\xB0", "\xCF\xB1", "\xCF\xB5", "\xE1\xBA\x9B", "\xE1\xBE\xBE"], - ['μ', 's', 'ι', 'σ', 'β', 'θ', 'φ', 'π', 'κ', 'ρ', 'ε', "\xE1\xB9\xA1", 'ι'], - ]; - - private static $encodingList = ['ASCII', 'UTF-8']; - private static $language = 'neutral'; - private static $internalEncoding = 'UTF-8'; - - public static function mb_convert_encoding($s, $toEncoding, $fromEncoding = null) - { - if (\is_array($fromEncoding) || false !== strpos($fromEncoding, ',')) { - $fromEncoding = self::mb_detect_encoding($s, $fromEncoding); - } else { - $fromEncoding = self::getEncoding($fromEncoding); - } - - $toEncoding = self::getEncoding($toEncoding); - - if ('BASE64' === $fromEncoding) { - $s = base64_decode($s); - $fromEncoding = $toEncoding; - } - - if ('BASE64' === $toEncoding) { - return base64_encode($s); - } - - if ('HTML-ENTITIES' === $toEncoding || 'HTML' === $toEncoding) { - if ('HTML-ENTITIES' === $fromEncoding || 'HTML' === $fromEncoding) { - $fromEncoding = 'Windows-1252'; - } - if ('UTF-8' !== $fromEncoding) { - $s = \iconv($fromEncoding, 'UTF-8//IGNORE', $s); - } - - return preg_replace_callback('/[\x80-\xFF]+/', [__CLASS__, 'html_encoding_callback'], $s); - } - - if ('HTML-ENTITIES' === $fromEncoding) { - $s = html_entity_decode($s, \ENT_COMPAT, 'UTF-8'); - $fromEncoding = 'UTF-8'; - } - - return \iconv($fromEncoding, $toEncoding.'//IGNORE', $s); - } - - public static function mb_convert_variables($toEncoding, $fromEncoding, &...$vars) - { - $ok = true; - array_walk_recursive($vars, function (&$v) use (&$ok, $toEncoding, $fromEncoding) { - if (false === $v = self::mb_convert_encoding($v, $toEncoding, $fromEncoding)) { - $ok = false; - } - }); - - return $ok ? $fromEncoding : false; - } - - public static function mb_decode_mimeheader($s) - { - return \iconv_mime_decode($s, 2, self::$internalEncoding); - } - - public static function mb_encode_mimeheader($s, $charset = null, $transferEncoding = null, $linefeed = null, $indent = null) - { - trigger_error('mb_encode_mimeheader() is bugged. Please use iconv_mime_encode() instead', \E_USER_WARNING); - } - - public static function mb_decode_numericentity($s, $convmap, $encoding = null) - { - if (null !== $s && !is_scalar($s) && !(\is_object($s) && method_exists($s, '__toString'))) { - trigger_error('mb_decode_numericentity() expects parameter 1 to be string, '.\gettype($s).' given', \E_USER_WARNING); - - return null; - } - - if (!\is_array($convmap) || (80000 > \PHP_VERSION_ID && !$convmap)) { - return false; - } - - if (null !== $encoding && !is_scalar($encoding)) { - trigger_error('mb_decode_numericentity() expects parameter 3 to be string, '.\gettype($s).' given', \E_USER_WARNING); - - return ''; // Instead of null (cf. mb_encode_numericentity). - } - - $s = (string) $s; - if ('' === $s) { - return ''; - } - - $encoding = self::getEncoding($encoding); - - if ('UTF-8' === $encoding) { - $encoding = null; - if (!preg_match('//u', $s)) { - $s = @\iconv('UTF-8', 'UTF-8//IGNORE', $s); - } - } else { - $s = \iconv($encoding, 'UTF-8//IGNORE', $s); - } - - $cnt = floor(\count($convmap) / 4) * 4; - - for ($i = 0; $i < $cnt; $i += 4) { - // collector_decode_htmlnumericentity ignores $convmap[$i + 3] - $convmap[$i] += $convmap[$i + 2]; - $convmap[$i + 1] += $convmap[$i + 2]; - } - - $s = preg_replace_callback('/&#(?:0*([0-9]+)|x0*([0-9a-fA-F]+))(?!&);?/', function (array $m) use ($cnt, $convmap) { - $c = isset($m[2]) ? (int) hexdec($m[2]) : $m[1]; - for ($i = 0; $i < $cnt; $i += 4) { - if ($c >= $convmap[$i] && $c <= $convmap[$i + 1]) { - return self::mb_chr($c - $convmap[$i + 2]); - } - } - - return $m[0]; - }, $s); - - if (null === $encoding) { - return $s; - } - - return \iconv('UTF-8', $encoding.'//IGNORE', $s); - } - - public static function mb_encode_numericentity($s, $convmap, $encoding = null, $is_hex = false) - { - if (null !== $s && !is_scalar($s) && !(\is_object($s) && method_exists($s, '__toString'))) { - trigger_error('mb_encode_numericentity() expects parameter 1 to be string, '.\gettype($s).' given', \E_USER_WARNING); - - return null; - } - - if (!\is_array($convmap) || (80000 > \PHP_VERSION_ID && !$convmap)) { - return false; - } - - if (null !== $encoding && !is_scalar($encoding)) { - trigger_error('mb_encode_numericentity() expects parameter 3 to be string, '.\gettype($s).' given', \E_USER_WARNING); - - return null; // Instead of '' (cf. mb_decode_numericentity). - } - - if (null !== $is_hex && !is_scalar($is_hex)) { - trigger_error('mb_encode_numericentity() expects parameter 4 to be boolean, '.\gettype($s).' given', \E_USER_WARNING); - - return null; - } - - $s = (string) $s; - if ('' === $s) { - return ''; - } - - $encoding = self::getEncoding($encoding); - - if ('UTF-8' === $encoding) { - $encoding = null; - if (!preg_match('//u', $s)) { - $s = @\iconv('UTF-8', 'UTF-8//IGNORE', $s); - } - } else { - $s = \iconv($encoding, 'UTF-8//IGNORE', $s); - } - - static $ulenMask = ["\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4]; - - $cnt = floor(\count($convmap) / 4) * 4; - $i = 0; - $len = \strlen($s); - $result = ''; - - while ($i < $len) { - $ulen = $s[$i] < "\x80" ? 1 : $ulenMask[$s[$i] & "\xF0"]; - $uchr = substr($s, $i, $ulen); - $i += $ulen; - $c = self::mb_ord($uchr); - - for ($j = 0; $j < $cnt; $j += 4) { - if ($c >= $convmap[$j] && $c <= $convmap[$j + 1]) { - $cOffset = ($c + $convmap[$j + 2]) & $convmap[$j + 3]; - $result .= $is_hex ? sprintf('&#x%X;', $cOffset) : '&#'.$cOffset.';'; - continue 2; - } - } - $result .= $uchr; - } - - if (null === $encoding) { - return $result; - } - - return \iconv('UTF-8', $encoding.'//IGNORE', $result); - } - - public static function mb_convert_case($s, $mode, $encoding = null) - { - $s = (string) $s; - if ('' === $s) { - return ''; - } - - $encoding = self::getEncoding($encoding); - - if ('UTF-8' === $encoding) { - $encoding = null; - if (!preg_match('//u', $s)) { - $s = @\iconv('UTF-8', 'UTF-8//IGNORE', $s); - } - } else { - $s = \iconv($encoding, 'UTF-8//IGNORE', $s); - } - - if (\MB_CASE_TITLE == $mode) { - static $titleRegexp = null; - if (null === $titleRegexp) { - $titleRegexp = self::getData('titleCaseRegexp'); - } - $s = preg_replace_callback($titleRegexp, [__CLASS__, 'title_case'], $s); - } else { - if (\MB_CASE_UPPER == $mode) { - static $upper = null; - if (null === $upper) { - $upper = self::getData('upperCase'); - } - $map = $upper; - } else { - if (self::MB_CASE_FOLD === $mode) { - $s = str_replace(self::CASE_FOLD[0], self::CASE_FOLD[1], $s); - } - - static $lower = null; - if (null === $lower) { - $lower = self::getData('lowerCase'); - } - $map = $lower; - } - - static $ulenMask = ["\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4]; - - $i = 0; - $len = \strlen($s); - - while ($i < $len) { - $ulen = $s[$i] < "\x80" ? 1 : $ulenMask[$s[$i] & "\xF0"]; - $uchr = substr($s, $i, $ulen); - $i += $ulen; - - if (isset($map[$uchr])) { - $uchr = $map[$uchr]; - $nlen = \strlen($uchr); - - if ($nlen == $ulen) { - $nlen = $i; - do { - $s[--$nlen] = $uchr[--$ulen]; - } while ($ulen); - } else { - $s = substr_replace($s, $uchr, $i - $ulen, $ulen); - $len += $nlen - $ulen; - $i += $nlen - $ulen; - } - } - } - } - - if (null === $encoding) { - return $s; - } - - return \iconv('UTF-8', $encoding.'//IGNORE', $s); - } - - public static function mb_internal_encoding($encoding = null) - { - if (null === $encoding) { - return self::$internalEncoding; - } - - $normalizedEncoding = self::getEncoding($encoding); - - if ('UTF-8' === $normalizedEncoding || false !== @\iconv($normalizedEncoding, $normalizedEncoding, ' ')) { - self::$internalEncoding = $normalizedEncoding; - - return true; - } - - if (80000 > \PHP_VERSION_ID) { - return false; - } - - throw new \ValueError(sprintf('Argument #1 ($encoding) must be a valid encoding, "%s" given', $encoding)); - } - - public static function mb_language($lang = null) - { - if (null === $lang) { - return self::$language; - } - - switch ($normalizedLang = strtolower($lang)) { - case 'uni': - case 'neutral': - self::$language = $normalizedLang; - - return true; - } - - if (80000 > \PHP_VERSION_ID) { - return false; - } - - throw new \ValueError(sprintf('Argument #1 ($language) must be a valid language, "%s" given', $lang)); - } - - public static function mb_list_encodings() - { - return ['UTF-8']; - } - - public static function mb_encoding_aliases($encoding) - { - switch (strtoupper($encoding)) { - case 'UTF8': - case 'UTF-8': - return ['utf8']; - } - - return false; - } - - public static function mb_check_encoding($var = null, $encoding = null) - { - if (null === $encoding) { - if (null === $var) { - return false; - } - $encoding = self::$internalEncoding; - } - - return self::mb_detect_encoding($var, [$encoding]) || false !== @\iconv($encoding, $encoding, $var); - } - - public static function mb_detect_encoding($str, $encodingList = null, $strict = false) - { - if (null === $encodingList) { - $encodingList = self::$encodingList; - } else { - if (!\is_array($encodingList)) { - $encodingList = array_map('trim', explode(',', $encodingList)); - } - $encodingList = array_map('strtoupper', $encodingList); - } - - foreach ($encodingList as $enc) { - switch ($enc) { - case 'ASCII': - if (!preg_match('/[\x80-\xFF]/', $str)) { - return $enc; - } - break; - - case 'UTF8': - case 'UTF-8': - if (preg_match('//u', $str)) { - return 'UTF-8'; - } - break; - - default: - if (0 === strncmp($enc, 'ISO-8859-', 9)) { - return $enc; - } - } - } - - return false; - } - - public static function mb_detect_order($encodingList = null) - { - if (null === $encodingList) { - return self::$encodingList; - } - - if (!\is_array($encodingList)) { - $encodingList = array_map('trim', explode(',', $encodingList)); - } - $encodingList = array_map('strtoupper', $encodingList); - - foreach ($encodingList as $enc) { - switch ($enc) { - default: - if (strncmp($enc, 'ISO-8859-', 9)) { - return false; - } - // no break - case 'ASCII': - case 'UTF8': - case 'UTF-8': - } - } - - self::$encodingList = $encodingList; - - return true; - } - - public static function mb_strlen($s, $encoding = null) - { - $encoding = self::getEncoding($encoding); - if ('CP850' === $encoding || 'ASCII' === $encoding) { - return \strlen($s); - } - - return @\iconv_strlen($s, $encoding); - } - - public static function mb_strpos($haystack, $needle, $offset = 0, $encoding = null) - { - $encoding = self::getEncoding($encoding); - if ('CP850' === $encoding || 'ASCII' === $encoding) { - return strpos($haystack, $needle, $offset); - } - - $needle = (string) $needle; - if ('' === $needle) { - if (80000 > \PHP_VERSION_ID) { - trigger_error(__METHOD__.': Empty delimiter', \E_USER_WARNING); - - return false; - } - - return 0; - } - - return \iconv_strpos($haystack, $needle, $offset, $encoding); - } - - public static function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null) - { - $encoding = self::getEncoding($encoding); - if ('CP850' === $encoding || 'ASCII' === $encoding) { - return strrpos($haystack, $needle, $offset); - } - - if ($offset != (int) $offset) { - $offset = 0; - } elseif ($offset = (int) $offset) { - if ($offset < 0) { - if (0 > $offset += self::mb_strlen($needle)) { - $haystack = self::mb_substr($haystack, 0, $offset, $encoding); - } - $offset = 0; - } else { - $haystack = self::mb_substr($haystack, $offset, 2147483647, $encoding); - } - } - - $pos = '' !== $needle || 80000 > \PHP_VERSION_ID - ? \iconv_strrpos($haystack, $needle, $encoding) - : self::mb_strlen($haystack, $encoding); - - return false !== $pos ? $offset + $pos : false; - } - - public static function mb_str_split($string, $split_length = 1, $encoding = null) - { - if (null !== $string && !is_scalar($string) && !(\is_object($string) && method_exists($string, '__toString'))) { - trigger_error('mb_str_split() expects parameter 1 to be string, '.\gettype($string).' given', \E_USER_WARNING); - - return null; - } - - if (1 > $split_length = (int) $split_length) { - if (80000 > \PHP_VERSION_ID) { - trigger_error('The length of each segment must be greater than zero', \E_USER_WARNING); - return false; - } - - throw new \ValueError('Argument #2 ($length) must be greater than 0'); - } - - if (null === $encoding) { - $encoding = mb_internal_encoding(); - } - - if ('UTF-8' === $encoding = self::getEncoding($encoding)) { - $rx = '/('; - while (65535 < $split_length) { - $rx .= '.{65535}'; - $split_length -= 65535; - } - $rx .= '.{'.$split_length.'})/us'; - - return preg_split($rx, $string, null, \PREG_SPLIT_DELIM_CAPTURE | \PREG_SPLIT_NO_EMPTY); - } - - $result = []; - $length = mb_strlen($string, $encoding); - - for ($i = 0; $i < $length; $i += $split_length) { - $result[] = mb_substr($string, $i, $split_length, $encoding); - } - - return $result; - } - - public static function mb_strtolower($s, $encoding = null) - { - return self::mb_convert_case($s, \MB_CASE_LOWER, $encoding); - } - - public static function mb_strtoupper($s, $encoding = null) - { - return self::mb_convert_case($s, \MB_CASE_UPPER, $encoding); - } - - public static function mb_substitute_character($c = null) - { - if (null === $c) { - return 'none'; - } - if (0 === strcasecmp($c, 'none')) { - return true; - } - if (80000 > \PHP_VERSION_ID) { - return false; - } - - throw new \ValueError('Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint'); - } - - public static function mb_substr($s, $start, $length = null, $encoding = null) - { - $encoding = self::getEncoding($encoding); - if ('CP850' === $encoding || 'ASCII' === $encoding) { - return (string) substr($s, $start, null === $length ? 2147483647 : $length); - } - - if ($start < 0) { - $start = \iconv_strlen($s, $encoding) + $start; - if ($start < 0) { - $start = 0; - } - } - - if (null === $length) { - $length = 2147483647; - } elseif ($length < 0) { - $length = \iconv_strlen($s, $encoding) + $length - $start; - if ($length < 0) { - return ''; - } - } - - return (string) \iconv_substr($s, $start, $length, $encoding); - } - - public static function mb_stripos($haystack, $needle, $offset = 0, $encoding = null) - { - $haystack = self::mb_convert_case($haystack, self::MB_CASE_FOLD, $encoding); - $needle = self::mb_convert_case($needle, self::MB_CASE_FOLD, $encoding); - - return self::mb_strpos($haystack, $needle, $offset, $encoding); - } - - public static function mb_stristr($haystack, $needle, $part = false, $encoding = null) - { - $pos = self::mb_stripos($haystack, $needle, 0, $encoding); - - return self::getSubpart($pos, $part, $haystack, $encoding); - } - - public static function mb_strrchr($haystack, $needle, $part = false, $encoding = null) - { - $encoding = self::getEncoding($encoding); - if ('CP850' === $encoding || 'ASCII' === $encoding) { - $pos = strrpos($haystack, $needle); - } else { - $needle = self::mb_substr($needle, 0, 1, $encoding); - $pos = \iconv_strrpos($haystack, $needle, $encoding); - } - - return self::getSubpart($pos, $part, $haystack, $encoding); - } - - public static function mb_strrichr($haystack, $needle, $part = false, $encoding = null) - { - $needle = self::mb_substr($needle, 0, 1, $encoding); - $pos = self::mb_strripos($haystack, $needle, $encoding); - - return self::getSubpart($pos, $part, $haystack, $encoding); - } - - public static function mb_strripos($haystack, $needle, $offset = 0, $encoding = null) - { - $haystack = self::mb_convert_case($haystack, self::MB_CASE_FOLD, $encoding); - $needle = self::mb_convert_case($needle, self::MB_CASE_FOLD, $encoding); - - return self::mb_strrpos($haystack, $needle, $offset, $encoding); - } - - public static function mb_strstr($haystack, $needle, $part = false, $encoding = null) - { - $pos = strpos($haystack, $needle); - if (false === $pos) { - return false; - } - if ($part) { - return substr($haystack, 0, $pos); - } - - return substr($haystack, $pos); - } - - public static function mb_get_info($type = 'all') - { - $info = [ - 'internal_encoding' => self::$internalEncoding, - 'http_output' => 'pass', - 'http_output_conv_mimetypes' => '^(text/|application/xhtml\+xml)', - 'func_overload' => 0, - 'func_overload_list' => 'no overload', - 'mail_charset' => 'UTF-8', - 'mail_header_encoding' => 'BASE64', - 'mail_body_encoding' => 'BASE64', - 'illegal_chars' => 0, - 'encoding_translation' => 'Off', - 'language' => self::$language, - 'detect_order' => self::$encodingList, - 'substitute_character' => 'none', - 'strict_detection' => 'Off', - ]; - - if ('all' === $type) { - return $info; - } - if (isset($info[$type])) { - return $info[$type]; - } - - return false; - } - - public static function mb_http_input($type = '') - { - return false; - } - - public static function mb_http_output($encoding = null) - { - return null !== $encoding ? 'pass' === $encoding : 'pass'; - } - - public static function mb_strwidth($s, $encoding = null) - { - $encoding = self::getEncoding($encoding); - - if ('UTF-8' !== $encoding) { - $s = \iconv($encoding, 'UTF-8//IGNORE', $s); - } - - $s = preg_replace('/[\x{1100}-\x{115F}\x{2329}\x{232A}\x{2E80}-\x{303E}\x{3040}-\x{A4CF}\x{AC00}-\x{D7A3}\x{F900}-\x{FAFF}\x{FE10}-\x{FE19}\x{FE30}-\x{FE6F}\x{FF00}-\x{FF60}\x{FFE0}-\x{FFE6}\x{20000}-\x{2FFFD}\x{30000}-\x{3FFFD}]/u', '', $s, -1, $wide); - - return ($wide << 1) + \iconv_strlen($s, 'UTF-8'); - } - - public static function mb_substr_count($haystack, $needle, $encoding = null) - { - return substr_count($haystack, $needle); - } - - public static function mb_output_handler($contents, $status) - { - return $contents; - } - - public static function mb_chr($code, $encoding = null) - { - if (0x80 > $code %= 0x200000) { - $s = \chr($code); - } elseif (0x800 > $code) { - $s = \chr(0xC0 | $code >> 6).\chr(0x80 | $code & 0x3F); - } elseif (0x10000 > $code) { - $s = \chr(0xE0 | $code >> 12).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); - } else { - $s = \chr(0xF0 | $code >> 18).\chr(0x80 | $code >> 12 & 0x3F).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); - } - - if ('UTF-8' !== $encoding = self::getEncoding($encoding)) { - $s = mb_convert_encoding($s, $encoding, 'UTF-8'); - } - - return $s; - } - - public static function mb_ord($s, $encoding = null) - { - if ('UTF-8' !== $encoding = self::getEncoding($encoding)) { - $s = mb_convert_encoding($s, 'UTF-8', $encoding); - } - - if (1 === \strlen($s)) { - return \ord($s); - } - - $code = ($s = unpack('C*', substr($s, 0, 4))) ? $s[1] : 0; - if (0xF0 <= $code) { - return (($code - 0xF0) << 18) + (($s[2] - 0x80) << 12) + (($s[3] - 0x80) << 6) + $s[4] - 0x80; - } - if (0xE0 <= $code) { - return (($code - 0xE0) << 12) + (($s[2] - 0x80) << 6) + $s[3] - 0x80; - } - if (0xC0 <= $code) { - return (($code - 0xC0) << 6) + $s[2] - 0x80; - } - - return $code; - } - - private static function getSubpart($pos, $part, $haystack, $encoding) - { - if (false === $pos) { - return false; - } - if ($part) { - return self::mb_substr($haystack, 0, $pos, $encoding); - } - - return self::mb_substr($haystack, $pos, null, $encoding); - } - - private static function html_encoding_callback(array $m) - { - $i = 1; - $entities = ''; - $m = unpack('C*', htmlentities($m[0], \ENT_COMPAT, 'UTF-8')); - - while (isset($m[$i])) { - if (0x80 > $m[$i]) { - $entities .= \chr($m[$i++]); - continue; - } - if (0xF0 <= $m[$i]) { - $c = (($m[$i++] - 0xF0) << 18) + (($m[$i++] - 0x80) << 12) + (($m[$i++] - 0x80) << 6) + $m[$i++] - 0x80; - } elseif (0xE0 <= $m[$i]) { - $c = (($m[$i++] - 0xE0) << 12) + (($m[$i++] - 0x80) << 6) + $m[$i++] - 0x80; - } else { - $c = (($m[$i++] - 0xC0) << 6) + $m[$i++] - 0x80; - } - - $entities .= '&#'.$c.';'; - } - - return $entities; - } - - private static function title_case(array $s) - { - return self::mb_convert_case($s[1], \MB_CASE_UPPER, 'UTF-8').self::mb_convert_case($s[2], \MB_CASE_LOWER, 'UTF-8'); - } - - private static function getData($file) - { - if (file_exists($file = __DIR__.'/Resources/unidata/'.$file.'.php')) { - return require $file; - } - - return false; - } - - private static function getEncoding($encoding) - { - if (null === $encoding) { - return self::$internalEncoding; - } - - if ('UTF-8' === $encoding) { - return 'UTF-8'; - } - - $encoding = strtoupper($encoding); - - if ('8BIT' === $encoding || 'BINARY' === $encoding) { - return 'CP850'; - } - - if ('UTF8' === $encoding) { - return 'UTF-8'; - } - - return $encoding; - } -} diff --git a/source/vendor/symfony/polyfill-mbstring/README.md b/source/vendor/symfony/polyfill-mbstring/README.md deleted file mode 100644 index 4efb599..0000000 --- a/source/vendor/symfony/polyfill-mbstring/README.md +++ /dev/null @@ -1,13 +0,0 @@ -Symfony Polyfill / Mbstring -=========================== - -This component provides a partial, native PHP implementation for the -[Mbstring](https://php.net/mbstring) extension. - -More information can be found in the -[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). - -License -======= - -This library is released under the [MIT license](LICENSE). diff --git a/source/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php b/source/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php deleted file mode 100644 index fac60b0..0000000 --- a/source/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php +++ /dev/null @@ -1,1397 +0,0 @@ - 'a', - 'B' => 'b', - 'C' => 'c', - 'D' => 'd', - 'E' => 'e', - 'F' => 'f', - 'G' => 'g', - 'H' => 'h', - 'I' => 'i', - 'J' => 'j', - 'K' => 'k', - 'L' => 'l', - 'M' => 'm', - 'N' => 'n', - 'O' => 'o', - 'P' => 'p', - 'Q' => 'q', - 'R' => 'r', - 'S' => 's', - 'T' => 't', - 'U' => 'u', - 'V' => 'v', - 'W' => 'w', - 'X' => 'x', - 'Y' => 'y', - 'Z' => 'z', - 'À' => 'à', - 'Á' => 'á', - 'Â' => 'â', - 'Ã' => 'ã', - 'Ä' => 'ä', - 'Å' => 'å', - 'Æ' => 'æ', - 'Ç' => 'ç', - 'È' => 'è', - 'É' => 'é', - 'Ê' => 'ê', - 'Ë' => 'ë', - 'Ì' => 'ì', - 'Í' => 'í', - 'Î' => 'î', - 'Ï' => 'ï', - 'Ð' => 'ð', - 'Ñ' => 'ñ', - 'Ò' => 'ò', - 'Ó' => 'ó', - 'Ô' => 'ô', - 'Õ' => 'õ', - 'Ö' => 'ö', - 'Ø' => 'ø', - 'Ù' => 'ù', - 'Ú' => 'ú', - 'Û' => 'û', - 'Ü' => 'ü', - 'Ý' => 'ý', - 'Þ' => 'þ', - 'Ā' => 'ā', - 'Ă' => 'ă', - 'Ą' => 'ą', - 'Ć' => 'ć', - 'Ĉ' => 'ĉ', - 'Ċ' => 'ċ', - 'Č' => 'č', - 'Ď' => 'ď', - 'Đ' => 'đ', - 'Ē' => 'ē', - 'Ĕ' => 'ĕ', - 'Ė' => 'ė', - 'Ę' => 'ę', - 'Ě' => 'ě', - 'Ĝ' => 'ĝ', - 'Ğ' => 'ğ', - 'Ġ' => 'ġ', - 'Ģ' => 'ģ', - 'Ĥ' => 'ĥ', - 'Ħ' => 'ħ', - 'Ĩ' => 'ĩ', - 'Ī' => 'ī', - 'Ĭ' => 'ĭ', - 'Į' => 'į', - 'İ' => 'i̇', - 'IJ' => 'ij', - 'Ĵ' => 'ĵ', - 'Ķ' => 'ķ', - 'Ĺ' => 'ĺ', - 'Ļ' => 'ļ', - 'Ľ' => 'ľ', - 'Ŀ' => 'ŀ', - 'Ł' => 'ł', - 'Ń' => 'ń', - 'Ņ' => 'ņ', - 'Ň' => 'ň', - 'Ŋ' => 'ŋ', - 'Ō' => 'ō', - 'Ŏ' => 'ŏ', - 'Ő' => 'ő', - 'Œ' => 'œ', - 'Ŕ' => 'ŕ', - 'Ŗ' => 'ŗ', - 'Ř' => 'ř', - 'Ś' => 'ś', - 'Ŝ' => 'ŝ', - 'Ş' => 'ş', - 'Š' => 'š', - 'Ţ' => 'ţ', - 'Ť' => 'ť', - 'Ŧ' => 'ŧ', - 'Ũ' => 'ũ', - 'Ū' => 'ū', - 'Ŭ' => 'ŭ', - 'Ů' => 'ů', - 'Ű' => 'ű', - 'Ų' => 'ų', - 'Ŵ' => 'ŵ', - 'Ŷ' => 'ŷ', - 'Ÿ' => 'ÿ', - 'Ź' => 'ź', - 'Ż' => 'ż', - 'Ž' => 'ž', - 'Ɓ' => 'ɓ', - 'Ƃ' => 'ƃ', - 'Ƅ' => 'ƅ', - 'Ɔ' => 'ɔ', - 'Ƈ' => 'ƈ', - 'Ɖ' => 'ɖ', - 'Ɗ' => 'ɗ', - 'Ƌ' => 'ƌ', - 'Ǝ' => 'ǝ', - 'Ə' => 'ə', - 'Ɛ' => 'ɛ', - 'Ƒ' => 'ƒ', - 'Ɠ' => 'ɠ', - 'Ɣ' => 'ɣ', - 'Ɩ' => 'ɩ', - 'Ɨ' => 'ɨ', - 'Ƙ' => 'ƙ', - 'Ɯ' => 'ɯ', - 'Ɲ' => 'ɲ', - 'Ɵ' => 'ɵ', - 'Ơ' => 'ơ', - 'Ƣ' => 'ƣ', - 'Ƥ' => 'ƥ', - 'Ʀ' => 'ʀ', - 'Ƨ' => 'ƨ', - 'Ʃ' => 'ʃ', - 'Ƭ' => 'ƭ', - 'Ʈ' => 'ʈ', - 'Ư' => 'ư', - 'Ʊ' => 'ʊ', - 'Ʋ' => 'ʋ', - 'Ƴ' => 'ƴ', - 'Ƶ' => 'ƶ', - 'Ʒ' => 'ʒ', - 'Ƹ' => 'ƹ', - 'Ƽ' => 'ƽ', - 'DŽ' => 'dž', - 'Dž' => 'dž', - 'LJ' => 'lj', - 'Lj' => 'lj', - 'NJ' => 'nj', - 'Nj' => 'nj', - 'Ǎ' => 'ǎ', - 'Ǐ' => 'ǐ', - 'Ǒ' => 'ǒ', - 'Ǔ' => 'ǔ', - 'Ǖ' => 'ǖ', - 'Ǘ' => 'ǘ', - 'Ǚ' => 'ǚ', - 'Ǜ' => 'ǜ', - 'Ǟ' => 'ǟ', - 'Ǡ' => 'ǡ', - 'Ǣ' => 'ǣ', - 'Ǥ' => 'ǥ', - 'Ǧ' => 'ǧ', - 'Ǩ' => 'ǩ', - 'Ǫ' => 'ǫ', - 'Ǭ' => 'ǭ', - 'Ǯ' => 'ǯ', - 'DZ' => 'dz', - 'Dz' => 'dz', - 'Ǵ' => 'ǵ', - 'Ƕ' => 'ƕ', - 'Ƿ' => 'ƿ', - 'Ǹ' => 'ǹ', - 'Ǻ' => 'ǻ', - 'Ǽ' => 'ǽ', - 'Ǿ' => 'ǿ', - 'Ȁ' => 'ȁ', - 'Ȃ' => 'ȃ', - 'Ȅ' => 'ȅ', - 'Ȇ' => 'ȇ', - 'Ȉ' => 'ȉ', - 'Ȋ' => 'ȋ', - 'Ȍ' => 'ȍ', - 'Ȏ' => 'ȏ', - 'Ȑ' => 'ȑ', - 'Ȓ' => 'ȓ', - 'Ȕ' => 'ȕ', - 'Ȗ' => 'ȗ', - 'Ș' => 'ș', - 'Ț' => 'ț', - 'Ȝ' => 'ȝ', - 'Ȟ' => 'ȟ', - 'Ƞ' => 'ƞ', - 'Ȣ' => 'ȣ', - 'Ȥ' => 'ȥ', - 'Ȧ' => 'ȧ', - 'Ȩ' => 'ȩ', - 'Ȫ' => 'ȫ', - 'Ȭ' => 'ȭ', - 'Ȯ' => 'ȯ', - 'Ȱ' => 'ȱ', - 'Ȳ' => 'ȳ', - 'Ⱥ' => 'ⱥ', - 'Ȼ' => 'ȼ', - 'Ƚ' => 'ƚ', - 'Ⱦ' => 'ⱦ', - 'Ɂ' => 'ɂ', - 'Ƀ' => 'ƀ', - 'Ʉ' => 'ʉ', - 'Ʌ' => 'ʌ', - 'Ɇ' => 'ɇ', - 'Ɉ' => 'ɉ', - 'Ɋ' => 'ɋ', - 'Ɍ' => 'ɍ', - 'Ɏ' => 'ɏ', - 'Ͱ' => 'ͱ', - 'Ͳ' => 'ͳ', - 'Ͷ' => 'ͷ', - 'Ϳ' => 'ϳ', - 'Ά' => 'ά', - 'Έ' => 'έ', - 'Ή' => 'ή', - 'Ί' => 'ί', - 'Ό' => 'ό', - 'Ύ' => 'ύ', - 'Ώ' => 'ώ', - 'Α' => 'α', - 'Β' => 'β', - 'Γ' => 'γ', - 'Δ' => 'δ', - 'Ε' => 'ε', - 'Ζ' => 'ζ', - 'Η' => 'η', - 'Θ' => 'θ', - 'Ι' => 'ι', - 'Κ' => 'κ', - 'Λ' => 'λ', - 'Μ' => 'μ', - 'Ν' => 'ν', - 'Ξ' => 'ξ', - 'Ο' => 'ο', - 'Π' => 'π', - 'Ρ' => 'ρ', - 'Σ' => 'σ', - 'Τ' => 'τ', - 'Υ' => 'υ', - 'Φ' => 'φ', - 'Χ' => 'χ', - 'Ψ' => 'ψ', - 'Ω' => 'ω', - 'Ϊ' => 'ϊ', - 'Ϋ' => 'ϋ', - 'Ϗ' => 'ϗ', - 'Ϙ' => 'ϙ', - 'Ϛ' => 'ϛ', - 'Ϝ' => 'ϝ', - 'Ϟ' => 'ϟ', - 'Ϡ' => 'ϡ', - 'Ϣ' => 'ϣ', - 'Ϥ' => 'ϥ', - 'Ϧ' => 'ϧ', - 'Ϩ' => 'ϩ', - 'Ϫ' => 'ϫ', - 'Ϭ' => 'ϭ', - 'Ϯ' => 'ϯ', - 'ϴ' => 'θ', - 'Ϸ' => 'ϸ', - 'Ϲ' => 'ϲ', - 'Ϻ' => 'ϻ', - 'Ͻ' => 'ͻ', - 'Ͼ' => 'ͼ', - 'Ͽ' => 'ͽ', - 'Ѐ' => 'ѐ', - 'Ё' => 'ё', - 'Ђ' => 'ђ', - 'Ѓ' => 'ѓ', - 'Є' => 'є', - 'Ѕ' => 'ѕ', - 'І' => 'і', - 'Ї' => 'ї', - 'Ј' => 'ј', - 'Љ' => 'љ', - 'Њ' => 'њ', - 'Ћ' => 'ћ', - 'Ќ' => 'ќ', - 'Ѝ' => 'ѝ', - 'Ў' => 'ў', - 'Џ' => 'џ', - 'А' => 'а', - 'Б' => 'б', - 'В' => 'в', - 'Г' => 'г', - 'Д' => 'д', - 'Е' => 'е', - 'Ж' => 'ж', - 'З' => 'з', - 'И' => 'и', - 'Й' => 'й', - 'К' => 'к', - 'Л' => 'л', - 'М' => 'м', - 'Н' => 'н', - 'О' => 'о', - 'П' => 'п', - 'Р' => 'р', - 'С' => 'с', - 'Т' => 'т', - 'У' => 'у', - 'Ф' => 'ф', - 'Х' => 'х', - 'Ц' => 'ц', - 'Ч' => 'ч', - 'Ш' => 'ш', - 'Щ' => 'щ', - 'Ъ' => 'ъ', - 'Ы' => 'ы', - 'Ь' => 'ь', - 'Э' => 'э', - 'Ю' => 'ю', - 'Я' => 'я', - 'Ѡ' => 'ѡ', - 'Ѣ' => 'ѣ', - 'Ѥ' => 'ѥ', - 'Ѧ' => 'ѧ', - 'Ѩ' => 'ѩ', - 'Ѫ' => 'ѫ', - 'Ѭ' => 'ѭ', - 'Ѯ' => 'ѯ', - 'Ѱ' => 'ѱ', - 'Ѳ' => 'ѳ', - 'Ѵ' => 'ѵ', - 'Ѷ' => 'ѷ', - 'Ѹ' => 'ѹ', - 'Ѻ' => 'ѻ', - 'Ѽ' => 'ѽ', - 'Ѿ' => 'ѿ', - 'Ҁ' => 'ҁ', - 'Ҋ' => 'ҋ', - 'Ҍ' => 'ҍ', - 'Ҏ' => 'ҏ', - 'Ґ' => 'ґ', - 'Ғ' => 'ғ', - 'Ҕ' => 'ҕ', - 'Җ' => 'җ', - 'Ҙ' => 'ҙ', - 'Қ' => 'қ', - 'Ҝ' => 'ҝ', - 'Ҟ' => 'ҟ', - 'Ҡ' => 'ҡ', - 'Ң' => 'ң', - 'Ҥ' => 'ҥ', - 'Ҧ' => 'ҧ', - 'Ҩ' => 'ҩ', - 'Ҫ' => 'ҫ', - 'Ҭ' => 'ҭ', - 'Ү' => 'ү', - 'Ұ' => 'ұ', - 'Ҳ' => 'ҳ', - 'Ҵ' => 'ҵ', - 'Ҷ' => 'ҷ', - 'Ҹ' => 'ҹ', - 'Һ' => 'һ', - 'Ҽ' => 'ҽ', - 'Ҿ' => 'ҿ', - 'Ӏ' => 'ӏ', - 'Ӂ' => 'ӂ', - 'Ӄ' => 'ӄ', - 'Ӆ' => 'ӆ', - 'Ӈ' => 'ӈ', - 'Ӊ' => 'ӊ', - 'Ӌ' => 'ӌ', - 'Ӎ' => 'ӎ', - 'Ӑ' => 'ӑ', - 'Ӓ' => 'ӓ', - 'Ӕ' => 'ӕ', - 'Ӗ' => 'ӗ', - 'Ә' => 'ә', - 'Ӛ' => 'ӛ', - 'Ӝ' => 'ӝ', - 'Ӟ' => 'ӟ', - 'Ӡ' => 'ӡ', - 'Ӣ' => 'ӣ', - 'Ӥ' => 'ӥ', - 'Ӧ' => 'ӧ', - 'Ө' => 'ө', - 'Ӫ' => 'ӫ', - 'Ӭ' => 'ӭ', - 'Ӯ' => 'ӯ', - 'Ӱ' => 'ӱ', - 'Ӳ' => 'ӳ', - 'Ӵ' => 'ӵ', - 'Ӷ' => 'ӷ', - 'Ӹ' => 'ӹ', - 'Ӻ' => 'ӻ', - 'Ӽ' => 'ӽ', - 'Ӿ' => 'ӿ', - 'Ԁ' => 'ԁ', - 'Ԃ' => 'ԃ', - 'Ԅ' => 'ԅ', - 'Ԇ' => 'ԇ', - 'Ԉ' => 'ԉ', - 'Ԋ' => 'ԋ', - 'Ԍ' => 'ԍ', - 'Ԏ' => 'ԏ', - 'Ԑ' => 'ԑ', - 'Ԓ' => 'ԓ', - 'Ԕ' => 'ԕ', - 'Ԗ' => 'ԗ', - 'Ԙ' => 'ԙ', - 'Ԛ' => 'ԛ', - 'Ԝ' => 'ԝ', - 'Ԟ' => 'ԟ', - 'Ԡ' => 'ԡ', - 'Ԣ' => 'ԣ', - 'Ԥ' => 'ԥ', - 'Ԧ' => 'ԧ', - 'Ԩ' => 'ԩ', - 'Ԫ' => 'ԫ', - 'Ԭ' => 'ԭ', - 'Ԯ' => 'ԯ', - 'Ա' => 'ա', - 'Բ' => 'բ', - 'Գ' => 'գ', - 'Դ' => 'դ', - 'Ե' => 'ե', - 'Զ' => 'զ', - 'Է' => 'է', - 'Ը' => 'ը', - 'Թ' => 'թ', - 'Ժ' => 'ժ', - 'Ի' => 'ի', - 'Լ' => 'լ', - 'Խ' => 'խ', - 'Ծ' => 'ծ', - 'Կ' => 'կ', - 'Հ' => 'հ', - 'Ձ' => 'ձ', - 'Ղ' => 'ղ', - 'Ճ' => 'ճ', - 'Մ' => 'մ', - 'Յ' => 'յ', - 'Ն' => 'ն', - 'Շ' => 'շ', - 'Ո' => 'ո', - 'Չ' => 'չ', - 'Պ' => 'պ', - 'Ջ' => 'ջ', - 'Ռ' => 'ռ', - 'Ս' => 'ս', - 'Վ' => 'վ', - 'Տ' => 'տ', - 'Ր' => 'ր', - 'Ց' => 'ց', - 'Ւ' => 'ւ', - 'Փ' => 'փ', - 'Ք' => 'ք', - 'Օ' => 'օ', - 'Ֆ' => 'ֆ', - 'Ⴀ' => 'ⴀ', - 'Ⴁ' => 'ⴁ', - 'Ⴂ' => 'ⴂ', - 'Ⴃ' => 'ⴃ', - 'Ⴄ' => 'ⴄ', - 'Ⴅ' => 'ⴅ', - 'Ⴆ' => 'ⴆ', - 'Ⴇ' => 'ⴇ', - 'Ⴈ' => 'ⴈ', - 'Ⴉ' => 'ⴉ', - 'Ⴊ' => 'ⴊ', - 'Ⴋ' => 'ⴋ', - 'Ⴌ' => 'ⴌ', - 'Ⴍ' => 'ⴍ', - 'Ⴎ' => 'ⴎ', - 'Ⴏ' => 'ⴏ', - 'Ⴐ' => 'ⴐ', - 'Ⴑ' => 'ⴑ', - 'Ⴒ' => 'ⴒ', - 'Ⴓ' => 'ⴓ', - 'Ⴔ' => 'ⴔ', - 'Ⴕ' => 'ⴕ', - 'Ⴖ' => 'ⴖ', - 'Ⴗ' => 'ⴗ', - 'Ⴘ' => 'ⴘ', - 'Ⴙ' => 'ⴙ', - 'Ⴚ' => 'ⴚ', - 'Ⴛ' => 'ⴛ', - 'Ⴜ' => 'ⴜ', - 'Ⴝ' => 'ⴝ', - 'Ⴞ' => 'ⴞ', - 'Ⴟ' => 'ⴟ', - 'Ⴠ' => 'ⴠ', - 'Ⴡ' => 'ⴡ', - 'Ⴢ' => 'ⴢ', - 'Ⴣ' => 'ⴣ', - 'Ⴤ' => 'ⴤ', - 'Ⴥ' => 'ⴥ', - 'Ⴧ' => 'ⴧ', - 'Ⴭ' => 'ⴭ', - 'Ꭰ' => 'ꭰ', - 'Ꭱ' => 'ꭱ', - 'Ꭲ' => 'ꭲ', - 'Ꭳ' => 'ꭳ', - 'Ꭴ' => 'ꭴ', - 'Ꭵ' => 'ꭵ', - 'Ꭶ' => 'ꭶ', - 'Ꭷ' => 'ꭷ', - 'Ꭸ' => 'ꭸ', - 'Ꭹ' => 'ꭹ', - 'Ꭺ' => 'ꭺ', - 'Ꭻ' => 'ꭻ', - 'Ꭼ' => 'ꭼ', - 'Ꭽ' => 'ꭽ', - 'Ꭾ' => 'ꭾ', - 'Ꭿ' => 'ꭿ', - 'Ꮀ' => 'ꮀ', - 'Ꮁ' => 'ꮁ', - 'Ꮂ' => 'ꮂ', - 'Ꮃ' => 'ꮃ', - 'Ꮄ' => 'ꮄ', - 'Ꮅ' => 'ꮅ', - 'Ꮆ' => 'ꮆ', - 'Ꮇ' => 'ꮇ', - 'Ꮈ' => 'ꮈ', - 'Ꮉ' => 'ꮉ', - 'Ꮊ' => 'ꮊ', - 'Ꮋ' => 'ꮋ', - 'Ꮌ' => 'ꮌ', - 'Ꮍ' => 'ꮍ', - 'Ꮎ' => 'ꮎ', - 'Ꮏ' => 'ꮏ', - 'Ꮐ' => 'ꮐ', - 'Ꮑ' => 'ꮑ', - 'Ꮒ' => 'ꮒ', - 'Ꮓ' => 'ꮓ', - 'Ꮔ' => 'ꮔ', - 'Ꮕ' => 'ꮕ', - 'Ꮖ' => 'ꮖ', - 'Ꮗ' => 'ꮗ', - 'Ꮘ' => 'ꮘ', - 'Ꮙ' => 'ꮙ', - 'Ꮚ' => 'ꮚ', - 'Ꮛ' => 'ꮛ', - 'Ꮜ' => 'ꮜ', - 'Ꮝ' => 'ꮝ', - 'Ꮞ' => 'ꮞ', - 'Ꮟ' => 'ꮟ', - 'Ꮠ' => 'ꮠ', - 'Ꮡ' => 'ꮡ', - 'Ꮢ' => 'ꮢ', - 'Ꮣ' => 'ꮣ', - 'Ꮤ' => 'ꮤ', - 'Ꮥ' => 'ꮥ', - 'Ꮦ' => 'ꮦ', - 'Ꮧ' => 'ꮧ', - 'Ꮨ' => 'ꮨ', - 'Ꮩ' => 'ꮩ', - 'Ꮪ' => 'ꮪ', - 'Ꮫ' => 'ꮫ', - 'Ꮬ' => 'ꮬ', - 'Ꮭ' => 'ꮭ', - 'Ꮮ' => 'ꮮ', - 'Ꮯ' => 'ꮯ', - 'Ꮰ' => 'ꮰ', - 'Ꮱ' => 'ꮱ', - 'Ꮲ' => 'ꮲ', - 'Ꮳ' => 'ꮳ', - 'Ꮴ' => 'ꮴ', - 'Ꮵ' => 'ꮵ', - 'Ꮶ' => 'ꮶ', - 'Ꮷ' => 'ꮷ', - 'Ꮸ' => 'ꮸ', - 'Ꮹ' => 'ꮹ', - 'Ꮺ' => 'ꮺ', - 'Ꮻ' => 'ꮻ', - 'Ꮼ' => 'ꮼ', - 'Ꮽ' => 'ꮽ', - 'Ꮾ' => 'ꮾ', - 'Ꮿ' => 'ꮿ', - 'Ᏸ' => 'ᏸ', - 'Ᏹ' => 'ᏹ', - 'Ᏺ' => 'ᏺ', - 'Ᏻ' => 'ᏻ', - 'Ᏼ' => 'ᏼ', - 'Ᏽ' => 'ᏽ', - 'Ა' => 'ა', - 'Ბ' => 'ბ', - 'Გ' => 'გ', - 'Დ' => 'დ', - 'Ე' => 'ე', - 'Ვ' => 'ვ', - 'Ზ' => 'ზ', - 'Თ' => 'თ', - 'Ი' => 'ი', - 'Კ' => 'კ', - 'Ლ' => 'ლ', - 'Მ' => 'მ', - 'Ნ' => 'ნ', - 'Ო' => 'ო', - 'Პ' => 'პ', - 'Ჟ' => 'ჟ', - 'Რ' => 'რ', - 'Ს' => 'ს', - 'Ტ' => 'ტ', - 'Უ' => 'უ', - 'Ფ' => 'ფ', - 'Ქ' => 'ქ', - 'Ღ' => 'ღ', - 'Ყ' => 'ყ', - 'Შ' => 'შ', - 'Ჩ' => 'ჩ', - 'Ც' => 'ც', - 'Ძ' => 'ძ', - 'Წ' => 'წ', - 'Ჭ' => 'ჭ', - 'Ხ' => 'ხ', - 'Ჯ' => 'ჯ', - 'Ჰ' => 'ჰ', - 'Ჱ' => 'ჱ', - 'Ჲ' => 'ჲ', - 'Ჳ' => 'ჳ', - 'Ჴ' => 'ჴ', - 'Ჵ' => 'ჵ', - 'Ჶ' => 'ჶ', - 'Ჷ' => 'ჷ', - 'Ჸ' => 'ჸ', - 'Ჹ' => 'ჹ', - 'Ჺ' => 'ჺ', - 'Ჽ' => 'ჽ', - 'Ჾ' => 'ჾ', - 'Ჿ' => 'ჿ', - 'Ḁ' => 'ḁ', - 'Ḃ' => 'ḃ', - 'Ḅ' => 'ḅ', - 'Ḇ' => 'ḇ', - 'Ḉ' => 'ḉ', - 'Ḋ' => 'ḋ', - 'Ḍ' => 'ḍ', - 'Ḏ' => 'ḏ', - 'Ḑ' => 'ḑ', - 'Ḓ' => 'ḓ', - 'Ḕ' => 'ḕ', - 'Ḗ' => 'ḗ', - 'Ḙ' => 'ḙ', - 'Ḛ' => 'ḛ', - 'Ḝ' => 'ḝ', - 'Ḟ' => 'ḟ', - 'Ḡ' => 'ḡ', - 'Ḣ' => 'ḣ', - 'Ḥ' => 'ḥ', - 'Ḧ' => 'ḧ', - 'Ḩ' => 'ḩ', - 'Ḫ' => 'ḫ', - 'Ḭ' => 'ḭ', - 'Ḯ' => 'ḯ', - 'Ḱ' => 'ḱ', - 'Ḳ' => 'ḳ', - 'Ḵ' => 'ḵ', - 'Ḷ' => 'ḷ', - 'Ḹ' => 'ḹ', - 'Ḻ' => 'ḻ', - 'Ḽ' => 'ḽ', - 'Ḿ' => 'ḿ', - 'Ṁ' => 'ṁ', - 'Ṃ' => 'ṃ', - 'Ṅ' => 'ṅ', - 'Ṇ' => 'ṇ', - 'Ṉ' => 'ṉ', - 'Ṋ' => 'ṋ', - 'Ṍ' => 'ṍ', - 'Ṏ' => 'ṏ', - 'Ṑ' => 'ṑ', - 'Ṓ' => 'ṓ', - 'Ṕ' => 'ṕ', - 'Ṗ' => 'ṗ', - 'Ṙ' => 'ṙ', - 'Ṛ' => 'ṛ', - 'Ṝ' => 'ṝ', - 'Ṟ' => 'ṟ', - 'Ṡ' => 'ṡ', - 'Ṣ' => 'ṣ', - 'Ṥ' => 'ṥ', - 'Ṧ' => 'ṧ', - 'Ṩ' => 'ṩ', - 'Ṫ' => 'ṫ', - 'Ṭ' => 'ṭ', - 'Ṯ' => 'ṯ', - 'Ṱ' => 'ṱ', - 'Ṳ' => 'ṳ', - 'Ṵ' => 'ṵ', - 'Ṷ' => 'ṷ', - 'Ṹ' => 'ṹ', - 'Ṻ' => 'ṻ', - 'Ṽ' => 'ṽ', - 'Ṿ' => 'ṿ', - 'Ẁ' => 'ẁ', - 'Ẃ' => 'ẃ', - 'Ẅ' => 'ẅ', - 'Ẇ' => 'ẇ', - 'Ẉ' => 'ẉ', - 'Ẋ' => 'ẋ', - 'Ẍ' => 'ẍ', - 'Ẏ' => 'ẏ', - 'Ẑ' => 'ẑ', - 'Ẓ' => 'ẓ', - 'Ẕ' => 'ẕ', - 'ẞ' => 'ß', - 'Ạ' => 'ạ', - 'Ả' => 'ả', - 'Ấ' => 'ấ', - 'Ầ' => 'ầ', - 'Ẩ' => 'ẩ', - 'Ẫ' => 'ẫ', - 'Ậ' => 'ậ', - 'Ắ' => 'ắ', - 'Ằ' => 'ằ', - 'Ẳ' => 'ẳ', - 'Ẵ' => 'ẵ', - 'Ặ' => 'ặ', - 'Ẹ' => 'ẹ', - 'Ẻ' => 'ẻ', - 'Ẽ' => 'ẽ', - 'Ế' => 'ế', - 'Ề' => 'ề', - 'Ể' => 'ể', - 'Ễ' => 'ễ', - 'Ệ' => 'ệ', - 'Ỉ' => 'ỉ', - 'Ị' => 'ị', - 'Ọ' => 'ọ', - 'Ỏ' => 'ỏ', - 'Ố' => 'ố', - 'Ồ' => 'ồ', - 'Ổ' => 'ổ', - 'Ỗ' => 'ỗ', - 'Ộ' => 'ộ', - 'Ớ' => 'ớ', - 'Ờ' => 'ờ', - 'Ở' => 'ở', - 'Ỡ' => 'ỡ', - 'Ợ' => 'ợ', - 'Ụ' => 'ụ', - 'Ủ' => 'ủ', - 'Ứ' => 'ứ', - 'Ừ' => 'ừ', - 'Ử' => 'ử', - 'Ữ' => 'ữ', - 'Ự' => 'ự', - 'Ỳ' => 'ỳ', - 'Ỵ' => 'ỵ', - 'Ỷ' => 'ỷ', - 'Ỹ' => 'ỹ', - 'Ỻ' => 'ỻ', - 'Ỽ' => 'ỽ', - 'Ỿ' => 'ỿ', - 'Ἀ' => 'ἀ', - 'Ἁ' => 'ἁ', - 'Ἂ' => 'ἂ', - 'Ἃ' => 'ἃ', - 'Ἄ' => 'ἄ', - 'Ἅ' => 'ἅ', - 'Ἆ' => 'ἆ', - 'Ἇ' => 'ἇ', - 'Ἐ' => 'ἐ', - 'Ἑ' => 'ἑ', - 'Ἒ' => 'ἒ', - 'Ἓ' => 'ἓ', - 'Ἔ' => 'ἔ', - 'Ἕ' => 'ἕ', - 'Ἠ' => 'ἠ', - 'Ἡ' => 'ἡ', - 'Ἢ' => 'ἢ', - 'Ἣ' => 'ἣ', - 'Ἤ' => 'ἤ', - 'Ἥ' => 'ἥ', - 'Ἦ' => 'ἦ', - 'Ἧ' => 'ἧ', - 'Ἰ' => 'ἰ', - 'Ἱ' => 'ἱ', - 'Ἲ' => 'ἲ', - 'Ἳ' => 'ἳ', - 'Ἴ' => 'ἴ', - 'Ἵ' => 'ἵ', - 'Ἶ' => 'ἶ', - 'Ἷ' => 'ἷ', - 'Ὀ' => 'ὀ', - 'Ὁ' => 'ὁ', - 'Ὂ' => 'ὂ', - 'Ὃ' => 'ὃ', - 'Ὄ' => 'ὄ', - 'Ὅ' => 'ὅ', - 'Ὑ' => 'ὑ', - 'Ὓ' => 'ὓ', - 'Ὕ' => 'ὕ', - 'Ὗ' => 'ὗ', - 'Ὠ' => 'ὠ', - 'Ὡ' => 'ὡ', - 'Ὢ' => 'ὢ', - 'Ὣ' => 'ὣ', - 'Ὤ' => 'ὤ', - 'Ὥ' => 'ὥ', - 'Ὦ' => 'ὦ', - 'Ὧ' => 'ὧ', - 'ᾈ' => 'ᾀ', - 'ᾉ' => 'ᾁ', - 'ᾊ' => 'ᾂ', - 'ᾋ' => 'ᾃ', - 'ᾌ' => 'ᾄ', - 'ᾍ' => 'ᾅ', - 'ᾎ' => 'ᾆ', - 'ᾏ' => 'ᾇ', - 'ᾘ' => 'ᾐ', - 'ᾙ' => 'ᾑ', - 'ᾚ' => 'ᾒ', - 'ᾛ' => 'ᾓ', - 'ᾜ' => 'ᾔ', - 'ᾝ' => 'ᾕ', - 'ᾞ' => 'ᾖ', - 'ᾟ' => 'ᾗ', - 'ᾨ' => 'ᾠ', - 'ᾩ' => 'ᾡ', - 'ᾪ' => 'ᾢ', - 'ᾫ' => 'ᾣ', - 'ᾬ' => 'ᾤ', - 'ᾭ' => 'ᾥ', - 'ᾮ' => 'ᾦ', - 'ᾯ' => 'ᾧ', - 'Ᾰ' => 'ᾰ', - 'Ᾱ' => 'ᾱ', - 'Ὰ' => 'ὰ', - 'Ά' => 'ά', - 'ᾼ' => 'ᾳ', - 'Ὲ' => 'ὲ', - 'Έ' => 'έ', - 'Ὴ' => 'ὴ', - 'Ή' => 'ή', - 'ῌ' => 'ῃ', - 'Ῐ' => 'ῐ', - 'Ῑ' => 'ῑ', - 'Ὶ' => 'ὶ', - 'Ί' => 'ί', - 'Ῠ' => 'ῠ', - 'Ῡ' => 'ῡ', - 'Ὺ' => 'ὺ', - 'Ύ' => 'ύ', - 'Ῥ' => 'ῥ', - 'Ὸ' => 'ὸ', - 'Ό' => 'ό', - 'Ὼ' => 'ὼ', - 'Ώ' => 'ώ', - 'ῼ' => 'ῳ', - 'Ω' => 'ω', - 'K' => 'k', - 'Å' => 'å', - 'Ⅎ' => 'ⅎ', - 'Ⅰ' => 'ⅰ', - 'Ⅱ' => 'ⅱ', - 'Ⅲ' => 'ⅲ', - 'Ⅳ' => 'ⅳ', - 'Ⅴ' => 'ⅴ', - 'Ⅵ' => 'ⅵ', - 'Ⅶ' => 'ⅶ', - 'Ⅷ' => 'ⅷ', - 'Ⅸ' => 'ⅸ', - 'Ⅹ' => 'ⅹ', - 'Ⅺ' => 'ⅺ', - 'Ⅻ' => 'ⅻ', - 'Ⅼ' => 'ⅼ', - 'Ⅽ' => 'ⅽ', - 'Ⅾ' => 'ⅾ', - 'Ⅿ' => 'ⅿ', - 'Ↄ' => 'ↄ', - 'Ⓐ' => 'ⓐ', - 'Ⓑ' => 'ⓑ', - 'Ⓒ' => 'ⓒ', - 'Ⓓ' => 'ⓓ', - 'Ⓔ' => 'ⓔ', - 'Ⓕ' => 'ⓕ', - 'Ⓖ' => 'ⓖ', - 'Ⓗ' => 'ⓗ', - 'Ⓘ' => 'ⓘ', - 'Ⓙ' => 'ⓙ', - 'Ⓚ' => 'ⓚ', - 'Ⓛ' => 'ⓛ', - 'Ⓜ' => 'ⓜ', - 'Ⓝ' => 'ⓝ', - 'Ⓞ' => 'ⓞ', - 'Ⓟ' => 'ⓟ', - 'Ⓠ' => 'ⓠ', - 'Ⓡ' => 'ⓡ', - 'Ⓢ' => 'ⓢ', - 'Ⓣ' => 'ⓣ', - 'Ⓤ' => 'ⓤ', - 'Ⓥ' => 'ⓥ', - 'Ⓦ' => 'ⓦ', - 'Ⓧ' => 'ⓧ', - 'Ⓨ' => 'ⓨ', - 'Ⓩ' => 'ⓩ', - 'Ⰰ' => 'ⰰ', - 'Ⰱ' => 'ⰱ', - 'Ⰲ' => 'ⰲ', - 'Ⰳ' => 'ⰳ', - 'Ⰴ' => 'ⰴ', - 'Ⰵ' => 'ⰵ', - 'Ⰶ' => 'ⰶ', - 'Ⰷ' => 'ⰷ', - 'Ⰸ' => 'ⰸ', - 'Ⰹ' => 'ⰹ', - 'Ⰺ' => 'ⰺ', - 'Ⰻ' => 'ⰻ', - 'Ⰼ' => 'ⰼ', - 'Ⰽ' => 'ⰽ', - 'Ⰾ' => 'ⰾ', - 'Ⰿ' => 'ⰿ', - 'Ⱀ' => 'ⱀ', - 'Ⱁ' => 'ⱁ', - 'Ⱂ' => 'ⱂ', - 'Ⱃ' => 'ⱃ', - 'Ⱄ' => 'ⱄ', - 'Ⱅ' => 'ⱅ', - 'Ⱆ' => 'ⱆ', - 'Ⱇ' => 'ⱇ', - 'Ⱈ' => 'ⱈ', - 'Ⱉ' => 'ⱉ', - 'Ⱊ' => 'ⱊ', - 'Ⱋ' => 'ⱋ', - 'Ⱌ' => 'ⱌ', - 'Ⱍ' => 'ⱍ', - 'Ⱎ' => 'ⱎ', - 'Ⱏ' => 'ⱏ', - 'Ⱐ' => 'ⱐ', - 'Ⱑ' => 'ⱑ', - 'Ⱒ' => 'ⱒ', - 'Ⱓ' => 'ⱓ', - 'Ⱔ' => 'ⱔ', - 'Ⱕ' => 'ⱕ', - 'Ⱖ' => 'ⱖ', - 'Ⱗ' => 'ⱗ', - 'Ⱘ' => 'ⱘ', - 'Ⱙ' => 'ⱙ', - 'Ⱚ' => 'ⱚ', - 'Ⱛ' => 'ⱛ', - 'Ⱜ' => 'ⱜ', - 'Ⱝ' => 'ⱝ', - 'Ⱞ' => 'ⱞ', - 'Ⱡ' => 'ⱡ', - 'Ɫ' => 'ɫ', - 'Ᵽ' => 'ᵽ', - 'Ɽ' => 'ɽ', - 'Ⱨ' => 'ⱨ', - 'Ⱪ' => 'ⱪ', - 'Ⱬ' => 'ⱬ', - 'Ɑ' => 'ɑ', - 'Ɱ' => 'ɱ', - 'Ɐ' => 'ɐ', - 'Ɒ' => 'ɒ', - 'Ⱳ' => 'ⱳ', - 'Ⱶ' => 'ⱶ', - 'Ȿ' => 'ȿ', - 'Ɀ' => 'ɀ', - 'Ⲁ' => 'ⲁ', - 'Ⲃ' => 'ⲃ', - 'Ⲅ' => 'ⲅ', - 'Ⲇ' => 'ⲇ', - 'Ⲉ' => 'ⲉ', - 'Ⲋ' => 'ⲋ', - 'Ⲍ' => 'ⲍ', - 'Ⲏ' => 'ⲏ', - 'Ⲑ' => 'ⲑ', - 'Ⲓ' => 'ⲓ', - 'Ⲕ' => 'ⲕ', - 'Ⲗ' => 'ⲗ', - 'Ⲙ' => 'ⲙ', - 'Ⲛ' => 'ⲛ', - 'Ⲝ' => 'ⲝ', - 'Ⲟ' => 'ⲟ', - 'Ⲡ' => 'ⲡ', - 'Ⲣ' => 'ⲣ', - 'Ⲥ' => 'ⲥ', - 'Ⲧ' => 'ⲧ', - 'Ⲩ' => 'ⲩ', - 'Ⲫ' => 'ⲫ', - 'Ⲭ' => 'ⲭ', - 'Ⲯ' => 'ⲯ', - 'Ⲱ' => 'ⲱ', - 'Ⲳ' => 'ⲳ', - 'Ⲵ' => 'ⲵ', - 'Ⲷ' => 'ⲷ', - 'Ⲹ' => 'ⲹ', - 'Ⲻ' => 'ⲻ', - 'Ⲽ' => 'ⲽ', - 'Ⲿ' => 'ⲿ', - 'Ⳁ' => 'ⳁ', - 'Ⳃ' => 'ⳃ', - 'Ⳅ' => 'ⳅ', - 'Ⳇ' => 'ⳇ', - 'Ⳉ' => 'ⳉ', - 'Ⳋ' => 'ⳋ', - 'Ⳍ' => 'ⳍ', - 'Ⳏ' => 'ⳏ', - 'Ⳑ' => 'ⳑ', - 'Ⳓ' => 'ⳓ', - 'Ⳕ' => 'ⳕ', - 'Ⳗ' => 'ⳗ', - 'Ⳙ' => 'ⳙ', - 'Ⳛ' => 'ⳛ', - 'Ⳝ' => 'ⳝ', - 'Ⳟ' => 'ⳟ', - 'Ⳡ' => 'ⳡ', - 'Ⳣ' => 'ⳣ', - 'Ⳬ' => 'ⳬ', - 'Ⳮ' => 'ⳮ', - 'Ⳳ' => 'ⳳ', - 'Ꙁ' => 'ꙁ', - 'Ꙃ' => 'ꙃ', - 'Ꙅ' => 'ꙅ', - 'Ꙇ' => 'ꙇ', - 'Ꙉ' => 'ꙉ', - 'Ꙋ' => 'ꙋ', - 'Ꙍ' => 'ꙍ', - 'Ꙏ' => 'ꙏ', - 'Ꙑ' => 'ꙑ', - 'Ꙓ' => 'ꙓ', - 'Ꙕ' => 'ꙕ', - 'Ꙗ' => 'ꙗ', - 'Ꙙ' => 'ꙙ', - 'Ꙛ' => 'ꙛ', - 'Ꙝ' => 'ꙝ', - 'Ꙟ' => 'ꙟ', - 'Ꙡ' => 'ꙡ', - 'Ꙣ' => 'ꙣ', - 'Ꙥ' => 'ꙥ', - 'Ꙧ' => 'ꙧ', - 'Ꙩ' => 'ꙩ', - 'Ꙫ' => 'ꙫ', - 'Ꙭ' => 'ꙭ', - 'Ꚁ' => 'ꚁ', - 'Ꚃ' => 'ꚃ', - 'Ꚅ' => 'ꚅ', - 'Ꚇ' => 'ꚇ', - 'Ꚉ' => 'ꚉ', - 'Ꚋ' => 'ꚋ', - 'Ꚍ' => 'ꚍ', - 'Ꚏ' => 'ꚏ', - 'Ꚑ' => 'ꚑ', - 'Ꚓ' => 'ꚓ', - 'Ꚕ' => 'ꚕ', - 'Ꚗ' => 'ꚗ', - 'Ꚙ' => 'ꚙ', - 'Ꚛ' => 'ꚛ', - 'Ꜣ' => 'ꜣ', - 'Ꜥ' => 'ꜥ', - 'Ꜧ' => 'ꜧ', - 'Ꜩ' => 'ꜩ', - 'Ꜫ' => 'ꜫ', - 'Ꜭ' => 'ꜭ', - 'Ꜯ' => 'ꜯ', - 'Ꜳ' => 'ꜳ', - 'Ꜵ' => 'ꜵ', - 'Ꜷ' => 'ꜷ', - 'Ꜹ' => 'ꜹ', - 'Ꜻ' => 'ꜻ', - 'Ꜽ' => 'ꜽ', - 'Ꜿ' => 'ꜿ', - 'Ꝁ' => 'ꝁ', - 'Ꝃ' => 'ꝃ', - 'Ꝅ' => 'ꝅ', - 'Ꝇ' => 'ꝇ', - 'Ꝉ' => 'ꝉ', - 'Ꝋ' => 'ꝋ', - 'Ꝍ' => 'ꝍ', - 'Ꝏ' => 'ꝏ', - 'Ꝑ' => 'ꝑ', - 'Ꝓ' => 'ꝓ', - 'Ꝕ' => 'ꝕ', - 'Ꝗ' => 'ꝗ', - 'Ꝙ' => 'ꝙ', - 'Ꝛ' => 'ꝛ', - 'Ꝝ' => 'ꝝ', - 'Ꝟ' => 'ꝟ', - 'Ꝡ' => 'ꝡ', - 'Ꝣ' => 'ꝣ', - 'Ꝥ' => 'ꝥ', - 'Ꝧ' => 'ꝧ', - 'Ꝩ' => 'ꝩ', - 'Ꝫ' => 'ꝫ', - 'Ꝭ' => 'ꝭ', - 'Ꝯ' => 'ꝯ', - 'Ꝺ' => 'ꝺ', - 'Ꝼ' => 'ꝼ', - 'Ᵹ' => 'ᵹ', - 'Ꝿ' => 'ꝿ', - 'Ꞁ' => 'ꞁ', - 'Ꞃ' => 'ꞃ', - 'Ꞅ' => 'ꞅ', - 'Ꞇ' => 'ꞇ', - 'Ꞌ' => 'ꞌ', - 'Ɥ' => 'ɥ', - 'Ꞑ' => 'ꞑ', - 'Ꞓ' => 'ꞓ', - 'Ꞗ' => 'ꞗ', - 'Ꞙ' => 'ꞙ', - 'Ꞛ' => 'ꞛ', - 'Ꞝ' => 'ꞝ', - 'Ꞟ' => 'ꞟ', - 'Ꞡ' => 'ꞡ', - 'Ꞣ' => 'ꞣ', - 'Ꞥ' => 'ꞥ', - 'Ꞧ' => 'ꞧ', - 'Ꞩ' => 'ꞩ', - 'Ɦ' => 'ɦ', - 'Ɜ' => 'ɜ', - 'Ɡ' => 'ɡ', - 'Ɬ' => 'ɬ', - 'Ɪ' => 'ɪ', - 'Ʞ' => 'ʞ', - 'Ʇ' => 'ʇ', - 'Ʝ' => 'ʝ', - 'Ꭓ' => 'ꭓ', - 'Ꞵ' => 'ꞵ', - 'Ꞷ' => 'ꞷ', - 'Ꞹ' => 'ꞹ', - 'Ꞻ' => 'ꞻ', - 'Ꞽ' => 'ꞽ', - 'Ꞿ' => 'ꞿ', - 'Ꟃ' => 'ꟃ', - 'Ꞔ' => 'ꞔ', - 'Ʂ' => 'ʂ', - 'Ᶎ' => 'ᶎ', - 'Ꟈ' => 'ꟈ', - 'Ꟊ' => 'ꟊ', - 'Ꟶ' => 'ꟶ', - 'A' => 'a', - 'B' => 'b', - 'C' => 'c', - 'D' => 'd', - 'E' => 'e', - 'F' => 'f', - 'G' => 'g', - 'H' => 'h', - 'I' => 'i', - 'J' => 'j', - 'K' => 'k', - 'L' => 'l', - 'M' => 'm', - 'N' => 'n', - 'O' => 'o', - 'P' => 'p', - 'Q' => 'q', - 'R' => 'r', - 'S' => 's', - 'T' => 't', - 'U' => 'u', - 'V' => 'v', - 'W' => 'w', - 'X' => 'x', - 'Y' => 'y', - 'Z' => 'z', - '𐐀' => '𐐨', - '𐐁' => '𐐩', - '𐐂' => '𐐪', - '𐐃' => '𐐫', - '𐐄' => '𐐬', - '𐐅' => '𐐭', - '𐐆' => '𐐮', - '𐐇' => '𐐯', - '𐐈' => '𐐰', - '𐐉' => '𐐱', - '𐐊' => '𐐲', - '𐐋' => '𐐳', - '𐐌' => '𐐴', - '𐐍' => '𐐵', - '𐐎' => '𐐶', - '𐐏' => '𐐷', - '𐐐' => '𐐸', - '𐐑' => '𐐹', - '𐐒' => '𐐺', - '𐐓' => '𐐻', - '𐐔' => '𐐼', - '𐐕' => '𐐽', - '𐐖' => '𐐾', - '𐐗' => '𐐿', - '𐐘' => '𐑀', - '𐐙' => '𐑁', - '𐐚' => '𐑂', - '𐐛' => '𐑃', - '𐐜' => '𐑄', - '𐐝' => '𐑅', - '𐐞' => '𐑆', - '𐐟' => '𐑇', - '𐐠' => '𐑈', - '𐐡' => '𐑉', - '𐐢' => '𐑊', - '𐐣' => '𐑋', - '𐐤' => '𐑌', - '𐐥' => '𐑍', - '𐐦' => '𐑎', - '𐐧' => '𐑏', - '𐒰' => '𐓘', - '𐒱' => '𐓙', - '𐒲' => '𐓚', - '𐒳' => '𐓛', - '𐒴' => '𐓜', - '𐒵' => '𐓝', - '𐒶' => '𐓞', - '𐒷' => '𐓟', - '𐒸' => '𐓠', - '𐒹' => '𐓡', - '𐒺' => '𐓢', - '𐒻' => '𐓣', - '𐒼' => '𐓤', - '𐒽' => '𐓥', - '𐒾' => '𐓦', - '𐒿' => '𐓧', - '𐓀' => '𐓨', - '𐓁' => '𐓩', - '𐓂' => '𐓪', - '𐓃' => '𐓫', - '𐓄' => '𐓬', - '𐓅' => '𐓭', - '𐓆' => '𐓮', - '𐓇' => '𐓯', - '𐓈' => '𐓰', - '𐓉' => '𐓱', - '𐓊' => '𐓲', - '𐓋' => '𐓳', - '𐓌' => '𐓴', - '𐓍' => '𐓵', - '𐓎' => '𐓶', - '𐓏' => '𐓷', - '𐓐' => '𐓸', - '𐓑' => '𐓹', - '𐓒' => '𐓺', - '𐓓' => '𐓻', - '𐲀' => '𐳀', - '𐲁' => '𐳁', - '𐲂' => '𐳂', - '𐲃' => '𐳃', - '𐲄' => '𐳄', - '𐲅' => '𐳅', - '𐲆' => '𐳆', - '𐲇' => '𐳇', - '𐲈' => '𐳈', - '𐲉' => '𐳉', - '𐲊' => '𐳊', - '𐲋' => '𐳋', - '𐲌' => '𐳌', - '𐲍' => '𐳍', - '𐲎' => '𐳎', - '𐲏' => '𐳏', - '𐲐' => '𐳐', - '𐲑' => '𐳑', - '𐲒' => '𐳒', - '𐲓' => '𐳓', - '𐲔' => '𐳔', - '𐲕' => '𐳕', - '𐲖' => '𐳖', - '𐲗' => '𐳗', - '𐲘' => '𐳘', - '𐲙' => '𐳙', - '𐲚' => '𐳚', - '𐲛' => '𐳛', - '𐲜' => '𐳜', - '𐲝' => '𐳝', - '𐲞' => '𐳞', - '𐲟' => '𐳟', - '𐲠' => '𐳠', - '𐲡' => '𐳡', - '𐲢' => '𐳢', - '𐲣' => '𐳣', - '𐲤' => '𐳤', - '𐲥' => '𐳥', - '𐲦' => '𐳦', - '𐲧' => '𐳧', - '𐲨' => '𐳨', - '𐲩' => '𐳩', - '𐲪' => '𐳪', - '𐲫' => '𐳫', - '𐲬' => '𐳬', - '𐲭' => '𐳭', - '𐲮' => '𐳮', - '𐲯' => '𐳯', - '𐲰' => '𐳰', - '𐲱' => '𐳱', - '𐲲' => '𐳲', - '𑢠' => '𑣀', - '𑢡' => '𑣁', - '𑢢' => '𑣂', - '𑢣' => '𑣃', - '𑢤' => '𑣄', - '𑢥' => '𑣅', - '𑢦' => '𑣆', - '𑢧' => '𑣇', - '𑢨' => '𑣈', - '𑢩' => '𑣉', - '𑢪' => '𑣊', - '𑢫' => '𑣋', - '𑢬' => '𑣌', - '𑢭' => '𑣍', - '𑢮' => '𑣎', - '𑢯' => '𑣏', - '𑢰' => '𑣐', - '𑢱' => '𑣑', - '𑢲' => '𑣒', - '𑢳' => '𑣓', - '𑢴' => '𑣔', - '𑢵' => '𑣕', - '𑢶' => '𑣖', - '𑢷' => '𑣗', - '𑢸' => '𑣘', - '𑢹' => '𑣙', - '𑢺' => '𑣚', - '𑢻' => '𑣛', - '𑢼' => '𑣜', - '𑢽' => '𑣝', - '𑢾' => '𑣞', - '𑢿' => '𑣟', - '𖹀' => '𖹠', - '𖹁' => '𖹡', - '𖹂' => '𖹢', - '𖹃' => '𖹣', - '𖹄' => '𖹤', - '𖹅' => '𖹥', - '𖹆' => '𖹦', - '𖹇' => '𖹧', - '𖹈' => '𖹨', - '𖹉' => '𖹩', - '𖹊' => '𖹪', - '𖹋' => '𖹫', - '𖹌' => '𖹬', - '𖹍' => '𖹭', - '𖹎' => '𖹮', - '𖹏' => '𖹯', - '𖹐' => '𖹰', - '𖹑' => '𖹱', - '𖹒' => '𖹲', - '𖹓' => '𖹳', - '𖹔' => '𖹴', - '𖹕' => '𖹵', - '𖹖' => '𖹶', - '𖹗' => '𖹷', - '𖹘' => '𖹸', - '𖹙' => '𖹹', - '𖹚' => '𖹺', - '𖹛' => '𖹻', - '𖹜' => '𖹼', - '𖹝' => '𖹽', - '𖹞' => '𖹾', - '𖹟' => '𖹿', - '𞤀' => '𞤢', - '𞤁' => '𞤣', - '𞤂' => '𞤤', - '𞤃' => '𞤥', - '𞤄' => '𞤦', - '𞤅' => '𞤧', - '𞤆' => '𞤨', - '𞤇' => '𞤩', - '𞤈' => '𞤪', - '𞤉' => '𞤫', - '𞤊' => '𞤬', - '𞤋' => '𞤭', - '𞤌' => '𞤮', - '𞤍' => '𞤯', - '𞤎' => '𞤰', - '𞤏' => '𞤱', - '𞤐' => '𞤲', - '𞤑' => '𞤳', - '𞤒' => '𞤴', - '𞤓' => '𞤵', - '𞤔' => '𞤶', - '𞤕' => '𞤷', - '𞤖' => '𞤸', - '𞤗' => '𞤹', - '𞤘' => '𞤺', - '𞤙' => '𞤻', - '𞤚' => '𞤼', - '𞤛' => '𞤽', - '𞤜' => '𞤾', - '𞤝' => '𞤿', - '𞤞' => '𞥀', - '𞤟' => '𞥁', - '𞤠' => '𞥂', - '𞤡' => '𞥃', -); diff --git a/source/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php b/source/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php deleted file mode 100644 index 2a8f6e7..0000000 --- a/source/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php +++ /dev/null @@ -1,5 +0,0 @@ - 'A', - 'b' => 'B', - 'c' => 'C', - 'd' => 'D', - 'e' => 'E', - 'f' => 'F', - 'g' => 'G', - 'h' => 'H', - 'i' => 'I', - 'j' => 'J', - 'k' => 'K', - 'l' => 'L', - 'm' => 'M', - 'n' => 'N', - 'o' => 'O', - 'p' => 'P', - 'q' => 'Q', - 'r' => 'R', - 's' => 'S', - 't' => 'T', - 'u' => 'U', - 'v' => 'V', - 'w' => 'W', - 'x' => 'X', - 'y' => 'Y', - 'z' => 'Z', - 'µ' => 'Μ', - 'à' => 'À', - 'á' => 'Á', - 'â' => 'Â', - 'ã' => 'Ã', - 'ä' => 'Ä', - 'å' => 'Å', - 'æ' => 'Æ', - 'ç' => 'Ç', - 'è' => 'È', - 'é' => 'É', - 'ê' => 'Ê', - 'ë' => 'Ë', - 'ì' => 'Ì', - 'í' => 'Í', - 'î' => 'Î', - 'ï' => 'Ï', - 'ð' => 'Ð', - 'ñ' => 'Ñ', - 'ò' => 'Ò', - 'ó' => 'Ó', - 'ô' => 'Ô', - 'õ' => 'Õ', - 'ö' => 'Ö', - 'ø' => 'Ø', - 'ù' => 'Ù', - 'ú' => 'Ú', - 'û' => 'Û', - 'ü' => 'Ü', - 'ý' => 'Ý', - 'þ' => 'Þ', - 'ÿ' => 'Ÿ', - 'ā' => 'Ā', - 'ă' => 'Ă', - 'ą' => 'Ą', - 'ć' => 'Ć', - 'ĉ' => 'Ĉ', - 'ċ' => 'Ċ', - 'č' => 'Č', - 'ď' => 'Ď', - 'đ' => 'Đ', - 'ē' => 'Ē', - 'ĕ' => 'Ĕ', - 'ė' => 'Ė', - 'ę' => 'Ę', - 'ě' => 'Ě', - 'ĝ' => 'Ĝ', - 'ğ' => 'Ğ', - 'ġ' => 'Ġ', - 'ģ' => 'Ģ', - 'ĥ' => 'Ĥ', - 'ħ' => 'Ħ', - 'ĩ' => 'Ĩ', - 'ī' => 'Ī', - 'ĭ' => 'Ĭ', - 'į' => 'Į', - 'ı' => 'I', - 'ij' => 'IJ', - 'ĵ' => 'Ĵ', - 'ķ' => 'Ķ', - 'ĺ' => 'Ĺ', - 'ļ' => 'Ļ', - 'ľ' => 'Ľ', - 'ŀ' => 'Ŀ', - 'ł' => 'Ł', - 'ń' => 'Ń', - 'ņ' => 'Ņ', - 'ň' => 'Ň', - 'ŋ' => 'Ŋ', - 'ō' => 'Ō', - 'ŏ' => 'Ŏ', - 'ő' => 'Ő', - 'œ' => 'Œ', - 'ŕ' => 'Ŕ', - 'ŗ' => 'Ŗ', - 'ř' => 'Ř', - 'ś' => 'Ś', - 'ŝ' => 'Ŝ', - 'ş' => 'Ş', - 'š' => 'Š', - 'ţ' => 'Ţ', - 'ť' => 'Ť', - 'ŧ' => 'Ŧ', - 'ũ' => 'Ũ', - 'ū' => 'Ū', - 'ŭ' => 'Ŭ', - 'ů' => 'Ů', - 'ű' => 'Ű', - 'ų' => 'Ų', - 'ŵ' => 'Ŵ', - 'ŷ' => 'Ŷ', - 'ź' => 'Ź', - 'ż' => 'Ż', - 'ž' => 'Ž', - 'ſ' => 'S', - 'ƀ' => 'Ƀ', - 'ƃ' => 'Ƃ', - 'ƅ' => 'Ƅ', - 'ƈ' => 'Ƈ', - 'ƌ' => 'Ƌ', - 'ƒ' => 'Ƒ', - 'ƕ' => 'Ƕ', - 'ƙ' => 'Ƙ', - 'ƚ' => 'Ƚ', - 'ƞ' => 'Ƞ', - 'ơ' => 'Ơ', - 'ƣ' => 'Ƣ', - 'ƥ' => 'Ƥ', - 'ƨ' => 'Ƨ', - 'ƭ' => 'Ƭ', - 'ư' => 'Ư', - 'ƴ' => 'Ƴ', - 'ƶ' => 'Ƶ', - 'ƹ' => 'Ƹ', - 'ƽ' => 'Ƽ', - 'ƿ' => 'Ƿ', - 'Dž' => 'DŽ', - 'dž' => 'DŽ', - 'Lj' => 'LJ', - 'lj' => 'LJ', - 'Nj' => 'NJ', - 'nj' => 'NJ', - 'ǎ' => 'Ǎ', - 'ǐ' => 'Ǐ', - 'ǒ' => 'Ǒ', - 'ǔ' => 'Ǔ', - 'ǖ' => 'Ǖ', - 'ǘ' => 'Ǘ', - 'ǚ' => 'Ǚ', - 'ǜ' => 'Ǜ', - 'ǝ' => 'Ǝ', - 'ǟ' => 'Ǟ', - 'ǡ' => 'Ǡ', - 'ǣ' => 'Ǣ', - 'ǥ' => 'Ǥ', - 'ǧ' => 'Ǧ', - 'ǩ' => 'Ǩ', - 'ǫ' => 'Ǫ', - 'ǭ' => 'Ǭ', - 'ǯ' => 'Ǯ', - 'Dz' => 'DZ', - 'dz' => 'DZ', - 'ǵ' => 'Ǵ', - 'ǹ' => 'Ǹ', - 'ǻ' => 'Ǻ', - 'ǽ' => 'Ǽ', - 'ǿ' => 'Ǿ', - 'ȁ' => 'Ȁ', - 'ȃ' => 'Ȃ', - 'ȅ' => 'Ȅ', - 'ȇ' => 'Ȇ', - 'ȉ' => 'Ȉ', - 'ȋ' => 'Ȋ', - 'ȍ' => 'Ȍ', - 'ȏ' => 'Ȏ', - 'ȑ' => 'Ȑ', - 'ȓ' => 'Ȓ', - 'ȕ' => 'Ȕ', - 'ȗ' => 'Ȗ', - 'ș' => 'Ș', - 'ț' => 'Ț', - 'ȝ' => 'Ȝ', - 'ȟ' => 'Ȟ', - 'ȣ' => 'Ȣ', - 'ȥ' => 'Ȥ', - 'ȧ' => 'Ȧ', - 'ȩ' => 'Ȩ', - 'ȫ' => 'Ȫ', - 'ȭ' => 'Ȭ', - 'ȯ' => 'Ȯ', - 'ȱ' => 'Ȱ', - 'ȳ' => 'Ȳ', - 'ȼ' => 'Ȼ', - 'ȿ' => 'Ȿ', - 'ɀ' => 'Ɀ', - 'ɂ' => 'Ɂ', - 'ɇ' => 'Ɇ', - 'ɉ' => 'Ɉ', - 'ɋ' => 'Ɋ', - 'ɍ' => 'Ɍ', - 'ɏ' => 'Ɏ', - 'ɐ' => 'Ɐ', - 'ɑ' => 'Ɑ', - 'ɒ' => 'Ɒ', - 'ɓ' => 'Ɓ', - 'ɔ' => 'Ɔ', - 'ɖ' => 'Ɖ', - 'ɗ' => 'Ɗ', - 'ə' => 'Ə', - 'ɛ' => 'Ɛ', - 'ɜ' => 'Ɜ', - 'ɠ' => 'Ɠ', - 'ɡ' => 'Ɡ', - 'ɣ' => 'Ɣ', - 'ɥ' => 'Ɥ', - 'ɦ' => 'Ɦ', - 'ɨ' => 'Ɨ', - 'ɩ' => 'Ɩ', - 'ɪ' => 'Ɪ', - 'ɫ' => 'Ɫ', - 'ɬ' => 'Ɬ', - 'ɯ' => 'Ɯ', - 'ɱ' => 'Ɱ', - 'ɲ' => 'Ɲ', - 'ɵ' => 'Ɵ', - 'ɽ' => 'Ɽ', - 'ʀ' => 'Ʀ', - 'ʂ' => 'Ʂ', - 'ʃ' => 'Ʃ', - 'ʇ' => 'Ʇ', - 'ʈ' => 'Ʈ', - 'ʉ' => 'Ʉ', - 'ʊ' => 'Ʊ', - 'ʋ' => 'Ʋ', - 'ʌ' => 'Ʌ', - 'ʒ' => 'Ʒ', - 'ʝ' => 'Ʝ', - 'ʞ' => 'Ʞ', - 'ͅ' => 'Ι', - 'ͱ' => 'Ͱ', - 'ͳ' => 'Ͳ', - 'ͷ' => 'Ͷ', - 'ͻ' => 'Ͻ', - 'ͼ' => 'Ͼ', - 'ͽ' => 'Ͽ', - 'ά' => 'Ά', - 'έ' => 'Έ', - 'ή' => 'Ή', - 'ί' => 'Ί', - 'α' => 'Α', - 'β' => 'Β', - 'γ' => 'Γ', - 'δ' => 'Δ', - 'ε' => 'Ε', - 'ζ' => 'Ζ', - 'η' => 'Η', - 'θ' => 'Θ', - 'ι' => 'Ι', - 'κ' => 'Κ', - 'λ' => 'Λ', - 'μ' => 'Μ', - 'ν' => 'Ν', - 'ξ' => 'Ξ', - 'ο' => 'Ο', - 'π' => 'Π', - 'ρ' => 'Ρ', - 'ς' => 'Σ', - 'σ' => 'Σ', - 'τ' => 'Τ', - 'υ' => 'Υ', - 'φ' => 'Φ', - 'χ' => 'Χ', - 'ψ' => 'Ψ', - 'ω' => 'Ω', - 'ϊ' => 'Ϊ', - 'ϋ' => 'Ϋ', - 'ό' => 'Ό', - 'ύ' => 'Ύ', - 'ώ' => 'Ώ', - 'ϐ' => 'Β', - 'ϑ' => 'Θ', - 'ϕ' => 'Φ', - 'ϖ' => 'Π', - 'ϗ' => 'Ϗ', - 'ϙ' => 'Ϙ', - 'ϛ' => 'Ϛ', - 'ϝ' => 'Ϝ', - 'ϟ' => 'Ϟ', - 'ϡ' => 'Ϡ', - 'ϣ' => 'Ϣ', - 'ϥ' => 'Ϥ', - 'ϧ' => 'Ϧ', - 'ϩ' => 'Ϩ', - 'ϫ' => 'Ϫ', - 'ϭ' => 'Ϭ', - 'ϯ' => 'Ϯ', - 'ϰ' => 'Κ', - 'ϱ' => 'Ρ', - 'ϲ' => 'Ϲ', - 'ϳ' => 'Ϳ', - 'ϵ' => 'Ε', - 'ϸ' => 'Ϸ', - 'ϻ' => 'Ϻ', - 'а' => 'А', - 'б' => 'Б', - 'в' => 'В', - 'г' => 'Г', - 'д' => 'Д', - 'е' => 'Е', - 'ж' => 'Ж', - 'з' => 'З', - 'и' => 'И', - 'й' => 'Й', - 'к' => 'К', - 'л' => 'Л', - 'м' => 'М', - 'н' => 'Н', - 'о' => 'О', - 'п' => 'П', - 'р' => 'Р', - 'с' => 'С', - 'т' => 'Т', - 'у' => 'У', - 'ф' => 'Ф', - 'х' => 'Х', - 'ц' => 'Ц', - 'ч' => 'Ч', - 'ш' => 'Ш', - 'щ' => 'Щ', - 'ъ' => 'Ъ', - 'ы' => 'Ы', - 'ь' => 'Ь', - 'э' => 'Э', - 'ю' => 'Ю', - 'я' => 'Я', - 'ѐ' => 'Ѐ', - 'ё' => 'Ё', - 'ђ' => 'Ђ', - 'ѓ' => 'Ѓ', - 'є' => 'Є', - 'ѕ' => 'Ѕ', - 'і' => 'І', - 'ї' => 'Ї', - 'ј' => 'Ј', - 'љ' => 'Љ', - 'њ' => 'Њ', - 'ћ' => 'Ћ', - 'ќ' => 'Ќ', - 'ѝ' => 'Ѝ', - 'ў' => 'Ў', - 'џ' => 'Џ', - 'ѡ' => 'Ѡ', - 'ѣ' => 'Ѣ', - 'ѥ' => 'Ѥ', - 'ѧ' => 'Ѧ', - 'ѩ' => 'Ѩ', - 'ѫ' => 'Ѫ', - 'ѭ' => 'Ѭ', - 'ѯ' => 'Ѯ', - 'ѱ' => 'Ѱ', - 'ѳ' => 'Ѳ', - 'ѵ' => 'Ѵ', - 'ѷ' => 'Ѷ', - 'ѹ' => 'Ѹ', - 'ѻ' => 'Ѻ', - 'ѽ' => 'Ѽ', - 'ѿ' => 'Ѿ', - 'ҁ' => 'Ҁ', - 'ҋ' => 'Ҋ', - 'ҍ' => 'Ҍ', - 'ҏ' => 'Ҏ', - 'ґ' => 'Ґ', - 'ғ' => 'Ғ', - 'ҕ' => 'Ҕ', - 'җ' => 'Җ', - 'ҙ' => 'Ҙ', - 'қ' => 'Қ', - 'ҝ' => 'Ҝ', - 'ҟ' => 'Ҟ', - 'ҡ' => 'Ҡ', - 'ң' => 'Ң', - 'ҥ' => 'Ҥ', - 'ҧ' => 'Ҧ', - 'ҩ' => 'Ҩ', - 'ҫ' => 'Ҫ', - 'ҭ' => 'Ҭ', - 'ү' => 'Ү', - 'ұ' => 'Ұ', - 'ҳ' => 'Ҳ', - 'ҵ' => 'Ҵ', - 'ҷ' => 'Ҷ', - 'ҹ' => 'Ҹ', - 'һ' => 'Һ', - 'ҽ' => 'Ҽ', - 'ҿ' => 'Ҿ', - 'ӂ' => 'Ӂ', - 'ӄ' => 'Ӄ', - 'ӆ' => 'Ӆ', - 'ӈ' => 'Ӈ', - 'ӊ' => 'Ӊ', - 'ӌ' => 'Ӌ', - 'ӎ' => 'Ӎ', - 'ӏ' => 'Ӏ', - 'ӑ' => 'Ӑ', - 'ӓ' => 'Ӓ', - 'ӕ' => 'Ӕ', - 'ӗ' => 'Ӗ', - 'ә' => 'Ә', - 'ӛ' => 'Ӛ', - 'ӝ' => 'Ӝ', - 'ӟ' => 'Ӟ', - 'ӡ' => 'Ӡ', - 'ӣ' => 'Ӣ', - 'ӥ' => 'Ӥ', - 'ӧ' => 'Ӧ', - 'ө' => 'Ө', - 'ӫ' => 'Ӫ', - 'ӭ' => 'Ӭ', - 'ӯ' => 'Ӯ', - 'ӱ' => 'Ӱ', - 'ӳ' => 'Ӳ', - 'ӵ' => 'Ӵ', - 'ӷ' => 'Ӷ', - 'ӹ' => 'Ӹ', - 'ӻ' => 'Ӻ', - 'ӽ' => 'Ӽ', - 'ӿ' => 'Ӿ', - 'ԁ' => 'Ԁ', - 'ԃ' => 'Ԃ', - 'ԅ' => 'Ԅ', - 'ԇ' => 'Ԇ', - 'ԉ' => 'Ԉ', - 'ԋ' => 'Ԋ', - 'ԍ' => 'Ԍ', - 'ԏ' => 'Ԏ', - 'ԑ' => 'Ԑ', - 'ԓ' => 'Ԓ', - 'ԕ' => 'Ԕ', - 'ԗ' => 'Ԗ', - 'ԙ' => 'Ԙ', - 'ԛ' => 'Ԛ', - 'ԝ' => 'Ԝ', - 'ԟ' => 'Ԟ', - 'ԡ' => 'Ԡ', - 'ԣ' => 'Ԣ', - 'ԥ' => 'Ԥ', - 'ԧ' => 'Ԧ', - 'ԩ' => 'Ԩ', - 'ԫ' => 'Ԫ', - 'ԭ' => 'Ԭ', - 'ԯ' => 'Ԯ', - 'ա' => 'Ա', - 'բ' => 'Բ', - 'գ' => 'Գ', - 'դ' => 'Դ', - 'ե' => 'Ե', - 'զ' => 'Զ', - 'է' => 'Է', - 'ը' => 'Ը', - 'թ' => 'Թ', - 'ժ' => 'Ժ', - 'ի' => 'Ի', - 'լ' => 'Լ', - 'խ' => 'Խ', - 'ծ' => 'Ծ', - 'կ' => 'Կ', - 'հ' => 'Հ', - 'ձ' => 'Ձ', - 'ղ' => 'Ղ', - 'ճ' => 'Ճ', - 'մ' => 'Մ', - 'յ' => 'Յ', - 'ն' => 'Ն', - 'շ' => 'Շ', - 'ո' => 'Ո', - 'չ' => 'Չ', - 'պ' => 'Պ', - 'ջ' => 'Ջ', - 'ռ' => 'Ռ', - 'ս' => 'Ս', - 'վ' => 'Վ', - 'տ' => 'Տ', - 'ր' => 'Ր', - 'ց' => 'Ց', - 'ւ' => 'Ւ', - 'փ' => 'Փ', - 'ք' => 'Ք', - 'օ' => 'Օ', - 'ֆ' => 'Ֆ', - 'ა' => 'Ა', - 'ბ' => 'Ბ', - 'გ' => 'Გ', - 'დ' => 'Დ', - 'ე' => 'Ე', - 'ვ' => 'Ვ', - 'ზ' => 'Ზ', - 'თ' => 'Თ', - 'ი' => 'Ი', - 'კ' => 'Კ', - 'ლ' => 'Ლ', - 'მ' => 'Მ', - 'ნ' => 'Ნ', - 'ო' => 'Ო', - 'პ' => 'Პ', - 'ჟ' => 'Ჟ', - 'რ' => 'Რ', - 'ს' => 'Ს', - 'ტ' => 'Ტ', - 'უ' => 'Უ', - 'ფ' => 'Ფ', - 'ქ' => 'Ქ', - 'ღ' => 'Ღ', - 'ყ' => 'Ყ', - 'შ' => 'Შ', - 'ჩ' => 'Ჩ', - 'ც' => 'Ც', - 'ძ' => 'Ძ', - 'წ' => 'Წ', - 'ჭ' => 'Ჭ', - 'ხ' => 'Ხ', - 'ჯ' => 'Ჯ', - 'ჰ' => 'Ჰ', - 'ჱ' => 'Ჱ', - 'ჲ' => 'Ჲ', - 'ჳ' => 'Ჳ', - 'ჴ' => 'Ჴ', - 'ჵ' => 'Ჵ', - 'ჶ' => 'Ჶ', - 'ჷ' => 'Ჷ', - 'ჸ' => 'Ჸ', - 'ჹ' => 'Ჹ', - 'ჺ' => 'Ჺ', - 'ჽ' => 'Ჽ', - 'ჾ' => 'Ჾ', - 'ჿ' => 'Ჿ', - 'ᏸ' => 'Ᏸ', - 'ᏹ' => 'Ᏹ', - 'ᏺ' => 'Ᏺ', - 'ᏻ' => 'Ᏻ', - 'ᏼ' => 'Ᏼ', - 'ᏽ' => 'Ᏽ', - 'ᲀ' => 'В', - 'ᲁ' => 'Д', - 'ᲂ' => 'О', - 'ᲃ' => 'С', - 'ᲄ' => 'Т', - 'ᲅ' => 'Т', - 'ᲆ' => 'Ъ', - 'ᲇ' => 'Ѣ', - 'ᲈ' => 'Ꙋ', - 'ᵹ' => 'Ᵹ', - 'ᵽ' => 'Ᵽ', - 'ᶎ' => 'Ᶎ', - 'ḁ' => 'Ḁ', - 'ḃ' => 'Ḃ', - 'ḅ' => 'Ḅ', - 'ḇ' => 'Ḇ', - 'ḉ' => 'Ḉ', - 'ḋ' => 'Ḋ', - 'ḍ' => 'Ḍ', - 'ḏ' => 'Ḏ', - 'ḑ' => 'Ḑ', - 'ḓ' => 'Ḓ', - 'ḕ' => 'Ḕ', - 'ḗ' => 'Ḗ', - 'ḙ' => 'Ḙ', - 'ḛ' => 'Ḛ', - 'ḝ' => 'Ḝ', - 'ḟ' => 'Ḟ', - 'ḡ' => 'Ḡ', - 'ḣ' => 'Ḣ', - 'ḥ' => 'Ḥ', - 'ḧ' => 'Ḧ', - 'ḩ' => 'Ḩ', - 'ḫ' => 'Ḫ', - 'ḭ' => 'Ḭ', - 'ḯ' => 'Ḯ', - 'ḱ' => 'Ḱ', - 'ḳ' => 'Ḳ', - 'ḵ' => 'Ḵ', - 'ḷ' => 'Ḷ', - 'ḹ' => 'Ḹ', - 'ḻ' => 'Ḻ', - 'ḽ' => 'Ḽ', - 'ḿ' => 'Ḿ', - 'ṁ' => 'Ṁ', - 'ṃ' => 'Ṃ', - 'ṅ' => 'Ṅ', - 'ṇ' => 'Ṇ', - 'ṉ' => 'Ṉ', - 'ṋ' => 'Ṋ', - 'ṍ' => 'Ṍ', - 'ṏ' => 'Ṏ', - 'ṑ' => 'Ṑ', - 'ṓ' => 'Ṓ', - 'ṕ' => 'Ṕ', - 'ṗ' => 'Ṗ', - 'ṙ' => 'Ṙ', - 'ṛ' => 'Ṛ', - 'ṝ' => 'Ṝ', - 'ṟ' => 'Ṟ', - 'ṡ' => 'Ṡ', - 'ṣ' => 'Ṣ', - 'ṥ' => 'Ṥ', - 'ṧ' => 'Ṧ', - 'ṩ' => 'Ṩ', - 'ṫ' => 'Ṫ', - 'ṭ' => 'Ṭ', - 'ṯ' => 'Ṯ', - 'ṱ' => 'Ṱ', - 'ṳ' => 'Ṳ', - 'ṵ' => 'Ṵ', - 'ṷ' => 'Ṷ', - 'ṹ' => 'Ṹ', - 'ṻ' => 'Ṻ', - 'ṽ' => 'Ṽ', - 'ṿ' => 'Ṿ', - 'ẁ' => 'Ẁ', - 'ẃ' => 'Ẃ', - 'ẅ' => 'Ẅ', - 'ẇ' => 'Ẇ', - 'ẉ' => 'Ẉ', - 'ẋ' => 'Ẋ', - 'ẍ' => 'Ẍ', - 'ẏ' => 'Ẏ', - 'ẑ' => 'Ẑ', - 'ẓ' => 'Ẓ', - 'ẕ' => 'Ẕ', - 'ẛ' => 'Ṡ', - 'ạ' => 'Ạ', - 'ả' => 'Ả', - 'ấ' => 'Ấ', - 'ầ' => 'Ầ', - 'ẩ' => 'Ẩ', - 'ẫ' => 'Ẫ', - 'ậ' => 'Ậ', - 'ắ' => 'Ắ', - 'ằ' => 'Ằ', - 'ẳ' => 'Ẳ', - 'ẵ' => 'Ẵ', - 'ặ' => 'Ặ', - 'ẹ' => 'Ẹ', - 'ẻ' => 'Ẻ', - 'ẽ' => 'Ẽ', - 'ế' => 'Ế', - 'ề' => 'Ề', - 'ể' => 'Ể', - 'ễ' => 'Ễ', - 'ệ' => 'Ệ', - 'ỉ' => 'Ỉ', - 'ị' => 'Ị', - 'ọ' => 'Ọ', - 'ỏ' => 'Ỏ', - 'ố' => 'Ố', - 'ồ' => 'Ồ', - 'ổ' => 'Ổ', - 'ỗ' => 'Ỗ', - 'ộ' => 'Ộ', - 'ớ' => 'Ớ', - 'ờ' => 'Ờ', - 'ở' => 'Ở', - 'ỡ' => 'Ỡ', - 'ợ' => 'Ợ', - 'ụ' => 'Ụ', - 'ủ' => 'Ủ', - 'ứ' => 'Ứ', - 'ừ' => 'Ừ', - 'ử' => 'Ử', - 'ữ' => 'Ữ', - 'ự' => 'Ự', - 'ỳ' => 'Ỳ', - 'ỵ' => 'Ỵ', - 'ỷ' => 'Ỷ', - 'ỹ' => 'Ỹ', - 'ỻ' => 'Ỻ', - 'ỽ' => 'Ỽ', - 'ỿ' => 'Ỿ', - 'ἀ' => 'Ἀ', - 'ἁ' => 'Ἁ', - 'ἂ' => 'Ἂ', - 'ἃ' => 'Ἃ', - 'ἄ' => 'Ἄ', - 'ἅ' => 'Ἅ', - 'ἆ' => 'Ἆ', - 'ἇ' => 'Ἇ', - 'ἐ' => 'Ἐ', - 'ἑ' => 'Ἑ', - 'ἒ' => 'Ἒ', - 'ἓ' => 'Ἓ', - 'ἔ' => 'Ἔ', - 'ἕ' => 'Ἕ', - 'ἠ' => 'Ἠ', - 'ἡ' => 'Ἡ', - 'ἢ' => 'Ἢ', - 'ἣ' => 'Ἣ', - 'ἤ' => 'Ἤ', - 'ἥ' => 'Ἥ', - 'ἦ' => 'Ἦ', - 'ἧ' => 'Ἧ', - 'ἰ' => 'Ἰ', - 'ἱ' => 'Ἱ', - 'ἲ' => 'Ἲ', - 'ἳ' => 'Ἳ', - 'ἴ' => 'Ἴ', - 'ἵ' => 'Ἵ', - 'ἶ' => 'Ἶ', - 'ἷ' => 'Ἷ', - 'ὀ' => 'Ὀ', - 'ὁ' => 'Ὁ', - 'ὂ' => 'Ὂ', - 'ὃ' => 'Ὃ', - 'ὄ' => 'Ὄ', - 'ὅ' => 'Ὅ', - 'ὑ' => 'Ὑ', - 'ὓ' => 'Ὓ', - 'ὕ' => 'Ὕ', - 'ὗ' => 'Ὗ', - 'ὠ' => 'Ὠ', - 'ὡ' => 'Ὡ', - 'ὢ' => 'Ὢ', - 'ὣ' => 'Ὣ', - 'ὤ' => 'Ὤ', - 'ὥ' => 'Ὥ', - 'ὦ' => 'Ὦ', - 'ὧ' => 'Ὧ', - 'ὰ' => 'Ὰ', - 'ά' => 'Ά', - 'ὲ' => 'Ὲ', - 'έ' => 'Έ', - 'ὴ' => 'Ὴ', - 'ή' => 'Ή', - 'ὶ' => 'Ὶ', - 'ί' => 'Ί', - 'ὸ' => 'Ὸ', - 'ό' => 'Ό', - 'ὺ' => 'Ὺ', - 'ύ' => 'Ύ', - 'ὼ' => 'Ὼ', - 'ώ' => 'Ώ', - 'ᾀ' => 'ἈΙ', - 'ᾁ' => 'ἉΙ', - 'ᾂ' => 'ἊΙ', - 'ᾃ' => 'ἋΙ', - 'ᾄ' => 'ἌΙ', - 'ᾅ' => 'ἍΙ', - 'ᾆ' => 'ἎΙ', - 'ᾇ' => 'ἏΙ', - 'ᾐ' => 'ἨΙ', - 'ᾑ' => 'ἩΙ', - 'ᾒ' => 'ἪΙ', - 'ᾓ' => 'ἫΙ', - 'ᾔ' => 'ἬΙ', - 'ᾕ' => 'ἭΙ', - 'ᾖ' => 'ἮΙ', - 'ᾗ' => 'ἯΙ', - 'ᾠ' => 'ὨΙ', - 'ᾡ' => 'ὩΙ', - 'ᾢ' => 'ὪΙ', - 'ᾣ' => 'ὫΙ', - 'ᾤ' => 'ὬΙ', - 'ᾥ' => 'ὭΙ', - 'ᾦ' => 'ὮΙ', - 'ᾧ' => 'ὯΙ', - 'ᾰ' => 'Ᾰ', - 'ᾱ' => 'Ᾱ', - 'ᾳ' => 'ΑΙ', - 'ι' => 'Ι', - 'ῃ' => 'ΗΙ', - 'ῐ' => 'Ῐ', - 'ῑ' => 'Ῑ', - 'ῠ' => 'Ῠ', - 'ῡ' => 'Ῡ', - 'ῥ' => 'Ῥ', - 'ῳ' => 'ΩΙ', - 'ⅎ' => 'Ⅎ', - 'ⅰ' => 'Ⅰ', - 'ⅱ' => 'Ⅱ', - 'ⅲ' => 'Ⅲ', - 'ⅳ' => 'Ⅳ', - 'ⅴ' => 'Ⅴ', - 'ⅵ' => 'Ⅵ', - 'ⅶ' => 'Ⅶ', - 'ⅷ' => 'Ⅷ', - 'ⅸ' => 'Ⅸ', - 'ⅹ' => 'Ⅹ', - 'ⅺ' => 'Ⅺ', - 'ⅻ' => 'Ⅻ', - 'ⅼ' => 'Ⅼ', - 'ⅽ' => 'Ⅽ', - 'ⅾ' => 'Ⅾ', - 'ⅿ' => 'Ⅿ', - 'ↄ' => 'Ↄ', - 'ⓐ' => 'Ⓐ', - 'ⓑ' => 'Ⓑ', - 'ⓒ' => 'Ⓒ', - 'ⓓ' => 'Ⓓ', - 'ⓔ' => 'Ⓔ', - 'ⓕ' => 'Ⓕ', - 'ⓖ' => 'Ⓖ', - 'ⓗ' => 'Ⓗ', - 'ⓘ' => 'Ⓘ', - 'ⓙ' => 'Ⓙ', - 'ⓚ' => 'Ⓚ', - 'ⓛ' => 'Ⓛ', - 'ⓜ' => 'Ⓜ', - 'ⓝ' => 'Ⓝ', - 'ⓞ' => 'Ⓞ', - 'ⓟ' => 'Ⓟ', - 'ⓠ' => 'Ⓠ', - 'ⓡ' => 'Ⓡ', - 'ⓢ' => 'Ⓢ', - 'ⓣ' => 'Ⓣ', - 'ⓤ' => 'Ⓤ', - 'ⓥ' => 'Ⓥ', - 'ⓦ' => 'Ⓦ', - 'ⓧ' => 'Ⓧ', - 'ⓨ' => 'Ⓨ', - 'ⓩ' => 'Ⓩ', - 'ⰰ' => 'Ⰰ', - 'ⰱ' => 'Ⰱ', - 'ⰲ' => 'Ⰲ', - 'ⰳ' => 'Ⰳ', - 'ⰴ' => 'Ⰴ', - 'ⰵ' => 'Ⰵ', - 'ⰶ' => 'Ⰶ', - 'ⰷ' => 'Ⰷ', - 'ⰸ' => 'Ⰸ', - 'ⰹ' => 'Ⰹ', - 'ⰺ' => 'Ⰺ', - 'ⰻ' => 'Ⰻ', - 'ⰼ' => 'Ⰼ', - 'ⰽ' => 'Ⰽ', - 'ⰾ' => 'Ⰾ', - 'ⰿ' => 'Ⰿ', - 'ⱀ' => 'Ⱀ', - 'ⱁ' => 'Ⱁ', - 'ⱂ' => 'Ⱂ', - 'ⱃ' => 'Ⱃ', - 'ⱄ' => 'Ⱄ', - 'ⱅ' => 'Ⱅ', - 'ⱆ' => 'Ⱆ', - 'ⱇ' => 'Ⱇ', - 'ⱈ' => 'Ⱈ', - 'ⱉ' => 'Ⱉ', - 'ⱊ' => 'Ⱊ', - 'ⱋ' => 'Ⱋ', - 'ⱌ' => 'Ⱌ', - 'ⱍ' => 'Ⱍ', - 'ⱎ' => 'Ⱎ', - 'ⱏ' => 'Ⱏ', - 'ⱐ' => 'Ⱐ', - 'ⱑ' => 'Ⱑ', - 'ⱒ' => 'Ⱒ', - 'ⱓ' => 'Ⱓ', - 'ⱔ' => 'Ⱔ', - 'ⱕ' => 'Ⱕ', - 'ⱖ' => 'Ⱖ', - 'ⱗ' => 'Ⱗ', - 'ⱘ' => 'Ⱘ', - 'ⱙ' => 'Ⱙ', - 'ⱚ' => 'Ⱚ', - 'ⱛ' => 'Ⱛ', - 'ⱜ' => 'Ⱜ', - 'ⱝ' => 'Ⱝ', - 'ⱞ' => 'Ⱞ', - 'ⱡ' => 'Ⱡ', - 'ⱥ' => 'Ⱥ', - 'ⱦ' => 'Ⱦ', - 'ⱨ' => 'Ⱨ', - 'ⱪ' => 'Ⱪ', - 'ⱬ' => 'Ⱬ', - 'ⱳ' => 'Ⱳ', - 'ⱶ' => 'Ⱶ', - 'ⲁ' => 'Ⲁ', - 'ⲃ' => 'Ⲃ', - 'ⲅ' => 'Ⲅ', - 'ⲇ' => 'Ⲇ', - 'ⲉ' => 'Ⲉ', - 'ⲋ' => 'Ⲋ', - 'ⲍ' => 'Ⲍ', - 'ⲏ' => 'Ⲏ', - 'ⲑ' => 'Ⲑ', - 'ⲓ' => 'Ⲓ', - 'ⲕ' => 'Ⲕ', - 'ⲗ' => 'Ⲗ', - 'ⲙ' => 'Ⲙ', - 'ⲛ' => 'Ⲛ', - 'ⲝ' => 'Ⲝ', - 'ⲟ' => 'Ⲟ', - 'ⲡ' => 'Ⲡ', - 'ⲣ' => 'Ⲣ', - 'ⲥ' => 'Ⲥ', - 'ⲧ' => 'Ⲧ', - 'ⲩ' => 'Ⲩ', - 'ⲫ' => 'Ⲫ', - 'ⲭ' => 'Ⲭ', - 'ⲯ' => 'Ⲯ', - 'ⲱ' => 'Ⲱ', - 'ⲳ' => 'Ⲳ', - 'ⲵ' => 'Ⲵ', - 'ⲷ' => 'Ⲷ', - 'ⲹ' => 'Ⲹ', - 'ⲻ' => 'Ⲻ', - 'ⲽ' => 'Ⲽ', - 'ⲿ' => 'Ⲿ', - 'ⳁ' => 'Ⳁ', - 'ⳃ' => 'Ⳃ', - 'ⳅ' => 'Ⳅ', - 'ⳇ' => 'Ⳇ', - 'ⳉ' => 'Ⳉ', - 'ⳋ' => 'Ⳋ', - 'ⳍ' => 'Ⳍ', - 'ⳏ' => 'Ⳏ', - 'ⳑ' => 'Ⳑ', - 'ⳓ' => 'Ⳓ', - 'ⳕ' => 'Ⳕ', - 'ⳗ' => 'Ⳗ', - 'ⳙ' => 'Ⳙ', - 'ⳛ' => 'Ⳛ', - 'ⳝ' => 'Ⳝ', - 'ⳟ' => 'Ⳟ', - 'ⳡ' => 'Ⳡ', - 'ⳣ' => 'Ⳣ', - 'ⳬ' => 'Ⳬ', - 'ⳮ' => 'Ⳮ', - 'ⳳ' => 'Ⳳ', - 'ⴀ' => 'Ⴀ', - 'ⴁ' => 'Ⴁ', - 'ⴂ' => 'Ⴂ', - 'ⴃ' => 'Ⴃ', - 'ⴄ' => 'Ⴄ', - 'ⴅ' => 'Ⴅ', - 'ⴆ' => 'Ⴆ', - 'ⴇ' => 'Ⴇ', - 'ⴈ' => 'Ⴈ', - 'ⴉ' => 'Ⴉ', - 'ⴊ' => 'Ⴊ', - 'ⴋ' => 'Ⴋ', - 'ⴌ' => 'Ⴌ', - 'ⴍ' => 'Ⴍ', - 'ⴎ' => 'Ⴎ', - 'ⴏ' => 'Ⴏ', - 'ⴐ' => 'Ⴐ', - 'ⴑ' => 'Ⴑ', - 'ⴒ' => 'Ⴒ', - 'ⴓ' => 'Ⴓ', - 'ⴔ' => 'Ⴔ', - 'ⴕ' => 'Ⴕ', - 'ⴖ' => 'Ⴖ', - 'ⴗ' => 'Ⴗ', - 'ⴘ' => 'Ⴘ', - 'ⴙ' => 'Ⴙ', - 'ⴚ' => 'Ⴚ', - 'ⴛ' => 'Ⴛ', - 'ⴜ' => 'Ⴜ', - 'ⴝ' => 'Ⴝ', - 'ⴞ' => 'Ⴞ', - 'ⴟ' => 'Ⴟ', - 'ⴠ' => 'Ⴠ', - 'ⴡ' => 'Ⴡ', - 'ⴢ' => 'Ⴢ', - 'ⴣ' => 'Ⴣ', - 'ⴤ' => 'Ⴤ', - 'ⴥ' => 'Ⴥ', - 'ⴧ' => 'Ⴧ', - 'ⴭ' => 'Ⴭ', - 'ꙁ' => 'Ꙁ', - 'ꙃ' => 'Ꙃ', - 'ꙅ' => 'Ꙅ', - 'ꙇ' => 'Ꙇ', - 'ꙉ' => 'Ꙉ', - 'ꙋ' => 'Ꙋ', - 'ꙍ' => 'Ꙍ', - 'ꙏ' => 'Ꙏ', - 'ꙑ' => 'Ꙑ', - 'ꙓ' => 'Ꙓ', - 'ꙕ' => 'Ꙕ', - 'ꙗ' => 'Ꙗ', - 'ꙙ' => 'Ꙙ', - 'ꙛ' => 'Ꙛ', - 'ꙝ' => 'Ꙝ', - 'ꙟ' => 'Ꙟ', - 'ꙡ' => 'Ꙡ', - 'ꙣ' => 'Ꙣ', - 'ꙥ' => 'Ꙥ', - 'ꙧ' => 'Ꙧ', - 'ꙩ' => 'Ꙩ', - 'ꙫ' => 'Ꙫ', - 'ꙭ' => 'Ꙭ', - 'ꚁ' => 'Ꚁ', - 'ꚃ' => 'Ꚃ', - 'ꚅ' => 'Ꚅ', - 'ꚇ' => 'Ꚇ', - 'ꚉ' => 'Ꚉ', - 'ꚋ' => 'Ꚋ', - 'ꚍ' => 'Ꚍ', - 'ꚏ' => 'Ꚏ', - 'ꚑ' => 'Ꚑ', - 'ꚓ' => 'Ꚓ', - 'ꚕ' => 'Ꚕ', - 'ꚗ' => 'Ꚗ', - 'ꚙ' => 'Ꚙ', - 'ꚛ' => 'Ꚛ', - 'ꜣ' => 'Ꜣ', - 'ꜥ' => 'Ꜥ', - 'ꜧ' => 'Ꜧ', - 'ꜩ' => 'Ꜩ', - 'ꜫ' => 'Ꜫ', - 'ꜭ' => 'Ꜭ', - 'ꜯ' => 'Ꜯ', - 'ꜳ' => 'Ꜳ', - 'ꜵ' => 'Ꜵ', - 'ꜷ' => 'Ꜷ', - 'ꜹ' => 'Ꜹ', - 'ꜻ' => 'Ꜻ', - 'ꜽ' => 'Ꜽ', - 'ꜿ' => 'Ꜿ', - 'ꝁ' => 'Ꝁ', - 'ꝃ' => 'Ꝃ', - 'ꝅ' => 'Ꝅ', - 'ꝇ' => 'Ꝇ', - 'ꝉ' => 'Ꝉ', - 'ꝋ' => 'Ꝋ', - 'ꝍ' => 'Ꝍ', - 'ꝏ' => 'Ꝏ', - 'ꝑ' => 'Ꝑ', - 'ꝓ' => 'Ꝓ', - 'ꝕ' => 'Ꝕ', - 'ꝗ' => 'Ꝗ', - 'ꝙ' => 'Ꝙ', - 'ꝛ' => 'Ꝛ', - 'ꝝ' => 'Ꝝ', - 'ꝟ' => 'Ꝟ', - 'ꝡ' => 'Ꝡ', - 'ꝣ' => 'Ꝣ', - 'ꝥ' => 'Ꝥ', - 'ꝧ' => 'Ꝧ', - 'ꝩ' => 'Ꝩ', - 'ꝫ' => 'Ꝫ', - 'ꝭ' => 'Ꝭ', - 'ꝯ' => 'Ꝯ', - 'ꝺ' => 'Ꝺ', - 'ꝼ' => 'Ꝼ', - 'ꝿ' => 'Ꝿ', - 'ꞁ' => 'Ꞁ', - 'ꞃ' => 'Ꞃ', - 'ꞅ' => 'Ꞅ', - 'ꞇ' => 'Ꞇ', - 'ꞌ' => 'Ꞌ', - 'ꞑ' => 'Ꞑ', - 'ꞓ' => 'Ꞓ', - 'ꞔ' => 'Ꞔ', - 'ꞗ' => 'Ꞗ', - 'ꞙ' => 'Ꞙ', - 'ꞛ' => 'Ꞛ', - 'ꞝ' => 'Ꞝ', - 'ꞟ' => 'Ꞟ', - 'ꞡ' => 'Ꞡ', - 'ꞣ' => 'Ꞣ', - 'ꞥ' => 'Ꞥ', - 'ꞧ' => 'Ꞧ', - 'ꞩ' => 'Ꞩ', - 'ꞵ' => 'Ꞵ', - 'ꞷ' => 'Ꞷ', - 'ꞹ' => 'Ꞹ', - 'ꞻ' => 'Ꞻ', - 'ꞽ' => 'Ꞽ', - 'ꞿ' => 'Ꞿ', - 'ꟃ' => 'Ꟃ', - 'ꟈ' => 'Ꟈ', - 'ꟊ' => 'Ꟊ', - 'ꟶ' => 'Ꟶ', - 'ꭓ' => 'Ꭓ', - 'ꭰ' => 'Ꭰ', - 'ꭱ' => 'Ꭱ', - 'ꭲ' => 'Ꭲ', - 'ꭳ' => 'Ꭳ', - 'ꭴ' => 'Ꭴ', - 'ꭵ' => 'Ꭵ', - 'ꭶ' => 'Ꭶ', - 'ꭷ' => 'Ꭷ', - 'ꭸ' => 'Ꭸ', - 'ꭹ' => 'Ꭹ', - 'ꭺ' => 'Ꭺ', - 'ꭻ' => 'Ꭻ', - 'ꭼ' => 'Ꭼ', - 'ꭽ' => 'Ꭽ', - 'ꭾ' => 'Ꭾ', - 'ꭿ' => 'Ꭿ', - 'ꮀ' => 'Ꮀ', - 'ꮁ' => 'Ꮁ', - 'ꮂ' => 'Ꮂ', - 'ꮃ' => 'Ꮃ', - 'ꮄ' => 'Ꮄ', - 'ꮅ' => 'Ꮅ', - 'ꮆ' => 'Ꮆ', - 'ꮇ' => 'Ꮇ', - 'ꮈ' => 'Ꮈ', - 'ꮉ' => 'Ꮉ', - 'ꮊ' => 'Ꮊ', - 'ꮋ' => 'Ꮋ', - 'ꮌ' => 'Ꮌ', - 'ꮍ' => 'Ꮍ', - 'ꮎ' => 'Ꮎ', - 'ꮏ' => 'Ꮏ', - 'ꮐ' => 'Ꮐ', - 'ꮑ' => 'Ꮑ', - 'ꮒ' => 'Ꮒ', - 'ꮓ' => 'Ꮓ', - 'ꮔ' => 'Ꮔ', - 'ꮕ' => 'Ꮕ', - 'ꮖ' => 'Ꮖ', - 'ꮗ' => 'Ꮗ', - 'ꮘ' => 'Ꮘ', - 'ꮙ' => 'Ꮙ', - 'ꮚ' => 'Ꮚ', - 'ꮛ' => 'Ꮛ', - 'ꮜ' => 'Ꮜ', - 'ꮝ' => 'Ꮝ', - 'ꮞ' => 'Ꮞ', - 'ꮟ' => 'Ꮟ', - 'ꮠ' => 'Ꮠ', - 'ꮡ' => 'Ꮡ', - 'ꮢ' => 'Ꮢ', - 'ꮣ' => 'Ꮣ', - 'ꮤ' => 'Ꮤ', - 'ꮥ' => 'Ꮥ', - 'ꮦ' => 'Ꮦ', - 'ꮧ' => 'Ꮧ', - 'ꮨ' => 'Ꮨ', - 'ꮩ' => 'Ꮩ', - 'ꮪ' => 'Ꮪ', - 'ꮫ' => 'Ꮫ', - 'ꮬ' => 'Ꮬ', - 'ꮭ' => 'Ꮭ', - 'ꮮ' => 'Ꮮ', - 'ꮯ' => 'Ꮯ', - 'ꮰ' => 'Ꮰ', - 'ꮱ' => 'Ꮱ', - 'ꮲ' => 'Ꮲ', - 'ꮳ' => 'Ꮳ', - 'ꮴ' => 'Ꮴ', - 'ꮵ' => 'Ꮵ', - 'ꮶ' => 'Ꮶ', - 'ꮷ' => 'Ꮷ', - 'ꮸ' => 'Ꮸ', - 'ꮹ' => 'Ꮹ', - 'ꮺ' => 'Ꮺ', - 'ꮻ' => 'Ꮻ', - 'ꮼ' => 'Ꮼ', - 'ꮽ' => 'Ꮽ', - 'ꮾ' => 'Ꮾ', - 'ꮿ' => 'Ꮿ', - 'a' => 'A', - 'b' => 'B', - 'c' => 'C', - 'd' => 'D', - 'e' => 'E', - 'f' => 'F', - 'g' => 'G', - 'h' => 'H', - 'i' => 'I', - 'j' => 'J', - 'k' => 'K', - 'l' => 'L', - 'm' => 'M', - 'n' => 'N', - 'o' => 'O', - 'p' => 'P', - 'q' => 'Q', - 'r' => 'R', - 's' => 'S', - 't' => 'T', - 'u' => 'U', - 'v' => 'V', - 'w' => 'W', - 'x' => 'X', - 'y' => 'Y', - 'z' => 'Z', - '𐐨' => '𐐀', - '𐐩' => '𐐁', - '𐐪' => '𐐂', - '𐐫' => '𐐃', - '𐐬' => '𐐄', - '𐐭' => '𐐅', - '𐐮' => '𐐆', - '𐐯' => '𐐇', - '𐐰' => '𐐈', - '𐐱' => '𐐉', - '𐐲' => '𐐊', - '𐐳' => '𐐋', - '𐐴' => '𐐌', - '𐐵' => '𐐍', - '𐐶' => '𐐎', - '𐐷' => '𐐏', - '𐐸' => '𐐐', - '𐐹' => '𐐑', - '𐐺' => '𐐒', - '𐐻' => '𐐓', - '𐐼' => '𐐔', - '𐐽' => '𐐕', - '𐐾' => '𐐖', - '𐐿' => '𐐗', - '𐑀' => '𐐘', - '𐑁' => '𐐙', - '𐑂' => '𐐚', - '𐑃' => '𐐛', - '𐑄' => '𐐜', - '𐑅' => '𐐝', - '𐑆' => '𐐞', - '𐑇' => '𐐟', - '𐑈' => '𐐠', - '𐑉' => '𐐡', - '𐑊' => '𐐢', - '𐑋' => '𐐣', - '𐑌' => '𐐤', - '𐑍' => '𐐥', - '𐑎' => '𐐦', - '𐑏' => '𐐧', - '𐓘' => '𐒰', - '𐓙' => '𐒱', - '𐓚' => '𐒲', - '𐓛' => '𐒳', - '𐓜' => '𐒴', - '𐓝' => '𐒵', - '𐓞' => '𐒶', - '𐓟' => '𐒷', - '𐓠' => '𐒸', - '𐓡' => '𐒹', - '𐓢' => '𐒺', - '𐓣' => '𐒻', - '𐓤' => '𐒼', - '𐓥' => '𐒽', - '𐓦' => '𐒾', - '𐓧' => '𐒿', - '𐓨' => '𐓀', - '𐓩' => '𐓁', - '𐓪' => '𐓂', - '𐓫' => '𐓃', - '𐓬' => '𐓄', - '𐓭' => '𐓅', - '𐓮' => '𐓆', - '𐓯' => '𐓇', - '𐓰' => '𐓈', - '𐓱' => '𐓉', - '𐓲' => '𐓊', - '𐓳' => '𐓋', - '𐓴' => '𐓌', - '𐓵' => '𐓍', - '𐓶' => '𐓎', - '𐓷' => '𐓏', - '𐓸' => '𐓐', - '𐓹' => '𐓑', - '𐓺' => '𐓒', - '𐓻' => '𐓓', - '𐳀' => '𐲀', - '𐳁' => '𐲁', - '𐳂' => '𐲂', - '𐳃' => '𐲃', - '𐳄' => '𐲄', - '𐳅' => '𐲅', - '𐳆' => '𐲆', - '𐳇' => '𐲇', - '𐳈' => '𐲈', - '𐳉' => '𐲉', - '𐳊' => '𐲊', - '𐳋' => '𐲋', - '𐳌' => '𐲌', - '𐳍' => '𐲍', - '𐳎' => '𐲎', - '𐳏' => '𐲏', - '𐳐' => '𐲐', - '𐳑' => '𐲑', - '𐳒' => '𐲒', - '𐳓' => '𐲓', - '𐳔' => '𐲔', - '𐳕' => '𐲕', - '𐳖' => '𐲖', - '𐳗' => '𐲗', - '𐳘' => '𐲘', - '𐳙' => '𐲙', - '𐳚' => '𐲚', - '𐳛' => '𐲛', - '𐳜' => '𐲜', - '𐳝' => '𐲝', - '𐳞' => '𐲞', - '𐳟' => '𐲟', - '𐳠' => '𐲠', - '𐳡' => '𐲡', - '𐳢' => '𐲢', - '𐳣' => '𐲣', - '𐳤' => '𐲤', - '𐳥' => '𐲥', - '𐳦' => '𐲦', - '𐳧' => '𐲧', - '𐳨' => '𐲨', - '𐳩' => '𐲩', - '𐳪' => '𐲪', - '𐳫' => '𐲫', - '𐳬' => '𐲬', - '𐳭' => '𐲭', - '𐳮' => '𐲮', - '𐳯' => '𐲯', - '𐳰' => '𐲰', - '𐳱' => '𐲱', - '𐳲' => '𐲲', - '𑣀' => '𑢠', - '𑣁' => '𑢡', - '𑣂' => '𑢢', - '𑣃' => '𑢣', - '𑣄' => '𑢤', - '𑣅' => '𑢥', - '𑣆' => '𑢦', - '𑣇' => '𑢧', - '𑣈' => '𑢨', - '𑣉' => '𑢩', - '𑣊' => '𑢪', - '𑣋' => '𑢫', - '𑣌' => '𑢬', - '𑣍' => '𑢭', - '𑣎' => '𑢮', - '𑣏' => '𑢯', - '𑣐' => '𑢰', - '𑣑' => '𑢱', - '𑣒' => '𑢲', - '𑣓' => '𑢳', - '𑣔' => '𑢴', - '𑣕' => '𑢵', - '𑣖' => '𑢶', - '𑣗' => '𑢷', - '𑣘' => '𑢸', - '𑣙' => '𑢹', - '𑣚' => '𑢺', - '𑣛' => '𑢻', - '𑣜' => '𑢼', - '𑣝' => '𑢽', - '𑣞' => '𑢾', - '𑣟' => '𑢿', - '𖹠' => '𖹀', - '𖹡' => '𖹁', - '𖹢' => '𖹂', - '𖹣' => '𖹃', - '𖹤' => '𖹄', - '𖹥' => '𖹅', - '𖹦' => '𖹆', - '𖹧' => '𖹇', - '𖹨' => '𖹈', - '𖹩' => '𖹉', - '𖹪' => '𖹊', - '𖹫' => '𖹋', - '𖹬' => '𖹌', - '𖹭' => '𖹍', - '𖹮' => '𖹎', - '𖹯' => '𖹏', - '𖹰' => '𖹐', - '𖹱' => '𖹑', - '𖹲' => '𖹒', - '𖹳' => '𖹓', - '𖹴' => '𖹔', - '𖹵' => '𖹕', - '𖹶' => '𖹖', - '𖹷' => '𖹗', - '𖹸' => '𖹘', - '𖹹' => '𖹙', - '𖹺' => '𖹚', - '𖹻' => '𖹛', - '𖹼' => '𖹜', - '𖹽' => '𖹝', - '𖹾' => '𖹞', - '𖹿' => '𖹟', - '𞤢' => '𞤀', - '𞤣' => '𞤁', - '𞤤' => '𞤂', - '𞤥' => '𞤃', - '𞤦' => '𞤄', - '𞤧' => '𞤅', - '𞤨' => '𞤆', - '𞤩' => '𞤇', - '𞤪' => '𞤈', - '𞤫' => '𞤉', - '𞤬' => '𞤊', - '𞤭' => '𞤋', - '𞤮' => '𞤌', - '𞤯' => '𞤍', - '𞤰' => '𞤎', - '𞤱' => '𞤏', - '𞤲' => '𞤐', - '𞤳' => '𞤑', - '𞤴' => '𞤒', - '𞤵' => '𞤓', - '𞤶' => '𞤔', - '𞤷' => '𞤕', - '𞤸' => '𞤖', - '𞤹' => '𞤗', - '𞤺' => '𞤘', - '𞤻' => '𞤙', - '𞤼' => '𞤚', - '𞤽' => '𞤛', - '𞤾' => '𞤜', - '𞤿' => '𞤝', - '𞥀' => '𞤞', - '𞥁' => '𞤟', - '𞥂' => '𞤠', - '𞥃' => '𞤡', - 'ß' => 'SS', - 'ff' => 'FF', - 'fi' => 'FI', - 'fl' => 'FL', - 'ffi' => 'FFI', - 'ffl' => 'FFL', - 'ſt' => 'ST', - 'st' => 'ST', - 'և' => 'ԵՒ', - 'ﬓ' => 'ՄՆ', - 'ﬔ' => 'ՄԵ', - 'ﬕ' => 'ՄԻ', - 'ﬖ' => 'ՎՆ', - 'ﬗ' => 'ՄԽ', - 'ʼn' => 'ʼN', - 'ΐ' => 'Ϊ́', - 'ΰ' => 'Ϋ́', - 'ǰ' => 'J̌', - 'ẖ' => 'H̱', - 'ẗ' => 'T̈', - 'ẘ' => 'W̊', - 'ẙ' => 'Y̊', - 'ẚ' => 'Aʾ', - 'ὐ' => 'Υ̓', - 'ὒ' => 'Υ̓̀', - 'ὔ' => 'Υ̓́', - 'ὖ' => 'Υ̓͂', - 'ᾶ' => 'Α͂', - 'ῆ' => 'Η͂', - 'ῒ' => 'Ϊ̀', - 'ΐ' => 'Ϊ́', - 'ῖ' => 'Ι͂', - 'ῗ' => 'Ϊ͂', - 'ῢ' => 'Ϋ̀', - 'ΰ' => 'Ϋ́', - 'ῤ' => 'Ρ̓', - 'ῦ' => 'Υ͂', - 'ῧ' => 'Ϋ͂', - 'ῶ' => 'Ω͂', - 'ᾈ' => 'ἈΙ', - 'ᾉ' => 'ἉΙ', - 'ᾊ' => 'ἊΙ', - 'ᾋ' => 'ἋΙ', - 'ᾌ' => 'ἌΙ', - 'ᾍ' => 'ἍΙ', - 'ᾎ' => 'ἎΙ', - 'ᾏ' => 'ἏΙ', - 'ᾘ' => 'ἨΙ', - 'ᾙ' => 'ἩΙ', - 'ᾚ' => 'ἪΙ', - 'ᾛ' => 'ἫΙ', - 'ᾜ' => 'ἬΙ', - 'ᾝ' => 'ἭΙ', - 'ᾞ' => 'ἮΙ', - 'ᾟ' => 'ἯΙ', - 'ᾨ' => 'ὨΙ', - 'ᾩ' => 'ὩΙ', - 'ᾪ' => 'ὪΙ', - 'ᾫ' => 'ὫΙ', - 'ᾬ' => 'ὬΙ', - 'ᾭ' => 'ὭΙ', - 'ᾮ' => 'ὮΙ', - 'ᾯ' => 'ὯΙ', - 'ᾼ' => 'ΑΙ', - 'ῌ' => 'ΗΙ', - 'ῼ' => 'ΩΙ', - 'ᾲ' => 'ᾺΙ', - 'ᾴ' => 'ΆΙ', - 'ῂ' => 'ῊΙ', - 'ῄ' => 'ΉΙ', - 'ῲ' => 'ῺΙ', - 'ῴ' => 'ΏΙ', - 'ᾷ' => 'Α͂Ι', - 'ῇ' => 'Η͂Ι', - 'ῷ' => 'Ω͂Ι', -); diff --git a/source/vendor/symfony/polyfill-mbstring/bootstrap.php b/source/vendor/symfony/polyfill-mbstring/bootstrap.php deleted file mode 100644 index 1fedd1f..0000000 --- a/source/vendor/symfony/polyfill-mbstring/bootstrap.php +++ /dev/null @@ -1,147 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Mbstring as p; - -if (\PHP_VERSION_ID >= 80000) { - return require __DIR__.'/bootstrap80.php'; -} - -if (!function_exists('mb_convert_encoding')) { - function mb_convert_encoding($string, $to_encoding, $from_encoding = null) { return p\Mbstring::mb_convert_encoding($string, $to_encoding, $from_encoding); } -} -if (!function_exists('mb_decode_mimeheader')) { - function mb_decode_mimeheader($string) { return p\Mbstring::mb_decode_mimeheader($string); } -} -if (!function_exists('mb_encode_mimeheader')) { - function mb_encode_mimeheader($string, $charset = null, $transfer_encoding = null, $newline = "\r\n", $indent = 0) { return p\Mbstring::mb_encode_mimeheader($string, $charset, $transfer_encoding, $newline, $indent); } -} -if (!function_exists('mb_decode_numericentity')) { - function mb_decode_numericentity($string, $map, $encoding = null) { return p\Mbstring::mb_decode_numericentity($string, $map, $encoding); } -} -if (!function_exists('mb_encode_numericentity')) { - function mb_encode_numericentity($string, $map, $encoding = null, $hex = false) { return p\Mbstring::mb_encode_numericentity($string, $map, $encoding, $hex); } -} -if (!function_exists('mb_convert_case')) { - function mb_convert_case($string, $mode, $encoding = null) { return p\Mbstring::mb_convert_case($string, $mode, $encoding); } -} -if (!function_exists('mb_internal_encoding')) { - function mb_internal_encoding($encoding = null) { return p\Mbstring::mb_internal_encoding($encoding); } -} -if (!function_exists('mb_language')) { - function mb_language($language = null) { return p\Mbstring::mb_language($language); } -} -if (!function_exists('mb_list_encodings')) { - function mb_list_encodings() { return p\Mbstring::mb_list_encodings(); } -} -if (!function_exists('mb_encoding_aliases')) { - function mb_encoding_aliases($encoding) { return p\Mbstring::mb_encoding_aliases($encoding); } -} -if (!function_exists('mb_check_encoding')) { - function mb_check_encoding($value = null, $encoding = null) { return p\Mbstring::mb_check_encoding($value, $encoding); } -} -if (!function_exists('mb_detect_encoding')) { - function mb_detect_encoding($string, $encodings = null, $strict = false) { return p\Mbstring::mb_detect_encoding($string, $encodings, $strict); } -} -if (!function_exists('mb_detect_order')) { - function mb_detect_order($encoding = null) { return p\Mbstring::mb_detect_order($encoding); } -} -if (!function_exists('mb_parse_str')) { - function mb_parse_str($string, &$result = []) { parse_str($string, $result); return (bool) $result; } -} -if (!function_exists('mb_strlen')) { - function mb_strlen($string, $encoding = null) { return p\Mbstring::mb_strlen($string, $encoding); } -} -if (!function_exists('mb_strpos')) { - function mb_strpos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strpos($haystack, $needle, $offset, $encoding); } -} -if (!function_exists('mb_strtolower')) { - function mb_strtolower($string, $encoding = null) { return p\Mbstring::mb_strtolower($string, $encoding); } -} -if (!function_exists('mb_strtoupper')) { - function mb_strtoupper($string, $encoding = null) { return p\Mbstring::mb_strtoupper($string, $encoding); } -} -if (!function_exists('mb_substitute_character')) { - function mb_substitute_character($substitute_character = null) { return p\Mbstring::mb_substitute_character($substitute_character); } -} -if (!function_exists('mb_substr')) { - function mb_substr($string, $start, $length = 2147483647, $encoding = null) { return p\Mbstring::mb_substr($string, $start, $length, $encoding); } -} -if (!function_exists('mb_stripos')) { - function mb_stripos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_stripos($haystack, $needle, $offset, $encoding); } -} -if (!function_exists('mb_stristr')) { - function mb_stristr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_stristr($haystack, $needle, $before_needle, $encoding); } -} -if (!function_exists('mb_strrchr')) { - function mb_strrchr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strrchr($haystack, $needle, $before_needle, $encoding); } -} -if (!function_exists('mb_strrichr')) { - function mb_strrichr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strrichr($haystack, $needle, $before_needle, $encoding); } -} -if (!function_exists('mb_strripos')) { - function mb_strripos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strripos($haystack, $needle, $offset, $encoding); } -} -if (!function_exists('mb_strrpos')) { - function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strrpos($haystack, $needle, $offset, $encoding); } -} -if (!function_exists('mb_strstr')) { - function mb_strstr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strstr($haystack, $needle, $before_needle, $encoding); } -} -if (!function_exists('mb_get_info')) { - function mb_get_info($type = 'all') { return p\Mbstring::mb_get_info($type); } -} -if (!function_exists('mb_http_output')) { - function mb_http_output($encoding = null) { return p\Mbstring::mb_http_output($encoding); } -} -if (!function_exists('mb_strwidth')) { - function mb_strwidth($string, $encoding = null) { return p\Mbstring::mb_strwidth($string, $encoding); } -} -if (!function_exists('mb_substr_count')) { - function mb_substr_count($haystack, $needle, $encoding = null) { return p\Mbstring::mb_substr_count($haystack, $needle, $encoding); } -} -if (!function_exists('mb_output_handler')) { - function mb_output_handler($string, $status) { return p\Mbstring::mb_output_handler($string, $status); } -} -if (!function_exists('mb_http_input')) { - function mb_http_input($type = null) { return p\Mbstring::mb_http_input($type); } -} - -if (!function_exists('mb_convert_variables')) { - function mb_convert_variables($to_encoding, $from_encoding, &...$vars) { return p\Mbstring::mb_convert_variables($to_encoding, $from_encoding, ...$vars); } -} - -if (!function_exists('mb_ord')) { - function mb_ord($string, $encoding = null) { return p\Mbstring::mb_ord($string, $encoding); } -} -if (!function_exists('mb_chr')) { - function mb_chr($codepoint, $encoding = null) { return p\Mbstring::mb_chr($codepoint, $encoding); } -} -if (!function_exists('mb_scrub')) { - function mb_scrub($string, $encoding = null) { $encoding = null === $encoding ? mb_internal_encoding() : $encoding; return mb_convert_encoding($string, $encoding, $encoding); } -} -if (!function_exists('mb_str_split')) { - function mb_str_split($string, $length = 1, $encoding = null) { return p\Mbstring::mb_str_split($string, $length, $encoding); } -} - -if (extension_loaded('mbstring')) { - return; -} - -if (!defined('MB_CASE_UPPER')) { - define('MB_CASE_UPPER', 0); -} -if (!defined('MB_CASE_LOWER')) { - define('MB_CASE_LOWER', 1); -} -if (!defined('MB_CASE_TITLE')) { - define('MB_CASE_TITLE', 2); -} diff --git a/source/vendor/symfony/polyfill-mbstring/bootstrap80.php b/source/vendor/symfony/polyfill-mbstring/bootstrap80.php deleted file mode 100644 index 82f5ac4..0000000 --- a/source/vendor/symfony/polyfill-mbstring/bootstrap80.php +++ /dev/null @@ -1,143 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Mbstring as p; - -if (!function_exists('mb_convert_encoding')) { - function mb_convert_encoding(array|string|null $string, ?string $to_encoding, array|string|null $from_encoding = null): array|string|false { return p\Mbstring::mb_convert_encoding($string ?? '', (string) $to_encoding, $from_encoding); } -} -if (!function_exists('mb_decode_mimeheader')) { - function mb_decode_mimeheader(?string $string): string { return p\Mbstring::mb_decode_mimeheader((string) $string); } -} -if (!function_exists('mb_encode_mimeheader')) { - function mb_encode_mimeheader(?string $string, ?string $charset = null, ?string $transfer_encoding = null, ?string $newline = "\r\n", ?int $indent = 0): string { return p\Mbstring::mb_encode_mimeheader((string) $string, $charset, $transfer_encoding, (string) $newline, (int) $indent); } -} -if (!function_exists('mb_decode_numericentity')) { - function mb_decode_numericentity(?string $string, array $map, ?string $encoding = null): string { return p\Mbstring::mb_decode_numericentity((string) $string, $map, $encoding); } -} -if (!function_exists('mb_encode_numericentity')) { - function mb_encode_numericentity(?string $string, array $map, ?string $encoding = null, ?bool $hex = false): string { return p\Mbstring::mb_encode_numericentity((string) $string, $map, $encoding, (bool) $hex); } -} -if (!function_exists('mb_convert_case')) { - function mb_convert_case(?string $string, ?int $mode, ?string $encoding = null): string { return p\Mbstring::mb_convert_case((string) $string, (int) $mode, $encoding); } -} -if (!function_exists('mb_internal_encoding')) { - function mb_internal_encoding(?string $encoding = null): string|bool { return p\Mbstring::mb_internal_encoding($encoding); } -} -if (!function_exists('mb_language')) { - function mb_language(?string $language = null): string|bool { return p\Mbstring::mb_language($language); } -} -if (!function_exists('mb_list_encodings')) { - function mb_list_encodings(): array { return p\Mbstring::mb_list_encodings(); } -} -if (!function_exists('mb_encoding_aliases')) { - function mb_encoding_aliases(?string $encoding): array { return p\Mbstring::mb_encoding_aliases((string) $encoding); } -} -if (!function_exists('mb_check_encoding')) { - function mb_check_encoding(array|string|null $value = null, ?string $encoding = null): bool { return p\Mbstring::mb_check_encoding($value, $encoding); } -} -if (!function_exists('mb_detect_encoding')) { - function mb_detect_encoding(?string $string, array|string|null $encodings = null, ?bool $strict = false): string|false { return p\Mbstring::mb_detect_encoding((string) $string, $encodings, (bool) $strict); } -} -if (!function_exists('mb_detect_order')) { - function mb_detect_order(array|string|null $encoding = null): array|bool { return p\Mbstring::mb_detect_order($encoding); } -} -if (!function_exists('mb_parse_str')) { - function mb_parse_str(?string $string, &$result = []): bool { parse_str((string) $string, $result); return (bool) $result; } -} -if (!function_exists('mb_strlen')) { - function mb_strlen(?string $string, ?string $encoding = null): int { return p\Mbstring::mb_strlen((string) $string, $encoding); } -} -if (!function_exists('mb_strpos')) { - function mb_strpos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_strpos((string) $haystack, (string) $needle, (int) $offset, $encoding); } -} -if (!function_exists('mb_strtolower')) { - function mb_strtolower(?string $string, ?string $encoding = null): string { return p\Mbstring::mb_strtolower((string) $string, $encoding); } -} -if (!function_exists('mb_strtoupper')) { - function mb_strtoupper(?string $string, ?string $encoding = null): string { return p\Mbstring::mb_strtoupper((string) $string, $encoding); } -} -if (!function_exists('mb_substitute_character')) { - function mb_substitute_character(string|int|null $substitute_character = null): string|int|bool { return p\Mbstring::mb_substitute_character($substitute_character); } -} -if (!function_exists('mb_substr')) { - function mb_substr(?string $string, ?int $start, ?int $length = null, ?string $encoding = null): string { return p\Mbstring::mb_substr((string) $string, (int) $start, $length, $encoding); } -} -if (!function_exists('mb_stripos')) { - function mb_stripos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_stripos((string) $haystack, (string) $needle, (int) $offset, $encoding); } -} -if (!function_exists('mb_stristr')) { - function mb_stristr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_stristr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); } -} -if (!function_exists('mb_strrchr')) { - function mb_strrchr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strrchr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); } -} -if (!function_exists('mb_strrichr')) { - function mb_strrichr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strrichr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); } -} -if (!function_exists('mb_strripos')) { - function mb_strripos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_strripos((string) $haystack, (string) $needle, (int) $offset, $encoding); } -} -if (!function_exists('mb_strrpos')) { - function mb_strrpos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_strrpos((string) $haystack, (string) $needle, (int) $offset, $encoding); } -} -if (!function_exists('mb_strstr')) { - function mb_strstr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strstr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); } -} -if (!function_exists('mb_get_info')) { - function mb_get_info(?string $type = 'all'): array|string|int|false { return p\Mbstring::mb_get_info((string) $type); } -} -if (!function_exists('mb_http_output')) { - function mb_http_output(?string $encoding = null): string|bool { return p\Mbstring::mb_http_output($encoding); } -} -if (!function_exists('mb_strwidth')) { - function mb_strwidth(?string $string, ?string $encoding = null): int { return p\Mbstring::mb_strwidth((string) $string, $encoding); } -} -if (!function_exists('mb_substr_count')) { - function mb_substr_count(?string $haystack, ?string $needle, ?string $encoding = null): int { return p\Mbstring::mb_substr_count((string) $haystack, (string) $needle, $encoding); } -} -if (!function_exists('mb_output_handler')) { - function mb_output_handler(?string $string, ?int $status): string { return p\Mbstring::mb_output_handler((string) $string, (int) $status); } -} -if (!function_exists('mb_http_input')) { - function mb_http_input(?string $type = null): array|string|false { return p\Mbstring::mb_http_input($type); } -} - -if (!function_exists('mb_convert_variables')) { - function mb_convert_variables(?string $to_encoding, array|string|null $from_encoding, mixed &$var, mixed &...$vars): string|false { return p\Mbstring::mb_convert_variables((string) $to_encoding, $from_encoding ?? '', $var, ...$vars); } -} - -if (!function_exists('mb_ord')) { - function mb_ord(?string $string, ?string $encoding = null): int|false { return p\Mbstring::mb_ord((string) $string, $encoding); } -} -if (!function_exists('mb_chr')) { - function mb_chr(?int $codepoint, ?string $encoding = null): string|false { return p\Mbstring::mb_chr((int) $codepoint, $encoding); } -} -if (!function_exists('mb_scrub')) { - function mb_scrub(?string $string, ?string $encoding = null): string { $encoding ??= mb_internal_encoding(); return mb_convert_encoding((string) $string, $encoding, $encoding); } -} -if (!function_exists('mb_str_split')) { - function mb_str_split(?string $string, ?int $length = 1, ?string $encoding = null): array { return p\Mbstring::mb_str_split((string) $string, (int) $length, $encoding); } -} - -if (extension_loaded('mbstring')) { - return; -} - -if (!defined('MB_CASE_UPPER')) { - define('MB_CASE_UPPER', 0); -} -if (!defined('MB_CASE_LOWER')) { - define('MB_CASE_LOWER', 1); -} -if (!defined('MB_CASE_TITLE')) { - define('MB_CASE_TITLE', 2); -} diff --git a/source/vendor/symfony/polyfill-php74/LICENSE b/source/vendor/symfony/polyfill-php74/LICENSE deleted file mode 100644 index 1a18697..0000000 --- a/source/vendor/symfony/polyfill-php74/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2019 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/source/vendor/symfony/polyfill-php74/Php74.php b/source/vendor/symfony/polyfill-php74/Php74.php deleted file mode 100644 index 0a0946b..0000000 --- a/source/vendor/symfony/polyfill-php74/Php74.php +++ /dev/null @@ -1,94 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Php74; - -/** - * @author Ion Bazan - * - * @internal - */ -final class Php74 -{ - public static function get_mangled_object_vars($obj) - { - if (!\is_object($obj)) { - trigger_error('get_mangled_object_vars() expects parameter 1 to be object, '.\gettype($obj).' given', \E_USER_WARNING); - - return null; - } - - if ($obj instanceof \ArrayIterator || $obj instanceof \ArrayObject) { - $reflector = new \ReflectionClass($obj instanceof \ArrayIterator ? 'ArrayIterator' : 'ArrayObject'); - $flags = $reflector->getMethod('getFlags')->invoke($obj); - $reflector = $reflector->getMethod('setFlags'); - - $reflector->invoke($obj, ($flags & \ArrayObject::STD_PROP_LIST) ? 0 : \ArrayObject::STD_PROP_LIST); - $arr = (array) $obj; - $reflector->invoke($obj, $flags); - } else { - $arr = (array) $obj; - } - - return array_combine(array_keys($arr), array_values($arr)); - } - - public static function mb_str_split($string, $split_length = 1, $encoding = null) - { - if (null !== $string && !is_scalar($string) && !(\is_object($string) && method_exists($string, '__toString'))) { - trigger_error('mb_str_split() expects parameter 1 to be string, '.\gettype($string).' given', \E_USER_WARNING); - - return null; - } - - if (1 > $split_length = (int) $split_length) { - trigger_error('The length of each segment must be greater than zero', \E_USER_WARNING); - - return false; - } - - if (null === $encoding) { - $encoding = mb_internal_encoding(); - } - - if ('UTF-8' === $encoding || \in_array(strtoupper($encoding), ['UTF-8', 'UTF8'], true)) { - return preg_split("/(.{{$split_length}})/u", $string, null, \PREG_SPLIT_DELIM_CAPTURE | \PREG_SPLIT_NO_EMPTY); - } - - $result = []; - $length = mb_strlen($string, $encoding); - - for ($i = 0; $i < $length; $i += $split_length) { - $result[] = mb_substr($string, $i, $split_length, $encoding); - } - - return $result; - } - - public static function password_algos() - { - $algos = []; - - if (\defined('PASSWORD_BCRYPT')) { - $algos[] = \PASSWORD_BCRYPT; - } - - if (\defined('PASSWORD_ARGON2I')) { - $algos[] = \PASSWORD_ARGON2I; - } - - if (\defined('PASSWORD_ARGON2ID')) { - $algos[] = \PASSWORD_ARGON2ID; - } - - return $algos; - } -} diff --git a/source/vendor/symfony/polyfill-php74/README.md b/source/vendor/symfony/polyfill-php74/README.md deleted file mode 100644 index 8133ce9..0000000 --- a/source/vendor/symfony/polyfill-php74/README.md +++ /dev/null @@ -1,16 +0,0 @@ -Symfony Polyfill / Php74 -======================== - -This component provides functions added to PHP 7.4 core: - -- [`get_mangled_object_vars`](https://php.net/get_mangled_object_vars) -- [`mb_str_split`](https://php.net/mb_str_split) -- [`password_algos`](https://php.net/password_algos) - -More information can be found in the -[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). - -License -======= - -This library is released under the [MIT license](LICENSE). diff --git a/source/vendor/symfony/polyfill-php74/bootstrap.php b/source/vendor/symfony/polyfill-php74/bootstrap.php deleted file mode 100644 index f6a11f1..0000000 --- a/source/vendor/symfony/polyfill-php74/bootstrap.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Php74 as p; - -if (\PHP_VERSION_ID >= 70400) { - return; -} - -if (!function_exists('get_mangled_object_vars')) { - function get_mangled_object_vars($object) { return p\Php74::get_mangled_object_vars($object); } -} -if (!function_exists('mb_str_split') && function_exists('mb_substr')) { - function mb_str_split($string, $length = 1, $encoding = null) { return p\Php74::mb_str_split($string, $length, $encoding); } -} -if (!function_exists('password_algos')) { - function password_algos() { return p\Php74::password_algos(); } -} diff --git a/source/vendor/symfony/polyfill-php74/composer.json b/source/vendor/symfony/polyfill-php74/composer.json deleted file mode 100644 index dbcf5d4..0000000 --- a/source/vendor/symfony/polyfill-php74/composer.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "symfony/polyfill-php74", - "type": "library", - "description": "Symfony polyfill backporting some PHP 7.4+ features to lower PHP versions", - "keywords": ["polyfill", "shim", "compatibility", "portable"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.1" - }, - "autoload": { - "psr-4": { "Symfony\\Polyfill\\Php74\\": "" }, - "files": [ "bootstrap.php" ] - }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - } -} diff --git a/source/vendor/symfony/polyfill-php80/LICENSE b/source/vendor/symfony/polyfill-php80/LICENSE deleted file mode 100644 index 5593b1d..0000000 --- a/source/vendor/symfony/polyfill-php80/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2020 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/source/vendor/symfony/polyfill-php80/Php80.php b/source/vendor/symfony/polyfill-php80/Php80.php deleted file mode 100644 index 5fef511..0000000 --- a/source/vendor/symfony/polyfill-php80/Php80.php +++ /dev/null @@ -1,105 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Php80; - -/** - * @author Ion Bazan - * @author Nico Oelgart - * @author Nicolas Grekas - * - * @internal - */ -final class Php80 -{ - public static function fdiv(float $dividend, float $divisor): float - { - return @($dividend / $divisor); - } - - public static function get_debug_type($value): string - { - switch (true) { - case null === $value: return 'null'; - case \is_bool($value): return 'bool'; - case \is_string($value): return 'string'; - case \is_array($value): return 'array'; - case \is_int($value): return 'int'; - case \is_float($value): return 'float'; - case \is_object($value): break; - case $value instanceof \__PHP_Incomplete_Class: return '__PHP_Incomplete_Class'; - default: - if (null === $type = @get_resource_type($value)) { - return 'unknown'; - } - - if ('Unknown' === $type) { - $type = 'closed'; - } - - return "resource ($type)"; - } - - $class = \get_class($value); - - if (false === strpos($class, '@')) { - return $class; - } - - return (get_parent_class($class) ?: key(class_implements($class)) ?: 'class').'@anonymous'; - } - - public static function get_resource_id($res): int - { - if (!\is_resource($res) && null === @get_resource_type($res)) { - throw new \TypeError(sprintf('Argument 1 passed to get_resource_id() must be of the type resource, %s given', get_debug_type($res))); - } - - return (int) $res; - } - - public static function preg_last_error_msg(): string - { - switch (preg_last_error()) { - case \PREG_INTERNAL_ERROR: - return 'Internal error'; - case \PREG_BAD_UTF8_ERROR: - return 'Malformed UTF-8 characters, possibly incorrectly encoded'; - case \PREG_BAD_UTF8_OFFSET_ERROR: - return 'The offset did not correspond to the beginning of a valid UTF-8 code point'; - case \PREG_BACKTRACK_LIMIT_ERROR: - return 'Backtrack limit exhausted'; - case \PREG_RECURSION_LIMIT_ERROR: - return 'Recursion limit exhausted'; - case \PREG_JIT_STACKLIMIT_ERROR: - return 'JIT stack limit exhausted'; - case \PREG_NO_ERROR: - return 'No error'; - default: - return 'Unknown error'; - } - } - - public static function str_contains(string $haystack, string $needle): bool - { - return '' === $needle || false !== strpos($haystack, $needle); - } - - public static function str_starts_with(string $haystack, string $needle): bool - { - return 0 === strncmp($haystack, $needle, \strlen($needle)); - } - - public static function str_ends_with(string $haystack, string $needle): bool - { - return '' === $needle || ('' !== $haystack && 0 === substr_compare($haystack, $needle, -\strlen($needle))); - } -} diff --git a/source/vendor/symfony/polyfill-php80/README.md b/source/vendor/symfony/polyfill-php80/README.md deleted file mode 100644 index 10b8ee4..0000000 --- a/source/vendor/symfony/polyfill-php80/README.md +++ /dev/null @@ -1,24 +0,0 @@ -Symfony Polyfill / Php80 -======================== - -This component provides features added to PHP 8.0 core: - -- `Stringable` interface -- [`fdiv`](https://php.net/fdiv) -- `ValueError` class -- `UnhandledMatchError` class -- `FILTER_VALIDATE_BOOL` constant -- [`get_debug_type`](https://php.net/get_debug_type) -- [`preg_last_error_msg`](https://php.net/preg_last_error_msg) -- [`str_contains`](https://php.net/str_contains) -- [`str_starts_with`](https://php.net/str_starts_with) -- [`str_ends_with`](https://php.net/str_ends_with) -- [`get_resource_id`](https://php.net/get_resource_id) - -More information can be found in the -[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md). - -License -======= - -This library is released under the [MIT license](LICENSE). diff --git a/source/vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php b/source/vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php deleted file mode 100644 index 7ea6d27..0000000 --- a/source/vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php +++ /dev/null @@ -1,22 +0,0 @@ -flags = $flags; - } -} diff --git a/source/vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php b/source/vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php deleted file mode 100644 index 77e037c..0000000 --- a/source/vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php +++ /dev/null @@ -1,11 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Php80 as p; - -if (\PHP_VERSION_ID >= 80000) { - return; -} - -if (!defined('FILTER_VALIDATE_BOOL') && defined('FILTER_VALIDATE_BOOLEAN')) { - define('FILTER_VALIDATE_BOOL', \FILTER_VALIDATE_BOOLEAN); -} - -if (!function_exists('fdiv')) { - function fdiv(float $num1, float $num2): float { return p\Php80::fdiv($num1, $num2); } -} -if (!function_exists('preg_last_error_msg')) { - function preg_last_error_msg(): string { return p\Php80::preg_last_error_msg(); } -} -if (!function_exists('str_contains')) { - function str_contains(?string $haystack, ?string $needle): bool { return p\Php80::str_contains($haystack ?? '', $needle ?? ''); } -} -if (!function_exists('str_starts_with')) { - function str_starts_with(?string $haystack, ?string $needle): bool { return p\Php80::str_starts_with($haystack ?? '', $needle ?? ''); } -} -if (!function_exists('str_ends_with')) { - function str_ends_with(?string $haystack, ?string $needle): bool { return p\Php80::str_ends_with($haystack ?? '', $needle ?? ''); } -} -if (!function_exists('get_debug_type')) { - function get_debug_type($value): string { return p\Php80::get_debug_type($value); } -} -if (!function_exists('get_resource_id')) { - function get_resource_id($resource): int { return p\Php80::get_resource_id($resource); } -} diff --git a/source/vendor/symfony/polyfill-php80/composer.json b/source/vendor/symfony/polyfill-php80/composer.json deleted file mode 100644 index 5fe679d..0000000 --- a/source/vendor/symfony/polyfill-php80/composer.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "symfony/polyfill-php80", - "type": "library", - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "keywords": ["polyfill", "shim", "compatibility", "portable"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.1" - }, - "autoload": { - "psr-4": { "Symfony\\Polyfill\\Php80\\": "" }, - "files": [ "bootstrap.php" ], - "classmap": [ "Resources/stubs" ] - }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - } -} diff --git a/source/vendor/symfony/process/Exception/ExceptionInterface.php b/source/vendor/symfony/process/Exception/ExceptionInterface.php deleted file mode 100644 index bd4a604..0000000 --- a/source/vendor/symfony/process/Exception/ExceptionInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Process\Exception; - -/** - * Marker Interface for the Process Component. - * - * @author Johannes M. Schmitt - */ -interface ExceptionInterface extends \Throwable -{ -} diff --git a/source/vendor/symfony/process/Exception/InvalidArgumentException.php b/source/vendor/symfony/process/Exception/InvalidArgumentException.php deleted file mode 100644 index 926ee21..0000000 --- a/source/vendor/symfony/process/Exception/InvalidArgumentException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Process\Exception; - -/** - * InvalidArgumentException for the Process Component. - * - * @author Romain Neutron - */ -class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface -{ -} diff --git a/source/vendor/symfony/process/Exception/LogicException.php b/source/vendor/symfony/process/Exception/LogicException.php deleted file mode 100644 index be3d490..0000000 --- a/source/vendor/symfony/process/Exception/LogicException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Process\Exception; - -/** - * LogicException for the Process Component. - * - * @author Romain Neutron - */ -class LogicException extends \LogicException implements ExceptionInterface -{ -} diff --git a/source/vendor/symfony/process/Exception/ProcessFailedException.php b/source/vendor/symfony/process/Exception/ProcessFailedException.php deleted file mode 100644 index 328acfd..0000000 --- a/source/vendor/symfony/process/Exception/ProcessFailedException.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Process\Exception; - -use Symfony\Component\Process\Process; - -/** - * Exception for failed processes. - * - * @author Johannes M. Schmitt - */ -class ProcessFailedException extends RuntimeException -{ - private $process; - - public function __construct(Process $process) - { - if ($process->isSuccessful()) { - throw new InvalidArgumentException('Expected a failed process, but the given process was successful.'); - } - - $error = sprintf('The command "%s" failed.'."\n\nExit Code: %s(%s)\n\nWorking directory: %s", - $process->getCommandLine(), - $process->getExitCode(), - $process->getExitCodeText(), - $process->getWorkingDirectory() - ); - - if (!$process->isOutputDisabled()) { - $error .= sprintf("\n\nOutput:\n================\n%s\n\nError Output:\n================\n%s", - $process->getOutput(), - $process->getErrorOutput() - ); - } - - parent::__construct($error); - - $this->process = $process; - } - - public function getProcess() - { - return $this->process; - } -} diff --git a/source/vendor/symfony/process/Exception/ProcessSignaledException.php b/source/vendor/symfony/process/Exception/ProcessSignaledException.php deleted file mode 100644 index d4d3227..0000000 --- a/source/vendor/symfony/process/Exception/ProcessSignaledException.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Process\Exception; - -use Symfony\Component\Process\Process; - -/** - * Exception that is thrown when a process has been signaled. - * - * @author Sullivan Senechal - */ -final class ProcessSignaledException extends RuntimeException -{ - private $process; - - public function __construct(Process $process) - { - $this->process = $process; - - parent::__construct(sprintf('The process has been signaled with signal "%s".', $process->getTermSignal())); - } - - public function getProcess(): Process - { - return $this->process; - } - - public function getSignal(): int - { - return $this->getProcess()->getTermSignal(); - } -} diff --git a/source/vendor/symfony/process/Exception/ProcessTimedOutException.php b/source/vendor/symfony/process/Exception/ProcessTimedOutException.php deleted file mode 100644 index 94391a4..0000000 --- a/source/vendor/symfony/process/Exception/ProcessTimedOutException.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Process\Exception; - -use Symfony\Component\Process\Process; - -/** - * Exception that is thrown when a process times out. - * - * @author Johannes M. Schmitt - */ -class ProcessTimedOutException extends RuntimeException -{ - public const TYPE_GENERAL = 1; - public const TYPE_IDLE = 2; - - private $process; - private $timeoutType; - - public function __construct(Process $process, int $timeoutType) - { - $this->process = $process; - $this->timeoutType = $timeoutType; - - parent::__construct(sprintf( - 'The process "%s" exceeded the timeout of %s seconds.', - $process->getCommandLine(), - $this->getExceededTimeout() - )); - } - - public function getProcess() - { - return $this->process; - } - - public function isGeneralTimeout() - { - return self::TYPE_GENERAL === $this->timeoutType; - } - - public function isIdleTimeout() - { - return self::TYPE_IDLE === $this->timeoutType; - } - - public function getExceededTimeout() - { - switch ($this->timeoutType) { - case self::TYPE_GENERAL: - return $this->process->getTimeout(); - - case self::TYPE_IDLE: - return $this->process->getIdleTimeout(); - - default: - throw new \LogicException(sprintf('Unknown timeout type "%d".', $this->timeoutType)); - } - } -} diff --git a/source/vendor/symfony/process/Exception/RuntimeException.php b/source/vendor/symfony/process/Exception/RuntimeException.php deleted file mode 100644 index adead25..0000000 --- a/source/vendor/symfony/process/Exception/RuntimeException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Process\Exception; - -/** - * RuntimeException for the Process Component. - * - * @author Johannes M. Schmitt - */ -class RuntimeException extends \RuntimeException implements ExceptionInterface -{ -} diff --git a/source/vendor/symfony/process/ExecutableFinder.php b/source/vendor/symfony/process/ExecutableFinder.php deleted file mode 100644 index ff68ed3..0000000 --- a/source/vendor/symfony/process/ExecutableFinder.php +++ /dev/null @@ -1,88 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Process; - -/** - * Generic executable finder. - * - * @author Fabien Potencier - * @author Johannes M. Schmitt - */ -class ExecutableFinder -{ - private $suffixes = ['.exe', '.bat', '.cmd', '.com']; - - /** - * Replaces default suffixes of executable. - */ - public function setSuffixes(array $suffixes) - { - $this->suffixes = $suffixes; - } - - /** - * Adds new possible suffix to check for executable. - * - * @param string $suffix - */ - public function addSuffix($suffix) - { - $this->suffixes[] = $suffix; - } - - /** - * Finds an executable by name. - * - * @param string $name The executable name (without the extension) - * @param string|null $default The default to return if no executable is found - * @param array $extraDirs Additional dirs to check into - * - * @return string|null The executable path or default value - */ - public function find($name, $default = null, array $extraDirs = []) - { - if (ini_get('open_basedir')) { - $searchPath = array_merge(explode(\PATH_SEPARATOR, ini_get('open_basedir')), $extraDirs); - $dirs = []; - foreach ($searchPath as $path) { - // Silencing against https://bugs.php.net/69240 - if (@is_dir($path)) { - $dirs[] = $path; - } else { - if (basename($path) == $name && @is_executable($path)) { - return $path; - } - } - } - } else { - $dirs = array_merge( - explode(\PATH_SEPARATOR, getenv('PATH') ?: getenv('Path')), - $extraDirs - ); - } - - $suffixes = ['']; - if ('\\' === \DIRECTORY_SEPARATOR) { - $pathExt = getenv('PATHEXT'); - $suffixes = array_merge($pathExt ? explode(\PATH_SEPARATOR, $pathExt) : $this->suffixes, $suffixes); - } - foreach ($suffixes as $suffix) { - foreach ($dirs as $dir) { - if (@is_file($file = $dir.\DIRECTORY_SEPARATOR.$name.$suffix) && ('\\' === \DIRECTORY_SEPARATOR || @is_executable($file))) { - return $file; - } - } - } - - return $default; - } -} diff --git a/source/vendor/symfony/process/InputStream.php b/source/vendor/symfony/process/InputStream.php deleted file mode 100644 index 4f8f713..0000000 --- a/source/vendor/symfony/process/InputStream.php +++ /dev/null @@ -1,94 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Process; - -use Symfony\Component\Process\Exception\RuntimeException; - -/** - * Provides a way to continuously write to the input of a Process until the InputStream is closed. - * - * @author Nicolas Grekas - */ -class InputStream implements \IteratorAggregate -{ - /** @var callable|null */ - private $onEmpty = null; - private $input = []; - private $open = true; - - /** - * Sets a callback that is called when the write buffer becomes empty. - */ - public function onEmpty(callable $onEmpty = null) - { - $this->onEmpty = $onEmpty; - } - - /** - * Appends an input to the write buffer. - * - * @param resource|string|int|float|bool|\Traversable|null $input The input to append as scalar, - * stream resource or \Traversable - */ - public function write($input) - { - if (null === $input) { - return; - } - if ($this->isClosed()) { - throw new RuntimeException(sprintf('"%s" is closed.', static::class)); - } - $this->input[] = ProcessUtils::validateInput(__METHOD__, $input); - } - - /** - * Closes the write buffer. - */ - public function close() - { - $this->open = false; - } - - /** - * Tells whether the write buffer is closed or not. - */ - public function isClosed() - { - return !$this->open; - } - - /** - * @return \Traversable - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - $this->open = true; - - while ($this->open || $this->input) { - if (!$this->input) { - yield ''; - continue; - } - $current = array_shift($this->input); - - if ($current instanceof \Iterator) { - yield from $current; - } else { - yield $current; - } - if (!$this->input && $this->open && null !== $onEmpty = $this->onEmpty) { - $this->write($onEmpty($this)); - } - } - } -} diff --git a/source/vendor/symfony/process/LICENSE b/source/vendor/symfony/process/LICENSE deleted file mode 100644 index 9ff2d0d..0000000 --- a/source/vendor/symfony/process/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2021 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/source/vendor/symfony/process/PhpExecutableFinder.php b/source/vendor/symfony/process/PhpExecutableFinder.php deleted file mode 100644 index 3d5eabd..0000000 --- a/source/vendor/symfony/process/PhpExecutableFinder.php +++ /dev/null @@ -1,101 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Process; - -/** - * An executable finder specifically designed for the PHP executable. - * - * @author Fabien Potencier - * @author Johannes M. Schmitt - */ -class PhpExecutableFinder -{ - private $executableFinder; - - public function __construct() - { - $this->executableFinder = new ExecutableFinder(); - } - - /** - * Finds The PHP executable. - * - * @param bool $includeArgs Whether or not include command arguments - * - * @return string|false The PHP executable path or false if it cannot be found - */ - public function find($includeArgs = true) - { - if ($php = getenv('PHP_BINARY')) { - if (!is_executable($php)) { - $command = '\\' === \DIRECTORY_SEPARATOR ? 'where' : 'command -v'; - if ($php = strtok(exec($command.' '.escapeshellarg($php)), \PHP_EOL)) { - if (!is_executable($php)) { - return false; - } - } else { - return false; - } - } - - return $php; - } - - $args = $this->findArguments(); - $args = $includeArgs && $args ? ' '.implode(' ', $args) : ''; - - // PHP_BINARY return the current sapi executable - if (\PHP_BINARY && \in_array(\PHP_SAPI, ['cgi-fcgi', 'cli', 'cli-server', 'phpdbg'], true)) { - return \PHP_BINARY.$args; - } - - if ($php = getenv('PHP_PATH')) { - if (!@is_executable($php)) { - return false; - } - - return $php; - } - - if ($php = getenv('PHP_PEAR_PHP_BIN')) { - if (@is_executable($php)) { - return $php; - } - } - - if (@is_executable($php = \PHP_BINDIR.('\\' === \DIRECTORY_SEPARATOR ? '\\php.exe' : '/php'))) { - return $php; - } - - $dirs = [\PHP_BINDIR]; - if ('\\' === \DIRECTORY_SEPARATOR) { - $dirs[] = 'C:\xampp\php\\'; - } - - return $this->executableFinder->find('php', false, $dirs); - } - - /** - * Finds the PHP executable arguments. - * - * @return array The PHP executable arguments - */ - public function findArguments() - { - $arguments = []; - if ('phpdbg' === \PHP_SAPI) { - $arguments[] = '-qrr'; - } - - return $arguments; - } -} diff --git a/source/vendor/symfony/process/PhpProcess.php b/source/vendor/symfony/process/PhpProcess.php deleted file mode 100644 index dc064e0..0000000 --- a/source/vendor/symfony/process/PhpProcess.php +++ /dev/null @@ -1,84 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Process; - -use Symfony\Component\Process\Exception\LogicException; -use Symfony\Component\Process\Exception\RuntimeException; - -/** - * PhpProcess runs a PHP script in an independent process. - * - * $p = new PhpProcess(''); - * $p->run(); - * print $p->getOutput()."\n"; - * - * @author Fabien Potencier - */ -class PhpProcess extends Process -{ - /** - * @param string $script The PHP script to run (as a string) - * @param string|null $cwd The working directory or null to use the working dir of the current PHP process - * @param array|null $env The environment variables or null to use the same environment as the current PHP process - * @param int $timeout The timeout in seconds - * @param array|null $php Path to the PHP binary to use with any additional arguments - */ - public function __construct(string $script, string $cwd = null, array $env = null, int $timeout = 60, array $php = null) - { - if (null === $php) { - $executableFinder = new PhpExecutableFinder(); - $php = $executableFinder->find(false); - $php = false === $php ? null : array_merge([$php], $executableFinder->findArguments()); - } - if ('phpdbg' === \PHP_SAPI) { - $file = tempnam(sys_get_temp_dir(), 'dbg'); - file_put_contents($file, $script); - register_shutdown_function('unlink', $file); - $php[] = $file; - $script = null; - } - - parent::__construct($php, $cwd, $env, $script, $timeout); - } - - /** - * {@inheritdoc} - */ - public static function fromShellCommandline(string $command, string $cwd = null, array $env = null, $input = null, ?float $timeout = 60) - { - throw new LogicException(sprintf('The "%s()" method cannot be called when using "%s".', __METHOD__, self::class)); - } - - /** - * Sets the path to the PHP binary to use. - * - * @deprecated since Symfony 4.2, use the $php argument of the constructor instead. - */ - public function setPhpBinary($php) - { - @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2, use the $php argument of the constructor instead.', __METHOD__), \E_USER_DEPRECATED); - - $this->setCommandLine($php); - } - - /** - * {@inheritdoc} - */ - public function start(callable $callback = null, array $env = []) - { - if (null === $this->getCommandLine()) { - throw new RuntimeException('Unable to find the PHP executable.'); - } - - parent::start($callback, $env); - } -} diff --git a/source/vendor/symfony/process/Pipes/AbstractPipes.php b/source/vendor/symfony/process/Pipes/AbstractPipes.php deleted file mode 100644 index 21ab3e3..0000000 --- a/source/vendor/symfony/process/Pipes/AbstractPipes.php +++ /dev/null @@ -1,178 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Process\Pipes; - -use Symfony\Component\Process\Exception\InvalidArgumentException; - -/** - * @author Romain Neutron - * - * @internal - */ -abstract class AbstractPipes implements PipesInterface -{ - public $pipes = []; - - private $inputBuffer = ''; - private $input; - private $blocked = true; - private $lastError; - - /** - * @param resource|string|int|float|bool|\Iterator|null $input - */ - public function __construct($input) - { - if (\is_resource($input) || $input instanceof \Iterator) { - $this->input = $input; - } elseif (\is_string($input)) { - $this->inputBuffer = $input; - } else { - $this->inputBuffer = (string) $input; - } - } - - /** - * {@inheritdoc} - */ - public function close() - { - foreach ($this->pipes as $pipe) { - fclose($pipe); - } - $this->pipes = []; - } - - /** - * Returns true if a system call has been interrupted. - */ - protected function hasSystemCallBeenInterrupted(): bool - { - $lastError = $this->lastError; - $this->lastError = null; - - // stream_select returns false when the `select` system call is interrupted by an incoming signal - return null !== $lastError && false !== stripos($lastError, 'interrupted system call'); - } - - /** - * Unblocks streams. - */ - protected function unblock() - { - if (!$this->blocked) { - return; - } - - foreach ($this->pipes as $pipe) { - stream_set_blocking($pipe, 0); - } - if (\is_resource($this->input)) { - stream_set_blocking($this->input, 0); - } - - $this->blocked = false; - } - - /** - * Writes input to stdin. - * - * @throws InvalidArgumentException When an input iterator yields a non supported value - */ - protected function write(): ?array - { - if (!isset($this->pipes[0])) { - return null; - } - $input = $this->input; - - if ($input instanceof \Iterator) { - if (!$input->valid()) { - $input = null; - } elseif (\is_resource($input = $input->current())) { - stream_set_blocking($input, 0); - } elseif (!isset($this->inputBuffer[0])) { - if (!\is_string($input)) { - if (!is_scalar($input)) { - throw new InvalidArgumentException(sprintf('"%s" yielded a value of type "%s", but only scalars and stream resources are supported.', \get_class($this->input), \gettype($input))); - } - $input = (string) $input; - } - $this->inputBuffer = $input; - $this->input->next(); - $input = null; - } else { - $input = null; - } - } - - $r = $e = []; - $w = [$this->pipes[0]]; - - // let's have a look if something changed in streams - if (false === @stream_select($r, $w, $e, 0, 0)) { - return null; - } - - foreach ($w as $stdin) { - if (isset($this->inputBuffer[0])) { - $written = fwrite($stdin, $this->inputBuffer); - $this->inputBuffer = substr($this->inputBuffer, $written); - if (isset($this->inputBuffer[0])) { - return [$this->pipes[0]]; - } - } - - if ($input) { - for (;;) { - $data = fread($input, self::CHUNK_SIZE); - if (!isset($data[0])) { - break; - } - $written = fwrite($stdin, $data); - $data = substr($data, $written); - if (isset($data[0])) { - $this->inputBuffer = $data; - - return [$this->pipes[0]]; - } - } - if (feof($input)) { - if ($this->input instanceof \Iterator) { - $this->input->next(); - } else { - $this->input = null; - } - } - } - } - - // no input to read on resource, buffer is empty - if (!isset($this->inputBuffer[0]) && !($this->input instanceof \Iterator ? $this->input->valid() : $this->input)) { - $this->input = null; - fclose($this->pipes[0]); - unset($this->pipes[0]); - } elseif (!$w) { - return [$this->pipes[0]]; - } - - return null; - } - - /** - * @internal - */ - public function handleError(int $type, string $msg) - { - $this->lastError = $msg; - } -} diff --git a/source/vendor/symfony/process/Pipes/PipesInterface.php b/source/vendor/symfony/process/Pipes/PipesInterface.php deleted file mode 100644 index 50eb5c4..0000000 --- a/source/vendor/symfony/process/Pipes/PipesInterface.php +++ /dev/null @@ -1,61 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Process\Pipes; - -/** - * PipesInterface manages descriptors and pipes for the use of proc_open. - * - * @author Romain Neutron - * - * @internal - */ -interface PipesInterface -{ - public const CHUNK_SIZE = 16384; - - /** - * Returns an array of descriptors for the use of proc_open. - */ - public function getDescriptors(): array; - - /** - * Returns an array of filenames indexed by their related stream in case these pipes use temporary files. - * - * @return string[] - */ - public function getFiles(): array; - - /** - * Reads data in file handles and pipes. - * - * @param bool $blocking Whether to use blocking calls or not - * @param bool $close Whether to close pipes if they've reached EOF - * - * @return string[] An array of read data indexed by their fd - */ - public function readAndWrite(bool $blocking, bool $close = false): array; - - /** - * Returns if the current state has open file handles or pipes. - */ - public function areOpen(): bool; - - /** - * Returns if pipes are able to read output. - */ - public function haveReadSupport(): bool; - - /** - * Closes file handles and pipes. - */ - public function close(); -} diff --git a/source/vendor/symfony/process/Pipes/UnixPipes.php b/source/vendor/symfony/process/Pipes/UnixPipes.php deleted file mode 100644 index 58a8da0..0000000 --- a/source/vendor/symfony/process/Pipes/UnixPipes.php +++ /dev/null @@ -1,166 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Process\Pipes; - -use Symfony\Component\Process\Process; - -/** - * UnixPipes implementation uses unix pipes as handles. - * - * @author Romain Neutron - * - * @internal - */ -class UnixPipes extends AbstractPipes -{ - private $ttyMode; - private $ptyMode; - private $haveReadSupport; - - public function __construct(?bool $ttyMode, bool $ptyMode, $input, bool $haveReadSupport) - { - $this->ttyMode = $ttyMode; - $this->ptyMode = $ptyMode; - $this->haveReadSupport = $haveReadSupport; - - parent::__construct($input); - } - - /** - * @return array - */ - public function __sleep() - { - throw new \BadMethodCallException('Cannot serialize '.__CLASS__); - } - - public function __wakeup() - { - throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); - } - - public function __destruct() - { - $this->close(); - } - - /** - * {@inheritdoc} - */ - public function getDescriptors(): array - { - if (!$this->haveReadSupport) { - $nullstream = fopen('/dev/null', 'c'); - - return [ - ['pipe', 'r'], - $nullstream, - $nullstream, - ]; - } - - if ($this->ttyMode) { - return [ - ['file', '/dev/tty', 'r'], - ['file', '/dev/tty', 'w'], - ['file', '/dev/tty', 'w'], - ]; - } - - if ($this->ptyMode && Process::isPtySupported()) { - return [ - ['pty'], - ['pty'], - ['pty'], - ]; - } - - return [ - ['pipe', 'r'], - ['pipe', 'w'], // stdout - ['pipe', 'w'], // stderr - ]; - } - - /** - * {@inheritdoc} - */ - public function getFiles(): array - { - return []; - } - - /** - * {@inheritdoc} - */ - public function readAndWrite(bool $blocking, bool $close = false): array - { - $this->unblock(); - $w = $this->write(); - - $read = $e = []; - $r = $this->pipes; - unset($r[0]); - - // let's have a look if something changed in streams - set_error_handler([$this, 'handleError']); - if (($r || $w) && false === stream_select($r, $w, $e, 0, $blocking ? Process::TIMEOUT_PRECISION * 1E6 : 0)) { - restore_error_handler(); - // if a system call has been interrupted, forget about it, let's try again - // otherwise, an error occurred, let's reset pipes - if (!$this->hasSystemCallBeenInterrupted()) { - $this->pipes = []; - } - - return $read; - } - restore_error_handler(); - - foreach ($r as $pipe) { - // prior PHP 5.4 the array passed to stream_select is modified and - // lose key association, we have to find back the key - $read[$type = array_search($pipe, $this->pipes, true)] = ''; - - do { - $data = @fread($pipe, self::CHUNK_SIZE); - $read[$type] .= $data; - } while (isset($data[0]) && ($close || isset($data[self::CHUNK_SIZE - 1]))); - - if (!isset($read[$type][0])) { - unset($read[$type]); - } - - if ($close && feof($pipe)) { - fclose($pipe); - unset($this->pipes[$type]); - } - } - - return $read; - } - - /** - * {@inheritdoc} - */ - public function haveReadSupport(): bool - { - return $this->haveReadSupport; - } - - /** - * {@inheritdoc} - */ - public function areOpen(): bool - { - return (bool) $this->pipes; - } -} diff --git a/source/vendor/symfony/process/Pipes/WindowsPipes.php b/source/vendor/symfony/process/Pipes/WindowsPipes.php deleted file mode 100644 index 69768f3..0000000 --- a/source/vendor/symfony/process/Pipes/WindowsPipes.php +++ /dev/null @@ -1,207 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Process\Pipes; - -use Symfony\Component\Process\Exception\RuntimeException; -use Symfony\Component\Process\Process; - -/** - * WindowsPipes implementation uses temporary files as handles. - * - * @see https://bugs.php.net/51800 - * @see https://bugs.php.net/65650 - * - * @author Romain Neutron - * - * @internal - */ -class WindowsPipes extends AbstractPipes -{ - private $files = []; - private $fileHandles = []; - private $lockHandles = []; - private $readBytes = [ - Process::STDOUT => 0, - Process::STDERR => 0, - ]; - private $haveReadSupport; - - public function __construct($input, bool $haveReadSupport) - { - $this->haveReadSupport = $haveReadSupport; - - if ($this->haveReadSupport) { - // Fix for PHP bug #51800: reading from STDOUT pipe hangs forever on Windows if the output is too big. - // Workaround for this problem is to use temporary files instead of pipes on Windows platform. - // - // @see https://bugs.php.net/51800 - $pipes = [ - Process::STDOUT => Process::OUT, - Process::STDERR => Process::ERR, - ]; - $tmpDir = sys_get_temp_dir(); - $lastError = 'unknown reason'; - set_error_handler(function ($type, $msg) use (&$lastError) { $lastError = $msg; }); - for ($i = 0;; ++$i) { - foreach ($pipes as $pipe => $name) { - $file = sprintf('%s\\sf_proc_%02X.%s', $tmpDir, $i, $name); - - if (!$h = fopen($file.'.lock', 'w')) { - if (file_exists($file.'.lock')) { - continue 2; - } - restore_error_handler(); - throw new RuntimeException('A temporary file could not be opened to write the process output: '.$lastError); - } - if (!flock($h, \LOCK_EX | \LOCK_NB)) { - continue 2; - } - if (isset($this->lockHandles[$pipe])) { - flock($this->lockHandles[$pipe], \LOCK_UN); - fclose($this->lockHandles[$pipe]); - } - $this->lockHandles[$pipe] = $h; - - if (!($h = fopen($file, 'w')) || !fclose($h) || !$h = fopen($file, 'r')) { - flock($this->lockHandles[$pipe], \LOCK_UN); - fclose($this->lockHandles[$pipe]); - unset($this->lockHandles[$pipe]); - continue 2; - } - $this->fileHandles[$pipe] = $h; - $this->files[$pipe] = $file; - } - break; - } - restore_error_handler(); - } - - parent::__construct($input); - } - - /** - * @return array - */ - public function __sleep() - { - throw new \BadMethodCallException('Cannot serialize '.__CLASS__); - } - - public function __wakeup() - { - throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); - } - - public function __destruct() - { - $this->close(); - } - - /** - * {@inheritdoc} - */ - public function getDescriptors(): array - { - if (!$this->haveReadSupport) { - $nullstream = fopen('NUL', 'c'); - - return [ - ['pipe', 'r'], - $nullstream, - $nullstream, - ]; - } - - // We're not using pipe on Windows platform as it hangs (https://bugs.php.net/51800) - // We're not using file handles as it can produce corrupted output https://bugs.php.net/65650 - // So we redirect output within the commandline and pass the nul device to the process - return [ - ['pipe', 'r'], - ['file', 'NUL', 'w'], - ['file', 'NUL', 'w'], - ]; - } - - /** - * {@inheritdoc} - */ - public function getFiles(): array - { - return $this->files; - } - - /** - * {@inheritdoc} - */ - public function readAndWrite(bool $blocking, bool $close = false): array - { - $this->unblock(); - $w = $this->write(); - $read = $r = $e = []; - - if ($blocking) { - if ($w) { - @stream_select($r, $w, $e, 0, Process::TIMEOUT_PRECISION * 1E6); - } elseif ($this->fileHandles) { - usleep(Process::TIMEOUT_PRECISION * 1E6); - } - } - foreach ($this->fileHandles as $type => $fileHandle) { - $data = stream_get_contents($fileHandle, -1, $this->readBytes[$type]); - - if (isset($data[0])) { - $this->readBytes[$type] += \strlen($data); - $read[$type] = $data; - } - if ($close) { - ftruncate($fileHandle, 0); - fclose($fileHandle); - flock($this->lockHandles[$type], \LOCK_UN); - fclose($this->lockHandles[$type]); - unset($this->fileHandles[$type], $this->lockHandles[$type]); - } - } - - return $read; - } - - /** - * {@inheritdoc} - */ - public function haveReadSupport(): bool - { - return $this->haveReadSupport; - } - - /** - * {@inheritdoc} - */ - public function areOpen(): bool - { - return $this->pipes && $this->fileHandles; - } - - /** - * {@inheritdoc} - */ - public function close() - { - parent::close(); - foreach ($this->fileHandles as $type => $handle) { - ftruncate($handle, 0); - fclose($handle); - flock($this->lockHandles[$type], \LOCK_UN); - fclose($this->lockHandles[$type]); - } - $this->fileHandles = $this->lockHandles = []; - } -} diff --git a/source/vendor/symfony/process/Process.php b/source/vendor/symfony/process/Process.php deleted file mode 100644 index 9fafddd..0000000 --- a/source/vendor/symfony/process/Process.php +++ /dev/null @@ -1,1690 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Process; - -use Symfony\Component\Process\Exception\InvalidArgumentException; -use Symfony\Component\Process\Exception\LogicException; -use Symfony\Component\Process\Exception\ProcessFailedException; -use Symfony\Component\Process\Exception\ProcessSignaledException; -use Symfony\Component\Process\Exception\ProcessTimedOutException; -use Symfony\Component\Process\Exception\RuntimeException; -use Symfony\Component\Process\Pipes\PipesInterface; -use Symfony\Component\Process\Pipes\UnixPipes; -use Symfony\Component\Process\Pipes\WindowsPipes; - -/** - * Process is a thin wrapper around proc_* functions to easily - * start independent PHP processes. - * - * @author Fabien Potencier - * @author Romain Neutron - */ -class Process implements \IteratorAggregate -{ - public const ERR = 'err'; - public const OUT = 'out'; - - public const STATUS_READY = 'ready'; - public const STATUS_STARTED = 'started'; - public const STATUS_TERMINATED = 'terminated'; - - public const STDIN = 0; - public const STDOUT = 1; - public const STDERR = 2; - - // Timeout Precision in seconds. - public const TIMEOUT_PRECISION = 0.2; - - public const ITER_NON_BLOCKING = 1; // By default, iterating over outputs is a blocking call, use this flag to make it non-blocking - public const ITER_KEEP_OUTPUT = 2; // By default, outputs are cleared while iterating, use this flag to keep them in memory - public const ITER_SKIP_OUT = 4; // Use this flag to skip STDOUT while iterating - public const ITER_SKIP_ERR = 8; // Use this flag to skip STDERR while iterating - - private $callback; - private $hasCallback = false; - private $commandline; - private $cwd; - private $env; - private $input; - private $starttime; - private $lastOutputTime; - private $timeout; - private $idleTimeout; - private $exitcode; - private $fallbackStatus = []; - private $processInformation; - private $outputDisabled = false; - private $stdout; - private $stderr; - private $process; - private $status = self::STATUS_READY; - private $incrementalOutputOffset = 0; - private $incrementalErrorOutputOffset = 0; - private $tty = false; - private $pty; - - private $useFileHandles = false; - /** @var PipesInterface */ - private $processPipes; - - private $latestSignal; - - private static $sigchild; - - /** - * Exit codes translation table. - * - * User-defined errors must use exit codes in the 64-113 range. - */ - public static $exitCodes = [ - 0 => 'OK', - 1 => 'General error', - 2 => 'Misuse of shell builtins', - - 126 => 'Invoked command cannot execute', - 127 => 'Command not found', - 128 => 'Invalid exit argument', - - // signals - 129 => 'Hangup', - 130 => 'Interrupt', - 131 => 'Quit and dump core', - 132 => 'Illegal instruction', - 133 => 'Trace/breakpoint trap', - 134 => 'Process aborted', - 135 => 'Bus error: "access to undefined portion of memory object"', - 136 => 'Floating point exception: "erroneous arithmetic operation"', - 137 => 'Kill (terminate immediately)', - 138 => 'User-defined 1', - 139 => 'Segmentation violation', - 140 => 'User-defined 2', - 141 => 'Write to pipe with no one reading', - 142 => 'Signal raised by alarm', - 143 => 'Termination (request to terminate)', - // 144 - not defined - 145 => 'Child process terminated, stopped (or continued*)', - 146 => 'Continue if stopped', - 147 => 'Stop executing temporarily', - 148 => 'Terminal stop signal', - 149 => 'Background process attempting to read from tty ("in")', - 150 => 'Background process attempting to write to tty ("out")', - 151 => 'Urgent data available on socket', - 152 => 'CPU time limit exceeded', - 153 => 'File size limit exceeded', - 154 => 'Signal raised by timer counting virtual time: "virtual timer expired"', - 155 => 'Profiling timer expired', - // 156 - not defined - 157 => 'Pollable event', - // 158 - not defined - 159 => 'Bad syscall', - ]; - - /** - * @param array $command The command to run and its arguments listed as separate entries - * @param string|null $cwd The working directory or null to use the working dir of the current PHP process - * @param array|null $env The environment variables or null to use the same environment as the current PHP process - * @param mixed $input The input as stream resource, scalar or \Traversable, or null for no input - * @param int|float|null $timeout The timeout in seconds or null to disable - * - * @throws LogicException When proc_open is not installed - */ - public function __construct($command, string $cwd = null, array $env = null, $input = null, ?float $timeout = 60) - { - if (!\function_exists('proc_open')) { - throw new LogicException('The Process class relies on proc_open, which is not available on your PHP installation.'); - } - - if (!\is_array($command)) { - @trigger_error(sprintf('Passing a command as string when creating a "%s" instance is deprecated since Symfony 4.2, pass it as an array of its arguments instead, or use the "Process::fromShellCommandline()" constructor if you need features provided by the shell.', __CLASS__), \E_USER_DEPRECATED); - } - - $this->commandline = $command; - $this->cwd = $cwd; - - // on Windows, if the cwd changed via chdir(), proc_open defaults to the dir where PHP was started - // on Gnu/Linux, PHP builds with --enable-maintainer-zts are also affected - // @see : https://bugs.php.net/51800 - // @see : https://bugs.php.net/50524 - if (null === $this->cwd && (\defined('ZEND_THREAD_SAFE') || '\\' === \DIRECTORY_SEPARATOR)) { - $this->cwd = getcwd(); - } - if (null !== $env) { - $this->setEnv($env); - } - - $this->setInput($input); - $this->setTimeout($timeout); - $this->useFileHandles = '\\' === \DIRECTORY_SEPARATOR; - $this->pty = false; - } - - /** - * Creates a Process instance as a command-line to be run in a shell wrapper. - * - * Command-lines are parsed by the shell of your OS (/bin/sh on Unix-like, cmd.exe on Windows.) - * This allows using e.g. pipes or conditional execution. In this mode, signals are sent to the - * shell wrapper and not to your commands. - * - * In order to inject dynamic values into command-lines, we strongly recommend using placeholders. - * This will save escaping values, which is not portable nor secure anyway: - * - * $process = Process::fromShellCommandline('my_command "$MY_VAR"'); - * $process->run(null, ['MY_VAR' => $theValue]); - * - * @param string $command The command line to pass to the shell of the OS - * @param string|null $cwd The working directory or null to use the working dir of the current PHP process - * @param array|null $env The environment variables or null to use the same environment as the current PHP process - * @param mixed $input The input as stream resource, scalar or \Traversable, or null for no input - * @param int|float|null $timeout The timeout in seconds or null to disable - * - * @return static - * - * @throws LogicException When proc_open is not installed - */ - public static function fromShellCommandline(string $command, string $cwd = null, array $env = null, $input = null, ?float $timeout = 60) - { - $process = new static([], $cwd, $env, $input, $timeout); - $process->commandline = $command; - - return $process; - } - - /** - * @return array - */ - public function __sleep() - { - throw new \BadMethodCallException('Cannot serialize '.__CLASS__); - } - - public function __wakeup() - { - throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); - } - - public function __destruct() - { - $this->stop(0); - } - - public function __clone() - { - $this->resetProcessData(); - } - - /** - * Runs the process. - * - * The callback receives the type of output (out or err) and - * some bytes from the output in real-time. It allows to have feedback - * from the independent process during execution. - * - * The STDOUT and STDERR are also available after the process is finished - * via the getOutput() and getErrorOutput() methods. - * - * @param callable|null $callback A PHP callback to run whenever there is some - * output available on STDOUT or STDERR - * - * @return int The exit status code - * - * @throws RuntimeException When process can't be launched - * @throws RuntimeException When process is already running - * @throws ProcessTimedOutException When process timed out - * @throws ProcessSignaledException When process stopped after receiving signal - * @throws LogicException In case a callback is provided and output has been disabled - * - * @final - */ - public function run(callable $callback = null, array $env = []): int - { - $this->start($callback, $env); - - return $this->wait(); - } - - /** - * Runs the process. - * - * This is identical to run() except that an exception is thrown if the process - * exits with a non-zero exit code. - * - * @return $this - * - * @throws ProcessFailedException if the process didn't terminate successfully - * - * @final - */ - public function mustRun(callable $callback = null, array $env = []): self - { - if (0 !== $this->run($callback, $env)) { - throw new ProcessFailedException($this); - } - - return $this; - } - - /** - * Starts the process and returns after writing the input to STDIN. - * - * This method blocks until all STDIN data is sent to the process then it - * returns while the process runs in the background. - * - * The termination of the process can be awaited with wait(). - * - * The callback receives the type of output (out or err) and some bytes from - * the output in real-time while writing the standard input to the process. - * It allows to have feedback from the independent process during execution. - * - * @param callable|null $callback A PHP callback to run whenever there is some - * output available on STDOUT or STDERR - * - * @throws RuntimeException When process can't be launched - * @throws RuntimeException When process is already running - * @throws LogicException In case a callback is provided and output has been disabled - */ - public function start(callable $callback = null, array $env = []) - { - if ($this->isRunning()) { - throw new RuntimeException('Process is already running.'); - } - - $this->resetProcessData(); - $this->starttime = $this->lastOutputTime = microtime(true); - $this->callback = $this->buildCallback($callback); - $this->hasCallback = null !== $callback; - $descriptors = $this->getDescriptors(); - - if ($this->env) { - $env += $this->env; - } - - $env += $this->getDefaultEnv(); - - if (\is_array($commandline = $this->commandline)) { - $commandline = implode(' ', array_map([$this, 'escapeArgument'], $commandline)); - - if ('\\' !== \DIRECTORY_SEPARATOR) { - // exec is mandatory to deal with sending a signal to the process - $commandline = 'exec '.$commandline; - } - } else { - $commandline = $this->replacePlaceholders($commandline, $env); - } - - $options = ['suppress_errors' => true]; - - if ('\\' === \DIRECTORY_SEPARATOR) { - $options['bypass_shell'] = true; - $commandline = $this->prepareWindowsCommandLine($commandline, $env); - } elseif (!$this->useFileHandles && $this->isSigchildEnabled()) { - // last exit code is output on the fourth pipe and caught to work around --enable-sigchild - $descriptors[3] = ['pipe', 'w']; - - // See https://unix.stackexchange.com/questions/71205/background-process-pipe-input - $commandline = '{ ('.$commandline.') <&3 3<&- 3>/dev/null & } 3<&0;'; - $commandline .= 'pid=$!; echo $pid >&3; wait $pid; code=$?; echo $code >&3; exit $code'; - - // Workaround for the bug, when PTS functionality is enabled. - // @see : https://bugs.php.net/69442 - $ptsWorkaround = fopen(__FILE__, 'r'); - } - - $envPairs = []; - foreach ($env as $k => $v) { - if (false !== $v) { - $envPairs[] = $k.'='.$v; - } - } - - if (!is_dir($this->cwd)) { - throw new RuntimeException(sprintf('The provided cwd "%s" does not exist.', $this->cwd)); - } - - $this->process = @proc_open($commandline, $descriptors, $this->processPipes->pipes, $this->cwd, $envPairs, $options); - - if (!\is_resource($this->process)) { - throw new RuntimeException('Unable to launch a new process.'); - } - $this->status = self::STATUS_STARTED; - - if (isset($descriptors[3])) { - $this->fallbackStatus['pid'] = (int) fgets($this->processPipes->pipes[3]); - } - - if ($this->tty) { - return; - } - - $this->updateStatus(false); - $this->checkTimeout(); - } - - /** - * Restarts the process. - * - * Be warned that the process is cloned before being started. - * - * @param callable|null $callback A PHP callback to run whenever there is some - * output available on STDOUT or STDERR - * - * @return static - * - * @throws RuntimeException When process can't be launched - * @throws RuntimeException When process is already running - * - * @see start() - * - * @final - */ - public function restart(callable $callback = null, array $env = []): self - { - if ($this->isRunning()) { - throw new RuntimeException('Process is already running.'); - } - - $process = clone $this; - $process->start($callback, $env); - - return $process; - } - - /** - * Waits for the process to terminate. - * - * The callback receives the type of output (out or err) and some bytes - * from the output in real-time while writing the standard input to the process. - * It allows to have feedback from the independent process during execution. - * - * @param callable|null $callback A valid PHP callback - * - * @return int The exitcode of the process - * - * @throws ProcessTimedOutException When process timed out - * @throws ProcessSignaledException When process stopped after receiving signal - * @throws LogicException When process is not yet started - */ - public function wait(callable $callback = null) - { - $this->requireProcessIsStarted(__FUNCTION__); - - $this->updateStatus(false); - - if (null !== $callback) { - if (!$this->processPipes->haveReadSupport()) { - $this->stop(0); - throw new LogicException('Pass the callback to the "Process::start" method or call enableOutput to use a callback with "Process::wait".'); - } - $this->callback = $this->buildCallback($callback); - } - - do { - $this->checkTimeout(); - $running = '\\' === \DIRECTORY_SEPARATOR ? $this->isRunning() : $this->processPipes->areOpen(); - $this->readPipes($running, '\\' !== \DIRECTORY_SEPARATOR || !$running); - } while ($running); - - while ($this->isRunning()) { - $this->checkTimeout(); - usleep(1000); - } - - if ($this->processInformation['signaled'] && $this->processInformation['termsig'] !== $this->latestSignal) { - throw new ProcessSignaledException($this); - } - - return $this->exitcode; - } - - /** - * Waits until the callback returns true. - * - * The callback receives the type of output (out or err) and some bytes - * from the output in real-time while writing the standard input to the process. - * It allows to have feedback from the independent process during execution. - * - * @throws RuntimeException When process timed out - * @throws LogicException When process is not yet started - * @throws ProcessTimedOutException In case the timeout was reached - */ - public function waitUntil(callable $callback): bool - { - $this->requireProcessIsStarted(__FUNCTION__); - $this->updateStatus(false); - - if (!$this->processPipes->haveReadSupport()) { - $this->stop(0); - throw new LogicException('Pass the callback to the "Process::start" method or call enableOutput to use a callback with "Process::waitUntil".'); - } - $callback = $this->buildCallback($callback); - - $ready = false; - while (true) { - $this->checkTimeout(); - $running = '\\' === \DIRECTORY_SEPARATOR ? $this->isRunning() : $this->processPipes->areOpen(); - $output = $this->processPipes->readAndWrite($running, '\\' !== \DIRECTORY_SEPARATOR || !$running); - - foreach ($output as $type => $data) { - if (3 !== $type) { - $ready = $callback(self::STDOUT === $type ? self::OUT : self::ERR, $data) || $ready; - } elseif (!isset($this->fallbackStatus['signaled'])) { - $this->fallbackStatus['exitcode'] = (int) $data; - } - } - if ($ready) { - return true; - } - if (!$running) { - return false; - } - - usleep(1000); - } - } - - /** - * Returns the Pid (process identifier), if applicable. - * - * @return int|null The process id if running, null otherwise - */ - public function getPid() - { - return $this->isRunning() ? $this->processInformation['pid'] : null; - } - - /** - * Sends a POSIX signal to the process. - * - * @param int $signal A valid POSIX signal (see https://php.net/pcntl.constants) - * - * @return $this - * - * @throws LogicException In case the process is not running - * @throws RuntimeException In case --enable-sigchild is activated and the process can't be killed - * @throws RuntimeException In case of failure - */ - public function signal($signal) - { - $this->doSignal($signal, true); - - return $this; - } - - /** - * Disables fetching output and error output from the underlying process. - * - * @return $this - * - * @throws RuntimeException In case the process is already running - * @throws LogicException if an idle timeout is set - */ - public function disableOutput() - { - if ($this->isRunning()) { - throw new RuntimeException('Disabling output while the process is running is not possible.'); - } - if (null !== $this->idleTimeout) { - throw new LogicException('Output can not be disabled while an idle timeout is set.'); - } - - $this->outputDisabled = true; - - return $this; - } - - /** - * Enables fetching output and error output from the underlying process. - * - * @return $this - * - * @throws RuntimeException In case the process is already running - */ - public function enableOutput() - { - if ($this->isRunning()) { - throw new RuntimeException('Enabling output while the process is running is not possible.'); - } - - $this->outputDisabled = false; - - return $this; - } - - /** - * Returns true in case the output is disabled, false otherwise. - * - * @return bool - */ - public function isOutputDisabled() - { - return $this->outputDisabled; - } - - /** - * Returns the current output of the process (STDOUT). - * - * @return string The process output - * - * @throws LogicException in case the output has been disabled - * @throws LogicException In case the process is not started - */ - public function getOutput() - { - $this->readPipesForOutput(__FUNCTION__); - - if (false === $ret = stream_get_contents($this->stdout, -1, 0)) { - return ''; - } - - return $ret; - } - - /** - * Returns the output incrementally. - * - * In comparison with the getOutput method which always return the whole - * output, this one returns the new output since the last call. - * - * @return string The process output since the last call - * - * @throws LogicException in case the output has been disabled - * @throws LogicException In case the process is not started - */ - public function getIncrementalOutput() - { - $this->readPipesForOutput(__FUNCTION__); - - $latest = stream_get_contents($this->stdout, -1, $this->incrementalOutputOffset); - $this->incrementalOutputOffset = ftell($this->stdout); - - if (false === $latest) { - return ''; - } - - return $latest; - } - - /** - * Returns an iterator to the output of the process, with the output type as keys (Process::OUT/ERR). - * - * @param int $flags A bit field of Process::ITER_* flags - * - * @throws LogicException in case the output has been disabled - * @throws LogicException In case the process is not started - * - * @return \Generator - */ - #[\ReturnTypeWillChange] - public function getIterator($flags = 0) - { - $this->readPipesForOutput(__FUNCTION__, false); - - $clearOutput = !(self::ITER_KEEP_OUTPUT & $flags); - $blocking = !(self::ITER_NON_BLOCKING & $flags); - $yieldOut = !(self::ITER_SKIP_OUT & $flags); - $yieldErr = !(self::ITER_SKIP_ERR & $flags); - - while (null !== $this->callback || ($yieldOut && !feof($this->stdout)) || ($yieldErr && !feof($this->stderr))) { - if ($yieldOut) { - $out = stream_get_contents($this->stdout, -1, $this->incrementalOutputOffset); - - if (isset($out[0])) { - if ($clearOutput) { - $this->clearOutput(); - } else { - $this->incrementalOutputOffset = ftell($this->stdout); - } - - yield self::OUT => $out; - } - } - - if ($yieldErr) { - $err = stream_get_contents($this->stderr, -1, $this->incrementalErrorOutputOffset); - - if (isset($err[0])) { - if ($clearOutput) { - $this->clearErrorOutput(); - } else { - $this->incrementalErrorOutputOffset = ftell($this->stderr); - } - - yield self::ERR => $err; - } - } - - if (!$blocking && !isset($out[0]) && !isset($err[0])) { - yield self::OUT => ''; - } - - $this->checkTimeout(); - $this->readPipesForOutput(__FUNCTION__, $blocking); - } - } - - /** - * Clears the process output. - * - * @return $this - */ - public function clearOutput() - { - ftruncate($this->stdout, 0); - fseek($this->stdout, 0); - $this->incrementalOutputOffset = 0; - - return $this; - } - - /** - * Returns the current error output of the process (STDERR). - * - * @return string The process error output - * - * @throws LogicException in case the output has been disabled - * @throws LogicException In case the process is not started - */ - public function getErrorOutput() - { - $this->readPipesForOutput(__FUNCTION__); - - if (false === $ret = stream_get_contents($this->stderr, -1, 0)) { - return ''; - } - - return $ret; - } - - /** - * Returns the errorOutput incrementally. - * - * In comparison with the getErrorOutput method which always return the - * whole error output, this one returns the new error output since the last - * call. - * - * @return string The process error output since the last call - * - * @throws LogicException in case the output has been disabled - * @throws LogicException In case the process is not started - */ - public function getIncrementalErrorOutput() - { - $this->readPipesForOutput(__FUNCTION__); - - $latest = stream_get_contents($this->stderr, -1, $this->incrementalErrorOutputOffset); - $this->incrementalErrorOutputOffset = ftell($this->stderr); - - if (false === $latest) { - return ''; - } - - return $latest; - } - - /** - * Clears the process output. - * - * @return $this - */ - public function clearErrorOutput() - { - ftruncate($this->stderr, 0); - fseek($this->stderr, 0); - $this->incrementalErrorOutputOffset = 0; - - return $this; - } - - /** - * Returns the exit code returned by the process. - * - * @return int|null The exit status code, null if the Process is not terminated - */ - public function getExitCode() - { - $this->updateStatus(false); - - return $this->exitcode; - } - - /** - * Returns a string representation for the exit code returned by the process. - * - * This method relies on the Unix exit code status standardization - * and might not be relevant for other operating systems. - * - * @return string|null A string representation for the exit status code, null if the Process is not terminated - * - * @see http://tldp.org/LDP/abs/html/exitcodes.html - * @see http://en.wikipedia.org/wiki/Unix_signal - */ - public function getExitCodeText() - { - if (null === $exitcode = $this->getExitCode()) { - return null; - } - - return self::$exitCodes[$exitcode] ?? 'Unknown error'; - } - - /** - * Checks if the process ended successfully. - * - * @return bool true if the process ended successfully, false otherwise - */ - public function isSuccessful() - { - return 0 === $this->getExitCode(); - } - - /** - * Returns true if the child process has been terminated by an uncaught signal. - * - * It always returns false on Windows. - * - * @return bool - * - * @throws LogicException In case the process is not terminated - */ - public function hasBeenSignaled() - { - $this->requireProcessIsTerminated(__FUNCTION__); - - return $this->processInformation['signaled']; - } - - /** - * Returns the number of the signal that caused the child process to terminate its execution. - * - * It is only meaningful if hasBeenSignaled() returns true. - * - * @return int - * - * @throws RuntimeException In case --enable-sigchild is activated - * @throws LogicException In case the process is not terminated - */ - public function getTermSignal() - { - $this->requireProcessIsTerminated(__FUNCTION__); - - if ($this->isSigchildEnabled() && -1 === $this->processInformation['termsig']) { - throw new RuntimeException('This PHP has been compiled with --enable-sigchild. Term signal can not be retrieved.'); - } - - return $this->processInformation['termsig']; - } - - /** - * Returns true if the child process has been stopped by a signal. - * - * It always returns false on Windows. - * - * @return bool - * - * @throws LogicException In case the process is not terminated - */ - public function hasBeenStopped() - { - $this->requireProcessIsTerminated(__FUNCTION__); - - return $this->processInformation['stopped']; - } - - /** - * Returns the number of the signal that caused the child process to stop its execution. - * - * It is only meaningful if hasBeenStopped() returns true. - * - * @return int - * - * @throws LogicException In case the process is not terminated - */ - public function getStopSignal() - { - $this->requireProcessIsTerminated(__FUNCTION__); - - return $this->processInformation['stopsig']; - } - - /** - * Checks if the process is currently running. - * - * @return bool true if the process is currently running, false otherwise - */ - public function isRunning() - { - if (self::STATUS_STARTED !== $this->status) { - return false; - } - - $this->updateStatus(false); - - return $this->processInformation['running']; - } - - /** - * Checks if the process has been started with no regard to the current state. - * - * @return bool true if status is ready, false otherwise - */ - public function isStarted() - { - return self::STATUS_READY != $this->status; - } - - /** - * Checks if the process is terminated. - * - * @return bool true if process is terminated, false otherwise - */ - public function isTerminated() - { - $this->updateStatus(false); - - return self::STATUS_TERMINATED == $this->status; - } - - /** - * Gets the process status. - * - * The status is one of: ready, started, terminated. - * - * @return string The current process status - */ - public function getStatus() - { - $this->updateStatus(false); - - return $this->status; - } - - /** - * Stops the process. - * - * @param int|float $timeout The timeout in seconds - * @param int $signal A POSIX signal to send in case the process has not stop at timeout, default is SIGKILL (9) - * - * @return int|null The exit-code of the process or null if it's not running - */ - public function stop($timeout = 10, $signal = null) - { - $timeoutMicro = microtime(true) + $timeout; - if ($this->isRunning()) { - // given SIGTERM may not be defined and that "proc_terminate" uses the constant value and not the constant itself, we use the same here - $this->doSignal(15, false); - do { - usleep(1000); - } while ($this->isRunning() && microtime(true) < $timeoutMicro); - - if ($this->isRunning()) { - // Avoid exception here: process is supposed to be running, but it might have stopped just - // after this line. In any case, let's silently discard the error, we cannot do anything. - $this->doSignal($signal ?: 9, false); - } - } - - if ($this->isRunning()) { - if (isset($this->fallbackStatus['pid'])) { - unset($this->fallbackStatus['pid']); - - return $this->stop(0, $signal); - } - $this->close(); - } - - return $this->exitcode; - } - - /** - * Adds a line to the STDOUT stream. - * - * @internal - */ - public function addOutput(string $line) - { - $this->lastOutputTime = microtime(true); - - fseek($this->stdout, 0, \SEEK_END); - fwrite($this->stdout, $line); - fseek($this->stdout, $this->incrementalOutputOffset); - } - - /** - * Adds a line to the STDERR stream. - * - * @internal - */ - public function addErrorOutput(string $line) - { - $this->lastOutputTime = microtime(true); - - fseek($this->stderr, 0, \SEEK_END); - fwrite($this->stderr, $line); - fseek($this->stderr, $this->incrementalErrorOutputOffset); - } - - /** - * Gets the last output time in seconds. - * - * @return float|null The last output time in seconds or null if it isn't started - */ - public function getLastOutputTime(): ?float - { - return $this->lastOutputTime; - } - - /** - * Gets the command line to be executed. - * - * @return string The command to execute - */ - public function getCommandLine() - { - return \is_array($this->commandline) ? implode(' ', array_map([$this, 'escapeArgument'], $this->commandline)) : $this->commandline; - } - - /** - * Sets the command line to be executed. - * - * @param string|array $commandline The command to execute - * - * @return $this - * - * @deprecated since Symfony 4.2. - */ - public function setCommandLine($commandline) - { - @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2.', __METHOD__), \E_USER_DEPRECATED); - - $this->commandline = $commandline; - - return $this; - } - - /** - * Gets the process timeout (max. runtime). - * - * @return float|null The timeout in seconds or null if it's disabled - */ - public function getTimeout() - { - return $this->timeout; - } - - /** - * Gets the process idle timeout (max. time since last output). - * - * @return float|null The timeout in seconds or null if it's disabled - */ - public function getIdleTimeout() - { - return $this->idleTimeout; - } - - /** - * Sets the process timeout (max. runtime) in seconds. - * - * To disable the timeout, set this value to null. - * - * @param int|float|null $timeout The timeout in seconds - * - * @return $this - * - * @throws InvalidArgumentException if the timeout is negative - */ - public function setTimeout($timeout) - { - $this->timeout = $this->validateTimeout($timeout); - - return $this; - } - - /** - * Sets the process idle timeout (max. time since last output). - * - * To disable the timeout, set this value to null. - * - * @param int|float|null $timeout The timeout in seconds - * - * @return $this - * - * @throws LogicException if the output is disabled - * @throws InvalidArgumentException if the timeout is negative - */ - public function setIdleTimeout($timeout) - { - if (null !== $timeout && $this->outputDisabled) { - throw new LogicException('Idle timeout can not be set while the output is disabled.'); - } - - $this->idleTimeout = $this->validateTimeout($timeout); - - return $this; - } - - /** - * Enables or disables the TTY mode. - * - * @param bool $tty True to enabled and false to disable - * - * @return $this - * - * @throws RuntimeException In case the TTY mode is not supported - */ - public function setTty($tty) - { - if ('\\' === \DIRECTORY_SEPARATOR && $tty) { - throw new RuntimeException('TTY mode is not supported on Windows platform.'); - } - - if ($tty && !self::isTtySupported()) { - throw new RuntimeException('TTY mode requires /dev/tty to be read/writable.'); - } - - $this->tty = (bool) $tty; - - return $this; - } - - /** - * Checks if the TTY mode is enabled. - * - * @return bool true if the TTY mode is enabled, false otherwise - */ - public function isTty() - { - return $this->tty; - } - - /** - * Sets PTY mode. - * - * @param bool $bool - * - * @return $this - */ - public function setPty($bool) - { - $this->pty = (bool) $bool; - - return $this; - } - - /** - * Returns PTY state. - * - * @return bool - */ - public function isPty() - { - return $this->pty; - } - - /** - * Gets the working directory. - * - * @return string|null The current working directory or null on failure - */ - public function getWorkingDirectory() - { - if (null === $this->cwd) { - // getcwd() will return false if any one of the parent directories does not have - // the readable or search mode set, even if the current directory does - return getcwd() ?: null; - } - - return $this->cwd; - } - - /** - * Sets the current working directory. - * - * @param string $cwd The new working directory - * - * @return $this - */ - public function setWorkingDirectory($cwd) - { - $this->cwd = $cwd; - - return $this; - } - - /** - * Gets the environment variables. - * - * @return array The current environment variables - */ - public function getEnv() - { - return $this->env; - } - - /** - * Sets the environment variables. - * - * Each environment variable value should be a string. - * If it is an array, the variable is ignored. - * If it is false or null, it will be removed when - * env vars are otherwise inherited. - * - * That happens in PHP when 'argv' is registered into - * the $_ENV array for instance. - * - * @param array $env The new environment variables - * - * @return $this - */ - public function setEnv(array $env) - { - // Process can not handle env values that are arrays - $env = array_filter($env, function ($value) { - return !\is_array($value); - }); - - $this->env = $env; - - return $this; - } - - /** - * Gets the Process input. - * - * @return resource|string|\Iterator|null The Process input - */ - public function getInput() - { - return $this->input; - } - - /** - * Sets the input. - * - * This content will be passed to the underlying process standard input. - * - * @param string|int|float|bool|resource|\Traversable|null $input The content - * - * @return $this - * - * @throws LogicException In case the process is running - */ - public function setInput($input) - { - if ($this->isRunning()) { - throw new LogicException('Input can not be set while the process is running.'); - } - - $this->input = ProcessUtils::validateInput(__METHOD__, $input); - - return $this; - } - - /** - * Sets whether environment variables will be inherited or not. - * - * @param bool $inheritEnv - * - * @return $this - * - * @deprecated since Symfony 4.4, env variables are always inherited - */ - public function inheritEnvironmentVariables($inheritEnv = true) - { - @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.4, env variables are always inherited.', __METHOD__), \E_USER_DEPRECATED); - - if (!$inheritEnv) { - throw new InvalidArgumentException('Not inheriting environment variables is not supported.'); - } - - return $this; - } - - /** - * Performs a check between the timeout definition and the time the process started. - * - * In case you run a background process (with the start method), you should - * trigger this method regularly to ensure the process timeout - * - * @throws ProcessTimedOutException In case the timeout was reached - */ - public function checkTimeout() - { - if (self::STATUS_STARTED !== $this->status) { - return; - } - - if (null !== $this->timeout && $this->timeout < microtime(true) - $this->starttime) { - $this->stop(0); - - throw new ProcessTimedOutException($this, ProcessTimedOutException::TYPE_GENERAL); - } - - if (null !== $this->idleTimeout && $this->idleTimeout < microtime(true) - $this->lastOutputTime) { - $this->stop(0); - - throw new ProcessTimedOutException($this, ProcessTimedOutException::TYPE_IDLE); - } - } - - /** - * Returns whether TTY is supported on the current operating system. - */ - public static function isTtySupported(): bool - { - static $isTtySupported; - - if (null === $isTtySupported) { - $isTtySupported = (bool) @proc_open('echo 1 >/dev/null', [['file', '/dev/tty', 'r'], ['file', '/dev/tty', 'w'], ['file', '/dev/tty', 'w']], $pipes); - } - - return $isTtySupported; - } - - /** - * Returns whether PTY is supported on the current operating system. - * - * @return bool - */ - public static function isPtySupported() - { - static $result; - - if (null !== $result) { - return $result; - } - - if ('\\' === \DIRECTORY_SEPARATOR) { - return $result = false; - } - - return $result = (bool) @proc_open('echo 1 >/dev/null', [['pty'], ['pty'], ['pty']], $pipes); - } - - /** - * Creates the descriptors needed by the proc_open. - */ - private function getDescriptors(): array - { - if ($this->input instanceof \Iterator) { - $this->input->rewind(); - } - if ('\\' === \DIRECTORY_SEPARATOR) { - $this->processPipes = new WindowsPipes($this->input, !$this->outputDisabled || $this->hasCallback); - } else { - $this->processPipes = new UnixPipes($this->isTty(), $this->isPty(), $this->input, !$this->outputDisabled || $this->hasCallback); - } - - return $this->processPipes->getDescriptors(); - } - - /** - * Builds up the callback used by wait(). - * - * The callbacks adds all occurred output to the specific buffer and calls - * the user callback (if present) with the received output. - * - * @param callable|null $callback The user defined PHP callback - * - * @return \Closure A PHP closure - */ - protected function buildCallback(callable $callback = null) - { - if ($this->outputDisabled) { - return function ($type, $data) use ($callback): bool { - return null !== $callback && $callback($type, $data); - }; - } - - $out = self::OUT; - - return function ($type, $data) use ($callback, $out): bool { - if ($out == $type) { - $this->addOutput($data); - } else { - $this->addErrorOutput($data); - } - - return null !== $callback && $callback($type, $data); - }; - } - - /** - * Updates the status of the process, reads pipes. - * - * @param bool $blocking Whether to use a blocking read call - */ - protected function updateStatus($blocking) - { - if (self::STATUS_STARTED !== $this->status) { - return; - } - - $this->processInformation = proc_get_status($this->process); - $running = $this->processInformation['running']; - - $this->readPipes($running && $blocking, '\\' !== \DIRECTORY_SEPARATOR || !$running); - - if ($this->fallbackStatus && $this->isSigchildEnabled()) { - $this->processInformation = $this->fallbackStatus + $this->processInformation; - } - - if (!$running) { - $this->close(); - } - } - - /** - * Returns whether PHP has been compiled with the '--enable-sigchild' option or not. - * - * @return bool - */ - protected function isSigchildEnabled() - { - if (null !== self::$sigchild) { - return self::$sigchild; - } - - if (!\function_exists('phpinfo')) { - return self::$sigchild = false; - } - - ob_start(); - phpinfo(\INFO_GENERAL); - - return self::$sigchild = str_contains(ob_get_clean(), '--enable-sigchild'); - } - - /** - * Reads pipes for the freshest output. - * - * @param string $caller The name of the method that needs fresh outputs - * @param bool $blocking Whether to use blocking calls or not - * - * @throws LogicException in case output has been disabled or process is not started - */ - private function readPipesForOutput(string $caller, bool $blocking = false) - { - if ($this->outputDisabled) { - throw new LogicException('Output has been disabled.'); - } - - $this->requireProcessIsStarted($caller); - - $this->updateStatus($blocking); - } - - /** - * Validates and returns the filtered timeout. - * - * @throws InvalidArgumentException if the given timeout is a negative number - */ - private function validateTimeout(?float $timeout): ?float - { - $timeout = (float) $timeout; - - if (0.0 === $timeout) { - $timeout = null; - } elseif ($timeout < 0) { - throw new InvalidArgumentException('The timeout value must be a valid positive integer or float number.'); - } - - return $timeout; - } - - /** - * Reads pipes, executes callback. - * - * @param bool $blocking Whether to use blocking calls or not - * @param bool $close Whether to close file handles or not - */ - private function readPipes(bool $blocking, bool $close) - { - $result = $this->processPipes->readAndWrite($blocking, $close); - - $callback = $this->callback; - foreach ($result as $type => $data) { - if (3 !== $type) { - $callback(self::STDOUT === $type ? self::OUT : self::ERR, $data); - } elseif (!isset($this->fallbackStatus['signaled'])) { - $this->fallbackStatus['exitcode'] = (int) $data; - } - } - } - - /** - * Closes process resource, closes file handles, sets the exitcode. - * - * @return int The exitcode - */ - private function close(): int - { - $this->processPipes->close(); - if (\is_resource($this->process)) { - proc_close($this->process); - } - $this->exitcode = $this->processInformation['exitcode']; - $this->status = self::STATUS_TERMINATED; - - if (-1 === $this->exitcode) { - if ($this->processInformation['signaled'] && 0 < $this->processInformation['termsig']) { - // if process has been signaled, no exitcode but a valid termsig, apply Unix convention - $this->exitcode = 128 + $this->processInformation['termsig']; - } elseif ($this->isSigchildEnabled()) { - $this->processInformation['signaled'] = true; - $this->processInformation['termsig'] = -1; - } - } - - // Free memory from self-reference callback created by buildCallback - // Doing so in other contexts like __destruct or by garbage collector is ineffective - // Now pipes are closed, so the callback is no longer necessary - $this->callback = null; - - return $this->exitcode; - } - - /** - * Resets data related to the latest run of the process. - */ - private function resetProcessData() - { - $this->starttime = null; - $this->callback = null; - $this->exitcode = null; - $this->fallbackStatus = []; - $this->processInformation = null; - $this->stdout = fopen('php://temp/maxmemory:'.(1024 * 1024), 'w+'); - $this->stderr = fopen('php://temp/maxmemory:'.(1024 * 1024), 'w+'); - $this->process = null; - $this->latestSignal = null; - $this->status = self::STATUS_READY; - $this->incrementalOutputOffset = 0; - $this->incrementalErrorOutputOffset = 0; - } - - /** - * Sends a POSIX signal to the process. - * - * @param int $signal A valid POSIX signal (see https://php.net/pcntl.constants) - * @param bool $throwException Whether to throw exception in case signal failed - * - * @return bool True if the signal was sent successfully, false otherwise - * - * @throws LogicException In case the process is not running - * @throws RuntimeException In case --enable-sigchild is activated and the process can't be killed - * @throws RuntimeException In case of failure - */ - private function doSignal(int $signal, bool $throwException): bool - { - if (null === $pid = $this->getPid()) { - if ($throwException) { - throw new LogicException('Can not send signal on a non running process.'); - } - - return false; - } - - if ('\\' === \DIRECTORY_SEPARATOR) { - exec(sprintf('taskkill /F /T /PID %d 2>&1', $pid), $output, $exitCode); - if ($exitCode && $this->isRunning()) { - if ($throwException) { - throw new RuntimeException(sprintf('Unable to kill the process (%s).', implode(' ', $output))); - } - - return false; - } - } else { - if (!$this->isSigchildEnabled()) { - $ok = @proc_terminate($this->process, $signal); - } elseif (\function_exists('posix_kill')) { - $ok = @posix_kill($pid, $signal); - } elseif ($ok = proc_open(sprintf('kill -%d %d', $signal, $pid), [2 => ['pipe', 'w']], $pipes)) { - $ok = false === fgets($pipes[2]); - } - if (!$ok) { - if ($throwException) { - throw new RuntimeException(sprintf('Error while sending signal "%s".', $signal)); - } - - return false; - } - } - - $this->latestSignal = $signal; - $this->fallbackStatus['signaled'] = true; - $this->fallbackStatus['exitcode'] = -1; - $this->fallbackStatus['termsig'] = $this->latestSignal; - - return true; - } - - private function prepareWindowsCommandLine(string $cmd, array &$env): string - { - $uid = uniqid('', true); - $varCount = 0; - $varCache = []; - $cmd = preg_replace_callback( - '/"(?:( - [^"%!^]*+ - (?: - (?: !LF! | "(?:\^[%!^])?+" ) - [^"%!^]*+ - )++ - ) | [^"]*+ )"/x', - function ($m) use (&$env, &$varCache, &$varCount, $uid) { - if (!isset($m[1])) { - return $m[0]; - } - if (isset($varCache[$m[0]])) { - return $varCache[$m[0]]; - } - if (str_contains($value = $m[1], "\0")) { - $value = str_replace("\0", '?', $value); - } - if (false === strpbrk($value, "\"%!\n")) { - return '"'.$value.'"'; - } - - $value = str_replace(['!LF!', '"^!"', '"^%"', '"^^"', '""'], ["\n", '!', '%', '^', '"'], $value); - $value = '"'.preg_replace('/(\\\\*)"/', '$1$1\\"', $value).'"'; - $var = $uid.++$varCount; - - $env[$var] = $value; - - return $varCache[$m[0]] = '!'.$var.'!'; - }, - $cmd - ); - - $cmd = 'cmd /V:ON /E:ON /D /C ('.str_replace("\n", ' ', $cmd).')'; - foreach ($this->processPipes->getFiles() as $offset => $filename) { - $cmd .= ' '.$offset.'>"'.$filename.'"'; - } - - return $cmd; - } - - /** - * Ensures the process is running or terminated, throws a LogicException if the process has a not started. - * - * @throws LogicException if the process has not run - */ - private function requireProcessIsStarted(string $functionName) - { - if (!$this->isStarted()) { - throw new LogicException(sprintf('Process must be started before calling "%s()".', $functionName)); - } - } - - /** - * Ensures the process is terminated, throws a LogicException if the process has a status different than "terminated". - * - * @throws LogicException if the process is not yet terminated - */ - private function requireProcessIsTerminated(string $functionName) - { - if (!$this->isTerminated()) { - throw new LogicException(sprintf('Process must be terminated before calling "%s()".', $functionName)); - } - } - - /** - * Escapes a string to be used as a shell argument. - */ - private function escapeArgument(?string $argument): string - { - if ('' === $argument || null === $argument) { - return '""'; - } - if ('\\' !== \DIRECTORY_SEPARATOR) { - return "'".str_replace("'", "'\\''", $argument)."'"; - } - if (str_contains($argument, "\0")) { - $argument = str_replace("\0", '?', $argument); - } - if (!preg_match('/[\/()%!^"<>&|\s]/', $argument)) { - return $argument; - } - $argument = preg_replace('/(\\\\+)$/', '$1$1', $argument); - - return '"'.str_replace(['"', '^', '%', '!', "\n"], ['""', '"^^"', '"^%"', '"^!"', '!LF!'], $argument).'"'; - } - - private function replacePlaceholders(string $commandline, array $env) - { - return preg_replace_callback('/"\$\{:([_a-zA-Z]++[_a-zA-Z0-9]*+)\}"/', function ($matches) use ($commandline, $env) { - if (!isset($env[$matches[1]]) || false === $env[$matches[1]]) { - throw new InvalidArgumentException(sprintf('Command line is missing a value for parameter "%s": ', $matches[1]).$commandline); - } - - return $this->escapeArgument($env[$matches[1]]); - }, $commandline); - } - - private function getDefaultEnv(): array - { - $env = []; - - foreach ($_SERVER as $k => $v) { - if (\is_string($v) && false !== $v = getenv($k)) { - $env[$k] = $v; - } - } - - foreach ($_ENV as $k => $v) { - if (\is_string($v)) { - $env[$k] = $v; - } - } - - return $env; - } -} diff --git a/source/vendor/symfony/process/ProcessUtils.php b/source/vendor/symfony/process/ProcessUtils.php deleted file mode 100644 index eb39a4a..0000000 --- a/source/vendor/symfony/process/ProcessUtils.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Process; - -use Symfony\Component\Process\Exception\InvalidArgumentException; - -/** - * ProcessUtils is a bunch of utility methods. - * - * This class contains static methods only and is not meant to be instantiated. - * - * @author Martin Hasoň - */ -class ProcessUtils -{ - /** - * This class should not be instantiated. - */ - private function __construct() - { - } - - /** - * Validates and normalizes a Process input. - * - * @param string $caller The name of method call that validates the input - * @param mixed $input The input to validate - * - * @return mixed The validated input - * - * @throws InvalidArgumentException In case the input is not valid - */ - public static function validateInput($caller, $input) - { - if (null !== $input) { - if (\is_resource($input)) { - return $input; - } - if (\is_string($input)) { - return $input; - } - if (is_scalar($input)) { - return (string) $input; - } - if ($input instanceof Process) { - return $input->getIterator($input::ITER_SKIP_ERR); - } - if ($input instanceof \Iterator) { - return $input; - } - if ($input instanceof \Traversable) { - return new \IteratorIterator($input); - } - - throw new InvalidArgumentException(sprintf('"%s" only accepts strings, Traversable objects or stream resources.', $caller)); - } - - return $input; - } -} diff --git a/source/vendor/symfony/process/README.md b/source/vendor/symfony/process/README.md deleted file mode 100644 index afce5e4..0000000 --- a/source/vendor/symfony/process/README.md +++ /dev/null @@ -1,13 +0,0 @@ -Process Component -================= - -The Process component executes commands in sub-processes. - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/process.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/source/vendor/symfony/var-dumper/Caster/AmqpCaster.php b/source/vendor/symfony/var-dumper/Caster/AmqpCaster.php deleted file mode 100644 index 60045ff..0000000 --- a/source/vendor/symfony/var-dumper/Caster/AmqpCaster.php +++ /dev/null @@ -1,212 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts Amqp related classes to array representation. - * - * @author Grégoire Pineau - * - * @final since Symfony 4.4 - */ -class AmqpCaster -{ - private const FLAGS = [ - \AMQP_DURABLE => 'AMQP_DURABLE', - \AMQP_PASSIVE => 'AMQP_PASSIVE', - \AMQP_EXCLUSIVE => 'AMQP_EXCLUSIVE', - \AMQP_AUTODELETE => 'AMQP_AUTODELETE', - \AMQP_INTERNAL => 'AMQP_INTERNAL', - \AMQP_NOLOCAL => 'AMQP_NOLOCAL', - \AMQP_AUTOACK => 'AMQP_AUTOACK', - \AMQP_IFEMPTY => 'AMQP_IFEMPTY', - \AMQP_IFUNUSED => 'AMQP_IFUNUSED', - \AMQP_MANDATORY => 'AMQP_MANDATORY', - \AMQP_IMMEDIATE => 'AMQP_IMMEDIATE', - \AMQP_MULTIPLE => 'AMQP_MULTIPLE', - \AMQP_NOWAIT => 'AMQP_NOWAIT', - \AMQP_REQUEUE => 'AMQP_REQUEUE', - ]; - - private const EXCHANGE_TYPES = [ - \AMQP_EX_TYPE_DIRECT => 'AMQP_EX_TYPE_DIRECT', - \AMQP_EX_TYPE_FANOUT => 'AMQP_EX_TYPE_FANOUT', - \AMQP_EX_TYPE_TOPIC => 'AMQP_EX_TYPE_TOPIC', - \AMQP_EX_TYPE_HEADERS => 'AMQP_EX_TYPE_HEADERS', - ]; - - public static function castConnection(\AMQPConnection $c, array $a, Stub $stub, $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - $a += [ - $prefix.'is_connected' => $c->isConnected(), - ]; - - // Recent version of the extension already expose private properties - if (isset($a["\x00AMQPConnection\x00login"])) { - return $a; - } - - // BC layer in the amqp lib - if (method_exists($c, 'getReadTimeout')) { - $timeout = $c->getReadTimeout(); - } else { - $timeout = $c->getTimeout(); - } - - $a += [ - $prefix.'is_connected' => $c->isConnected(), - $prefix.'login' => $c->getLogin(), - $prefix.'password' => $c->getPassword(), - $prefix.'host' => $c->getHost(), - $prefix.'vhost' => $c->getVhost(), - $prefix.'port' => $c->getPort(), - $prefix.'read_timeout' => $timeout, - ]; - - return $a; - } - - public static function castChannel(\AMQPChannel $c, array $a, Stub $stub, $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - $a += [ - $prefix.'is_connected' => $c->isConnected(), - $prefix.'channel_id' => $c->getChannelId(), - ]; - - // Recent version of the extension already expose private properties - if (isset($a["\x00AMQPChannel\x00connection"])) { - return $a; - } - - $a += [ - $prefix.'connection' => $c->getConnection(), - $prefix.'prefetch_size' => $c->getPrefetchSize(), - $prefix.'prefetch_count' => $c->getPrefetchCount(), - ]; - - return $a; - } - - public static function castQueue(\AMQPQueue $c, array $a, Stub $stub, $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - $a += [ - $prefix.'flags' => self::extractFlags($c->getFlags()), - ]; - - // Recent version of the extension already expose private properties - if (isset($a["\x00AMQPQueue\x00name"])) { - return $a; - } - - $a += [ - $prefix.'connection' => $c->getConnection(), - $prefix.'channel' => $c->getChannel(), - $prefix.'name' => $c->getName(), - $prefix.'arguments' => $c->getArguments(), - ]; - - return $a; - } - - public static function castExchange(\AMQPExchange $c, array $a, Stub $stub, $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - $a += [ - $prefix.'flags' => self::extractFlags($c->getFlags()), - ]; - - $type = isset(self::EXCHANGE_TYPES[$c->getType()]) ? new ConstStub(self::EXCHANGE_TYPES[$c->getType()], $c->getType()) : $c->getType(); - - // Recent version of the extension already expose private properties - if (isset($a["\x00AMQPExchange\x00name"])) { - $a["\x00AMQPExchange\x00type"] = $type; - - return $a; - } - - $a += [ - $prefix.'connection' => $c->getConnection(), - $prefix.'channel' => $c->getChannel(), - $prefix.'name' => $c->getName(), - $prefix.'type' => $type, - $prefix.'arguments' => $c->getArguments(), - ]; - - return $a; - } - - public static function castEnvelope(\AMQPEnvelope $c, array $a, Stub $stub, $isNested, $filter = 0) - { - $prefix = Caster::PREFIX_VIRTUAL; - - $deliveryMode = new ConstStub($c->getDeliveryMode().(2 === $c->getDeliveryMode() ? ' (persistent)' : ' (non-persistent)'), $c->getDeliveryMode()); - - // Recent version of the extension already expose private properties - if (isset($a["\x00AMQPEnvelope\x00body"])) { - $a["\0AMQPEnvelope\0delivery_mode"] = $deliveryMode; - - return $a; - } - - if (!($filter & Caster::EXCLUDE_VERBOSE)) { - $a += [$prefix.'body' => $c->getBody()]; - } - - $a += [ - $prefix.'delivery_tag' => $c->getDeliveryTag(), - $prefix.'is_redelivery' => $c->isRedelivery(), - $prefix.'exchange_name' => $c->getExchangeName(), - $prefix.'routing_key' => $c->getRoutingKey(), - $prefix.'content_type' => $c->getContentType(), - $prefix.'content_encoding' => $c->getContentEncoding(), - $prefix.'headers' => $c->getHeaders(), - $prefix.'delivery_mode' => $deliveryMode, - $prefix.'priority' => $c->getPriority(), - $prefix.'correlation_id' => $c->getCorrelationId(), - $prefix.'reply_to' => $c->getReplyTo(), - $prefix.'expiration' => $c->getExpiration(), - $prefix.'message_id' => $c->getMessageId(), - $prefix.'timestamp' => $c->getTimeStamp(), - $prefix.'type' => $c->getType(), - $prefix.'user_id' => $c->getUserId(), - $prefix.'app_id' => $c->getAppId(), - ]; - - return $a; - } - - private static function extractFlags(int $flags): ConstStub - { - $flagsArray = []; - - foreach (self::FLAGS as $value => $name) { - if ($flags & $value) { - $flagsArray[] = $name; - } - } - - if (!$flagsArray) { - $flagsArray = ['AMQP_NOPARAM']; - } - - return new ConstStub(implode('|', $flagsArray), $flags); - } -} diff --git a/source/vendor/symfony/var-dumper/Caster/ArgsStub.php b/source/vendor/symfony/var-dumper/Caster/ArgsStub.php deleted file mode 100644 index f8b485b..0000000 --- a/source/vendor/symfony/var-dumper/Caster/ArgsStub.php +++ /dev/null @@ -1,80 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Represents a list of function arguments. - * - * @author Nicolas Grekas - */ -class ArgsStub extends EnumStub -{ - private static $parameters = []; - - public function __construct(array $args, string $function, ?string $class) - { - [$variadic, $params] = self::getParameters($function, $class); - - $values = []; - foreach ($args as $k => $v) { - $values[$k] = !is_scalar($v) && !$v instanceof Stub ? new CutStub($v) : $v; - } - if (null === $params) { - parent::__construct($values, false); - - return; - } - if (\count($values) < \count($params)) { - $params = \array_slice($params, 0, \count($values)); - } elseif (\count($values) > \count($params)) { - $values[] = new EnumStub(array_splice($values, \count($params)), false); - $params[] = $variadic; - } - if (['...'] === $params) { - $this->dumpKeys = false; - $this->value = $values[0]->value; - } else { - $this->value = array_combine($params, $values); - } - } - - private static function getParameters(string $function, ?string $class): array - { - if (isset(self::$parameters[$k = $class.'::'.$function])) { - return self::$parameters[$k]; - } - - try { - $r = null !== $class ? new \ReflectionMethod($class, $function) : new \ReflectionFunction($function); - } catch (\ReflectionException $e) { - return [null, null]; - } - - $variadic = '...'; - $params = []; - foreach ($r->getParameters() as $v) { - $k = '$'.$v->name; - if ($v->isPassedByReference()) { - $k = '&'.$k; - } - if ($v->isVariadic()) { - $variadic .= $k; - } else { - $params[] = $k; - } - } - - return self::$parameters[$k] = [$variadic, $params]; - } -} diff --git a/source/vendor/symfony/var-dumper/Caster/Caster.php b/source/vendor/symfony/var-dumper/Caster/Caster.php deleted file mode 100644 index d35f323..0000000 --- a/source/vendor/symfony/var-dumper/Caster/Caster.php +++ /dev/null @@ -1,175 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Helper for filtering out properties in casters. - * - * @author Nicolas Grekas - * - * @final - */ -class Caster -{ - public const EXCLUDE_VERBOSE = 1; - public const EXCLUDE_VIRTUAL = 2; - public const EXCLUDE_DYNAMIC = 4; - public const EXCLUDE_PUBLIC = 8; - public const EXCLUDE_PROTECTED = 16; - public const EXCLUDE_PRIVATE = 32; - public const EXCLUDE_NULL = 64; - public const EXCLUDE_EMPTY = 128; - public const EXCLUDE_NOT_IMPORTANT = 256; - public const EXCLUDE_STRICT = 512; - - public const PREFIX_VIRTUAL = "\0~\0"; - public const PREFIX_DYNAMIC = "\0+\0"; - public const PREFIX_PROTECTED = "\0*\0"; - - /** - * Casts objects to arrays and adds the dynamic property prefix. - * - * @param object $obj The object to cast - * @param bool $hasDebugInfo Whether the __debugInfo method exists on $obj or not - * - * @return array The array-cast of the object, with prefixed dynamic properties - */ - public static function castObject($obj, string $class, bool $hasDebugInfo = false, string $debugClass = null): array - { - if ($hasDebugInfo) { - try { - $debugInfo = $obj->__debugInfo(); - } catch (\Exception $e) { - // ignore failing __debugInfo() - $hasDebugInfo = false; - } - } - - $a = $obj instanceof \Closure ? [] : (array) $obj; - - if ($obj instanceof \__PHP_Incomplete_Class) { - return $a; - } - - if ($a) { - static $publicProperties = []; - $debugClass = $debugClass ?? get_debug_type($obj); - - $i = 0; - $prefixedKeys = []; - foreach ($a as $k => $v) { - if (isset($k[0]) ? "\0" !== $k[0] : \PHP_VERSION_ID >= 70200) { - if (!isset($publicProperties[$class])) { - foreach ((new \ReflectionClass($class))->getProperties(\ReflectionProperty::IS_PUBLIC) as $prop) { - $publicProperties[$class][$prop->name] = true; - } - } - if (!isset($publicProperties[$class][$k])) { - $prefixedKeys[$i] = self::PREFIX_DYNAMIC.$k; - } - } elseif ($debugClass !== $class && 1 === strpos($k, $class)) { - $prefixedKeys[$i] = "\0".$debugClass.strrchr($k, "\0"); - } - ++$i; - } - if ($prefixedKeys) { - $keys = array_keys($a); - foreach ($prefixedKeys as $i => $k) { - $keys[$i] = $k; - } - $a = array_combine($keys, $a); - } - } - - if ($hasDebugInfo && \is_array($debugInfo)) { - foreach ($debugInfo as $k => $v) { - if (!isset($k[0]) || "\0" !== $k[0]) { - if (\array_key_exists(self::PREFIX_DYNAMIC.$k, $a)) { - continue; - } - $k = self::PREFIX_VIRTUAL.$k; - } - - unset($a[$k]); - $a[$k] = $v; - } - } - - return $a; - } - - /** - * Filters out the specified properties. - * - * By default, a single match in the $filter bit field filters properties out, following an "or" logic. - * When EXCLUDE_STRICT is set, an "and" logic is applied: all bits must match for a property to be removed. - * - * @param array $a The array containing the properties to filter - * @param int $filter A bit field of Caster::EXCLUDE_* constants specifying which properties to filter out - * @param string[] $listedProperties List of properties to exclude when Caster::EXCLUDE_VERBOSE is set, and to preserve when Caster::EXCLUDE_NOT_IMPORTANT is set - * @param int &$count Set to the number of removed properties - * - * @return array The filtered array - */ - public static function filter(array $a, int $filter, array $listedProperties = [], ?int &$count = 0): array - { - $count = 0; - - foreach ($a as $k => $v) { - $type = self::EXCLUDE_STRICT & $filter; - - if (null === $v) { - $type |= self::EXCLUDE_NULL & $filter; - $type |= self::EXCLUDE_EMPTY & $filter; - } elseif (false === $v || '' === $v || '0' === $v || 0 === $v || 0.0 === $v || [] === $v) { - $type |= self::EXCLUDE_EMPTY & $filter; - } - if ((self::EXCLUDE_NOT_IMPORTANT & $filter) && !\in_array($k, $listedProperties, true)) { - $type |= self::EXCLUDE_NOT_IMPORTANT; - } - if ((self::EXCLUDE_VERBOSE & $filter) && \in_array($k, $listedProperties, true)) { - $type |= self::EXCLUDE_VERBOSE; - } - - if (!isset($k[1]) || "\0" !== $k[0]) { - $type |= self::EXCLUDE_PUBLIC & $filter; - } elseif ('~' === $k[1]) { - $type |= self::EXCLUDE_VIRTUAL & $filter; - } elseif ('+' === $k[1]) { - $type |= self::EXCLUDE_DYNAMIC & $filter; - } elseif ('*' === $k[1]) { - $type |= self::EXCLUDE_PROTECTED & $filter; - } else { - $type |= self::EXCLUDE_PRIVATE & $filter; - } - - if ((self::EXCLUDE_STRICT & $filter) ? $type === $filter : $type) { - unset($a[$k]); - ++$count; - } - } - - return $a; - } - - public static function castPhpIncompleteClass(\__PHP_Incomplete_Class $c, array $a, Stub $stub, bool $isNested): array - { - if (isset($a['__PHP_Incomplete_Class_Name'])) { - $stub->class .= '('.$a['__PHP_Incomplete_Class_Name'].')'; - unset($a['__PHP_Incomplete_Class_Name']); - } - - return $a; - } -} diff --git a/source/vendor/symfony/var-dumper/Caster/ClassStub.php b/source/vendor/symfony/var-dumper/Caster/ClassStub.php deleted file mode 100644 index 48f8483..0000000 --- a/source/vendor/symfony/var-dumper/Caster/ClassStub.php +++ /dev/null @@ -1,106 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Represents a PHP class identifier. - * - * @author Nicolas Grekas - */ -class ClassStub extends ConstStub -{ - /** - * @param string $identifier A PHP identifier, e.g. a class, method, interface, etc. name - * @param callable $callable The callable targeted by the identifier when it is ambiguous or not a real PHP identifier - */ - public function __construct(string $identifier, $callable = null) - { - $this->value = $identifier; - - try { - if (null !== $callable) { - if ($callable instanceof \Closure) { - $r = new \ReflectionFunction($callable); - } elseif (\is_object($callable)) { - $r = [$callable, '__invoke']; - } elseif (\is_array($callable)) { - $r = $callable; - } elseif (false !== $i = strpos($callable, '::')) { - $r = [substr($callable, 0, $i), substr($callable, 2 + $i)]; - } else { - $r = new \ReflectionFunction($callable); - } - } elseif (0 < $i = strpos($identifier, '::') ?: strpos($identifier, '->')) { - $r = [substr($identifier, 0, $i), substr($identifier, 2 + $i)]; - } else { - $r = new \ReflectionClass($identifier); - } - - if (\is_array($r)) { - try { - $r = new \ReflectionMethod($r[0], $r[1]); - } catch (\ReflectionException $e) { - $r = new \ReflectionClass($r[0]); - } - } - - if (str_contains($identifier, "@anonymous\0")) { - $this->value = $identifier = preg_replace_callback('/[a-zA-Z_\x7f-\xff][\\\\a-zA-Z0-9_\x7f-\xff]*+@anonymous\x00.*?\.php(?:0x?|:[0-9]++\$)[0-9a-fA-F]++/', function ($m) { - return class_exists($m[0], false) ? (get_parent_class($m[0]) ?: key(class_implements($m[0])) ?: 'class').'@anonymous' : $m[0]; - }, $identifier); - } - - if (null !== $callable && $r instanceof \ReflectionFunctionAbstract) { - $s = ReflectionCaster::castFunctionAbstract($r, [], new Stub(), true, Caster::EXCLUDE_VERBOSE); - $s = ReflectionCaster::getSignature($s); - - if (str_ends_with($identifier, '()')) { - $this->value = substr_replace($identifier, $s, -2); - } else { - $this->value .= $s; - } - } - } catch (\ReflectionException $e) { - return; - } finally { - if (0 < $i = strrpos($this->value, '\\')) { - $this->attr['ellipsis'] = \strlen($this->value) - $i; - $this->attr['ellipsis-type'] = 'class'; - $this->attr['ellipsis-tail'] = 1; - } - } - - if ($f = $r->getFileName()) { - $this->attr['file'] = $f; - $this->attr['line'] = $r->getStartLine(); - } - } - - public static function wrapCallable($callable) - { - if (\is_object($callable) || !\is_callable($callable)) { - return $callable; - } - - if (!\is_array($callable)) { - $callable = new static($callable, $callable); - } elseif (\is_string($callable[0])) { - $callable[0] = new static($callable[0], $callable); - } else { - $callable[1] = new static($callable[1], $callable); - } - - return $callable; - } -} diff --git a/source/vendor/symfony/var-dumper/Caster/ConstStub.php b/source/vendor/symfony/var-dumper/Caster/ConstStub.php deleted file mode 100644 index 8b01797..0000000 --- a/source/vendor/symfony/var-dumper/Caster/ConstStub.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Represents a PHP constant and its value. - * - * @author Nicolas Grekas - */ -class ConstStub extends Stub -{ - public function __construct(string $name, $value = null) - { - $this->class = $name; - $this->value = 1 < \func_num_args() ? $value : $name; - } - - /** - * @return string - */ - public function __toString() - { - return (string) $this->value; - } -} diff --git a/source/vendor/symfony/var-dumper/Caster/CutArrayStub.php b/source/vendor/symfony/var-dumper/Caster/CutArrayStub.php deleted file mode 100644 index 0e4fb36..0000000 --- a/source/vendor/symfony/var-dumper/Caster/CutArrayStub.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -/** - * Represents a cut array. - * - * @author Nicolas Grekas - */ -class CutArrayStub extends CutStub -{ - public $preservedSubset; - - public function __construct(array $value, array $preservedKeys) - { - parent::__construct($value); - - $this->preservedSubset = array_intersect_key($value, array_flip($preservedKeys)); - $this->cut -= \count($this->preservedSubset); - } -} diff --git a/source/vendor/symfony/var-dumper/Caster/CutStub.php b/source/vendor/symfony/var-dumper/Caster/CutStub.php deleted file mode 100644 index 464c6db..0000000 --- a/source/vendor/symfony/var-dumper/Caster/CutStub.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Represents the main properties of a PHP variable, pre-casted by a caster. - * - * @author Nicolas Grekas - */ -class CutStub extends Stub -{ - public function __construct($value) - { - $this->value = $value; - - switch (\gettype($value)) { - case 'object': - $this->type = self::TYPE_OBJECT; - $this->class = \get_class($value); - - if ($value instanceof \Closure) { - ReflectionCaster::castClosure($value, [], $this, true, Caster::EXCLUDE_VERBOSE); - } - - $this->cut = -1; - break; - - case 'array': - $this->type = self::TYPE_ARRAY; - $this->class = self::ARRAY_ASSOC; - $this->cut = $this->value = \count($value); - break; - - case 'resource': - case 'unknown type': - case 'resource (closed)': - $this->type = self::TYPE_RESOURCE; - $this->handle = (int) $value; - if ('Unknown' === $this->class = @get_resource_type($value)) { - $this->class = 'Closed'; - } - $this->cut = -1; - break; - - case 'string': - $this->type = self::TYPE_STRING; - $this->class = preg_match('//u', $value) ? self::STRING_UTF8 : self::STRING_BINARY; - $this->cut = self::STRING_BINARY === $this->class ? \strlen($value) : mb_strlen($value, 'UTF-8'); - $this->value = ''; - break; - } - } -} diff --git a/source/vendor/symfony/var-dumper/Caster/DOMCaster.php b/source/vendor/symfony/var-dumper/Caster/DOMCaster.php deleted file mode 100644 index 5f2b9cd..0000000 --- a/source/vendor/symfony/var-dumper/Caster/DOMCaster.php +++ /dev/null @@ -1,304 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts DOM related classes to array representation. - * - * @author Nicolas Grekas - * - * @final since Symfony 4.4 - */ -class DOMCaster -{ - private const ERROR_CODES = [ - \DOM_PHP_ERR => 'DOM_PHP_ERR', - \DOM_INDEX_SIZE_ERR => 'DOM_INDEX_SIZE_ERR', - \DOMSTRING_SIZE_ERR => 'DOMSTRING_SIZE_ERR', - \DOM_HIERARCHY_REQUEST_ERR => 'DOM_HIERARCHY_REQUEST_ERR', - \DOM_WRONG_DOCUMENT_ERR => 'DOM_WRONG_DOCUMENT_ERR', - \DOM_INVALID_CHARACTER_ERR => 'DOM_INVALID_CHARACTER_ERR', - \DOM_NO_DATA_ALLOWED_ERR => 'DOM_NO_DATA_ALLOWED_ERR', - \DOM_NO_MODIFICATION_ALLOWED_ERR => 'DOM_NO_MODIFICATION_ALLOWED_ERR', - \DOM_NOT_FOUND_ERR => 'DOM_NOT_FOUND_ERR', - \DOM_NOT_SUPPORTED_ERR => 'DOM_NOT_SUPPORTED_ERR', - \DOM_INUSE_ATTRIBUTE_ERR => 'DOM_INUSE_ATTRIBUTE_ERR', - \DOM_INVALID_STATE_ERR => 'DOM_INVALID_STATE_ERR', - \DOM_SYNTAX_ERR => 'DOM_SYNTAX_ERR', - \DOM_INVALID_MODIFICATION_ERR => 'DOM_INVALID_MODIFICATION_ERR', - \DOM_NAMESPACE_ERR => 'DOM_NAMESPACE_ERR', - \DOM_INVALID_ACCESS_ERR => 'DOM_INVALID_ACCESS_ERR', - \DOM_VALIDATION_ERR => 'DOM_VALIDATION_ERR', - ]; - - private const NODE_TYPES = [ - \XML_ELEMENT_NODE => 'XML_ELEMENT_NODE', - \XML_ATTRIBUTE_NODE => 'XML_ATTRIBUTE_NODE', - \XML_TEXT_NODE => 'XML_TEXT_NODE', - \XML_CDATA_SECTION_NODE => 'XML_CDATA_SECTION_NODE', - \XML_ENTITY_REF_NODE => 'XML_ENTITY_REF_NODE', - \XML_ENTITY_NODE => 'XML_ENTITY_NODE', - \XML_PI_NODE => 'XML_PI_NODE', - \XML_COMMENT_NODE => 'XML_COMMENT_NODE', - \XML_DOCUMENT_NODE => 'XML_DOCUMENT_NODE', - \XML_DOCUMENT_TYPE_NODE => 'XML_DOCUMENT_TYPE_NODE', - \XML_DOCUMENT_FRAG_NODE => 'XML_DOCUMENT_FRAG_NODE', - \XML_NOTATION_NODE => 'XML_NOTATION_NODE', - \XML_HTML_DOCUMENT_NODE => 'XML_HTML_DOCUMENT_NODE', - \XML_DTD_NODE => 'XML_DTD_NODE', - \XML_ELEMENT_DECL_NODE => 'XML_ELEMENT_DECL_NODE', - \XML_ATTRIBUTE_DECL_NODE => 'XML_ATTRIBUTE_DECL_NODE', - \XML_ENTITY_DECL_NODE => 'XML_ENTITY_DECL_NODE', - \XML_NAMESPACE_DECL_NODE => 'XML_NAMESPACE_DECL_NODE', - ]; - - public static function castException(\DOMException $e, array $a, Stub $stub, $isNested) - { - $k = Caster::PREFIX_PROTECTED.'code'; - if (isset($a[$k], self::ERROR_CODES[$a[$k]])) { - $a[$k] = new ConstStub(self::ERROR_CODES[$a[$k]], $a[$k]); - } - - return $a; - } - - public static function castLength($dom, array $a, Stub $stub, $isNested) - { - $a += [ - 'length' => $dom->length, - ]; - - return $a; - } - - public static function castImplementation($dom, array $a, Stub $stub, $isNested) - { - $a += [ - Caster::PREFIX_VIRTUAL.'Core' => '1.0', - Caster::PREFIX_VIRTUAL.'XML' => '2.0', - ]; - - return $a; - } - - public static function castNode(\DOMNode $dom, array $a, Stub $stub, $isNested) - { - $a += [ - 'nodeName' => $dom->nodeName, - 'nodeValue' => new CutStub($dom->nodeValue), - 'nodeType' => new ConstStub(self::NODE_TYPES[$dom->nodeType], $dom->nodeType), - 'parentNode' => new CutStub($dom->parentNode), - 'childNodes' => $dom->childNodes, - 'firstChild' => new CutStub($dom->firstChild), - 'lastChild' => new CutStub($dom->lastChild), - 'previousSibling' => new CutStub($dom->previousSibling), - 'nextSibling' => new CutStub($dom->nextSibling), - 'attributes' => $dom->attributes, - 'ownerDocument' => new CutStub($dom->ownerDocument), - 'namespaceURI' => $dom->namespaceURI, - 'prefix' => $dom->prefix, - 'localName' => $dom->localName, - 'baseURI' => $dom->baseURI ? new LinkStub($dom->baseURI) : $dom->baseURI, - 'textContent' => new CutStub($dom->textContent), - ]; - - return $a; - } - - public static function castNameSpaceNode(\DOMNameSpaceNode $dom, array $a, Stub $stub, $isNested) - { - $a += [ - 'nodeName' => $dom->nodeName, - 'nodeValue' => new CutStub($dom->nodeValue), - 'nodeType' => new ConstStub(self::NODE_TYPES[$dom->nodeType], $dom->nodeType), - 'prefix' => $dom->prefix, - 'localName' => $dom->localName, - 'namespaceURI' => $dom->namespaceURI, - 'ownerDocument' => new CutStub($dom->ownerDocument), - 'parentNode' => new CutStub($dom->parentNode), - ]; - - return $a; - } - - public static function castDocument(\DOMDocument $dom, array $a, Stub $stub, $isNested, $filter = 0) - { - $a += [ - 'doctype' => $dom->doctype, - 'implementation' => $dom->implementation, - 'documentElement' => new CutStub($dom->documentElement), - 'actualEncoding' => $dom->actualEncoding, - 'encoding' => $dom->encoding, - 'xmlEncoding' => $dom->xmlEncoding, - 'standalone' => $dom->standalone, - 'xmlStandalone' => $dom->xmlStandalone, - 'version' => $dom->version, - 'xmlVersion' => $dom->xmlVersion, - 'strictErrorChecking' => $dom->strictErrorChecking, - 'documentURI' => $dom->documentURI ? new LinkStub($dom->documentURI) : $dom->documentURI, - 'config' => $dom->config, - 'formatOutput' => $dom->formatOutput, - 'validateOnParse' => $dom->validateOnParse, - 'resolveExternals' => $dom->resolveExternals, - 'preserveWhiteSpace' => $dom->preserveWhiteSpace, - 'recover' => $dom->recover, - 'substituteEntities' => $dom->substituteEntities, - ]; - - if (!($filter & Caster::EXCLUDE_VERBOSE)) { - $formatOutput = $dom->formatOutput; - $dom->formatOutput = true; - $a += [Caster::PREFIX_VIRTUAL.'xml' => $dom->saveXML()]; - $dom->formatOutput = $formatOutput; - } - - return $a; - } - - public static function castCharacterData(\DOMCharacterData $dom, array $a, Stub $stub, $isNested) - { - $a += [ - 'data' => $dom->data, - 'length' => $dom->length, - ]; - - return $a; - } - - public static function castAttr(\DOMAttr $dom, array $a, Stub $stub, $isNested) - { - $a += [ - 'name' => $dom->name, - 'specified' => $dom->specified, - 'value' => $dom->value, - 'ownerElement' => $dom->ownerElement, - 'schemaTypeInfo' => $dom->schemaTypeInfo, - ]; - - return $a; - } - - public static function castElement(\DOMElement $dom, array $a, Stub $stub, $isNested) - { - $a += [ - 'tagName' => $dom->tagName, - 'schemaTypeInfo' => $dom->schemaTypeInfo, - ]; - - return $a; - } - - public static function castText(\DOMText $dom, array $a, Stub $stub, $isNested) - { - $a += [ - 'wholeText' => $dom->wholeText, - ]; - - return $a; - } - - public static function castTypeinfo(\DOMTypeinfo $dom, array $a, Stub $stub, $isNested) - { - $a += [ - 'typeName' => $dom->typeName, - 'typeNamespace' => $dom->typeNamespace, - ]; - - return $a; - } - - public static function castDomError(\DOMDomError $dom, array $a, Stub $stub, $isNested) - { - $a += [ - 'severity' => $dom->severity, - 'message' => $dom->message, - 'type' => $dom->type, - 'relatedException' => $dom->relatedException, - 'related_data' => $dom->related_data, - 'location' => $dom->location, - ]; - - return $a; - } - - public static function castLocator(\DOMLocator $dom, array $a, Stub $stub, $isNested) - { - $a += [ - 'lineNumber' => $dom->lineNumber, - 'columnNumber' => $dom->columnNumber, - 'offset' => $dom->offset, - 'relatedNode' => $dom->relatedNode, - 'uri' => $dom->uri ? new LinkStub($dom->uri, $dom->lineNumber) : $dom->uri, - ]; - - return $a; - } - - public static function castDocumentType(\DOMDocumentType $dom, array $a, Stub $stub, $isNested) - { - $a += [ - 'name' => $dom->name, - 'entities' => $dom->entities, - 'notations' => $dom->notations, - 'publicId' => $dom->publicId, - 'systemId' => $dom->systemId, - 'internalSubset' => $dom->internalSubset, - ]; - - return $a; - } - - public static function castNotation(\DOMNotation $dom, array $a, Stub $stub, $isNested) - { - $a += [ - 'publicId' => $dom->publicId, - 'systemId' => $dom->systemId, - ]; - - return $a; - } - - public static function castEntity(\DOMEntity $dom, array $a, Stub $stub, $isNested) - { - $a += [ - 'publicId' => $dom->publicId, - 'systemId' => $dom->systemId, - 'notationName' => $dom->notationName, - 'actualEncoding' => $dom->actualEncoding, - 'encoding' => $dom->encoding, - 'version' => $dom->version, - ]; - - return $a; - } - - public static function castProcessingInstruction(\DOMProcessingInstruction $dom, array $a, Stub $stub, $isNested) - { - $a += [ - 'target' => $dom->target, - 'data' => $dom->data, - ]; - - return $a; - } - - public static function castXPath(\DOMXPath $dom, array $a, Stub $stub, $isNested) - { - $a += [ - 'document' => $dom->document, - ]; - - return $a; - } -} diff --git a/source/vendor/symfony/var-dumper/Caster/DateCaster.php b/source/vendor/symfony/var-dumper/Caster/DateCaster.php deleted file mode 100644 index 171fbde..0000000 --- a/source/vendor/symfony/var-dumper/Caster/DateCaster.php +++ /dev/null @@ -1,128 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts DateTimeInterface related classes to array representation. - * - * @author Dany Maillard - * - * @final since Symfony 4.4 - */ -class DateCaster -{ - private const PERIOD_LIMIT = 3; - - public static function castDateTime(\DateTimeInterface $d, array $a, Stub $stub, $isNested, $filter) - { - $prefix = Caster::PREFIX_VIRTUAL; - $location = $d->getTimezone()->getLocation(); - $fromNow = (new \DateTime())->diff($d); - - $title = $d->format('l, F j, Y') - ."\n".self::formatInterval($fromNow).' from now' - .($location ? ($d->format('I') ? "\nDST On" : "\nDST Off") : '') - ; - - unset( - $a[Caster::PREFIX_DYNAMIC.'date'], - $a[Caster::PREFIX_DYNAMIC.'timezone'], - $a[Caster::PREFIX_DYNAMIC.'timezone_type'] - ); - $a[$prefix.'date'] = new ConstStub(self::formatDateTime($d, $location ? ' e (P)' : ' P'), $title); - - $stub->class .= $d->format(' @U'); - - return $a; - } - - public static function castInterval(\DateInterval $interval, array $a, Stub $stub, $isNested, $filter) - { - $now = new \DateTimeImmutable(); - $numberOfSeconds = $now->add($interval)->getTimestamp() - $now->getTimestamp(); - $title = number_format($numberOfSeconds, 0, '.', ' ').'s'; - - $i = [Caster::PREFIX_VIRTUAL.'interval' => new ConstStub(self::formatInterval($interval), $title)]; - - return $filter & Caster::EXCLUDE_VERBOSE ? $i : $i + $a; - } - - private static function formatInterval(\DateInterval $i): string - { - $format = '%R '; - - if (0 === $i->y && 0 === $i->m && ($i->h >= 24 || $i->i >= 60 || $i->s >= 60)) { - $i = date_diff($d = new \DateTime(), date_add(clone $d, $i)); // recalculate carry over points - $format .= 0 < $i->days ? '%ad ' : ''; - } else { - $format .= ($i->y ? '%yy ' : '').($i->m ? '%mm ' : '').($i->d ? '%dd ' : ''); - } - - $format .= $i->h || $i->i || $i->s || $i->f ? '%H:%I:'.self::formatSeconds($i->s, substr($i->f, 2)) : ''; - $format = '%R ' === $format ? '0s' : $format; - - return $i->format(rtrim($format)); - } - - public static function castTimeZone(\DateTimeZone $timeZone, array $a, Stub $stub, $isNested, $filter) - { - $location = $timeZone->getLocation(); - $formatted = (new \DateTime('now', $timeZone))->format($location ? 'e (P)' : 'P'); - $title = $location && \extension_loaded('intl') ? \Locale::getDisplayRegion('-'.$location['country_code']) : ''; - - $z = [Caster::PREFIX_VIRTUAL.'timezone' => new ConstStub($formatted, $title)]; - - return $filter & Caster::EXCLUDE_VERBOSE ? $z : $z + $a; - } - - public static function castPeriod(\DatePeriod $p, array $a, Stub $stub, $isNested, $filter) - { - $dates = []; - if (\PHP_VERSION_ID >= 70107) { // see https://bugs.php.net/74639 - foreach (clone $p as $i => $d) { - if (self::PERIOD_LIMIT === $i) { - $now = new \DateTimeImmutable('now', new \DateTimeZone('UTC')); - $dates[] = sprintf('%s more', ($end = $p->getEndDate()) - ? ceil(($end->format('U.u') - $d->format('U.u')) / ((int) $now->add($p->getDateInterval())->format('U.u') - (int) $now->format('U.u'))) - : $p->recurrences - $i - ); - break; - } - $dates[] = sprintf('%s) %s', $i + 1, self::formatDateTime($d)); - } - } - - $period = sprintf( - 'every %s, from %s (%s) %s', - self::formatInterval($p->getDateInterval()), - self::formatDateTime($p->getStartDate()), - $p->include_start_date ? 'included' : 'excluded', - ($end = $p->getEndDate()) ? 'to '.self::formatDateTime($end) : 'recurring '.$p->recurrences.' time/s' - ); - - $p = [Caster::PREFIX_VIRTUAL.'period' => new ConstStub($period, implode("\n", $dates))]; - - return $filter & Caster::EXCLUDE_VERBOSE ? $p : $p + $a; - } - - private static function formatDateTime(\DateTimeInterface $d, string $extra = ''): string - { - return $d->format('Y-m-d H:i:'.self::formatSeconds($d->format('s'), $d->format('u')).$extra); - } - - private static function formatSeconds(string $s, string $us): string - { - return sprintf('%02d.%s', $s, 0 === ($len = \strlen($t = rtrim($us, '0'))) ? '0' : ($len <= 3 ? str_pad($t, 3, '0') : $us)); - } -} diff --git a/source/vendor/symfony/var-dumper/Caster/DoctrineCaster.php b/source/vendor/symfony/var-dumper/Caster/DoctrineCaster.php deleted file mode 100644 index 7409508..0000000 --- a/source/vendor/symfony/var-dumper/Caster/DoctrineCaster.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Doctrine\Common\Proxy\Proxy as CommonProxy; -use Doctrine\ORM\PersistentCollection; -use Doctrine\ORM\Proxy\Proxy as OrmProxy; -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts Doctrine related classes to array representation. - * - * @author Nicolas Grekas - * - * @final since Symfony 4.4 - */ -class DoctrineCaster -{ - public static function castCommonProxy(CommonProxy $proxy, array $a, Stub $stub, $isNested) - { - foreach (['__cloner__', '__initializer__'] as $k) { - if (\array_key_exists($k, $a)) { - unset($a[$k]); - ++$stub->cut; - } - } - - return $a; - } - - public static function castOrmProxy(OrmProxy $proxy, array $a, Stub $stub, $isNested) - { - foreach (['_entityPersister', '_identifier'] as $k) { - if (\array_key_exists($k = "\0Doctrine\\ORM\\Proxy\\Proxy\0".$k, $a)) { - unset($a[$k]); - ++$stub->cut; - } - } - - return $a; - } - - public static function castPersistentCollection(PersistentCollection $coll, array $a, Stub $stub, $isNested) - { - foreach (['snapshot', 'association', 'typeClass'] as $k) { - if (\array_key_exists($k = "\0Doctrine\\ORM\\PersistentCollection\0".$k, $a)) { - $a[$k] = new CutStub($a[$k]); - } - } - - return $a; - } -} diff --git a/source/vendor/symfony/var-dumper/Caster/DsCaster.php b/source/vendor/symfony/var-dumper/Caster/DsCaster.php deleted file mode 100644 index 11423c9..0000000 --- a/source/vendor/symfony/var-dumper/Caster/DsCaster.php +++ /dev/null @@ -1,70 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Ds\Collection; -use Ds\Map; -use Ds\Pair; -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts Ds extension classes to array representation. - * - * @author Jáchym Toušek - * - * @final since Symfony 4.4 - */ -class DsCaster -{ - public static function castCollection(Collection $c, array $a, Stub $stub, bool $isNested): array - { - $a[Caster::PREFIX_VIRTUAL.'count'] = $c->count(); - $a[Caster::PREFIX_VIRTUAL.'capacity'] = $c->capacity(); - - if (!$c instanceof Map) { - $a += $c->toArray(); - } - - return $a; - } - - public static function castMap(Map $c, array $a, Stub $stub, bool $isNested): array - { - foreach ($c as $k => $v) { - $a[] = new DsPairStub($k, $v); - } - - return $a; - } - - public static function castPair(Pair $c, array $a, Stub $stub, bool $isNested): array - { - foreach ($c->toArray() as $k => $v) { - $a[Caster::PREFIX_VIRTUAL.$k] = $v; - } - - return $a; - } - - public static function castPairStub(DsPairStub $c, array $a, Stub $stub, bool $isNested): array - { - if ($isNested) { - $stub->class = Pair::class; - $stub->value = null; - $stub->handle = 0; - - $a = $c->value; - } - - return $a; - } -} diff --git a/source/vendor/symfony/var-dumper/Caster/DsPairStub.php b/source/vendor/symfony/var-dumper/Caster/DsPairStub.php deleted file mode 100644 index a1dcc15..0000000 --- a/source/vendor/symfony/var-dumper/Caster/DsPairStub.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * @author Nicolas Grekas - */ -class DsPairStub extends Stub -{ - public function __construct($key, $value) - { - $this->value = [ - Caster::PREFIX_VIRTUAL.'key' => $key, - Caster::PREFIX_VIRTUAL.'value' => $value, - ]; - } -} diff --git a/source/vendor/symfony/var-dumper/Caster/EnumStub.php b/source/vendor/symfony/var-dumper/Caster/EnumStub.php deleted file mode 100644 index 7a4e98a..0000000 --- a/source/vendor/symfony/var-dumper/Caster/EnumStub.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Represents an enumeration of values. - * - * @author Nicolas Grekas - */ -class EnumStub extends Stub -{ - public $dumpKeys = true; - - public function __construct(array $values, bool $dumpKeys = true) - { - $this->value = $values; - $this->dumpKeys = $dumpKeys; - } -} diff --git a/source/vendor/symfony/var-dumper/Caster/ExceptionCaster.php b/source/vendor/symfony/var-dumper/Caster/ExceptionCaster.php deleted file mode 100644 index c29b7df..0000000 --- a/source/vendor/symfony/var-dumper/Caster/ExceptionCaster.php +++ /dev/null @@ -1,382 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\ErrorHandler\Exception\SilencedErrorContext; -use Symfony\Component\VarDumper\Cloner\Stub; -use Symfony\Component\VarDumper\Exception\ThrowingCasterException; - -/** - * Casts common Exception classes to array representation. - * - * @author Nicolas Grekas - * - * @final since Symfony 4.4 - */ -class ExceptionCaster -{ - public static $srcContext = 1; - public static $traceArgs = true; - public static $errorTypes = [ - \E_DEPRECATED => 'E_DEPRECATED', - \E_USER_DEPRECATED => 'E_USER_DEPRECATED', - \E_RECOVERABLE_ERROR => 'E_RECOVERABLE_ERROR', - \E_ERROR => 'E_ERROR', - \E_WARNING => 'E_WARNING', - \E_PARSE => 'E_PARSE', - \E_NOTICE => 'E_NOTICE', - \E_CORE_ERROR => 'E_CORE_ERROR', - \E_CORE_WARNING => 'E_CORE_WARNING', - \E_COMPILE_ERROR => 'E_COMPILE_ERROR', - \E_COMPILE_WARNING => 'E_COMPILE_WARNING', - \E_USER_ERROR => 'E_USER_ERROR', - \E_USER_WARNING => 'E_USER_WARNING', - \E_USER_NOTICE => 'E_USER_NOTICE', - \E_STRICT => 'E_STRICT', - ]; - - private static $framesCache = []; - - public static function castError(\Error $e, array $a, Stub $stub, $isNested, $filter = 0) - { - return self::filterExceptionArray($stub->class, $a, "\0Error\0", $filter); - } - - public static function castException(\Exception $e, array $a, Stub $stub, $isNested, $filter = 0) - { - return self::filterExceptionArray($stub->class, $a, "\0Exception\0", $filter); - } - - public static function castErrorException(\ErrorException $e, array $a, Stub $stub, $isNested) - { - if (isset($a[$s = Caster::PREFIX_PROTECTED.'severity'], self::$errorTypes[$a[$s]])) { - $a[$s] = new ConstStub(self::$errorTypes[$a[$s]], $a[$s]); - } - - return $a; - } - - public static function castThrowingCasterException(ThrowingCasterException $e, array $a, Stub $stub, $isNested) - { - $trace = Caster::PREFIX_VIRTUAL.'trace'; - $prefix = Caster::PREFIX_PROTECTED; - $xPrefix = "\0Exception\0"; - - if (isset($a[$xPrefix.'previous'], $a[$trace]) && $a[$xPrefix.'previous'] instanceof \Exception) { - $b = (array) $a[$xPrefix.'previous']; - $class = get_debug_type($a[$xPrefix.'previous']); - self::traceUnshift($b[$xPrefix.'trace'], $class, $b[$prefix.'file'], $b[$prefix.'line']); - $a[$trace] = new TraceStub($b[$xPrefix.'trace'], false, 0, -\count($a[$trace]->value)); - } - - unset($a[$xPrefix.'previous'], $a[$prefix.'code'], $a[$prefix.'file'], $a[$prefix.'line']); - - return $a; - } - - public static function castSilencedErrorContext(SilencedErrorContext $e, array $a, Stub $stub, $isNested) - { - $sPrefix = "\0".SilencedErrorContext::class."\0"; - - if (!isset($a[$s = $sPrefix.'severity'])) { - return $a; - } - - if (isset(self::$errorTypes[$a[$s]])) { - $a[$s] = new ConstStub(self::$errorTypes[$a[$s]], $a[$s]); - } - - $trace = [[ - 'file' => $a[$sPrefix.'file'], - 'line' => $a[$sPrefix.'line'], - ]]; - - if (isset($a[$sPrefix.'trace'])) { - $trace = array_merge($trace, $a[$sPrefix.'trace']); - } - - unset($a[$sPrefix.'file'], $a[$sPrefix.'line'], $a[$sPrefix.'trace']); - $a[Caster::PREFIX_VIRTUAL.'trace'] = new TraceStub($trace, self::$traceArgs); - - return $a; - } - - public static function castTraceStub(TraceStub $trace, array $a, Stub $stub, $isNested) - { - if (!$isNested) { - return $a; - } - $stub->class = ''; - $stub->handle = 0; - $frames = $trace->value; - $prefix = Caster::PREFIX_VIRTUAL; - - $a = []; - $j = \count($frames); - if (0 > $i = $trace->sliceOffset) { - $i = max(0, $j + $i); - } - if (!isset($trace->value[$i])) { - return []; - } - $lastCall = isset($frames[$i]['function']) ? (isset($frames[$i]['class']) ? $frames[0]['class'].$frames[$i]['type'] : '').$frames[$i]['function'].'()' : ''; - $frames[] = ['function' => '']; - $collapse = false; - - for ($j += $trace->numberingOffset - $i++; isset($frames[$i]); ++$i, --$j) { - $f = $frames[$i]; - $call = isset($f['function']) ? (isset($f['class']) ? $f['class'].$f['type'] : '').$f['function'] : '???'; - - $frame = new FrameStub( - [ - 'object' => $f['object'] ?? null, - 'class' => $f['class'] ?? null, - 'type' => $f['type'] ?? null, - 'function' => $f['function'] ?? null, - ] + $frames[$i - 1], - false, - true - ); - $f = self::castFrameStub($frame, [], $frame, true); - if (isset($f[$prefix.'src'])) { - foreach ($f[$prefix.'src']->value as $label => $frame) { - if (str_starts_with($label, "\0~collapse=0")) { - if ($collapse) { - $label = substr_replace($label, '1', 11, 1); - } else { - $collapse = true; - } - } - $label = substr_replace($label, "title=Stack level $j.&", 2, 0); - } - $f = $frames[$i - 1]; - if ($trace->keepArgs && !empty($f['args']) && $frame instanceof EnumStub) { - $frame->value['arguments'] = new ArgsStub($f['args'], $f['function'] ?? null, $f['class'] ?? null); - } - } elseif ('???' !== $lastCall) { - $label = new ClassStub($lastCall); - if (isset($label->attr['ellipsis'])) { - $label->attr['ellipsis'] += 2; - $label = substr_replace($prefix, "ellipsis-type=class&ellipsis={$label->attr['ellipsis']}&ellipsis-tail=1&title=Stack level $j.", 2, 0).$label->value.'()'; - } else { - $label = substr_replace($prefix, "title=Stack level $j.", 2, 0).$label->value.'()'; - } - } else { - $label = substr_replace($prefix, "title=Stack level $j.", 2, 0).$lastCall; - } - $a[substr_replace($label, sprintf('separator=%s&', $frame instanceof EnumStub ? ' ' : ':'), 2, 0)] = $frame; - - $lastCall = $call; - } - if (null !== $trace->sliceLength) { - $a = \array_slice($a, 0, $trace->sliceLength, true); - } - - return $a; - } - - public static function castFrameStub(FrameStub $frame, array $a, Stub $stub, $isNested) - { - if (!$isNested) { - return $a; - } - $f = $frame->value; - $prefix = Caster::PREFIX_VIRTUAL; - - if (isset($f['file'], $f['line'])) { - $cacheKey = $f; - unset($cacheKey['object'], $cacheKey['args']); - $cacheKey[] = self::$srcContext; - $cacheKey = implode('-', $cacheKey); - - if (isset(self::$framesCache[$cacheKey])) { - $a[$prefix.'src'] = self::$framesCache[$cacheKey]; - } else { - if (preg_match('/\((\d+)\)(?:\([\da-f]{32}\))? : (?:eval\(\)\'d code|runtime-created function)$/', $f['file'], $match)) { - $f['file'] = substr($f['file'], 0, -\strlen($match[0])); - $f['line'] = (int) $match[1]; - } - $src = $f['line']; - $srcKey = $f['file']; - $ellipsis = new LinkStub($srcKey, 0); - $srcAttr = 'collapse='.(int) $ellipsis->inVendor; - $ellipsisTail = $ellipsis->attr['ellipsis-tail'] ?? 0; - $ellipsis = $ellipsis->attr['ellipsis'] ?? 0; - - if (file_exists($f['file']) && 0 <= self::$srcContext) { - if (!empty($f['class']) && (is_subclass_of($f['class'], 'Twig\Template') || is_subclass_of($f['class'], 'Twig_Template')) && method_exists($f['class'], 'getDebugInfo')) { - $template = $f['object'] ?? unserialize(sprintf('O:%d:"%s":0:{}', \strlen($f['class']), $f['class'])); - - $ellipsis = 0; - $templateSrc = method_exists($template, 'getSourceContext') ? $template->getSourceContext()->getCode() : (method_exists($template, 'getSource') ? $template->getSource() : ''); - $templateInfo = $template->getDebugInfo(); - if (isset($templateInfo[$f['line']])) { - if (!method_exists($template, 'getSourceContext') || !file_exists($templatePath = $template->getSourceContext()->getPath())) { - $templatePath = null; - } - if ($templateSrc) { - $src = self::extractSource($templateSrc, $templateInfo[$f['line']], self::$srcContext, 'twig', $templatePath, $f); - $srcKey = ($templatePath ?: $template->getTemplateName()).':'.$templateInfo[$f['line']]; - } - } - } - if ($srcKey == $f['file']) { - $src = self::extractSource(file_get_contents($f['file']), $f['line'], self::$srcContext, 'php', $f['file'], $f); - $srcKey .= ':'.$f['line']; - if ($ellipsis) { - $ellipsis += 1 + \strlen($f['line']); - } - } - $srcAttr .= sprintf('&separator= &file=%s&line=%d', rawurlencode($f['file']), $f['line']); - } else { - $srcAttr .= '&separator=:'; - } - $srcAttr .= $ellipsis ? '&ellipsis-type=path&ellipsis='.$ellipsis.'&ellipsis-tail='.$ellipsisTail : ''; - self::$framesCache[$cacheKey] = $a[$prefix.'src'] = new EnumStub(["\0~$srcAttr\0$srcKey" => $src]); - } - } - - unset($a[$prefix.'args'], $a[$prefix.'line'], $a[$prefix.'file']); - if ($frame->inTraceStub) { - unset($a[$prefix.'class'], $a[$prefix.'type'], $a[$prefix.'function']); - } - foreach ($a as $k => $v) { - if (!$v) { - unset($a[$k]); - } - } - if ($frame->keepArgs && !empty($f['args'])) { - $a[$prefix.'arguments'] = new ArgsStub($f['args'], $f['function'], $f['class']); - } - - return $a; - } - - private static function filterExceptionArray(string $xClass, array $a, string $xPrefix, int $filter): array - { - if (isset($a[$xPrefix.'trace'])) { - $trace = $a[$xPrefix.'trace']; - unset($a[$xPrefix.'trace']); // Ensures the trace is always last - } else { - $trace = []; - } - - if (!($filter & Caster::EXCLUDE_VERBOSE) && $trace) { - if (isset($a[Caster::PREFIX_PROTECTED.'file'], $a[Caster::PREFIX_PROTECTED.'line'])) { - self::traceUnshift($trace, $xClass, $a[Caster::PREFIX_PROTECTED.'file'], $a[Caster::PREFIX_PROTECTED.'line']); - } - $a[Caster::PREFIX_VIRTUAL.'trace'] = new TraceStub($trace, self::$traceArgs); - } - if (empty($a[$xPrefix.'previous'])) { - unset($a[$xPrefix.'previous']); - } - unset($a[$xPrefix.'string'], $a[Caster::PREFIX_DYNAMIC.'xdebug_message'], $a[Caster::PREFIX_DYNAMIC.'__destructorException']); - - if (isset($a[Caster::PREFIX_PROTECTED.'message']) && str_contains($a[Caster::PREFIX_PROTECTED.'message'], "@anonymous\0")) { - $a[Caster::PREFIX_PROTECTED.'message'] = preg_replace_callback('/[a-zA-Z_\x7f-\xff][\\\\a-zA-Z0-9_\x7f-\xff]*+@anonymous\x00.*?\.php(?:0x?|:[0-9]++\$)[0-9a-fA-F]++/', function ($m) { - return class_exists($m[0], false) ? (get_parent_class($m[0]) ?: key(class_implements($m[0])) ?: 'class').'@anonymous' : $m[0]; - }, $a[Caster::PREFIX_PROTECTED.'message']); - } - - if (isset($a[Caster::PREFIX_PROTECTED.'file'], $a[Caster::PREFIX_PROTECTED.'line'])) { - $a[Caster::PREFIX_PROTECTED.'file'] = new LinkStub($a[Caster::PREFIX_PROTECTED.'file'], $a[Caster::PREFIX_PROTECTED.'line']); - } - - return $a; - } - - private static function traceUnshift(array &$trace, ?string $class, string $file, int $line): void - { - if (isset($trace[0]['file'], $trace[0]['line']) && $trace[0]['file'] === $file && $trace[0]['line'] === $line) { - return; - } - array_unshift($trace, [ - 'function' => $class ? 'new '.$class : null, - 'file' => $file, - 'line' => $line, - ]); - } - - private static function extractSource(string $srcLines, int $line, int $srcContext, string $lang, ?string $file, array $frame): EnumStub - { - $srcLines = explode("\n", $srcLines); - $src = []; - - for ($i = $line - 1 - $srcContext; $i <= $line - 1 + $srcContext; ++$i) { - $src[] = ($srcLines[$i] ?? '')."\n"; - } - - if ($frame['function'] ?? false) { - $stub = new CutStub(new \stdClass()); - $stub->class = (isset($frame['class']) ? $frame['class'].$frame['type'] : '').$frame['function']; - $stub->type = Stub::TYPE_OBJECT; - $stub->attr['cut_hash'] = true; - $stub->attr['file'] = $frame['file']; - $stub->attr['line'] = $frame['line']; - - try { - $caller = isset($frame['class']) ? new \ReflectionMethod($frame['class'], $frame['function']) : new \ReflectionFunction($frame['function']); - $stub->class .= ReflectionCaster::getSignature(ReflectionCaster::castFunctionAbstract($caller, [], $stub, true, Caster::EXCLUDE_VERBOSE)); - - if ($f = $caller->getFileName()) { - $stub->attr['file'] = $f; - $stub->attr['line'] = $caller->getStartLine(); - } - } catch (\ReflectionException $e) { - // ignore fake class/function - } - - $srcLines = ["\0~separator=\0" => $stub]; - } else { - $stub = null; - $srcLines = []; - } - - $ltrim = 0; - do { - $pad = null; - for ($i = $srcContext << 1; $i >= 0; --$i) { - if (isset($src[$i][$ltrim]) && "\r" !== ($c = $src[$i][$ltrim]) && "\n" !== $c) { - if (null === $pad) { - $pad = $c; - } - if ((' ' !== $c && "\t" !== $c) || $pad !== $c) { - break; - } - } - } - ++$ltrim; - } while (0 > $i && null !== $pad); - - --$ltrim; - - foreach ($src as $i => $c) { - if ($ltrim) { - $c = isset($c[$ltrim]) && "\r" !== $c[$ltrim] ? substr($c, $ltrim) : ltrim($c, " \t"); - } - $c = substr($c, 0, -1); - if ($i !== $srcContext) { - $c = new ConstStub('default', $c); - } else { - $c = new ConstStub($c, $stub ? 'in '.$stub->class : ''); - if (null !== $file) { - $c->attr['file'] = $file; - $c->attr['line'] = $line; - } - } - $c->attr['lang'] = $lang; - $srcLines[sprintf("\0~separator=› &%d\0", $i + $line - $srcContext)] = $c; - } - - return new EnumStub($srcLines); - } -} diff --git a/source/vendor/symfony/var-dumper/Caster/FrameStub.php b/source/vendor/symfony/var-dumper/Caster/FrameStub.php deleted file mode 100644 index 8786755..0000000 --- a/source/vendor/symfony/var-dumper/Caster/FrameStub.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -/** - * Represents a single backtrace frame as returned by debug_backtrace() or Exception->getTrace(). - * - * @author Nicolas Grekas - */ -class FrameStub extends EnumStub -{ - public $keepArgs; - public $inTraceStub; - - public function __construct(array $frame, bool $keepArgs = true, bool $inTraceStub = false) - { - $this->value = $frame; - $this->keepArgs = $keepArgs; - $this->inTraceStub = $inTraceStub; - } -} diff --git a/source/vendor/symfony/var-dumper/Caster/GmpCaster.php b/source/vendor/symfony/var-dumper/Caster/GmpCaster.php deleted file mode 100644 index 2b20e15..0000000 --- a/source/vendor/symfony/var-dumper/Caster/GmpCaster.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts GMP objects to array representation. - * - * @author Hamza Amrouche - * @author Nicolas Grekas - * - * @final since Symfony 4.4 - */ -class GmpCaster -{ - public static function castGmp(\GMP $gmp, array $a, Stub $stub, $isNested, $filter): array - { - $a[Caster::PREFIX_VIRTUAL.'value'] = new ConstStub(gmp_strval($gmp), gmp_strval($gmp)); - - return $a; - } -} diff --git a/source/vendor/symfony/var-dumper/Caster/ImagineCaster.php b/source/vendor/symfony/var-dumper/Caster/ImagineCaster.php deleted file mode 100644 index d1289da..0000000 --- a/source/vendor/symfony/var-dumper/Caster/ImagineCaster.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Imagine\Image\ImageInterface; -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * @author Grégoire Pineau - */ -final class ImagineCaster -{ - public static function castImage(ImageInterface $c, array $a, Stub $stub, bool $isNested): array - { - $imgData = $c->get('png'); - if (\strlen($imgData) > 1 * 1000 * 1000) { - $a += [ - Caster::PREFIX_VIRTUAL.'image' => new ConstStub($c->getSize()), - ]; - } else { - $a += [ - Caster::PREFIX_VIRTUAL.'image' => new ImgStub($imgData, 'image/png', $c->getSize()), - ]; - } - - return $a; - } -} diff --git a/source/vendor/symfony/var-dumper/Caster/ImgStub.php b/source/vendor/symfony/var-dumper/Caster/ImgStub.php deleted file mode 100644 index 05789fe..0000000 --- a/source/vendor/symfony/var-dumper/Caster/ImgStub.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -/** - * @author Grégoire Pineau - */ -class ImgStub extends ConstStub -{ - public function __construct(string $data, string $contentType, string $size) - { - $this->value = ''; - $this->attr['img-data'] = $data; - $this->attr['img-size'] = $size; - $this->attr['content-type'] = $contentType; - } -} diff --git a/source/vendor/symfony/var-dumper/Caster/IntlCaster.php b/source/vendor/symfony/var-dumper/Caster/IntlCaster.php deleted file mode 100644 index d7099cb..0000000 --- a/source/vendor/symfony/var-dumper/Caster/IntlCaster.php +++ /dev/null @@ -1,172 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * @author Nicolas Grekas - * @author Jan Schädlich - * - * @final since Symfony 4.4 - */ -class IntlCaster -{ - public static function castMessageFormatter(\MessageFormatter $c, array $a, Stub $stub, $isNested) - { - $a += [ - Caster::PREFIX_VIRTUAL.'locale' => $c->getLocale(), - Caster::PREFIX_VIRTUAL.'pattern' => $c->getPattern(), - ]; - - return self::castError($c, $a); - } - - public static function castNumberFormatter(\NumberFormatter $c, array $a, Stub $stub, $isNested, $filter = 0) - { - $a += [ - Caster::PREFIX_VIRTUAL.'locale' => $c->getLocale(), - Caster::PREFIX_VIRTUAL.'pattern' => $c->getPattern(), - ]; - - if ($filter & Caster::EXCLUDE_VERBOSE) { - $stub->cut += 3; - - return self::castError($c, $a); - } - - $a += [ - Caster::PREFIX_VIRTUAL.'attributes' => new EnumStub( - [ - 'PARSE_INT_ONLY' => $c->getAttribute(\NumberFormatter::PARSE_INT_ONLY), - 'GROUPING_USED' => $c->getAttribute(\NumberFormatter::GROUPING_USED), - 'DECIMAL_ALWAYS_SHOWN' => $c->getAttribute(\NumberFormatter::DECIMAL_ALWAYS_SHOWN), - 'MAX_INTEGER_DIGITS' => $c->getAttribute(\NumberFormatter::MAX_INTEGER_DIGITS), - 'MIN_INTEGER_DIGITS' => $c->getAttribute(\NumberFormatter::MIN_INTEGER_DIGITS), - 'INTEGER_DIGITS' => $c->getAttribute(\NumberFormatter::INTEGER_DIGITS), - 'MAX_FRACTION_DIGITS' => $c->getAttribute(\NumberFormatter::MAX_FRACTION_DIGITS), - 'MIN_FRACTION_DIGITS' => $c->getAttribute(\NumberFormatter::MIN_FRACTION_DIGITS), - 'FRACTION_DIGITS' => $c->getAttribute(\NumberFormatter::FRACTION_DIGITS), - 'MULTIPLIER' => $c->getAttribute(\NumberFormatter::MULTIPLIER), - 'GROUPING_SIZE' => $c->getAttribute(\NumberFormatter::GROUPING_SIZE), - 'ROUNDING_MODE' => $c->getAttribute(\NumberFormatter::ROUNDING_MODE), - 'ROUNDING_INCREMENT' => $c->getAttribute(\NumberFormatter::ROUNDING_INCREMENT), - 'FORMAT_WIDTH' => $c->getAttribute(\NumberFormatter::FORMAT_WIDTH), - 'PADDING_POSITION' => $c->getAttribute(\NumberFormatter::PADDING_POSITION), - 'SECONDARY_GROUPING_SIZE' => $c->getAttribute(\NumberFormatter::SECONDARY_GROUPING_SIZE), - 'SIGNIFICANT_DIGITS_USED' => $c->getAttribute(\NumberFormatter::SIGNIFICANT_DIGITS_USED), - 'MIN_SIGNIFICANT_DIGITS' => $c->getAttribute(\NumberFormatter::MIN_SIGNIFICANT_DIGITS), - 'MAX_SIGNIFICANT_DIGITS' => $c->getAttribute(\NumberFormatter::MAX_SIGNIFICANT_DIGITS), - 'LENIENT_PARSE' => $c->getAttribute(\NumberFormatter::LENIENT_PARSE), - ] - ), - Caster::PREFIX_VIRTUAL.'text_attributes' => new EnumStub( - [ - 'POSITIVE_PREFIX' => $c->getTextAttribute(\NumberFormatter::POSITIVE_PREFIX), - 'POSITIVE_SUFFIX' => $c->getTextAttribute(\NumberFormatter::POSITIVE_SUFFIX), - 'NEGATIVE_PREFIX' => $c->getTextAttribute(\NumberFormatter::NEGATIVE_PREFIX), - 'NEGATIVE_SUFFIX' => $c->getTextAttribute(\NumberFormatter::NEGATIVE_SUFFIX), - 'PADDING_CHARACTER' => $c->getTextAttribute(\NumberFormatter::PADDING_CHARACTER), - 'CURRENCY_CODE' => $c->getTextAttribute(\NumberFormatter::CURRENCY_CODE), - 'DEFAULT_RULESET' => $c->getTextAttribute(\NumberFormatter::DEFAULT_RULESET), - 'PUBLIC_RULESETS' => $c->getTextAttribute(\NumberFormatter::PUBLIC_RULESETS), - ] - ), - Caster::PREFIX_VIRTUAL.'symbols' => new EnumStub( - [ - 'DECIMAL_SEPARATOR_SYMBOL' => $c->getSymbol(\NumberFormatter::DECIMAL_SEPARATOR_SYMBOL), - 'GROUPING_SEPARATOR_SYMBOL' => $c->getSymbol(\NumberFormatter::GROUPING_SEPARATOR_SYMBOL), - 'PATTERN_SEPARATOR_SYMBOL' => $c->getSymbol(\NumberFormatter::PATTERN_SEPARATOR_SYMBOL), - 'PERCENT_SYMBOL' => $c->getSymbol(\NumberFormatter::PERCENT_SYMBOL), - 'ZERO_DIGIT_SYMBOL' => $c->getSymbol(\NumberFormatter::ZERO_DIGIT_SYMBOL), - 'DIGIT_SYMBOL' => $c->getSymbol(\NumberFormatter::DIGIT_SYMBOL), - 'MINUS_SIGN_SYMBOL' => $c->getSymbol(\NumberFormatter::MINUS_SIGN_SYMBOL), - 'PLUS_SIGN_SYMBOL' => $c->getSymbol(\NumberFormatter::PLUS_SIGN_SYMBOL), - 'CURRENCY_SYMBOL' => $c->getSymbol(\NumberFormatter::CURRENCY_SYMBOL), - 'INTL_CURRENCY_SYMBOL' => $c->getSymbol(\NumberFormatter::INTL_CURRENCY_SYMBOL), - 'MONETARY_SEPARATOR_SYMBOL' => $c->getSymbol(\NumberFormatter::MONETARY_SEPARATOR_SYMBOL), - 'EXPONENTIAL_SYMBOL' => $c->getSymbol(\NumberFormatter::EXPONENTIAL_SYMBOL), - 'PERMILL_SYMBOL' => $c->getSymbol(\NumberFormatter::PERMILL_SYMBOL), - 'PAD_ESCAPE_SYMBOL' => $c->getSymbol(\NumberFormatter::PAD_ESCAPE_SYMBOL), - 'INFINITY_SYMBOL' => $c->getSymbol(\NumberFormatter::INFINITY_SYMBOL), - 'NAN_SYMBOL' => $c->getSymbol(\NumberFormatter::NAN_SYMBOL), - 'SIGNIFICANT_DIGIT_SYMBOL' => $c->getSymbol(\NumberFormatter::SIGNIFICANT_DIGIT_SYMBOL), - 'MONETARY_GROUPING_SEPARATOR_SYMBOL' => $c->getSymbol(\NumberFormatter::MONETARY_GROUPING_SEPARATOR_SYMBOL), - ] - ), - ]; - - return self::castError($c, $a); - } - - public static function castIntlTimeZone(\IntlTimeZone $c, array $a, Stub $stub, $isNested) - { - $a += [ - Caster::PREFIX_VIRTUAL.'display_name' => $c->getDisplayName(), - Caster::PREFIX_VIRTUAL.'id' => $c->getID(), - Caster::PREFIX_VIRTUAL.'raw_offset' => $c->getRawOffset(), - ]; - - if ($c->useDaylightTime()) { - $a += [ - Caster::PREFIX_VIRTUAL.'dst_savings' => $c->getDSTSavings(), - ]; - } - - return self::castError($c, $a); - } - - public static function castIntlCalendar(\IntlCalendar $c, array $a, Stub $stub, $isNested, $filter = 0) - { - $a += [ - Caster::PREFIX_VIRTUAL.'type' => $c->getType(), - Caster::PREFIX_VIRTUAL.'first_day_of_week' => $c->getFirstDayOfWeek(), - Caster::PREFIX_VIRTUAL.'minimal_days_in_first_week' => $c->getMinimalDaysInFirstWeek(), - Caster::PREFIX_VIRTUAL.'repeated_wall_time_option' => $c->getRepeatedWallTimeOption(), - Caster::PREFIX_VIRTUAL.'skipped_wall_time_option' => $c->getSkippedWallTimeOption(), - Caster::PREFIX_VIRTUAL.'time' => $c->getTime(), - Caster::PREFIX_VIRTUAL.'in_daylight_time' => $c->inDaylightTime(), - Caster::PREFIX_VIRTUAL.'is_lenient' => $c->isLenient(), - Caster::PREFIX_VIRTUAL.'time_zone' => ($filter & Caster::EXCLUDE_VERBOSE) ? new CutStub($c->getTimeZone()) : $c->getTimeZone(), - ]; - - return self::castError($c, $a); - } - - public static function castIntlDateFormatter(\IntlDateFormatter $c, array $a, Stub $stub, $isNested, $filter = 0) - { - $a += [ - Caster::PREFIX_VIRTUAL.'locale' => $c->getLocale(), - Caster::PREFIX_VIRTUAL.'pattern' => $c->getPattern(), - Caster::PREFIX_VIRTUAL.'calendar' => $c->getCalendar(), - Caster::PREFIX_VIRTUAL.'time_zone_id' => $c->getTimeZoneId(), - Caster::PREFIX_VIRTUAL.'time_type' => $c->getTimeType(), - Caster::PREFIX_VIRTUAL.'date_type' => $c->getDateType(), - Caster::PREFIX_VIRTUAL.'calendar_object' => ($filter & Caster::EXCLUDE_VERBOSE) ? new CutStub($c->getCalendarObject()) : $c->getCalendarObject(), - Caster::PREFIX_VIRTUAL.'time_zone' => ($filter & Caster::EXCLUDE_VERBOSE) ? new CutStub($c->getTimeZone()) : $c->getTimeZone(), - ]; - - return self::castError($c, $a); - } - - private static function castError($c, array $a): array - { - if ($errorCode = $c->getErrorCode()) { - $a += [ - Caster::PREFIX_VIRTUAL.'error_code' => $errorCode, - Caster::PREFIX_VIRTUAL.'error_message' => $c->getErrorMessage(), - ]; - } - - return $a; - } -} diff --git a/source/vendor/symfony/var-dumper/Caster/LinkStub.php b/source/vendor/symfony/var-dumper/Caster/LinkStub.php deleted file mode 100644 index c619d9d..0000000 --- a/source/vendor/symfony/var-dumper/Caster/LinkStub.php +++ /dev/null @@ -1,108 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -/** - * Represents a file or a URL. - * - * @author Nicolas Grekas - */ -class LinkStub extends ConstStub -{ - public $inVendor = false; - - private static $vendorRoots; - private static $composerRoots; - - public function __construct(string $label, int $line = 0, string $href = null) - { - $this->value = $label; - - if (null === $href) { - $href = $label; - } - if (!\is_string($href)) { - return; - } - if (str_starts_with($href, 'file://')) { - if ($href === $label) { - $label = substr($label, 7); - } - $href = substr($href, 7); - } elseif (str_contains($href, '://')) { - $this->attr['href'] = $href; - - return; - } - if (!file_exists($href)) { - return; - } - if ($line) { - $this->attr['line'] = $line; - } - if ($label !== $this->attr['file'] = realpath($href) ?: $href) { - return; - } - if ($composerRoot = $this->getComposerRoot($href, $this->inVendor)) { - $this->attr['ellipsis'] = \strlen($href) - \strlen($composerRoot) + 1; - $this->attr['ellipsis-type'] = 'path'; - $this->attr['ellipsis-tail'] = 1 + ($this->inVendor ? 2 + \strlen(implode('', \array_slice(explode(\DIRECTORY_SEPARATOR, substr($href, 1 - $this->attr['ellipsis'])), 0, 2))) : 0); - } elseif (3 < \count($ellipsis = explode(\DIRECTORY_SEPARATOR, $href))) { - $this->attr['ellipsis'] = 2 + \strlen(implode('', \array_slice($ellipsis, -2))); - $this->attr['ellipsis-type'] = 'path'; - $this->attr['ellipsis-tail'] = 1; - } - } - - private function getComposerRoot(string $file, bool &$inVendor) - { - if (null === self::$vendorRoots) { - self::$vendorRoots = []; - - foreach (get_declared_classes() as $class) { - if ('C' === $class[0] && str_starts_with($class, 'ComposerAutoloaderInit')) { - $r = new \ReflectionClass($class); - $v = \dirname($r->getFileName(), 2); - if (file_exists($v.'/composer/installed.json')) { - self::$vendorRoots[] = $v.\DIRECTORY_SEPARATOR; - } - } - } - } - $inVendor = false; - - if (isset(self::$composerRoots[$dir = \dirname($file)])) { - return self::$composerRoots[$dir]; - } - - foreach (self::$vendorRoots as $root) { - if ($inVendor = str_starts_with($file, $root)) { - return $root; - } - } - - $parent = $dir; - while (!@file_exists($parent.'/composer.json')) { - if (!@file_exists($parent)) { - // open_basedir restriction in effect - break; - } - if ($parent === \dirname($parent)) { - return self::$composerRoots[$dir] = false; - } - - $parent = \dirname($parent); - } - - return self::$composerRoots[$dir] = $parent.\DIRECTORY_SEPARATOR; - } -} diff --git a/source/vendor/symfony/var-dumper/Caster/MemcachedCaster.php b/source/vendor/symfony/var-dumper/Caster/MemcachedCaster.php deleted file mode 100644 index 696cef1..0000000 --- a/source/vendor/symfony/var-dumper/Caster/MemcachedCaster.php +++ /dev/null @@ -1,81 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * @author Jan Schädlich - * - * @final since Symfony 4.4 - */ -class MemcachedCaster -{ - private static $optionConstants; - private static $defaultOptions; - - public static function castMemcached(\Memcached $c, array $a, Stub $stub, $isNested) - { - $a += [ - Caster::PREFIX_VIRTUAL.'servers' => $c->getServerList(), - Caster::PREFIX_VIRTUAL.'options' => new EnumStub( - self::getNonDefaultOptions($c) - ), - ]; - - return $a; - } - - private static function getNonDefaultOptions(\Memcached $c): array - { - self::$defaultOptions = self::$defaultOptions ?? self::discoverDefaultOptions(); - self::$optionConstants = self::$optionConstants ?? self::getOptionConstants(); - - $nonDefaultOptions = []; - foreach (self::$optionConstants as $constantKey => $value) { - if (self::$defaultOptions[$constantKey] !== $option = $c->getOption($value)) { - $nonDefaultOptions[$constantKey] = $option; - } - } - - return $nonDefaultOptions; - } - - private static function discoverDefaultOptions(): array - { - $defaultMemcached = new \Memcached(); - $defaultMemcached->addServer('127.0.0.1', 11211); - - $defaultOptions = []; - self::$optionConstants = self::$optionConstants ?? self::getOptionConstants(); - - foreach (self::$optionConstants as $constantKey => $value) { - $defaultOptions[$constantKey] = $defaultMemcached->getOption($value); - } - - return $defaultOptions; - } - - private static function getOptionConstants(): array - { - $reflectedMemcached = new \ReflectionClass(\Memcached::class); - - $optionConstants = []; - foreach ($reflectedMemcached->getConstants() as $constantKey => $value) { - if (str_starts_with($constantKey, 'OPT_')) { - $optionConstants[$constantKey] = $value; - } - } - - return $optionConstants; - } -} diff --git a/source/vendor/symfony/var-dumper/Caster/PdoCaster.php b/source/vendor/symfony/var-dumper/Caster/PdoCaster.php deleted file mode 100644 index 47b0a62..0000000 --- a/source/vendor/symfony/var-dumper/Caster/PdoCaster.php +++ /dev/null @@ -1,122 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts PDO related classes to array representation. - * - * @author Nicolas Grekas - * - * @final since Symfony 4.4 - */ -class PdoCaster -{ - private const PDO_ATTRIBUTES = [ - 'CASE' => [ - \PDO::CASE_LOWER => 'LOWER', - \PDO::CASE_NATURAL => 'NATURAL', - \PDO::CASE_UPPER => 'UPPER', - ], - 'ERRMODE' => [ - \PDO::ERRMODE_SILENT => 'SILENT', - \PDO::ERRMODE_WARNING => 'WARNING', - \PDO::ERRMODE_EXCEPTION => 'EXCEPTION', - ], - 'TIMEOUT', - 'PREFETCH', - 'AUTOCOMMIT', - 'PERSISTENT', - 'DRIVER_NAME', - 'SERVER_INFO', - 'ORACLE_NULLS' => [ - \PDO::NULL_NATURAL => 'NATURAL', - \PDO::NULL_EMPTY_STRING => 'EMPTY_STRING', - \PDO::NULL_TO_STRING => 'TO_STRING', - ], - 'CLIENT_VERSION', - 'SERVER_VERSION', - 'STATEMENT_CLASS', - 'EMULATE_PREPARES', - 'CONNECTION_STATUS', - 'STRINGIFY_FETCHES', - 'DEFAULT_FETCH_MODE' => [ - \PDO::FETCH_ASSOC => 'ASSOC', - \PDO::FETCH_BOTH => 'BOTH', - \PDO::FETCH_LAZY => 'LAZY', - \PDO::FETCH_NUM => 'NUM', - \PDO::FETCH_OBJ => 'OBJ', - ], - ]; - - public static function castPdo(\PDO $c, array $a, Stub $stub, $isNested) - { - $attr = []; - $errmode = $c->getAttribute(\PDO::ATTR_ERRMODE); - $c->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); - - foreach (self::PDO_ATTRIBUTES as $k => $v) { - if (!isset($k[0])) { - $k = $v; - $v = []; - } - - try { - $attr[$k] = 'ERRMODE' === $k ? $errmode : $c->getAttribute(\constant('PDO::ATTR_'.$k)); - if ($v && isset($v[$attr[$k]])) { - $attr[$k] = new ConstStub($v[$attr[$k]], $attr[$k]); - } - } catch (\Exception $e) { - } - } - if (isset($attr[$k = 'STATEMENT_CLASS'][1])) { - if ($attr[$k][1]) { - $attr[$k][1] = new ArgsStub($attr[$k][1], '__construct', $attr[$k][0]); - } - $attr[$k][0] = new ClassStub($attr[$k][0]); - } - - $prefix = Caster::PREFIX_VIRTUAL; - $a += [ - $prefix.'inTransaction' => method_exists($c, 'inTransaction'), - $prefix.'errorInfo' => $c->errorInfo(), - $prefix.'attributes' => new EnumStub($attr), - ]; - - if ($a[$prefix.'inTransaction']) { - $a[$prefix.'inTransaction'] = $c->inTransaction(); - } else { - unset($a[$prefix.'inTransaction']); - } - - if (!isset($a[$prefix.'errorInfo'][1], $a[$prefix.'errorInfo'][2])) { - unset($a[$prefix.'errorInfo']); - } - - $c->setAttribute(\PDO::ATTR_ERRMODE, $errmode); - - return $a; - } - - public static function castPdoStatement(\PDOStatement $c, array $a, Stub $stub, $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - $a[$prefix.'errorInfo'] = $c->errorInfo(); - - if (!isset($a[$prefix.'errorInfo'][1], $a[$prefix.'errorInfo'][2])) { - unset($a[$prefix.'errorInfo']); - } - - return $a; - } -} diff --git a/source/vendor/symfony/var-dumper/Caster/PgSqlCaster.php b/source/vendor/symfony/var-dumper/Caster/PgSqlCaster.php deleted file mode 100644 index 3097c51..0000000 --- a/source/vendor/symfony/var-dumper/Caster/PgSqlCaster.php +++ /dev/null @@ -1,156 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts pqsql resources to array representation. - * - * @author Nicolas Grekas - * - * @final since Symfony 4.4 - */ -class PgSqlCaster -{ - private const PARAM_CODES = [ - 'server_encoding', - 'client_encoding', - 'is_superuser', - 'session_authorization', - 'DateStyle', - 'TimeZone', - 'IntervalStyle', - 'integer_datetimes', - 'application_name', - 'standard_conforming_strings', - ]; - - private const TRANSACTION_STATUS = [ - \PGSQL_TRANSACTION_IDLE => 'PGSQL_TRANSACTION_IDLE', - \PGSQL_TRANSACTION_ACTIVE => 'PGSQL_TRANSACTION_ACTIVE', - \PGSQL_TRANSACTION_INTRANS => 'PGSQL_TRANSACTION_INTRANS', - \PGSQL_TRANSACTION_INERROR => 'PGSQL_TRANSACTION_INERROR', - \PGSQL_TRANSACTION_UNKNOWN => 'PGSQL_TRANSACTION_UNKNOWN', - ]; - - private const RESULT_STATUS = [ - \PGSQL_EMPTY_QUERY => 'PGSQL_EMPTY_QUERY', - \PGSQL_COMMAND_OK => 'PGSQL_COMMAND_OK', - \PGSQL_TUPLES_OK => 'PGSQL_TUPLES_OK', - \PGSQL_COPY_OUT => 'PGSQL_COPY_OUT', - \PGSQL_COPY_IN => 'PGSQL_COPY_IN', - \PGSQL_BAD_RESPONSE => 'PGSQL_BAD_RESPONSE', - \PGSQL_NONFATAL_ERROR => 'PGSQL_NONFATAL_ERROR', - \PGSQL_FATAL_ERROR => 'PGSQL_FATAL_ERROR', - ]; - - private const DIAG_CODES = [ - 'severity' => \PGSQL_DIAG_SEVERITY, - 'sqlstate' => \PGSQL_DIAG_SQLSTATE, - 'message' => \PGSQL_DIAG_MESSAGE_PRIMARY, - 'detail' => \PGSQL_DIAG_MESSAGE_DETAIL, - 'hint' => \PGSQL_DIAG_MESSAGE_HINT, - 'statement position' => \PGSQL_DIAG_STATEMENT_POSITION, - 'internal position' => \PGSQL_DIAG_INTERNAL_POSITION, - 'internal query' => \PGSQL_DIAG_INTERNAL_QUERY, - 'context' => \PGSQL_DIAG_CONTEXT, - 'file' => \PGSQL_DIAG_SOURCE_FILE, - 'line' => \PGSQL_DIAG_SOURCE_LINE, - 'function' => \PGSQL_DIAG_SOURCE_FUNCTION, - ]; - - public static function castLargeObject($lo, array $a, Stub $stub, $isNested) - { - $a['seek position'] = pg_lo_tell($lo); - - return $a; - } - - public static function castLink($link, array $a, Stub $stub, $isNested) - { - $a['status'] = pg_connection_status($link); - $a['status'] = new ConstStub(\PGSQL_CONNECTION_OK === $a['status'] ? 'PGSQL_CONNECTION_OK' : 'PGSQL_CONNECTION_BAD', $a['status']); - $a['busy'] = pg_connection_busy($link); - - $a['transaction'] = pg_transaction_status($link); - if (isset(self::TRANSACTION_STATUS[$a['transaction']])) { - $a['transaction'] = new ConstStub(self::TRANSACTION_STATUS[$a['transaction']], $a['transaction']); - } - - $a['pid'] = pg_get_pid($link); - $a['last error'] = pg_last_error($link); - $a['last notice'] = pg_last_notice($link); - $a['host'] = pg_host($link); - $a['port'] = pg_port($link); - $a['dbname'] = pg_dbname($link); - $a['options'] = pg_options($link); - $a['version'] = pg_version($link); - - foreach (self::PARAM_CODES as $v) { - if (false !== $s = pg_parameter_status($link, $v)) { - $a['param'][$v] = $s; - } - } - - $a['param']['client_encoding'] = pg_client_encoding($link); - $a['param'] = new EnumStub($a['param']); - - return $a; - } - - public static function castResult($result, array $a, Stub $stub, $isNested) - { - $a['num rows'] = pg_num_rows($result); - $a['status'] = pg_result_status($result); - if (isset(self::RESULT_STATUS[$a['status']])) { - $a['status'] = new ConstStub(self::RESULT_STATUS[$a['status']], $a['status']); - } - $a['command-completion tag'] = pg_result_status($result, \PGSQL_STATUS_STRING); - - if (-1 === $a['num rows']) { - foreach (self::DIAG_CODES as $k => $v) { - $a['error'][$k] = pg_result_error_field($result, $v); - } - } - - $a['affected rows'] = pg_affected_rows($result); - $a['last OID'] = pg_last_oid($result); - - $fields = pg_num_fields($result); - - for ($i = 0; $i < $fields; ++$i) { - $field = [ - 'name' => pg_field_name($result, $i), - 'table' => sprintf('%s (OID: %s)', pg_field_table($result, $i), pg_field_table($result, $i, true)), - 'type' => sprintf('%s (OID: %s)', pg_field_type($result, $i), pg_field_type_oid($result, $i)), - 'nullable' => (bool) pg_field_is_null($result, $i), - 'storage' => pg_field_size($result, $i).' bytes', - 'display' => pg_field_prtlen($result, $i).' chars', - ]; - if (' (OID: )' === $field['table']) { - $field['table'] = null; - } - if ('-1 bytes' === $field['storage']) { - $field['storage'] = 'variable size'; - } elseif ('1 bytes' === $field['storage']) { - $field['storage'] = '1 byte'; - } - if ('1 chars' === $field['display']) { - $field['display'] = '1 char'; - } - $a['fields'][] = new EnumStub($field); - } - - return $a; - } -} diff --git a/source/vendor/symfony/var-dumper/Caster/ProxyManagerCaster.php b/source/vendor/symfony/var-dumper/Caster/ProxyManagerCaster.php deleted file mode 100644 index ec02f81..0000000 --- a/source/vendor/symfony/var-dumper/Caster/ProxyManagerCaster.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use ProxyManager\Proxy\ProxyInterface; -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * @author Nicolas Grekas - * - * @final since Symfony 4.4 - */ -class ProxyManagerCaster -{ - public static function castProxy(ProxyInterface $c, array $a, Stub $stub, $isNested) - { - if ($parent = get_parent_class($c)) { - $stub->class .= ' - '.$parent; - } - $stub->class .= '@proxy'; - - return $a; - } -} diff --git a/source/vendor/symfony/var-dumper/Caster/RedisCaster.php b/source/vendor/symfony/var-dumper/Caster/RedisCaster.php deleted file mode 100644 index bd877cb..0000000 --- a/source/vendor/symfony/var-dumper/Caster/RedisCaster.php +++ /dev/null @@ -1,152 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts Redis class from ext-redis to array representation. - * - * @author Nicolas Grekas - * - * @final since Symfony 4.4 - */ -class RedisCaster -{ - private const SERIALIZERS = [ - \Redis::SERIALIZER_NONE => 'NONE', - \Redis::SERIALIZER_PHP => 'PHP', - 2 => 'IGBINARY', // Optional Redis::SERIALIZER_IGBINARY - ]; - - private const MODES = [ - \Redis::ATOMIC => 'ATOMIC', - \Redis::MULTI => 'MULTI', - \Redis::PIPELINE => 'PIPELINE', - ]; - - private const COMPRESSION_MODES = [ - 0 => 'NONE', // Redis::COMPRESSION_NONE - 1 => 'LZF', // Redis::COMPRESSION_LZF - ]; - - private const FAILOVER_OPTIONS = [ - \RedisCluster::FAILOVER_NONE => 'NONE', - \RedisCluster::FAILOVER_ERROR => 'ERROR', - \RedisCluster::FAILOVER_DISTRIBUTE => 'DISTRIBUTE', - \RedisCluster::FAILOVER_DISTRIBUTE_SLAVES => 'DISTRIBUTE_SLAVES', - ]; - - public static function castRedis(\Redis $c, array $a, Stub $stub, $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - if (!$connected = $c->isConnected()) { - return $a + [ - $prefix.'isConnected' => $connected, - ]; - } - - $mode = $c->getMode(); - - return $a + [ - $prefix.'isConnected' => $connected, - $prefix.'host' => $c->getHost(), - $prefix.'port' => $c->getPort(), - $prefix.'auth' => $c->getAuth(), - $prefix.'mode' => isset(self::MODES[$mode]) ? new ConstStub(self::MODES[$mode], $mode) : $mode, - $prefix.'dbNum' => $c->getDbNum(), - $prefix.'timeout' => $c->getTimeout(), - $prefix.'lastError' => $c->getLastError(), - $prefix.'persistentId' => $c->getPersistentID(), - $prefix.'options' => self::getRedisOptions($c), - ]; - } - - public static function castRedisArray(\RedisArray $c, array $a, Stub $stub, $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - return $a + [ - $prefix.'hosts' => $c->_hosts(), - $prefix.'function' => ClassStub::wrapCallable($c->_function()), - $prefix.'lastError' => $c->getLastError(), - $prefix.'options' => self::getRedisOptions($c), - ]; - } - - public static function castRedisCluster(\RedisCluster $c, array $a, Stub $stub, $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - $failover = $c->getOption(\RedisCluster::OPT_SLAVE_FAILOVER); - - $a += [ - $prefix.'_masters' => $c->_masters(), - $prefix.'_redir' => $c->_redir(), - $prefix.'mode' => new ConstStub($c->getMode() ? 'MULTI' : 'ATOMIC', $c->getMode()), - $prefix.'lastError' => $c->getLastError(), - $prefix.'options' => self::getRedisOptions($c, [ - 'SLAVE_FAILOVER' => isset(self::FAILOVER_OPTIONS[$failover]) ? new ConstStub(self::FAILOVER_OPTIONS[$failover], $failover) : $failover, - ]), - ]; - - return $a; - } - - /** - * @param \Redis|\RedisArray|\RedisCluster $redis - */ - private static function getRedisOptions($redis, array $options = []): EnumStub - { - $serializer = $redis->getOption(\Redis::OPT_SERIALIZER); - if (\is_array($serializer)) { - foreach ($serializer as &$v) { - if (isset(self::SERIALIZERS[$v])) { - $v = new ConstStub(self::SERIALIZERS[$v], $v); - } - } - } elseif (isset(self::SERIALIZERS[$serializer])) { - $serializer = new ConstStub(self::SERIALIZERS[$serializer], $serializer); - } - - $compression = \defined('Redis::OPT_COMPRESSION') ? $redis->getOption(\Redis::OPT_COMPRESSION) : 0; - if (\is_array($compression)) { - foreach ($compression as &$v) { - if (isset(self::COMPRESSION_MODES[$v])) { - $v = new ConstStub(self::COMPRESSION_MODES[$v], $v); - } - } - } elseif (isset(self::COMPRESSION_MODES[$compression])) { - $compression = new ConstStub(self::COMPRESSION_MODES[$compression], $compression); - } - - $retry = \defined('Redis::OPT_SCAN') ? $redis->getOption(\Redis::OPT_SCAN) : 0; - if (\is_array($retry)) { - foreach ($retry as &$v) { - $v = new ConstStub($v ? 'RETRY' : 'NORETRY', $v); - } - } else { - $retry = new ConstStub($retry ? 'RETRY' : 'NORETRY', $retry); - } - - $options += [ - 'TCP_KEEPALIVE' => \defined('Redis::OPT_TCP_KEEPALIVE') ? $redis->getOption(\Redis::OPT_TCP_KEEPALIVE) : 0, - 'READ_TIMEOUT' => $redis->getOption(\Redis::OPT_READ_TIMEOUT), - 'COMPRESSION' => $compression, - 'SERIALIZER' => $serializer, - 'PREFIX' => $redis->getOption(\Redis::OPT_PREFIX), - 'SCAN' => $retry, - ]; - - return new EnumStub($options); - } -} diff --git a/source/vendor/symfony/var-dumper/Caster/ReflectionCaster.php b/source/vendor/symfony/var-dumper/Caster/ReflectionCaster.php deleted file mode 100644 index 077df62..0000000 --- a/source/vendor/symfony/var-dumper/Caster/ReflectionCaster.php +++ /dev/null @@ -1,401 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts Reflector related classes to array representation. - * - * @author Nicolas Grekas - * - * @final since Symfony 4.4 - */ -class ReflectionCaster -{ - public const UNSET_CLOSURE_FILE_INFO = ['Closure' => __CLASS__.'::unsetClosureFileInfo']; - - private const EXTRA_MAP = [ - 'docComment' => 'getDocComment', - 'extension' => 'getExtensionName', - 'isDisabled' => 'isDisabled', - 'isDeprecated' => 'isDeprecated', - 'isInternal' => 'isInternal', - 'isUserDefined' => 'isUserDefined', - 'isGenerator' => 'isGenerator', - 'isVariadic' => 'isVariadic', - ]; - - public static function castClosure(\Closure $c, array $a, Stub $stub, $isNested, $filter = 0) - { - $prefix = Caster::PREFIX_VIRTUAL; - $c = new \ReflectionFunction($c); - - $a = static::castFunctionAbstract($c, $a, $stub, $isNested, $filter); - - if (!str_contains($c->name, '{closure}')) { - $stub->class = isset($a[$prefix.'class']) ? $a[$prefix.'class']->value.'::'.$c->name : $c->name; - unset($a[$prefix.'class']); - } - unset($a[$prefix.'extra']); - - $stub->class .= self::getSignature($a); - - if ($f = $c->getFileName()) { - $stub->attr['file'] = $f; - $stub->attr['line'] = $c->getStartLine(); - } - - unset($a[$prefix.'parameters']); - - if ($filter & Caster::EXCLUDE_VERBOSE) { - $stub->cut += ($c->getFileName() ? 2 : 0) + \count($a); - - return []; - } - - if ($f) { - $a[$prefix.'file'] = new LinkStub($f, $c->getStartLine()); - $a[$prefix.'line'] = $c->getStartLine().' to '.$c->getEndLine(); - } - - return $a; - } - - public static function unsetClosureFileInfo(\Closure $c, array $a) - { - unset($a[Caster::PREFIX_VIRTUAL.'file'], $a[Caster::PREFIX_VIRTUAL.'line']); - - return $a; - } - - public static function castGenerator(\Generator $c, array $a, Stub $stub, $isNested) - { - // Cannot create ReflectionGenerator based on a terminated Generator - try { - $reflectionGenerator = new \ReflectionGenerator($c); - } catch (\Exception $e) { - $a[Caster::PREFIX_VIRTUAL.'closed'] = true; - - return $a; - } - - return self::castReflectionGenerator($reflectionGenerator, $a, $stub, $isNested); - } - - public static function castType(\ReflectionType $c, array $a, Stub $stub, $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - if ($c instanceof \ReflectionNamedType || \PHP_VERSION_ID < 80000) { - $a += [ - $prefix.'name' => $c instanceof \ReflectionNamedType ? $c->getName() : (string) $c, - $prefix.'allowsNull' => $c->allowsNull(), - $prefix.'isBuiltin' => $c->isBuiltin(), - ]; - } elseif ($c instanceof \ReflectionUnionType || $c instanceof \ReflectionIntersectionType) { - $a[$prefix.'allowsNull'] = $c->allowsNull(); - self::addMap($a, $c, [ - 'types' => 'getTypes', - ]); - } else { - $a[$prefix.'allowsNull'] = $c->allowsNull(); - } - - return $a; - } - - public static function castReflectionGenerator(\ReflectionGenerator $c, array $a, Stub $stub, $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - if ($c->getThis()) { - $a[$prefix.'this'] = new CutStub($c->getThis()); - } - $function = $c->getFunction(); - $frame = [ - 'class' => $function->class ?? null, - 'type' => isset($function->class) ? ($function->isStatic() ? '::' : '->') : null, - 'function' => $function->name, - 'file' => $c->getExecutingFile(), - 'line' => $c->getExecutingLine(), - ]; - if ($trace = $c->getTrace(\DEBUG_BACKTRACE_IGNORE_ARGS)) { - $function = new \ReflectionGenerator($c->getExecutingGenerator()); - array_unshift($trace, [ - 'function' => 'yield', - 'file' => $function->getExecutingFile(), - 'line' => $function->getExecutingLine() - 1, - ]); - $trace[] = $frame; - $a[$prefix.'trace'] = new TraceStub($trace, false, 0, -1, -1); - } else { - $function = new FrameStub($frame, false, true); - $function = ExceptionCaster::castFrameStub($function, [], $function, true); - $a[$prefix.'executing'] = $function[$prefix.'src']; - } - - $a[Caster::PREFIX_VIRTUAL.'closed'] = false; - - return $a; - } - - public static function castClass(\ReflectionClass $c, array $a, Stub $stub, $isNested, $filter = 0) - { - $prefix = Caster::PREFIX_VIRTUAL; - - if ($n = \Reflection::getModifierNames($c->getModifiers())) { - $a[$prefix.'modifiers'] = implode(' ', $n); - } - - self::addMap($a, $c, [ - 'extends' => 'getParentClass', - 'implements' => 'getInterfaceNames', - 'constants' => 'getConstants', - ]); - - foreach ($c->getProperties() as $n) { - $a[$prefix.'properties'][$n->name] = $n; - } - - foreach ($c->getMethods() as $n) { - $a[$prefix.'methods'][$n->name] = $n; - } - - if (!($filter & Caster::EXCLUDE_VERBOSE) && !$isNested) { - self::addExtra($a, $c); - } - - return $a; - } - - public static function castFunctionAbstract(\ReflectionFunctionAbstract $c, array $a, Stub $stub, $isNested, $filter = 0) - { - $prefix = Caster::PREFIX_VIRTUAL; - - self::addMap($a, $c, [ - 'returnsReference' => 'returnsReference', - 'returnType' => 'getReturnType', - 'class' => 'getClosureScopeClass', - 'this' => 'getClosureThis', - ]); - - if (isset($a[$prefix.'returnType'])) { - $v = $a[$prefix.'returnType']; - $v = $v instanceof \ReflectionNamedType ? $v->getName() : (string) $v; - $a[$prefix.'returnType'] = new ClassStub($a[$prefix.'returnType'] instanceof \ReflectionNamedType && $a[$prefix.'returnType']->allowsNull() && 'mixed' !== $v ? '?'.$v : $v, [class_exists($v, false) || interface_exists($v, false) || trait_exists($v, false) ? $v : '', '']); - } - if (isset($a[$prefix.'class'])) { - $a[$prefix.'class'] = new ClassStub($a[$prefix.'class']); - } - if (isset($a[$prefix.'this'])) { - $a[$prefix.'this'] = new CutStub($a[$prefix.'this']); - } - - foreach ($c->getParameters() as $v) { - $k = '$'.$v->name; - if ($v->isVariadic()) { - $k = '...'.$k; - } - if ($v->isPassedByReference()) { - $k = '&'.$k; - } - $a[$prefix.'parameters'][$k] = $v; - } - if (isset($a[$prefix.'parameters'])) { - $a[$prefix.'parameters'] = new EnumStub($a[$prefix.'parameters']); - } - - if (!($filter & Caster::EXCLUDE_VERBOSE) && $v = $c->getStaticVariables()) { - foreach ($v as $k => &$v) { - if (\is_object($v)) { - $a[$prefix.'use']['$'.$k] = new CutStub($v); - } else { - $a[$prefix.'use']['$'.$k] = &$v; - } - } - unset($v); - $a[$prefix.'use'] = new EnumStub($a[$prefix.'use']); - } - - if (!($filter & Caster::EXCLUDE_VERBOSE) && !$isNested) { - self::addExtra($a, $c); - } - - return $a; - } - - public static function castMethod(\ReflectionMethod $c, array $a, Stub $stub, $isNested) - { - $a[Caster::PREFIX_VIRTUAL.'modifiers'] = implode(' ', \Reflection::getModifierNames($c->getModifiers())); - - return $a; - } - - public static function castParameter(\ReflectionParameter $c, array $a, Stub $stub, $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - self::addMap($a, $c, [ - 'position' => 'getPosition', - 'isVariadic' => 'isVariadic', - 'byReference' => 'isPassedByReference', - 'allowsNull' => 'allowsNull', - ]); - - if ($v = $c->getType()) { - $a[$prefix.'typeHint'] = $v instanceof \ReflectionNamedType ? $v->getName() : (string) $v; - } - - if (isset($a[$prefix.'typeHint'])) { - $v = $a[$prefix.'typeHint']; - $a[$prefix.'typeHint'] = new ClassStub($v, [class_exists($v, false) || interface_exists($v, false) || trait_exists($v, false) ? $v : '', '']); - } else { - unset($a[$prefix.'allowsNull']); - } - - try { - $a[$prefix.'default'] = $v = $c->getDefaultValue(); - if ($c->isDefaultValueConstant()) { - $a[$prefix.'default'] = new ConstStub($c->getDefaultValueConstantName(), $v); - } - if (null === $v) { - unset($a[$prefix.'allowsNull']); - } - } catch (\ReflectionException $e) { - } - - return $a; - } - - public static function castProperty(\ReflectionProperty $c, array $a, Stub $stub, $isNested) - { - $a[Caster::PREFIX_VIRTUAL.'modifiers'] = implode(' ', \Reflection::getModifierNames($c->getModifiers())); - self::addExtra($a, $c); - - return $a; - } - - public static function castReference(\ReflectionReference $c, array $a, Stub $stub, $isNested) - { - $a[Caster::PREFIX_VIRTUAL.'id'] = $c->getId(); - - return $a; - } - - public static function castExtension(\ReflectionExtension $c, array $a, Stub $stub, $isNested) - { - self::addMap($a, $c, [ - 'version' => 'getVersion', - 'dependencies' => 'getDependencies', - 'iniEntries' => 'getIniEntries', - 'isPersistent' => 'isPersistent', - 'isTemporary' => 'isTemporary', - 'constants' => 'getConstants', - 'functions' => 'getFunctions', - 'classes' => 'getClasses', - ]); - - return $a; - } - - public static function castZendExtension(\ReflectionZendExtension $c, array $a, Stub $stub, $isNested) - { - self::addMap($a, $c, [ - 'version' => 'getVersion', - 'author' => 'getAuthor', - 'copyright' => 'getCopyright', - 'url' => 'getURL', - ]); - - return $a; - } - - public static function getSignature(array $a) - { - $prefix = Caster::PREFIX_VIRTUAL; - $signature = ''; - - if (isset($a[$prefix.'parameters'])) { - foreach ($a[$prefix.'parameters']->value as $k => $param) { - $signature .= ', '; - if ($type = $param->getType()) { - if (!$type instanceof \ReflectionNamedType) { - $signature .= $type.' '; - } else { - if (!$param->isOptional() && $param->allowsNull() && 'mixed' !== $type->getName()) { - $signature .= '?'; - } - $signature .= substr(strrchr('\\'.$type->getName(), '\\'), 1).' '; - } - } - $signature .= $k; - - if (!$param->isDefaultValueAvailable()) { - continue; - } - $v = $param->getDefaultValue(); - $signature .= ' = '; - - if ($param->isDefaultValueConstant()) { - $signature .= substr(strrchr('\\'.$param->getDefaultValueConstantName(), '\\'), 1); - } elseif (null === $v) { - $signature .= 'null'; - } elseif (\is_array($v)) { - $signature .= $v ? '[…'.\count($v).']' : '[]'; - } elseif (\is_string($v)) { - $signature .= 10 > \strlen($v) && !str_contains($v, '\\') ? "'{$v}'" : "'…".\strlen($v)."'"; - } elseif (\is_bool($v)) { - $signature .= $v ? 'true' : 'false'; - } else { - $signature .= $v; - } - } - } - $signature = (empty($a[$prefix.'returnsReference']) ? '' : '&').'('.substr($signature, 2).')'; - - if (isset($a[$prefix.'returnType'])) { - $signature .= ': '.substr(strrchr('\\'.$a[$prefix.'returnType'], '\\'), 1); - } - - return $signature; - } - - private static function addExtra(array &$a, \Reflector $c) - { - $x = isset($a[Caster::PREFIX_VIRTUAL.'extra']) ? $a[Caster::PREFIX_VIRTUAL.'extra']->value : []; - - if (method_exists($c, 'getFileName') && $m = $c->getFileName()) { - $x['file'] = new LinkStub($m, $c->getStartLine()); - $x['line'] = $c->getStartLine().' to '.$c->getEndLine(); - } - - self::addMap($x, $c, self::EXTRA_MAP, ''); - - if ($x) { - $a[Caster::PREFIX_VIRTUAL.'extra'] = new EnumStub($x); - } - } - - private static function addMap(array &$a, $c, array $map, string $prefix = Caster::PREFIX_VIRTUAL) - { - foreach ($map as $k => $m) { - if (\PHP_VERSION_ID >= 80000 && 'isDisabled' === $k) { - continue; - } - - if (method_exists($c, $m) && false !== ($m = $c->$m()) && null !== $m) { - $a[$prefix.$k] = $m instanceof \Reflector ? $m->name : $m; - } - } - } -} diff --git a/source/vendor/symfony/var-dumper/Caster/ResourceCaster.php b/source/vendor/symfony/var-dumper/Caster/ResourceCaster.php deleted file mode 100644 index a3278a8..0000000 --- a/source/vendor/symfony/var-dumper/Caster/ResourceCaster.php +++ /dev/null @@ -1,105 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts common resource types to array representation. - * - * @author Nicolas Grekas - * - * @final since Symfony 4.4 - */ -class ResourceCaster -{ - /** - * @param \CurlHandle|resource $h - * - * @return array - */ - public static function castCurl($h, array $a, Stub $stub, $isNested) - { - return curl_getinfo($h); - } - - public static function castDba($dba, array $a, Stub $stub, $isNested) - { - $list = dba_list(); - $a['file'] = $list[(int) $dba]; - - return $a; - } - - public static function castProcess($process, array $a, Stub $stub, $isNested) - { - return proc_get_status($process); - } - - public static function castStream($stream, array $a, Stub $stub, $isNested) - { - $a = stream_get_meta_data($stream) + static::castStreamContext($stream, $a, $stub, $isNested); - if ($a['uri'] ?? false) { - $a['uri'] = new LinkStub($a['uri']); - } - - return $a; - } - - public static function castStreamContext($stream, array $a, Stub $stub, $isNested) - { - return @stream_context_get_params($stream) ?: $a; - } - - public static function castGd($gd, array $a, Stub $stub, $isNested) - { - $a['size'] = imagesx($gd).'x'.imagesy($gd); - $a['trueColor'] = imageistruecolor($gd); - - return $a; - } - - public static function castMysqlLink($h, array $a, Stub $stub, $isNested) - { - $a['host'] = mysql_get_host_info($h); - $a['protocol'] = mysql_get_proto_info($h); - $a['server'] = mysql_get_server_info($h); - - return $a; - } - - public static function castOpensslX509($h, array $a, Stub $stub, $isNested) - { - $stub->cut = -1; - $info = openssl_x509_parse($h, false); - - $pin = openssl_pkey_get_public($h); - $pin = openssl_pkey_get_details($pin)['key']; - $pin = \array_slice(explode("\n", $pin), 1, -2); - $pin = base64_decode(implode('', $pin)); - $pin = base64_encode(hash('sha256', $pin, true)); - - $a += [ - 'subject' => new EnumStub(array_intersect_key($info['subject'], ['organizationName' => true, 'commonName' => true])), - 'issuer' => new EnumStub(array_intersect_key($info['issuer'], ['organizationName' => true, 'commonName' => true])), - 'expiry' => new ConstStub(date(\DateTime::ISO8601, $info['validTo_time_t']), $info['validTo_time_t']), - 'fingerprint' => new EnumStub([ - 'md5' => new ConstStub(wordwrap(strtoupper(openssl_x509_fingerprint($h, 'md5')), 2, ':', true)), - 'sha1' => new ConstStub(wordwrap(strtoupper(openssl_x509_fingerprint($h, 'sha1')), 2, ':', true)), - 'sha256' => new ConstStub(wordwrap(strtoupper(openssl_x509_fingerprint($h, 'sha256')), 2, ':', true)), - 'pin-sha256' => new ConstStub($pin), - ]), - ]; - - return $a; - } -} diff --git a/source/vendor/symfony/var-dumper/Caster/SplCaster.php b/source/vendor/symfony/var-dumper/Caster/SplCaster.php deleted file mode 100644 index be9d66b..0000000 --- a/source/vendor/symfony/var-dumper/Caster/SplCaster.php +++ /dev/null @@ -1,245 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts SPL related classes to array representation. - * - * @author Nicolas Grekas - * - * @final since Symfony 4.4 - */ -class SplCaster -{ - private const SPL_FILE_OBJECT_FLAGS = [ - \SplFileObject::DROP_NEW_LINE => 'DROP_NEW_LINE', - \SplFileObject::READ_AHEAD => 'READ_AHEAD', - \SplFileObject::SKIP_EMPTY => 'SKIP_EMPTY', - \SplFileObject::READ_CSV => 'READ_CSV', - ]; - - public static function castArrayObject(\ArrayObject $c, array $a, Stub $stub, $isNested) - { - return self::castSplArray($c, $a, $stub, $isNested); - } - - public static function castArrayIterator(\ArrayIterator $c, array $a, Stub $stub, $isNested) - { - return self::castSplArray($c, $a, $stub, $isNested); - } - - public static function castHeap(\Iterator $c, array $a, Stub $stub, $isNested) - { - $a += [ - Caster::PREFIX_VIRTUAL.'heap' => iterator_to_array(clone $c), - ]; - - return $a; - } - - public static function castDoublyLinkedList(\SplDoublyLinkedList $c, array $a, Stub $stub, $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - $mode = $c->getIteratorMode(); - $c->setIteratorMode(\SplDoublyLinkedList::IT_MODE_KEEP | $mode & ~\SplDoublyLinkedList::IT_MODE_DELETE); - - $a += [ - $prefix.'mode' => new ConstStub((($mode & \SplDoublyLinkedList::IT_MODE_LIFO) ? 'IT_MODE_LIFO' : 'IT_MODE_FIFO').' | '.(($mode & \SplDoublyLinkedList::IT_MODE_DELETE) ? 'IT_MODE_DELETE' : 'IT_MODE_KEEP'), $mode), - $prefix.'dllist' => iterator_to_array($c), - ]; - $c->setIteratorMode($mode); - - return $a; - } - - public static function castFileInfo(\SplFileInfo $c, array $a, Stub $stub, $isNested) - { - static $map = [ - 'path' => 'getPath', - 'filename' => 'getFilename', - 'basename' => 'getBasename', - 'pathname' => 'getPathname', - 'extension' => 'getExtension', - 'realPath' => 'getRealPath', - 'aTime' => 'getATime', - 'mTime' => 'getMTime', - 'cTime' => 'getCTime', - 'inode' => 'getInode', - 'size' => 'getSize', - 'perms' => 'getPerms', - 'owner' => 'getOwner', - 'group' => 'getGroup', - 'type' => 'getType', - 'writable' => 'isWritable', - 'readable' => 'isReadable', - 'executable' => 'isExecutable', - 'file' => 'isFile', - 'dir' => 'isDir', - 'link' => 'isLink', - 'linkTarget' => 'getLinkTarget', - ]; - - $prefix = Caster::PREFIX_VIRTUAL; - unset($a["\0SplFileInfo\0fileName"]); - unset($a["\0SplFileInfo\0pathName"]); - - if (\PHP_VERSION_ID < 80000) { - if (false === $c->getPathname()) { - $a[$prefix.'⚠'] = 'The parent constructor was not called: the object is in an invalid state'; - - return $a; - } - } else { - try { - $c->isReadable(); - } catch (\RuntimeException $e) { - if ('Object not initialized' !== $e->getMessage()) { - throw $e; - } - - $a[$prefix.'⚠'] = 'The parent constructor was not called: the object is in an invalid state'; - - return $a; - } catch (\Error $e) { - if ('Object not initialized' !== $e->getMessage()) { - throw $e; - } - - $a[$prefix.'⚠'] = 'The parent constructor was not called: the object is in an invalid state'; - - return $a; - } - } - - foreach ($map as $key => $accessor) { - try { - $a[$prefix.$key] = $c->$accessor(); - } catch (\Exception $e) { - } - } - - if ($a[$prefix.'realPath'] ?? false) { - $a[$prefix.'realPath'] = new LinkStub($a[$prefix.'realPath']); - } - - if (isset($a[$prefix.'perms'])) { - $a[$prefix.'perms'] = new ConstStub(sprintf('0%o', $a[$prefix.'perms']), $a[$prefix.'perms']); - } - - static $mapDate = ['aTime', 'mTime', 'cTime']; - foreach ($mapDate as $key) { - if (isset($a[$prefix.$key])) { - $a[$prefix.$key] = new ConstStub(date('Y-m-d H:i:s', $a[$prefix.$key]), $a[$prefix.$key]); - } - } - - return $a; - } - - public static function castFileObject(\SplFileObject $c, array $a, Stub $stub, $isNested) - { - static $map = [ - 'csvControl' => 'getCsvControl', - 'flags' => 'getFlags', - 'maxLineLen' => 'getMaxLineLen', - 'fstat' => 'fstat', - 'eof' => 'eof', - 'key' => 'key', - ]; - - $prefix = Caster::PREFIX_VIRTUAL; - - foreach ($map as $key => $accessor) { - try { - $a[$prefix.$key] = $c->$accessor(); - } catch (\Exception $e) { - } - } - - if (isset($a[$prefix.'flags'])) { - $flagsArray = []; - foreach (self::SPL_FILE_OBJECT_FLAGS as $value => $name) { - if ($a[$prefix.'flags'] & $value) { - $flagsArray[] = $name; - } - } - $a[$prefix.'flags'] = new ConstStub(implode('|', $flagsArray), $a[$prefix.'flags']); - } - - if (isset($a[$prefix.'fstat'])) { - $a[$prefix.'fstat'] = new CutArrayStub($a[$prefix.'fstat'], ['dev', 'ino', 'nlink', 'rdev', 'blksize', 'blocks']); - } - - return $a; - } - - public static function castObjectStorage(\SplObjectStorage $c, array $a, Stub $stub, $isNested) - { - $storage = []; - unset($a[Caster::PREFIX_DYNAMIC."\0gcdata"]); // Don't hit https://bugs.php.net/65967 - unset($a["\0SplObjectStorage\0storage"]); - - $clone = clone $c; - foreach ($clone as $obj) { - $storage[] = [ - 'object' => $obj, - 'info' => $clone->getInfo(), - ]; - } - - $a += [ - Caster::PREFIX_VIRTUAL.'storage' => $storage, - ]; - - return $a; - } - - public static function castOuterIterator(\OuterIterator $c, array $a, Stub $stub, $isNested) - { - $a[Caster::PREFIX_VIRTUAL.'innerIterator'] = $c->getInnerIterator(); - - return $a; - } - - public static function castWeakReference(\WeakReference $c, array $a, Stub $stub, $isNested) - { - $a[Caster::PREFIX_VIRTUAL.'object'] = $c->get(); - - return $a; - } - - private static function castSplArray($c, array $a, Stub $stub, bool $isNested): array - { - $prefix = Caster::PREFIX_VIRTUAL; - $flags = $c->getFlags(); - - if (!($flags & \ArrayObject::STD_PROP_LIST)) { - $c->setFlags(\ArrayObject::STD_PROP_LIST); - $a = Caster::castObject($c, \get_class($c), method_exists($c, '__debugInfo'), $stub->class); - $c->setFlags($flags); - } - if (\PHP_VERSION_ID < 70400) { - $a[$prefix.'storage'] = $c->getArrayCopy(); - } - $a += [ - $prefix.'flag::STD_PROP_LIST' => (bool) ($flags & \ArrayObject::STD_PROP_LIST), - $prefix.'flag::ARRAY_AS_PROPS' => (bool) ($flags & \ArrayObject::ARRAY_AS_PROPS), - ]; - if ($c instanceof \ArrayObject) { - $a[$prefix.'iteratorClass'] = new ClassStub($c->getIteratorClass()); - } - - return $a; - } -} diff --git a/source/vendor/symfony/var-dumper/Caster/StubCaster.php b/source/vendor/symfony/var-dumper/Caster/StubCaster.php deleted file mode 100644 index b6332fb..0000000 --- a/source/vendor/symfony/var-dumper/Caster/StubCaster.php +++ /dev/null @@ -1,84 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts a caster's Stub. - * - * @author Nicolas Grekas - * - * @final since Symfony 4.4 - */ -class StubCaster -{ - public static function castStub(Stub $c, array $a, Stub $stub, $isNested) - { - if ($isNested) { - $stub->type = $c->type; - $stub->class = $c->class; - $stub->value = $c->value; - $stub->handle = $c->handle; - $stub->cut = $c->cut; - $stub->attr = $c->attr; - - if (Stub::TYPE_REF === $c->type && !$c->class && \is_string($c->value) && !preg_match('//u', $c->value)) { - $stub->type = Stub::TYPE_STRING; - $stub->class = Stub::STRING_BINARY; - } - - $a = []; - } - - return $a; - } - - public static function castCutArray(CutArrayStub $c, array $a, Stub $stub, $isNested) - { - return $isNested ? $c->preservedSubset : $a; - } - - public static function cutInternals($obj, array $a, Stub $stub, $isNested) - { - if ($isNested) { - $stub->cut += \count($a); - - return []; - } - - return $a; - } - - public static function castEnum(EnumStub $c, array $a, Stub $stub, $isNested) - { - if ($isNested) { - $stub->class = $c->dumpKeys ? '' : null; - $stub->handle = 0; - $stub->value = null; - $stub->cut = $c->cut; - $stub->attr = $c->attr; - - $a = []; - - if ($c->value) { - foreach (array_keys($c->value) as $k) { - $keys[] = !isset($k[0]) || "\0" !== $k[0] ? Caster::PREFIX_VIRTUAL.$k : $k; - } - // Preserve references with array_combine() - $a = array_combine($keys, $c->value); - } - } - - return $a; - } -} diff --git a/source/vendor/symfony/var-dumper/Caster/SymfonyCaster.php b/source/vendor/symfony/var-dumper/Caster/SymfonyCaster.php deleted file mode 100644 index 06f213e..0000000 --- a/source/vendor/symfony/var-dumper/Caster/SymfonyCaster.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * @final since Symfony 4.4 - */ -class SymfonyCaster -{ - private const REQUEST_GETTERS = [ - 'pathInfo' => 'getPathInfo', - 'requestUri' => 'getRequestUri', - 'baseUrl' => 'getBaseUrl', - 'basePath' => 'getBasePath', - 'method' => 'getMethod', - 'format' => 'getRequestFormat', - ]; - - public static function castRequest(Request $request, array $a, Stub $stub, $isNested) - { - $clone = null; - - foreach (self::REQUEST_GETTERS as $prop => $getter) { - $key = Caster::PREFIX_PROTECTED.$prop; - if (\array_key_exists($key, $a) && null === $a[$key]) { - if (null === $clone) { - $clone = clone $request; - } - $a[Caster::PREFIX_VIRTUAL.$prop] = $clone->{$getter}(); - } - } - - return $a; - } - - public static function castHttpClient($client, array $a, Stub $stub, $isNested) - { - $multiKey = sprintf("\0%s\0multi", \get_class($client)); - if (isset($a[$multiKey])) { - $a[$multiKey] = new CutStub($a[$multiKey]); - } - - return $a; - } - - public static function castHttpClientResponse($response, array $a, Stub $stub, $isNested) - { - $stub->cut += \count($a); - $a = []; - - foreach ($response->getInfo() as $k => $v) { - $a[Caster::PREFIX_VIRTUAL.$k] = $v; - } - - return $a; - } -} diff --git a/source/vendor/symfony/var-dumper/Caster/TraceStub.php b/source/vendor/symfony/var-dumper/Caster/TraceStub.php deleted file mode 100644 index 5eea1c8..0000000 --- a/source/vendor/symfony/var-dumper/Caster/TraceStub.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Represents a backtrace as returned by debug_backtrace() or Exception->getTrace(). - * - * @author Nicolas Grekas - */ -class TraceStub extends Stub -{ - public $keepArgs; - public $sliceOffset; - public $sliceLength; - public $numberingOffset; - - public function __construct(array $trace, bool $keepArgs = true, int $sliceOffset = 0, int $sliceLength = null, int $numberingOffset = 0) - { - $this->value = $trace; - $this->keepArgs = $keepArgs; - $this->sliceOffset = $sliceOffset; - $this->sliceLength = $sliceLength; - $this->numberingOffset = $numberingOffset; - } -} diff --git a/source/vendor/symfony/var-dumper/Caster/UuidCaster.php b/source/vendor/symfony/var-dumper/Caster/UuidCaster.php deleted file mode 100644 index b102774..0000000 --- a/source/vendor/symfony/var-dumper/Caster/UuidCaster.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Ramsey\Uuid\UuidInterface; -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * @author Grégoire Pineau - */ -final class UuidCaster -{ - public static function castRamseyUuid(UuidInterface $c, array $a, Stub $stub, bool $isNested): array - { - $a += [ - Caster::PREFIX_VIRTUAL.'uuid' => (string) $c, - ]; - - return $a; - } -} diff --git a/source/vendor/symfony/var-dumper/Caster/XmlReaderCaster.php b/source/vendor/symfony/var-dumper/Caster/XmlReaderCaster.php deleted file mode 100644 index 19bf6a3..0000000 --- a/source/vendor/symfony/var-dumper/Caster/XmlReaderCaster.php +++ /dev/null @@ -1,79 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts XmlReader class to array representation. - * - * @author Baptiste Clavié - * - * @final since Symfony 4.4 - */ -class XmlReaderCaster -{ - private const NODE_TYPES = [ - \XMLReader::NONE => 'NONE', - \XMLReader::ELEMENT => 'ELEMENT', - \XMLReader::ATTRIBUTE => 'ATTRIBUTE', - \XMLReader::TEXT => 'TEXT', - \XMLReader::CDATA => 'CDATA', - \XMLReader::ENTITY_REF => 'ENTITY_REF', - \XMLReader::ENTITY => 'ENTITY', - \XMLReader::PI => 'PI (Processing Instruction)', - \XMLReader::COMMENT => 'COMMENT', - \XMLReader::DOC => 'DOC', - \XMLReader::DOC_TYPE => 'DOC_TYPE', - \XMLReader::DOC_FRAGMENT => 'DOC_FRAGMENT', - \XMLReader::NOTATION => 'NOTATION', - \XMLReader::WHITESPACE => 'WHITESPACE', - \XMLReader::SIGNIFICANT_WHITESPACE => 'SIGNIFICANT_WHITESPACE', - \XMLReader::END_ELEMENT => 'END_ELEMENT', - \XMLReader::END_ENTITY => 'END_ENTITY', - \XMLReader::XML_DECLARATION => 'XML_DECLARATION', - ]; - - public static function castXmlReader(\XMLReader $reader, array $a, Stub $stub, $isNested) - { - $props = Caster::PREFIX_VIRTUAL.'parserProperties'; - $info = [ - 'localName' => $reader->localName, - 'prefix' => $reader->prefix, - 'nodeType' => new ConstStub(self::NODE_TYPES[$reader->nodeType], $reader->nodeType), - 'depth' => $reader->depth, - 'isDefault' => $reader->isDefault, - 'isEmptyElement' => \XMLReader::NONE === $reader->nodeType ? null : $reader->isEmptyElement, - 'xmlLang' => $reader->xmlLang, - 'attributeCount' => $reader->attributeCount, - 'value' => $reader->value, - 'namespaceURI' => $reader->namespaceURI, - 'baseURI' => $reader->baseURI ? new LinkStub($reader->baseURI) : $reader->baseURI, - $props => [ - 'LOADDTD' => $reader->getParserProperty(\XMLReader::LOADDTD), - 'DEFAULTATTRS' => $reader->getParserProperty(\XMLReader::DEFAULTATTRS), - 'VALIDATE' => $reader->getParserProperty(\XMLReader::VALIDATE), - 'SUBST_ENTITIES' => $reader->getParserProperty(\XMLReader::SUBST_ENTITIES), - ], - ]; - - if ($info[$props] = Caster::filter($info[$props], Caster::EXCLUDE_EMPTY, [], $count)) { - $info[$props] = new EnumStub($info[$props]); - $info[$props]->cut = $count; - } - - $info = Caster::filter($info, Caster::EXCLUDE_EMPTY, [], $count); - // +2 because hasValue and hasAttributes are always filtered - $stub->cut += $count + 2; - - return $a + $info; - } -} diff --git a/source/vendor/symfony/var-dumper/Caster/XmlResourceCaster.php b/source/vendor/symfony/var-dumper/Caster/XmlResourceCaster.php deleted file mode 100644 index 455fc06..0000000 --- a/source/vendor/symfony/var-dumper/Caster/XmlResourceCaster.php +++ /dev/null @@ -1,63 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts XML resources to array representation. - * - * @author Nicolas Grekas - * - * @final since Symfony 4.4 - */ -class XmlResourceCaster -{ - private const XML_ERRORS = [ - \XML_ERROR_NONE => 'XML_ERROR_NONE', - \XML_ERROR_NO_MEMORY => 'XML_ERROR_NO_MEMORY', - \XML_ERROR_SYNTAX => 'XML_ERROR_SYNTAX', - \XML_ERROR_NO_ELEMENTS => 'XML_ERROR_NO_ELEMENTS', - \XML_ERROR_INVALID_TOKEN => 'XML_ERROR_INVALID_TOKEN', - \XML_ERROR_UNCLOSED_TOKEN => 'XML_ERROR_UNCLOSED_TOKEN', - \XML_ERROR_PARTIAL_CHAR => 'XML_ERROR_PARTIAL_CHAR', - \XML_ERROR_TAG_MISMATCH => 'XML_ERROR_TAG_MISMATCH', - \XML_ERROR_DUPLICATE_ATTRIBUTE => 'XML_ERROR_DUPLICATE_ATTRIBUTE', - \XML_ERROR_JUNK_AFTER_DOC_ELEMENT => 'XML_ERROR_JUNK_AFTER_DOC_ELEMENT', - \XML_ERROR_PARAM_ENTITY_REF => 'XML_ERROR_PARAM_ENTITY_REF', - \XML_ERROR_UNDEFINED_ENTITY => 'XML_ERROR_UNDEFINED_ENTITY', - \XML_ERROR_RECURSIVE_ENTITY_REF => 'XML_ERROR_RECURSIVE_ENTITY_REF', - \XML_ERROR_ASYNC_ENTITY => 'XML_ERROR_ASYNC_ENTITY', - \XML_ERROR_BAD_CHAR_REF => 'XML_ERROR_BAD_CHAR_REF', - \XML_ERROR_BINARY_ENTITY_REF => 'XML_ERROR_BINARY_ENTITY_REF', - \XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF => 'XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF', - \XML_ERROR_MISPLACED_XML_PI => 'XML_ERROR_MISPLACED_XML_PI', - \XML_ERROR_UNKNOWN_ENCODING => 'XML_ERROR_UNKNOWN_ENCODING', - \XML_ERROR_INCORRECT_ENCODING => 'XML_ERROR_INCORRECT_ENCODING', - \XML_ERROR_UNCLOSED_CDATA_SECTION => 'XML_ERROR_UNCLOSED_CDATA_SECTION', - \XML_ERROR_EXTERNAL_ENTITY_HANDLING => 'XML_ERROR_EXTERNAL_ENTITY_HANDLING', - ]; - - public static function castXml($h, array $a, Stub $stub, $isNested) - { - $a['current_byte_index'] = xml_get_current_byte_index($h); - $a['current_column_number'] = xml_get_current_column_number($h); - $a['current_line_number'] = xml_get_current_line_number($h); - $a['error_code'] = xml_get_error_code($h); - - if (isset(self::XML_ERRORS[$a['error_code']])) { - $a['error_code'] = new ConstStub(self::XML_ERRORS[$a['error_code']], $a['error_code']); - } - - return $a; - } -} diff --git a/source/vendor/symfony/var-dumper/Cloner/AbstractCloner.php b/source/vendor/symfony/var-dumper/Cloner/AbstractCloner.php deleted file mode 100644 index eeac882..0000000 --- a/source/vendor/symfony/var-dumper/Cloner/AbstractCloner.php +++ /dev/null @@ -1,375 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Cloner; - -use Symfony\Component\VarDumper\Caster\Caster; -use Symfony\Component\VarDumper\Exception\ThrowingCasterException; - -/** - * AbstractCloner implements a generic caster mechanism for objects and resources. - * - * @author Nicolas Grekas - */ -abstract class AbstractCloner implements ClonerInterface -{ - public static $defaultCasters = [ - '__PHP_Incomplete_Class' => ['Symfony\Component\VarDumper\Caster\Caster', 'castPhpIncompleteClass'], - - 'Symfony\Component\VarDumper\Caster\CutStub' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'castStub'], - 'Symfony\Component\VarDumper\Caster\CutArrayStub' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'castCutArray'], - 'Symfony\Component\VarDumper\Caster\ConstStub' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'castStub'], - 'Symfony\Component\VarDumper\Caster\EnumStub' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'castEnum'], - - 'Closure' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castClosure'], - 'Generator' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castGenerator'], - 'ReflectionType' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castType'], - 'ReflectionGenerator' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castReflectionGenerator'], - 'ReflectionClass' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castClass'], - 'ReflectionFunctionAbstract' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castFunctionAbstract'], - 'ReflectionMethod' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castMethod'], - 'ReflectionParameter' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castParameter'], - 'ReflectionProperty' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castProperty'], - 'ReflectionReference' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castReference'], - 'ReflectionExtension' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castExtension'], - 'ReflectionZendExtension' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castZendExtension'], - - 'Doctrine\Common\Persistence\ObjectManager' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], - 'Doctrine\Common\Proxy\Proxy' => ['Symfony\Component\VarDumper\Caster\DoctrineCaster', 'castCommonProxy'], - 'Doctrine\ORM\Proxy\Proxy' => ['Symfony\Component\VarDumper\Caster\DoctrineCaster', 'castOrmProxy'], - 'Doctrine\ORM\PersistentCollection' => ['Symfony\Component\VarDumper\Caster\DoctrineCaster', 'castPersistentCollection'], - 'Doctrine\Persistence\ObjectManager' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], - - 'DOMException' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castException'], - 'DOMStringList' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castLength'], - 'DOMNameList' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castLength'], - 'DOMImplementation' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castImplementation'], - 'DOMImplementationList' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castLength'], - 'DOMNode' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castNode'], - 'DOMNameSpaceNode' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castNameSpaceNode'], - 'DOMDocument' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castDocument'], - 'DOMNodeList' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castLength'], - 'DOMNamedNodeMap' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castLength'], - 'DOMCharacterData' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castCharacterData'], - 'DOMAttr' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castAttr'], - 'DOMElement' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castElement'], - 'DOMText' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castText'], - 'DOMTypeinfo' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castTypeinfo'], - 'DOMDomError' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castDomError'], - 'DOMLocator' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castLocator'], - 'DOMDocumentType' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castDocumentType'], - 'DOMNotation' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castNotation'], - 'DOMEntity' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castEntity'], - 'DOMProcessingInstruction' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castProcessingInstruction'], - 'DOMXPath' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castXPath'], - - 'XMLReader' => ['Symfony\Component\VarDumper\Caster\XmlReaderCaster', 'castXmlReader'], - - 'ErrorException' => ['Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castErrorException'], - 'Exception' => ['Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castException'], - 'Error' => ['Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castError'], - 'Symfony\Component\DependencyInjection\ContainerInterface' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], - 'Symfony\Component\EventDispatcher\EventDispatcherInterface' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], - 'Symfony\Component\HttpClient\CurlHttpClient' => ['Symfony\Component\VarDumper\Caster\SymfonyCaster', 'castHttpClient'], - 'Symfony\Component\HttpClient\NativeHttpClient' => ['Symfony\Component\VarDumper\Caster\SymfonyCaster', 'castHttpClient'], - 'Symfony\Component\HttpClient\Response\CurlResponse' => ['Symfony\Component\VarDumper\Caster\SymfonyCaster', 'castHttpClientResponse'], - 'Symfony\Component\HttpClient\Response\NativeResponse' => ['Symfony\Component\VarDumper\Caster\SymfonyCaster', 'castHttpClientResponse'], - 'Symfony\Component\HttpFoundation\Request' => ['Symfony\Component\VarDumper\Caster\SymfonyCaster', 'castRequest'], - 'Symfony\Component\VarDumper\Exception\ThrowingCasterException' => ['Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castThrowingCasterException'], - 'Symfony\Component\VarDumper\Caster\TraceStub' => ['Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castTraceStub'], - 'Symfony\Component\VarDumper\Caster\FrameStub' => ['Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castFrameStub'], - 'Symfony\Component\VarDumper\Cloner\AbstractCloner' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], - 'Symfony\Component\ErrorHandler\Exception\SilencedErrorContext' => ['Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castSilencedErrorContext'], - - 'Imagine\Image\ImageInterface' => ['Symfony\Component\VarDumper\Caster\ImagineCaster', 'castImage'], - - 'Ramsey\Uuid\UuidInterface' => ['Symfony\Component\VarDumper\Caster\UuidCaster', 'castRamseyUuid'], - - 'ProxyManager\Proxy\ProxyInterface' => ['Symfony\Component\VarDumper\Caster\ProxyManagerCaster', 'castProxy'], - 'PHPUnit_Framework_MockObject_MockObject' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], - 'PHPUnit\Framework\MockObject\MockObject' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], - 'PHPUnit\Framework\MockObject\Stub' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], - 'Prophecy\Prophecy\ProphecySubjectInterface' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], - 'Mockery\MockInterface' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], - - 'PDO' => ['Symfony\Component\VarDumper\Caster\PdoCaster', 'castPdo'], - 'PDOStatement' => ['Symfony\Component\VarDumper\Caster\PdoCaster', 'castPdoStatement'], - - 'AMQPConnection' => ['Symfony\Component\VarDumper\Caster\AmqpCaster', 'castConnection'], - 'AMQPChannel' => ['Symfony\Component\VarDumper\Caster\AmqpCaster', 'castChannel'], - 'AMQPQueue' => ['Symfony\Component\VarDumper\Caster\AmqpCaster', 'castQueue'], - 'AMQPExchange' => ['Symfony\Component\VarDumper\Caster\AmqpCaster', 'castExchange'], - 'AMQPEnvelope' => ['Symfony\Component\VarDumper\Caster\AmqpCaster', 'castEnvelope'], - - 'ArrayObject' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castArrayObject'], - 'ArrayIterator' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castArrayIterator'], - 'SplDoublyLinkedList' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castDoublyLinkedList'], - 'SplFileInfo' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castFileInfo'], - 'SplFileObject' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castFileObject'], - 'SplHeap' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castHeap'], - 'SplObjectStorage' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castObjectStorage'], - 'SplPriorityQueue' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castHeap'], - 'OuterIterator' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castOuterIterator'], - 'WeakReference' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castWeakReference'], - - 'Redis' => ['Symfony\Component\VarDumper\Caster\RedisCaster', 'castRedis'], - 'RedisArray' => ['Symfony\Component\VarDumper\Caster\RedisCaster', 'castRedisArray'], - 'RedisCluster' => ['Symfony\Component\VarDumper\Caster\RedisCaster', 'castRedisCluster'], - - 'DateTimeInterface' => ['Symfony\Component\VarDumper\Caster\DateCaster', 'castDateTime'], - 'DateInterval' => ['Symfony\Component\VarDumper\Caster\DateCaster', 'castInterval'], - 'DateTimeZone' => ['Symfony\Component\VarDumper\Caster\DateCaster', 'castTimeZone'], - 'DatePeriod' => ['Symfony\Component\VarDumper\Caster\DateCaster', 'castPeriod'], - - 'GMP' => ['Symfony\Component\VarDumper\Caster\GmpCaster', 'castGmp'], - - 'MessageFormatter' => ['Symfony\Component\VarDumper\Caster\IntlCaster', 'castMessageFormatter'], - 'NumberFormatter' => ['Symfony\Component\VarDumper\Caster\IntlCaster', 'castNumberFormatter'], - 'IntlTimeZone' => ['Symfony\Component\VarDumper\Caster\IntlCaster', 'castIntlTimeZone'], - 'IntlCalendar' => ['Symfony\Component\VarDumper\Caster\IntlCaster', 'castIntlCalendar'], - 'IntlDateFormatter' => ['Symfony\Component\VarDumper\Caster\IntlCaster', 'castIntlDateFormatter'], - - 'Memcached' => ['Symfony\Component\VarDumper\Caster\MemcachedCaster', 'castMemcached'], - - 'Ds\Collection' => ['Symfony\Component\VarDumper\Caster\DsCaster', 'castCollection'], - 'Ds\Map' => ['Symfony\Component\VarDumper\Caster\DsCaster', 'castMap'], - 'Ds\Pair' => ['Symfony\Component\VarDumper\Caster\DsCaster', 'castPair'], - 'Symfony\Component\VarDumper\Caster\DsPairStub' => ['Symfony\Component\VarDumper\Caster\DsCaster', 'castPairStub'], - - 'CurlHandle' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castCurl'], - ':curl' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castCurl'], - - ':dba' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castDba'], - ':dba persistent' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castDba'], - - 'GdImage' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castGd'], - ':gd' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castGd'], - - ':mysql link' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castMysqlLink'], - ':pgsql large object' => ['Symfony\Component\VarDumper\Caster\PgSqlCaster', 'castLargeObject'], - ':pgsql link' => ['Symfony\Component\VarDumper\Caster\PgSqlCaster', 'castLink'], - ':pgsql link persistent' => ['Symfony\Component\VarDumper\Caster\PgSqlCaster', 'castLink'], - ':pgsql result' => ['Symfony\Component\VarDumper\Caster\PgSqlCaster', 'castResult'], - ':process' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castProcess'], - ':stream' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castStream'], - - 'OpenSSLCertificate' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castOpensslX509'], - ':OpenSSL X.509' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castOpensslX509'], - - ':persistent stream' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castStream'], - ':stream-context' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castStreamContext'], - - 'XmlParser' => ['Symfony\Component\VarDumper\Caster\XmlResourceCaster', 'castXml'], - ':xml' => ['Symfony\Component\VarDumper\Caster\XmlResourceCaster', 'castXml'], - ]; - - protected $maxItems = 2500; - protected $maxString = -1; - protected $minDepth = 1; - - private $casters = []; - private $prevErrorHandler; - private $classInfo = []; - private $filter = 0; - - /** - * @param callable[]|null $casters A map of casters - * - * @see addCasters - */ - public function __construct(array $casters = null) - { - if (null === $casters) { - $casters = static::$defaultCasters; - } - $this->addCasters($casters); - } - - /** - * Adds casters for resources and objects. - * - * Maps resources or objects types to a callback. - * Types are in the key, with a callable caster for value. - * Resource types are to be prefixed with a `:`, - * see e.g. static::$defaultCasters. - * - * @param callable[] $casters A map of casters - */ - public function addCasters(array $casters) - { - foreach ($casters as $type => $callback) { - $this->casters[$type][] = $callback; - } - } - - /** - * Sets the maximum number of items to clone past the minimum depth in nested structures. - * - * @param int $maxItems - */ - public function setMaxItems($maxItems) - { - $this->maxItems = (int) $maxItems; - } - - /** - * Sets the maximum cloned length for strings. - * - * @param int $maxString - */ - public function setMaxString($maxString) - { - $this->maxString = (int) $maxString; - } - - /** - * Sets the minimum tree depth where we are guaranteed to clone all the items. After this - * depth is reached, only setMaxItems items will be cloned. - * - * @param int $minDepth - */ - public function setMinDepth($minDepth) - { - $this->minDepth = (int) $minDepth; - } - - /** - * Clones a PHP variable. - * - * @param mixed $var Any PHP variable - * @param int $filter A bit field of Caster::EXCLUDE_* constants - * - * @return Data The cloned variable represented by a Data object - */ - public function cloneVar($var, $filter = 0) - { - $this->prevErrorHandler = set_error_handler(function ($type, $msg, $file, $line, $context = []) { - if (\E_RECOVERABLE_ERROR === $type || \E_USER_ERROR === $type) { - // Cloner never dies - throw new \ErrorException($msg, 0, $type, $file, $line); - } - - if ($this->prevErrorHandler) { - return ($this->prevErrorHandler)($type, $msg, $file, $line, $context); - } - - return false; - }); - $this->filter = $filter; - - if ($gc = gc_enabled()) { - gc_disable(); - } - try { - return new Data($this->doClone($var)); - } finally { - if ($gc) { - gc_enable(); - } - restore_error_handler(); - $this->prevErrorHandler = null; - } - } - - /** - * Effectively clones the PHP variable. - * - * @param mixed $var Any PHP variable - * - * @return array The cloned variable represented in an array - */ - abstract protected function doClone($var); - - /** - * Casts an object to an array representation. - * - * @param bool $isNested True if the object is nested in the dumped structure - * - * @return array The object casted as array - */ - protected function castObject(Stub $stub, $isNested) - { - $obj = $stub->value; - $class = $stub->class; - - if (\PHP_VERSION_ID < 80000 ? "\0" === ($class[15] ?? null) : str_contains($class, "@anonymous\0")) { - $stub->class = get_debug_type($obj); - } - if (isset($this->classInfo[$class])) { - [$i, $parents, $hasDebugInfo, $fileInfo] = $this->classInfo[$class]; - } else { - $i = 2; - $parents = [$class]; - $hasDebugInfo = method_exists($class, '__debugInfo'); - - foreach (class_parents($class) as $p) { - $parents[] = $p; - ++$i; - } - foreach (class_implements($class) as $p) { - $parents[] = $p; - ++$i; - } - $parents[] = '*'; - - $r = new \ReflectionClass($class); - $fileInfo = $r->isInternal() || $r->isSubclassOf(Stub::class) ? [] : [ - 'file' => $r->getFileName(), - 'line' => $r->getStartLine(), - ]; - - $this->classInfo[$class] = [$i, $parents, $hasDebugInfo, $fileInfo]; - } - - $stub->attr += $fileInfo; - $a = Caster::castObject($obj, $class, $hasDebugInfo, $stub->class); - - try { - while ($i--) { - if (!empty($this->casters[$p = $parents[$i]])) { - foreach ($this->casters[$p] as $callback) { - $a = $callback($obj, $a, $stub, $isNested, $this->filter); - } - } - } - } catch (\Exception $e) { - $a = [(Stub::TYPE_OBJECT === $stub->type ? Caster::PREFIX_VIRTUAL : '').'⚠' => new ThrowingCasterException($e)] + $a; - } - - return $a; - } - - /** - * Casts a resource to an array representation. - * - * @param bool $isNested True if the object is nested in the dumped structure - * - * @return array The resource casted as array - */ - protected function castResource(Stub $stub, $isNested) - { - $a = []; - $res = $stub->value; - $type = $stub->class; - - try { - if (!empty($this->casters[':'.$type])) { - foreach ($this->casters[':'.$type] as $callback) { - $a = $callback($res, $a, $stub, $isNested, $this->filter); - } - } - } catch (\Exception $e) { - $a = [(Stub::TYPE_OBJECT === $stub->type ? Caster::PREFIX_VIRTUAL : '').'⚠' => new ThrowingCasterException($e)] + $a; - } - - return $a; - } -} diff --git a/source/vendor/symfony/var-dumper/Cloner/ClonerInterface.php b/source/vendor/symfony/var-dumper/Cloner/ClonerInterface.php deleted file mode 100644 index 7ed287a..0000000 --- a/source/vendor/symfony/var-dumper/Cloner/ClonerInterface.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Cloner; - -/** - * @author Nicolas Grekas - */ -interface ClonerInterface -{ - /** - * Clones a PHP variable. - * - * @param mixed $var Any PHP variable - * - * @return Data The cloned variable represented by a Data object - */ - public function cloneVar($var); -} diff --git a/source/vendor/symfony/var-dumper/Cloner/Cursor.php b/source/vendor/symfony/var-dumper/Cloner/Cursor.php deleted file mode 100644 index 1fd796d..0000000 --- a/source/vendor/symfony/var-dumper/Cloner/Cursor.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Cloner; - -/** - * Represents the current state of a dumper while dumping. - * - * @author Nicolas Grekas - */ -class Cursor -{ - public const HASH_INDEXED = Stub::ARRAY_INDEXED; - public const HASH_ASSOC = Stub::ARRAY_ASSOC; - public const HASH_OBJECT = Stub::TYPE_OBJECT; - public const HASH_RESOURCE = Stub::TYPE_RESOURCE; - - public $depth = 0; - public $refIndex = 0; - public $softRefTo = 0; - public $softRefCount = 0; - public $softRefHandle = 0; - public $hardRefTo = 0; - public $hardRefCount = 0; - public $hardRefHandle = 0; - public $hashType; - public $hashKey; - public $hashKeyIsBinary; - public $hashIndex = 0; - public $hashLength = 0; - public $hashCut = 0; - public $stop = false; - public $attr = []; - public $skipChildren = false; -} diff --git a/source/vendor/symfony/var-dumper/Cloner/Data.php b/source/vendor/symfony/var-dumper/Cloner/Data.php deleted file mode 100644 index 8f621b1..0000000 --- a/source/vendor/symfony/var-dumper/Cloner/Data.php +++ /dev/null @@ -1,470 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Cloner; - -use Symfony\Component\VarDumper\Caster\Caster; -use Symfony\Component\VarDumper\Dumper\ContextProvider\SourceContextProvider; - -/** - * @author Nicolas Grekas - */ -class Data implements \ArrayAccess, \Countable, \IteratorAggregate -{ - private $data; - private $position = 0; - private $key = 0; - private $maxDepth = 20; - private $maxItemsPerDepth = -1; - private $useRefHandles = -1; - private $context = []; - - /** - * @param array $data An array as returned by ClonerInterface::cloneVar() - */ - public function __construct(array $data) - { - $this->data = $data; - } - - /** - * @return string|null The type of the value - */ - public function getType() - { - $item = $this->data[$this->position][$this->key]; - - if ($item instanceof Stub && Stub::TYPE_REF === $item->type && !$item->position) { - $item = $item->value; - } - if (!$item instanceof Stub) { - return \gettype($item); - } - if (Stub::TYPE_STRING === $item->type) { - return 'string'; - } - if (Stub::TYPE_ARRAY === $item->type) { - return 'array'; - } - if (Stub::TYPE_OBJECT === $item->type) { - return $item->class; - } - if (Stub::TYPE_RESOURCE === $item->type) { - return $item->class.' resource'; - } - - return null; - } - - /** - * @param array|bool $recursive Whether values should be resolved recursively or not - * - * @return string|int|float|bool|array|Data[]|null A native representation of the original value - */ - public function getValue($recursive = false) - { - $item = $this->data[$this->position][$this->key]; - - if ($item instanceof Stub && Stub::TYPE_REF === $item->type && !$item->position) { - $item = $item->value; - } - if (!($item = $this->getStub($item)) instanceof Stub) { - return $item; - } - if (Stub::TYPE_STRING === $item->type) { - return $item->value; - } - - $children = $item->position ? $this->data[$item->position] : []; - - foreach ($children as $k => $v) { - if ($recursive && !($v = $this->getStub($v)) instanceof Stub) { - continue; - } - $children[$k] = clone $this; - $children[$k]->key = $k; - $children[$k]->position = $item->position; - - if ($recursive) { - if (Stub::TYPE_REF === $v->type && ($v = $this->getStub($v->value)) instanceof Stub) { - $recursive = (array) $recursive; - if (isset($recursive[$v->position])) { - continue; - } - $recursive[$v->position] = true; - } - $children[$k] = $children[$k]->getValue($recursive); - } - } - - return $children; - } - - /** - * @return int - */ - #[\ReturnTypeWillChange] - public function count() - { - return \count($this->getValue()); - } - - /** - * @return \Traversable - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - if (!\is_array($value = $this->getValue())) { - throw new \LogicException(sprintf('"%s" object holds non-iterable type "%s".', self::class, \gettype($value))); - } - - yield from $value; - } - - public function __get($key) - { - if (null !== $data = $this->seek($key)) { - $item = $this->getStub($data->data[$data->position][$data->key]); - - return $item instanceof Stub || [] === $item ? $data : $item; - } - - return null; - } - - /** - * @return bool - */ - public function __isset($key) - { - return null !== $this->seek($key); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function offsetExists($key) - { - return $this->__isset($key); - } - - /** - * @return mixed - */ - #[\ReturnTypeWillChange] - public function offsetGet($key) - { - return $this->__get($key); - } - - /** - * @return void - */ - #[\ReturnTypeWillChange] - public function offsetSet($key, $value) - { - throw new \BadMethodCallException(self::class.' objects are immutable.'); - } - - /** - * @return void - */ - #[\ReturnTypeWillChange] - public function offsetUnset($key) - { - throw new \BadMethodCallException(self::class.' objects are immutable.'); - } - - /** - * @return string - */ - public function __toString() - { - $value = $this->getValue(); - - if (!\is_array($value)) { - return (string) $value; - } - - return sprintf('%s (count=%d)', $this->getType(), \count($value)); - } - - /** - * Returns a depth limited clone of $this. - * - * @param int $maxDepth The max dumped depth level - * - * @return static - */ - public function withMaxDepth($maxDepth) - { - $data = clone $this; - $data->maxDepth = (int) $maxDepth; - - return $data; - } - - /** - * Limits the number of elements per depth level. - * - * @param int $maxItemsPerDepth The max number of items dumped per depth level - * - * @return static - */ - public function withMaxItemsPerDepth($maxItemsPerDepth) - { - $data = clone $this; - $data->maxItemsPerDepth = (int) $maxItemsPerDepth; - - return $data; - } - - /** - * Enables/disables objects' identifiers tracking. - * - * @param bool $useRefHandles False to hide global ref. handles - * - * @return static - */ - public function withRefHandles($useRefHandles) - { - $data = clone $this; - $data->useRefHandles = $useRefHandles ? -1 : 0; - - return $data; - } - - /** - * @return static - */ - public function withContext(array $context) - { - $data = clone $this; - $data->context = $context; - - return $data; - } - - /** - * Seeks to a specific key in nested data structures. - * - * @param string|int $key The key to seek to - * - * @return static|null Null if the key is not set - */ - public function seek($key) - { - $item = $this->data[$this->position][$this->key]; - - if ($item instanceof Stub && Stub::TYPE_REF === $item->type && !$item->position) { - $item = $item->value; - } - if (!($item = $this->getStub($item)) instanceof Stub || !$item->position) { - return null; - } - $keys = [$key]; - - switch ($item->type) { - case Stub::TYPE_OBJECT: - $keys[] = Caster::PREFIX_DYNAMIC.$key; - $keys[] = Caster::PREFIX_PROTECTED.$key; - $keys[] = Caster::PREFIX_VIRTUAL.$key; - $keys[] = "\0$item->class\0$key"; - // no break - case Stub::TYPE_ARRAY: - case Stub::TYPE_RESOURCE: - break; - default: - return null; - } - - $data = null; - $children = $this->data[$item->position]; - - foreach ($keys as $key) { - if (isset($children[$key]) || \array_key_exists($key, $children)) { - $data = clone $this; - $data->key = $key; - $data->position = $item->position; - break; - } - } - - return $data; - } - - /** - * Dumps data with a DumperInterface dumper. - */ - public function dump(DumperInterface $dumper) - { - $refs = [0]; - $cursor = new Cursor(); - - if ($cursor->attr = $this->context[SourceContextProvider::class] ?? []) { - $cursor->attr['if_links'] = true; - $cursor->hashType = -1; - $dumper->dumpScalar($cursor, 'default', '^'); - $cursor->attr = ['if_links' => true]; - $dumper->dumpScalar($cursor, 'default', ' '); - $cursor->hashType = 0; - } - - $this->dumpItem($dumper, $cursor, $refs, $this->data[$this->position][$this->key]); - } - - /** - * Depth-first dumping of items. - * - * @param mixed $item A Stub object or the original value being dumped - */ - private function dumpItem(DumperInterface $dumper, Cursor $cursor, array &$refs, $item) - { - $cursor->refIndex = 0; - $cursor->softRefTo = $cursor->softRefHandle = $cursor->softRefCount = 0; - $cursor->hardRefTo = $cursor->hardRefHandle = $cursor->hardRefCount = 0; - $firstSeen = true; - - if (!$item instanceof Stub) { - $cursor->attr = []; - $type = \gettype($item); - if ($item && 'array' === $type) { - $item = $this->getStub($item); - } - } elseif (Stub::TYPE_REF === $item->type) { - if ($item->handle) { - if (!isset($refs[$r = $item->handle - (\PHP_INT_MAX >> 1)])) { - $cursor->refIndex = $refs[$r] = $cursor->refIndex ?: ++$refs[0]; - } else { - $firstSeen = false; - } - $cursor->hardRefTo = $refs[$r]; - $cursor->hardRefHandle = $this->useRefHandles & $item->handle; - $cursor->hardRefCount = 0 < $item->handle ? $item->refCount : 0; - } - $cursor->attr = $item->attr; - $type = $item->class ?: \gettype($item->value); - $item = $this->getStub($item->value); - } - if ($item instanceof Stub) { - if ($item->refCount) { - if (!isset($refs[$r = $item->handle])) { - $cursor->refIndex = $refs[$r] = $cursor->refIndex ?: ++$refs[0]; - } else { - $firstSeen = false; - } - $cursor->softRefTo = $refs[$r]; - } - $cursor->softRefHandle = $this->useRefHandles & $item->handle; - $cursor->softRefCount = $item->refCount; - $cursor->attr = $item->attr; - $cut = $item->cut; - - if ($item->position && $firstSeen) { - $children = $this->data[$item->position]; - - if ($cursor->stop) { - if ($cut >= 0) { - $cut += \count($children); - } - $children = []; - } - } else { - $children = []; - } - switch ($item->type) { - case Stub::TYPE_STRING: - $dumper->dumpString($cursor, $item->value, Stub::STRING_BINARY === $item->class, $cut); - break; - - case Stub::TYPE_ARRAY: - $item = clone $item; - $item->type = $item->class; - $item->class = $item->value; - // no break - case Stub::TYPE_OBJECT: - case Stub::TYPE_RESOURCE: - $withChildren = $children && $cursor->depth !== $this->maxDepth && $this->maxItemsPerDepth; - $dumper->enterHash($cursor, $item->type, $item->class, $withChildren); - if ($withChildren) { - if ($cursor->skipChildren) { - $withChildren = false; - $cut = -1; - } else { - $cut = $this->dumpChildren($dumper, $cursor, $refs, $children, $cut, $item->type, null !== $item->class); - } - } elseif ($children && 0 <= $cut) { - $cut += \count($children); - } - $cursor->skipChildren = false; - $dumper->leaveHash($cursor, $item->type, $item->class, $withChildren, $cut); - break; - - default: - throw new \RuntimeException(sprintf('Unexpected Stub type: "%s".', $item->type)); - } - } elseif ('array' === $type) { - $dumper->enterHash($cursor, Cursor::HASH_INDEXED, 0, false); - $dumper->leaveHash($cursor, Cursor::HASH_INDEXED, 0, false, 0); - } elseif ('string' === $type) { - $dumper->dumpString($cursor, $item, false, 0); - } else { - $dumper->dumpScalar($cursor, $type, $item); - } - } - - /** - * Dumps children of hash structures. - * - * @return int The final number of removed items - */ - private function dumpChildren(DumperInterface $dumper, Cursor $parentCursor, array &$refs, array $children, int $hashCut, int $hashType, bool $dumpKeys): int - { - $cursor = clone $parentCursor; - ++$cursor->depth; - $cursor->hashType = $hashType; - $cursor->hashIndex = 0; - $cursor->hashLength = \count($children); - $cursor->hashCut = $hashCut; - foreach ($children as $key => $child) { - $cursor->hashKeyIsBinary = isset($key[0]) && !preg_match('//u', $key); - $cursor->hashKey = $dumpKeys ? $key : null; - $this->dumpItem($dumper, $cursor, $refs, $child); - if (++$cursor->hashIndex === $this->maxItemsPerDepth || $cursor->stop) { - $parentCursor->stop = true; - - return $hashCut >= 0 ? $hashCut + $cursor->hashLength - $cursor->hashIndex : $hashCut; - } - } - - return $hashCut; - } - - private function getStub($item) - { - if (!$item || !\is_array($item)) { - return $item; - } - - $stub = new Stub(); - $stub->type = Stub::TYPE_ARRAY; - foreach ($item as $stub->class => $stub->position) { - } - if (isset($item[0])) { - $stub->cut = $item[0]; - } - $stub->value = $stub->cut + ($stub->position ? \count($this->data[$stub->position]) : 0); - - return $stub; - } -} diff --git a/source/vendor/symfony/var-dumper/Cloner/DumperInterface.php b/source/vendor/symfony/var-dumper/Cloner/DumperInterface.php deleted file mode 100644 index ec8ef27..0000000 --- a/source/vendor/symfony/var-dumper/Cloner/DumperInterface.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Cloner; - -/** - * DumperInterface used by Data objects. - * - * @author Nicolas Grekas - */ -interface DumperInterface -{ - /** - * Dumps a scalar value. - * - * @param string $type The PHP type of the value being dumped - * @param string|int|float|bool $value The scalar value being dumped - */ - public function dumpScalar(Cursor $cursor, $type, $value); - - /** - * Dumps a string. - * - * @param string $str The string being dumped - * @param bool $bin Whether $str is UTF-8 or binary encoded - * @param int $cut The number of characters $str has been cut by - */ - public function dumpString(Cursor $cursor, $str, $bin, $cut); - - /** - * Dumps while entering an hash. - * - * @param int $type A Cursor::HASH_* const for the type of hash - * @param string|int $class The object class, resource type or array count - * @param bool $hasChild When the dump of the hash has child item - */ - public function enterHash(Cursor $cursor, $type, $class, $hasChild); - - /** - * Dumps while leaving an hash. - * - * @param int $type A Cursor::HASH_* const for the type of hash - * @param string|int $class The object class, resource type or array count - * @param bool $hasChild When the dump of the hash has child item - * @param int $cut The number of items the hash has been cut by - */ - public function leaveHash(Cursor $cursor, $type, $class, $hasChild, $cut); -} diff --git a/source/vendor/symfony/var-dumper/Cloner/Stub.php b/source/vendor/symfony/var-dumper/Cloner/Stub.php deleted file mode 100644 index 073c56e..0000000 --- a/source/vendor/symfony/var-dumper/Cloner/Stub.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Cloner; - -/** - * Represents the main properties of a PHP variable. - * - * @author Nicolas Grekas - */ -class Stub -{ - public const TYPE_REF = 1; - public const TYPE_STRING = 2; - public const TYPE_ARRAY = 3; - public const TYPE_OBJECT = 4; - public const TYPE_RESOURCE = 5; - - public const STRING_BINARY = 1; - public const STRING_UTF8 = 2; - - public const ARRAY_ASSOC = 1; - public const ARRAY_INDEXED = 2; - - public $type = self::TYPE_REF; - public $class = ''; - public $value; - public $cut = 0; - public $handle = 0; - public $refCount = 0; - public $position = 0; - public $attr = []; - - private static $defaultProperties = []; - - /** - * @internal - */ - public function __sleep(): array - { - $properties = []; - - if (!isset(self::$defaultProperties[$c = static::class])) { - self::$defaultProperties[$c] = get_class_vars($c); - - foreach ((new \ReflectionClass($c))->getStaticProperties() as $k => $v) { - unset(self::$defaultProperties[$c][$k]); - } - } - - foreach (self::$defaultProperties[$c] as $k => $v) { - if ($this->$k !== $v) { - $properties[] = $k; - } - } - - return $properties; - } -} diff --git a/source/vendor/symfony/var-dumper/Cloner/VarCloner.php b/source/vendor/symfony/var-dumper/Cloner/VarCloner.php deleted file mode 100644 index 6a90021..0000000 --- a/source/vendor/symfony/var-dumper/Cloner/VarCloner.php +++ /dev/null @@ -1,307 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Cloner; - -/** - * @author Nicolas Grekas - */ -class VarCloner extends AbstractCloner -{ - private static $gid; - private static $arrayCache = []; - - /** - * {@inheritdoc} - */ - protected function doClone($var) - { - $len = 1; // Length of $queue - $pos = 0; // Number of cloned items past the minimum depth - $refsCounter = 0; // Hard references counter - $queue = [[$var]]; // This breadth-first queue is the return value - $indexedArrays = []; // Map of queue indexes that hold numerically indexed arrays - $hardRefs = []; // Map of original zval ids to stub objects - $objRefs = []; // Map of original object handles to their stub object counterpart - $objects = []; // Keep a ref to objects to ensure their handle cannot be reused while cloning - $resRefs = []; // Map of original resource handles to their stub object counterpart - $values = []; // Map of stub objects' ids to original values - $maxItems = $this->maxItems; - $maxString = $this->maxString; - $minDepth = $this->minDepth; - $currentDepth = 0; // Current tree depth - $currentDepthFinalIndex = 0; // Final $queue index for current tree depth - $minimumDepthReached = 0 === $minDepth; // Becomes true when minimum tree depth has been reached - $cookie = (object) []; // Unique object used to detect hard references - $a = null; // Array cast for nested structures - $stub = null; // Stub capturing the main properties of an original item value - // or null if the original value is used directly - - if (!$gid = self::$gid) { - $gid = self::$gid = md5(random_bytes(6)); // Unique string used to detect the special $GLOBALS variable - } - $arrayStub = new Stub(); - $arrayStub->type = Stub::TYPE_ARRAY; - $fromObjCast = false; - - for ($i = 0; $i < $len; ++$i) { - // Detect when we move on to the next tree depth - if ($i > $currentDepthFinalIndex) { - ++$currentDepth; - $currentDepthFinalIndex = $len - 1; - if ($currentDepth >= $minDepth) { - $minimumDepthReached = true; - } - } - - $refs = $vals = $queue[$i]; - if (\PHP_VERSION_ID < 70200 && empty($indexedArrays[$i])) { - // see https://wiki.php.net/rfc/convert_numeric_keys_in_object_array_casts - foreach ($vals as $k => $v) { - if (\is_int($k)) { - continue; - } - foreach ([$k => true] as $gk => $gv) { - } - if ($gk !== $k) { - $fromObjCast = true; - $refs = $vals = array_values($queue[$i]); - break; - } - } - } - foreach ($vals as $k => $v) { - // $v is the original value or a stub object in case of hard references - - if (\PHP_VERSION_ID >= 70400) { - $zvalIsRef = null !== \ReflectionReference::fromArrayElement($vals, $k); - } else { - $refs[$k] = $cookie; - $zvalIsRef = $vals[$k] === $cookie; - } - - if ($zvalIsRef) { - $vals[$k] = &$stub; // Break hard references to make $queue completely - unset($stub); // independent from the original structure - if ($v instanceof Stub && isset($hardRefs[spl_object_id($v)])) { - $vals[$k] = $refs[$k] = $v; - if ($v->value instanceof Stub && (Stub::TYPE_OBJECT === $v->value->type || Stub::TYPE_RESOURCE === $v->value->type)) { - ++$v->value->refCount; - } - ++$v->refCount; - continue; - } - $refs[$k] = $vals[$k] = new Stub(); - $refs[$k]->value = $v; - $h = spl_object_id($refs[$k]); - $hardRefs[$h] = &$refs[$k]; - $values[$h] = $v; - $vals[$k]->handle = ++$refsCounter; - } - // Create $stub when the original value $v can not be used directly - // If $v is a nested structure, put that structure in array $a - switch (true) { - case null === $v: - case \is_bool($v): - case \is_int($v): - case \is_float($v): - continue 2; - case \is_string($v): - if ('' === $v) { - continue 2; - } - if (!preg_match('//u', $v)) { - $stub = new Stub(); - $stub->type = Stub::TYPE_STRING; - $stub->class = Stub::STRING_BINARY; - if (0 <= $maxString && 0 < $cut = \strlen($v) - $maxString) { - $stub->cut = $cut; - $stub->value = substr($v, 0, -$cut); - } else { - $stub->value = $v; - } - } elseif (0 <= $maxString && isset($v[1 + ($maxString >> 2)]) && 0 < $cut = mb_strlen($v, 'UTF-8') - $maxString) { - $stub = new Stub(); - $stub->type = Stub::TYPE_STRING; - $stub->class = Stub::STRING_UTF8; - $stub->cut = $cut; - $stub->value = mb_substr($v, 0, $maxString, 'UTF-8'); - } else { - continue 2; - } - $a = null; - break; - - case \is_array($v): - if (!$v) { - continue 2; - } - $stub = $arrayStub; - $stub->class = Stub::ARRAY_INDEXED; - - $j = -1; - foreach ($v as $gk => $gv) { - if ($gk !== ++$j) { - $stub->class = Stub::ARRAY_ASSOC; - break; - } - } - $a = $v; - - if (Stub::ARRAY_ASSOC === $stub->class) { - // Copies of $GLOBALS have very strange behavior, - // let's detect them with some black magic - if (\PHP_VERSION_ID < 80100 && ($a[$gid] = true) && isset($v[$gid])) { - unset($v[$gid]); - $a = []; - foreach ($v as $gk => &$gv) { - if ($v === $gv) { - unset($v); - $v = new Stub(); - $v->value = [$v->cut = \count($gv), Stub::TYPE_ARRAY => 0]; - $v->handle = -1; - $gv = &$hardRefs[spl_object_id($v)]; - $gv = $v; - } - - $a[$gk] = &$gv; - } - unset($gv); - } else { - $a = $v; - } - } elseif (\PHP_VERSION_ID < 70200) { - $indexedArrays[$len] = true; - } - break; - - case \is_object($v): - case $v instanceof \__PHP_Incomplete_Class: - if (empty($objRefs[$h = spl_object_id($v)])) { - $stub = new Stub(); - $stub->type = Stub::TYPE_OBJECT; - $stub->class = \get_class($v); - $stub->value = $v; - $stub->handle = $h; - $a = $this->castObject($stub, 0 < $i); - if ($v !== $stub->value) { - if (Stub::TYPE_OBJECT !== $stub->type || null === $stub->value) { - break; - } - $stub->handle = $h = spl_object_id($stub->value); - } - $stub->value = null; - if (0 <= $maxItems && $maxItems <= $pos && $minimumDepthReached) { - $stub->cut = \count($a); - $a = null; - } - } - if (empty($objRefs[$h])) { - $objRefs[$h] = $stub; - $objects[] = $v; - } else { - $stub = $objRefs[$h]; - ++$stub->refCount; - $a = null; - } - break; - - default: // resource - if (empty($resRefs[$h = (int) $v])) { - $stub = new Stub(); - $stub->type = Stub::TYPE_RESOURCE; - if ('Unknown' === $stub->class = @get_resource_type($v)) { - $stub->class = 'Closed'; - } - $stub->value = $v; - $stub->handle = $h; - $a = $this->castResource($stub, 0 < $i); - $stub->value = null; - if (0 <= $maxItems && $maxItems <= $pos && $minimumDepthReached) { - $stub->cut = \count($a); - $a = null; - } - } - if (empty($resRefs[$h])) { - $resRefs[$h] = $stub; - } else { - $stub = $resRefs[$h]; - ++$stub->refCount; - $a = null; - } - break; - } - - if ($a) { - if (!$minimumDepthReached || 0 > $maxItems) { - $queue[$len] = $a; - $stub->position = $len++; - } elseif ($pos < $maxItems) { - if ($maxItems < $pos += \count($a)) { - $a = \array_slice($a, 0, $maxItems - $pos, true); - if ($stub->cut >= 0) { - $stub->cut += $pos - $maxItems; - } - } - $queue[$len] = $a; - $stub->position = $len++; - } elseif ($stub->cut >= 0) { - $stub->cut += \count($a); - $stub->position = 0; - } - } - - if ($arrayStub === $stub) { - if ($arrayStub->cut) { - $stub = [$arrayStub->cut, $arrayStub->class => $arrayStub->position]; - $arrayStub->cut = 0; - } elseif (isset(self::$arrayCache[$arrayStub->class][$arrayStub->position])) { - $stub = self::$arrayCache[$arrayStub->class][$arrayStub->position]; - } else { - self::$arrayCache[$arrayStub->class][$arrayStub->position] = $stub = [$arrayStub->class => $arrayStub->position]; - } - } - - if ($zvalIsRef) { - $refs[$k]->value = $stub; - } else { - $vals[$k] = $stub; - } - } - - if ($fromObjCast) { - $fromObjCast = false; - $refs = $vals; - $vals = []; - $j = -1; - foreach ($queue[$i] as $k => $v) { - foreach ([$k => true] as $gk => $gv) { - } - if ($gk !== $k) { - $vals = (object) $vals; - $vals->{$k} = $refs[++$j]; - $vals = (array) $vals; - } else { - $vals[$k] = $refs[++$j]; - } - } - } - - $queue[$i] = $vals; - } - - foreach ($values as $h => $v) { - $hardRefs[$h] = $v; - } - - return $queue; - } -} diff --git a/source/vendor/symfony/var-dumper/Command/Descriptor/CliDescriptor.php b/source/vendor/symfony/var-dumper/Command/Descriptor/CliDescriptor.php deleted file mode 100644 index 7d9ec0e..0000000 --- a/source/vendor/symfony/var-dumper/Command/Descriptor/CliDescriptor.php +++ /dev/null @@ -1,88 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Command\Descriptor; - -use Symfony\Component\Console\Formatter\OutputFormatterStyle; -use Symfony\Component\Console\Input\ArrayInput; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\VarDumper\Cloner\Data; -use Symfony\Component\VarDumper\Dumper\CliDumper; - -/** - * Describe collected data clones for cli output. - * - * @author Maxime Steinhausser - * - * @final - */ -class CliDescriptor implements DumpDescriptorInterface -{ - private $dumper; - private $lastIdentifier; - private $supportsHref; - - public function __construct(CliDumper $dumper) - { - $this->dumper = $dumper; - $this->supportsHref = method_exists(OutputFormatterStyle::class, 'setHref'); - } - - public function describe(OutputInterface $output, Data $data, array $context, int $clientId): void - { - $io = $output instanceof SymfonyStyle ? $output : new SymfonyStyle(new ArrayInput([]), $output); - $this->dumper->setColors($output->isDecorated()); - - $rows = [['date', date('r', (int) $context['timestamp'])]]; - $lastIdentifier = $this->lastIdentifier; - $this->lastIdentifier = $clientId; - - $section = "Received from client #$clientId"; - if (isset($context['request'])) { - $request = $context['request']; - $this->lastIdentifier = $request['identifier']; - $section = sprintf('%s %s', $request['method'], $request['uri']); - if ($controller = $request['controller']) { - $rows[] = ['controller', rtrim($this->dumper->dump($controller, true), "\n")]; - } - } elseif (isset($context['cli'])) { - $this->lastIdentifier = $context['cli']['identifier']; - $section = '$ '.$context['cli']['command_line']; - } - - if ($this->lastIdentifier !== $lastIdentifier) { - $io->section($section); - } - - if (isset($context['source'])) { - $source = $context['source']; - $sourceInfo = sprintf('%s on line %d', $source['name'], $source['line']); - $fileLink = $source['file_link'] ?? null; - if ($this->supportsHref && $fileLink) { - $sourceInfo = sprintf('%s', $fileLink, $sourceInfo); - } - $rows[] = ['source', $sourceInfo]; - $file = $source['file_relative'] ?? $source['file']; - $rows[] = ['file', $file]; - } - - $io->table([], $rows); - - if (!$this->supportsHref && isset($fileLink)) { - $io->writeln(['Open source in your IDE/browser:', $fileLink]); - $io->newLine(); - } - - $this->dumper->dump($data); - $io->newLine(); - } -} diff --git a/source/vendor/symfony/var-dumper/Command/Descriptor/DumpDescriptorInterface.php b/source/vendor/symfony/var-dumper/Command/Descriptor/DumpDescriptorInterface.php deleted file mode 100644 index 267d27b..0000000 --- a/source/vendor/symfony/var-dumper/Command/Descriptor/DumpDescriptorInterface.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Command\Descriptor; - -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\VarDumper\Cloner\Data; - -/** - * @author Maxime Steinhausser - */ -interface DumpDescriptorInterface -{ - public function describe(OutputInterface $output, Data $data, array $context, int $clientId): void; -} diff --git a/source/vendor/symfony/var-dumper/Command/Descriptor/HtmlDescriptor.php b/source/vendor/symfony/var-dumper/Command/Descriptor/HtmlDescriptor.php deleted file mode 100644 index 636b618..0000000 --- a/source/vendor/symfony/var-dumper/Command/Descriptor/HtmlDescriptor.php +++ /dev/null @@ -1,119 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Command\Descriptor; - -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\VarDumper\Cloner\Data; -use Symfony\Component\VarDumper\Dumper\HtmlDumper; - -/** - * Describe collected data clones for html output. - * - * @author Maxime Steinhausser - * - * @final - */ -class HtmlDescriptor implements DumpDescriptorInterface -{ - private $dumper; - private $initialized = false; - - public function __construct(HtmlDumper $dumper) - { - $this->dumper = $dumper; - } - - public function describe(OutputInterface $output, Data $data, array $context, int $clientId): void - { - if (!$this->initialized) { - $styles = file_get_contents(__DIR__.'/../../Resources/css/htmlDescriptor.css'); - $scripts = file_get_contents(__DIR__.'/../../Resources/js/htmlDescriptor.js'); - $output->writeln(""); - $this->initialized = true; - } - - $title = '-'; - if (isset($context['request'])) { - $request = $context['request']; - $controller = "{$this->dumper->dump($request['controller'], true, ['maxDepth' => 0])}"; - $title = sprintf('%s %s', $request['method'], $uri = $request['uri'], $uri); - $dedupIdentifier = $request['identifier']; - } elseif (isset($context['cli'])) { - $title = '$ '.$context['cli']['command_line']; - $dedupIdentifier = $context['cli']['identifier']; - } else { - $dedupIdentifier = uniqid('', true); - } - - $sourceDescription = ''; - if (isset($context['source'])) { - $source = $context['source']; - $projectDir = $source['project_dir'] ?? null; - $sourceDescription = sprintf('%s on line %d', $source['name'], $source['line']); - if (isset($source['file_link'])) { - $sourceDescription = sprintf('%s', $source['file_link'], $sourceDescription); - } - } - - $isoDate = $this->extractDate($context, 'c'); - $tags = array_filter([ - 'controller' => $controller ?? null, - 'project dir' => $projectDir ?? null, - ]); - - $output->writeln(<< -
        -
        -

        $title

        - -
        - {$this->renderTags($tags)} -
        -
        -

        - $sourceDescription -

        - {$this->dumper->dump($data, true)} -
        - -HTML - ); - } - - private function extractDate(array $context, string $format = 'r'): string - { - return date($format, (int) $context['timestamp']); - } - - private function renderTags(array $tags): string - { - if (!$tags) { - return ''; - } - - $renderedTags = ''; - foreach ($tags as $key => $value) { - $renderedTags .= sprintf('
      • %s%s
      • ', $key, $value); - } - - return << -
          - $renderedTags -
        -
        -HTML; - } -} diff --git a/source/vendor/symfony/var-dumper/Command/ServerDumpCommand.php b/source/vendor/symfony/var-dumper/Command/ServerDumpCommand.php deleted file mode 100644 index b66301b..0000000 --- a/source/vendor/symfony/var-dumper/Command/ServerDumpCommand.php +++ /dev/null @@ -1,101 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Command; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\VarDumper\Cloner\Data; -use Symfony\Component\VarDumper\Command\Descriptor\CliDescriptor; -use Symfony\Component\VarDumper\Command\Descriptor\DumpDescriptorInterface; -use Symfony\Component\VarDumper\Command\Descriptor\HtmlDescriptor; -use Symfony\Component\VarDumper\Dumper\CliDumper; -use Symfony\Component\VarDumper\Dumper\HtmlDumper; -use Symfony\Component\VarDumper\Server\DumpServer; - -/** - * Starts a dump server to collect and output dumps on a single place with multiple formats support. - * - * @author Maxime Steinhausser - * - * @final - */ -class ServerDumpCommand extends Command -{ - protected static $defaultName = 'server:dump'; - - private $server; - - /** @var DumpDescriptorInterface[] */ - private $descriptors; - - public function __construct(DumpServer $server, array $descriptors = []) - { - $this->server = $server; - $this->descriptors = $descriptors + [ - 'cli' => new CliDescriptor(new CliDumper()), - 'html' => new HtmlDescriptor(new HtmlDumper()), - ]; - - parent::__construct(); - } - - protected function configure() - { - $availableFormats = implode(', ', array_keys($this->descriptors)); - - $this - ->addOption('format', null, InputOption::VALUE_REQUIRED, sprintf('The output format (%s)', $availableFormats), 'cli') - ->setDescription('Start a dump server that collects and displays dumps in a single place') - ->setHelp(<<<'EOF' -%command.name% starts a dump server that collects and displays -dumps in a single place for debugging you application: - - php %command.full_name% - -You can consult dumped data in HTML format in your browser by providing the --format=html option -and redirecting the output to a file: - - php %command.full_name% --format="html" > dump.html - -EOF - ) - ; - } - - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output); - $format = $input->getOption('format'); - - if (!$descriptor = $this->descriptors[$format] ?? null) { - throw new InvalidArgumentException(sprintf('Unsupported format "%s".', $format)); - } - - $errorIo = $io->getErrorStyle(); - $errorIo->title('Symfony Var Dumper Server'); - - $this->server->start(); - - $errorIo->success(sprintf('Server listening on %s', $this->server->getHost())); - $errorIo->comment('Quit the server with CONTROL-C.'); - - $this->server->listen(function (Data $data, array $context, int $clientId) use ($descriptor, $io) { - $descriptor->describe($io, $data, $context, $clientId); - }); - - return 0; - } -} diff --git a/source/vendor/symfony/var-dumper/Dumper/AbstractDumper.php b/source/vendor/symfony/var-dumper/Dumper/AbstractDumper.php deleted file mode 100644 index 4ddaf5e..0000000 --- a/source/vendor/symfony/var-dumper/Dumper/AbstractDumper.php +++ /dev/null @@ -1,212 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Dumper; - -use Symfony\Component\VarDumper\Cloner\Data; -use Symfony\Component\VarDumper\Cloner\DumperInterface; - -/** - * Abstract mechanism for dumping a Data object. - * - * @author Nicolas Grekas - */ -abstract class AbstractDumper implements DataDumperInterface, DumperInterface -{ - public const DUMP_LIGHT_ARRAY = 1; - public const DUMP_STRING_LENGTH = 2; - public const DUMP_COMMA_SEPARATOR = 4; - public const DUMP_TRAILING_COMMA = 8; - - public static $defaultOutput = 'php://output'; - - protected $line = ''; - protected $lineDumper; - protected $outputStream; - protected $decimalPoint; // This is locale dependent - protected $indentPad = ' '; - protected $flags; - - private $charset = ''; - - /** - * @param callable|resource|string|null $output A line dumper callable, an opened stream or an output path, defaults to static::$defaultOutput - * @param string|null $charset The default character encoding to use for non-UTF8 strings - * @param int $flags A bit field of static::DUMP_* constants to fine tune dumps representation - */ - public function __construct($output = null, string $charset = null, int $flags = 0) - { - $this->flags = $flags; - $this->setCharset($charset ?: ini_get('php.output_encoding') ?: ini_get('default_charset') ?: 'UTF-8'); - $this->decimalPoint = localeconv(); - $this->decimalPoint = $this->decimalPoint['decimal_point']; - $this->setOutput($output ?: static::$defaultOutput); - if (!$output && \is_string(static::$defaultOutput)) { - static::$defaultOutput = $this->outputStream; - } - } - - /** - * Sets the output destination of the dumps. - * - * @param callable|resource|string $output A line dumper callable, an opened stream or an output path - * - * @return callable|resource|string The previous output destination - */ - public function setOutput($output) - { - $prev = $this->outputStream ?? $this->lineDumper; - - if (\is_callable($output)) { - $this->outputStream = null; - $this->lineDumper = $output; - } else { - if (\is_string($output)) { - $output = fopen($output, 'w'); - } - $this->outputStream = $output; - $this->lineDumper = [$this, 'echoLine']; - } - - return $prev; - } - - /** - * Sets the default character encoding to use for non-UTF8 strings. - * - * @param string $charset The default character encoding to use for non-UTF8 strings - * - * @return string The previous charset - */ - public function setCharset($charset) - { - $prev = $this->charset; - - $charset = strtoupper($charset); - $charset = null === $charset || 'UTF-8' === $charset || 'UTF8' === $charset ? 'CP1252' : $charset; - - $this->charset = $charset; - - return $prev; - } - - /** - * Sets the indentation pad string. - * - * @param string $pad A string that will be prepended to dumped lines, repeated by nesting level - * - * @return string The previous indent pad - */ - public function setIndentPad($pad) - { - $prev = $this->indentPad; - $this->indentPad = $pad; - - return $prev; - } - - /** - * Dumps a Data object. - * - * @param callable|resource|string|true|null $output A line dumper callable, an opened stream, an output path or true to return the dump - * - * @return string|null The dump as string when $output is true - */ - public function dump(Data $data, $output = null) - { - $this->decimalPoint = localeconv(); - $this->decimalPoint = $this->decimalPoint['decimal_point']; - - if ($locale = $this->flags & (self::DUMP_COMMA_SEPARATOR | self::DUMP_TRAILING_COMMA) ? setlocale(\LC_NUMERIC, 0) : null) { - setlocale(\LC_NUMERIC, 'C'); - } - - if ($returnDump = true === $output) { - $output = fopen('php://memory', 'r+'); - } - if ($output) { - $prevOutput = $this->setOutput($output); - } - try { - $data->dump($this); - $this->dumpLine(-1); - - if ($returnDump) { - $result = stream_get_contents($output, -1, 0); - fclose($output); - - return $result; - } - } finally { - if ($output) { - $this->setOutput($prevOutput); - } - if ($locale) { - setlocale(\LC_NUMERIC, $locale); - } - } - - return null; - } - - /** - * Dumps the current line. - * - * @param int $depth The recursive depth in the dumped structure for the line being dumped, - * or -1 to signal the end-of-dump to the line dumper callable - */ - protected function dumpLine($depth) - { - ($this->lineDumper)($this->line, $depth, $this->indentPad); - $this->line = ''; - } - - /** - * Generic line dumper callback. - * - * @param string $line The line to write - * @param int $depth The recursive depth in the dumped structure - * @param string $indentPad The line indent pad - */ - protected function echoLine($line, $depth, $indentPad) - { - if (-1 !== $depth) { - fwrite($this->outputStream, str_repeat($indentPad, $depth).$line."\n"); - } - } - - /** - * Converts a non-UTF-8 string to UTF-8. - * - * @param string|null $s The non-UTF-8 string to convert - * - * @return string|null The string converted to UTF-8 - */ - protected function utf8Encode($s) - { - if (null === $s || preg_match('//u', $s)) { - return $s; - } - - if (!\function_exists('iconv')) { - throw new \RuntimeException('Unable to convert a non-UTF-8 string to UTF-8: required function iconv() does not exist. You should install ext-iconv or symfony/polyfill-iconv.'); - } - - if (false !== $c = @iconv($this->charset, 'UTF-8', $s)) { - return $c; - } - if ('CP1252' !== $this->charset && false !== $c = @iconv('CP1252', 'UTF-8', $s)) { - return $c; - } - - return iconv('CP850', 'UTF-8', $s); - } -} diff --git a/source/vendor/symfony/var-dumper/Dumper/CliDumper.php b/source/vendor/symfony/var-dumper/Dumper/CliDumper.php deleted file mode 100644 index b3d9e25..0000000 --- a/source/vendor/symfony/var-dumper/Dumper/CliDumper.php +++ /dev/null @@ -1,655 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Dumper; - -use Symfony\Component\VarDumper\Cloner\Cursor; -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * CliDumper dumps variables for command line output. - * - * @author Nicolas Grekas - */ -class CliDumper extends AbstractDumper -{ - public static $defaultColors; - public static $defaultOutput = 'php://stdout'; - - protected $colors; - protected $maxStringWidth = 0; - protected $styles = [ - // See http://en.wikipedia.org/wiki/ANSI_escape_code#graphics - 'default' => '0;38;5;208', - 'num' => '1;38;5;38', - 'const' => '1;38;5;208', - 'str' => '1;38;5;113', - 'note' => '38;5;38', - 'ref' => '38;5;247', - 'public' => '', - 'protected' => '', - 'private' => '', - 'meta' => '38;5;170', - 'key' => '38;5;113', - 'index' => '38;5;38', - ]; - - protected static $controlCharsRx = '/[\x00-\x1F\x7F]+/'; - protected static $controlCharsMap = [ - "\t" => '\t', - "\n" => '\n', - "\v" => '\v', - "\f" => '\f', - "\r" => '\r', - "\033" => '\e', - ]; - - protected $collapseNextHash = false; - protected $expandNextHash = false; - - private $displayOptions = [ - 'fileLinkFormat' => null, - ]; - - private $handlesHrefGracefully; - - /** - * {@inheritdoc} - */ - public function __construct($output = null, string $charset = null, int $flags = 0) - { - parent::__construct($output, $charset, $flags); - - if ('\\' === \DIRECTORY_SEPARATOR && !$this->isWindowsTrueColor()) { - // Use only the base 16 xterm colors when using ANSICON or standard Windows 10 CLI - $this->setStyles([ - 'default' => '31', - 'num' => '1;34', - 'const' => '1;31', - 'str' => '1;32', - 'note' => '34', - 'ref' => '1;30', - 'meta' => '35', - 'key' => '32', - 'index' => '34', - ]); - } - - $this->displayOptions['fileLinkFormat'] = ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format') ?: 'file://%f#L%l'; - } - - /** - * Enables/disables colored output. - * - * @param bool $colors - */ - public function setColors($colors) - { - $this->colors = (bool) $colors; - } - - /** - * Sets the maximum number of characters per line for dumped strings. - * - * @param int $maxStringWidth - */ - public function setMaxStringWidth($maxStringWidth) - { - $this->maxStringWidth = (int) $maxStringWidth; - } - - /** - * Configures styles. - * - * @param array $styles A map of style names to style definitions - */ - public function setStyles(array $styles) - { - $this->styles = $styles + $this->styles; - } - - /** - * Configures display options. - * - * @param array $displayOptions A map of display options to customize the behavior - */ - public function setDisplayOptions(array $displayOptions) - { - $this->displayOptions = $displayOptions + $this->displayOptions; - } - - /** - * {@inheritdoc} - */ - public function dumpScalar(Cursor $cursor, $type, $value) - { - $this->dumpKey($cursor); - - $style = 'const'; - $attr = $cursor->attr; - - switch ($type) { - case 'default': - $style = 'default'; - break; - - case 'integer': - $style = 'num'; - break; - - case 'double': - $style = 'num'; - - switch (true) { - case \INF === $value: $value = 'INF'; break; - case -\INF === $value: $value = '-INF'; break; - case is_nan($value): $value = 'NAN'; break; - default: - $value = (string) $value; - if (!str_contains($value, $this->decimalPoint)) { - $value .= $this->decimalPoint.'0'; - } - break; - } - break; - - case 'NULL': - $value = 'null'; - break; - - case 'boolean': - $value = $value ? 'true' : 'false'; - break; - - default: - $attr += ['value' => $this->utf8Encode($value)]; - $value = $this->utf8Encode($type); - break; - } - - $this->line .= $this->style($style, $value, $attr); - - $this->endValue($cursor); - } - - /** - * {@inheritdoc} - */ - public function dumpString(Cursor $cursor, $str, $bin, $cut) - { - $this->dumpKey($cursor); - $attr = $cursor->attr; - - if ($bin) { - $str = $this->utf8Encode($str); - } - if ('' === $str) { - $this->line .= '""'; - $this->endValue($cursor); - } else { - $attr += [ - 'length' => 0 <= $cut ? mb_strlen($str, 'UTF-8') + $cut : 0, - 'binary' => $bin, - ]; - $str = explode("\n", $str); - if (isset($str[1]) && !isset($str[2]) && !isset($str[1][0])) { - unset($str[1]); - $str[0] .= "\n"; - } - $m = \count($str) - 1; - $i = $lineCut = 0; - - if (self::DUMP_STRING_LENGTH & $this->flags) { - $this->line .= '('.$attr['length'].') '; - } - if ($bin) { - $this->line .= 'b'; - } - - if ($m) { - $this->line .= '"""'; - $this->dumpLine($cursor->depth); - } else { - $this->line .= '"'; - } - - foreach ($str as $str) { - if ($i < $m) { - $str .= "\n"; - } - if (0 < $this->maxStringWidth && $this->maxStringWidth < $len = mb_strlen($str, 'UTF-8')) { - $str = mb_substr($str, 0, $this->maxStringWidth, 'UTF-8'); - $lineCut = $len - $this->maxStringWidth; - } - if ($m && 0 < $cursor->depth) { - $this->line .= $this->indentPad; - } - if ('' !== $str) { - $this->line .= $this->style('str', $str, $attr); - } - if ($i++ == $m) { - if ($m) { - if ('' !== $str) { - $this->dumpLine($cursor->depth); - if (0 < $cursor->depth) { - $this->line .= $this->indentPad; - } - } - $this->line .= '"""'; - } else { - $this->line .= '"'; - } - if ($cut < 0) { - $this->line .= '…'; - $lineCut = 0; - } elseif ($cut) { - $lineCut += $cut; - } - } - if ($lineCut) { - $this->line .= '…'.$lineCut; - $lineCut = 0; - } - - if ($i > $m) { - $this->endValue($cursor); - } else { - $this->dumpLine($cursor->depth); - } - } - } - } - - /** - * {@inheritdoc} - */ - public function enterHash(Cursor $cursor, $type, $class, $hasChild) - { - if (null === $this->colors) { - $this->colors = $this->supportsColors(); - } - - $this->dumpKey($cursor); - $attr = $cursor->attr; - - if ($this->collapseNextHash) { - $cursor->skipChildren = true; - $this->collapseNextHash = $hasChild = false; - } - - $class = $this->utf8Encode($class); - if (Cursor::HASH_OBJECT === $type) { - $prefix = $class && 'stdClass' !== $class ? $this->style('note', $class, $attr).(empty($attr['cut_hash']) ? ' {' : '') : '{'; - } elseif (Cursor::HASH_RESOURCE === $type) { - $prefix = $this->style('note', $class.' resource', $attr).($hasChild ? ' {' : ' '); - } else { - $prefix = $class && !(self::DUMP_LIGHT_ARRAY & $this->flags) ? $this->style('note', 'array:'.$class).' [' : '['; - } - - if (($cursor->softRefCount || 0 < $cursor->softRefHandle) && empty($attr['cut_hash'])) { - $prefix .= $this->style('ref', (Cursor::HASH_RESOURCE === $type ? '@' : '#').(0 < $cursor->softRefHandle ? $cursor->softRefHandle : $cursor->softRefTo), ['count' => $cursor->softRefCount]); - } elseif ($cursor->hardRefTo && !$cursor->refIndex && $class) { - $prefix .= $this->style('ref', '&'.$cursor->hardRefTo, ['count' => $cursor->hardRefCount]); - } elseif (!$hasChild && Cursor::HASH_RESOURCE === $type) { - $prefix = substr($prefix, 0, -1); - } - - $this->line .= $prefix; - - if ($hasChild) { - $this->dumpLine($cursor->depth); - } - } - - /** - * {@inheritdoc} - */ - public function leaveHash(Cursor $cursor, $type, $class, $hasChild, $cut) - { - if (empty($cursor->attr['cut_hash'])) { - $this->dumpEllipsis($cursor, $hasChild, $cut); - $this->line .= Cursor::HASH_OBJECT === $type ? '}' : (Cursor::HASH_RESOURCE !== $type ? ']' : ($hasChild ? '}' : '')); - } - - $this->endValue($cursor); - } - - /** - * Dumps an ellipsis for cut children. - * - * @param bool $hasChild When the dump of the hash has child item - * @param int $cut The number of items the hash has been cut by - */ - protected function dumpEllipsis(Cursor $cursor, $hasChild, $cut) - { - if ($cut) { - $this->line .= ' …'; - if (0 < $cut) { - $this->line .= $cut; - } - if ($hasChild) { - $this->dumpLine($cursor->depth + 1); - } - } - } - - /** - * Dumps a key in a hash structure. - */ - protected function dumpKey(Cursor $cursor) - { - if (null !== $key = $cursor->hashKey) { - if ($cursor->hashKeyIsBinary) { - $key = $this->utf8Encode($key); - } - $attr = ['binary' => $cursor->hashKeyIsBinary]; - $bin = $cursor->hashKeyIsBinary ? 'b' : ''; - $style = 'key'; - switch ($cursor->hashType) { - default: - case Cursor::HASH_INDEXED: - if (self::DUMP_LIGHT_ARRAY & $this->flags) { - break; - } - $style = 'index'; - // no break - case Cursor::HASH_ASSOC: - if (\is_int($key)) { - $this->line .= $this->style($style, $key).' => '; - } else { - $this->line .= $bin.'"'.$this->style($style, $key).'" => '; - } - break; - - case Cursor::HASH_RESOURCE: - $key = "\0~\0".$key; - // no break - case Cursor::HASH_OBJECT: - if (!isset($key[0]) || "\0" !== $key[0]) { - $this->line .= '+'.$bin.$this->style('public', $key).': '; - } elseif (0 < strpos($key, "\0", 1)) { - $key = explode("\0", substr($key, 1), 2); - - switch ($key[0][0]) { - case '+': // User inserted keys - $attr['dynamic'] = true; - $this->line .= '+'.$bin.'"'.$this->style('public', $key[1], $attr).'": '; - break 2; - case '~': - $style = 'meta'; - if (isset($key[0][1])) { - parse_str(substr($key[0], 1), $attr); - $attr += ['binary' => $cursor->hashKeyIsBinary]; - } - break; - case '*': - $style = 'protected'; - $bin = '#'.$bin; - break; - default: - $attr['class'] = $key[0]; - $style = 'private'; - $bin = '-'.$bin; - break; - } - - if (isset($attr['collapse'])) { - if ($attr['collapse']) { - $this->collapseNextHash = true; - } else { - $this->expandNextHash = true; - } - } - - $this->line .= $bin.$this->style($style, $key[1], $attr).($attr['separator'] ?? ': '); - } else { - // This case should not happen - $this->line .= '-'.$bin.'"'.$this->style('private', $key, ['class' => '']).'": '; - } - break; - } - - if ($cursor->hardRefTo) { - $this->line .= $this->style('ref', '&'.($cursor->hardRefCount ? $cursor->hardRefTo : ''), ['count' => $cursor->hardRefCount]).' '; - } - } - } - - /** - * Decorates a value with some style. - * - * @param string $style The type of style being applied - * @param string $value The value being styled - * @param array $attr Optional context information - * - * @return string The value with style decoration - */ - protected function style($style, $value, $attr = []) - { - if (null === $this->colors) { - $this->colors = $this->supportsColors(); - } - - if (null === $this->handlesHrefGracefully) { - $this->handlesHrefGracefully = 'JetBrains-JediTerm' !== getenv('TERMINAL_EMULATOR') - && (!getenv('KONSOLE_VERSION') || (int) getenv('KONSOLE_VERSION') > 201100); - } - - if (isset($attr['ellipsis'], $attr['ellipsis-type'])) { - $prefix = substr($value, 0, -$attr['ellipsis']); - if ('cli' === \PHP_SAPI && 'path' === $attr['ellipsis-type'] && isset($_SERVER[$pwd = '\\' === \DIRECTORY_SEPARATOR ? 'CD' : 'PWD']) && str_starts_with($prefix, $_SERVER[$pwd])) { - $prefix = '.'.substr($prefix, \strlen($_SERVER[$pwd])); - } - if (!empty($attr['ellipsis-tail'])) { - $prefix .= substr($value, -$attr['ellipsis'], $attr['ellipsis-tail']); - $value = substr($value, -$attr['ellipsis'] + $attr['ellipsis-tail']); - } else { - $value = substr($value, -$attr['ellipsis']); - } - - $value = $this->style('default', $prefix).$this->style($style, $value); - - goto href; - } - - $map = static::$controlCharsMap; - $startCchr = $this->colors ? "\033[m\033[{$this->styles['default']}m" : ''; - $endCchr = $this->colors ? "\033[m\033[{$this->styles[$style]}m" : ''; - $value = preg_replace_callback(static::$controlCharsRx, function ($c) use ($map, $startCchr, $endCchr) { - $s = $startCchr; - $c = $c[$i = 0]; - do { - $s .= $map[$c[$i]] ?? sprintf('\x%02X', \ord($c[$i])); - } while (isset($c[++$i])); - - return $s.$endCchr; - }, $value, -1, $cchrCount); - - if ($this->colors) { - if ($cchrCount && "\033" === $value[0]) { - $value = substr($value, \strlen($startCchr)); - } else { - $value = "\033[{$this->styles[$style]}m".$value; - } - if ($cchrCount && str_ends_with($value, $endCchr)) { - $value = substr($value, 0, -\strlen($endCchr)); - } else { - $value .= "\033[{$this->styles['default']}m"; - } - } - - href: - if ($this->colors && $this->handlesHrefGracefully) { - if (isset($attr['file']) && $href = $this->getSourceLink($attr['file'], $attr['line'] ?? 0)) { - if ('note' === $style) { - $value .= "\033]8;;{$href}\033\\^\033]8;;\033\\"; - } else { - $attr['href'] = $href; - } - } - if (isset($attr['href'])) { - $value = "\033]8;;{$attr['href']}\033\\{$value}\033]8;;\033\\"; - } - } elseif ($attr['if_links'] ?? false) { - return ''; - } - - return $value; - } - - /** - * @return bool Tells if the current output stream supports ANSI colors or not - */ - protected function supportsColors() - { - if ($this->outputStream !== static::$defaultOutput) { - return $this->hasColorSupport($this->outputStream); - } - if (null !== static::$defaultColors) { - return static::$defaultColors; - } - if (isset($_SERVER['argv'][1])) { - $colors = $_SERVER['argv']; - $i = \count($colors); - while (--$i > 0) { - if (isset($colors[$i][5])) { - switch ($colors[$i]) { - case '--ansi': - case '--color': - case '--color=yes': - case '--color=force': - case '--color=always': - return static::$defaultColors = true; - - case '--no-ansi': - case '--color=no': - case '--color=none': - case '--color=never': - return static::$defaultColors = false; - } - } - } - } - - $h = stream_get_meta_data($this->outputStream) + ['wrapper_type' => null]; - $h = 'Output' === $h['stream_type'] && 'PHP' === $h['wrapper_type'] ? fopen('php://stdout', 'w') : $this->outputStream; - - return static::$defaultColors = $this->hasColorSupport($h); - } - - /** - * {@inheritdoc} - */ - protected function dumpLine($depth, $endOfValue = false) - { - if ($this->colors) { - $this->line = sprintf("\033[%sm%s\033[m", $this->styles['default'], $this->line); - } - parent::dumpLine($depth); - } - - protected function endValue(Cursor $cursor) - { - if (-1 === $cursor->hashType) { - return; - } - - if (Stub::ARRAY_INDEXED === $cursor->hashType || Stub::ARRAY_ASSOC === $cursor->hashType) { - if (self::DUMP_TRAILING_COMMA & $this->flags && 0 < $cursor->depth) { - $this->line .= ','; - } elseif (self::DUMP_COMMA_SEPARATOR & $this->flags && 1 < $cursor->hashLength - $cursor->hashIndex) { - $this->line .= ','; - } - } - - $this->dumpLine($cursor->depth, true); - } - - /** - * Returns true if the stream supports colorization. - * - * Reference: Composer\XdebugHandler\Process::supportsColor - * https://github.com/composer/xdebug-handler - * - * @param mixed $stream A CLI output stream - */ - private function hasColorSupport($stream): bool - { - if (!\is_resource($stream) || 'stream' !== get_resource_type($stream)) { - return false; - } - - // Follow https://no-color.org/ - if (isset($_SERVER['NO_COLOR']) || false !== getenv('NO_COLOR')) { - return false; - } - - if ('Hyper' === getenv('TERM_PROGRAM')) { - return true; - } - - if (\DIRECTORY_SEPARATOR === '\\') { - return (\function_exists('sapi_windows_vt100_support') - && @sapi_windows_vt100_support($stream)) - || false !== getenv('ANSICON') - || 'ON' === getenv('ConEmuANSI') - || 'xterm' === getenv('TERM'); - } - - if (\function_exists('stream_isatty')) { - return @stream_isatty($stream); - } - - if (\function_exists('posix_isatty')) { - return @posix_isatty($stream); - } - - $stat = @fstat($stream); - // Check if formatted mode is S_IFCHR - return $stat ? 0020000 === ($stat['mode'] & 0170000) : false; - } - - /** - * Returns true if the Windows terminal supports true color. - * - * Note that this does not check an output stream, but relies on environment - * variables from known implementations, or a PHP and Windows version that - * supports true color. - */ - private function isWindowsTrueColor(): bool - { - $result = 183 <= getenv('ANSICON_VER') - || 'ON' === getenv('ConEmuANSI') - || 'xterm' === getenv('TERM') - || 'Hyper' === getenv('TERM_PROGRAM'); - - if (!$result && \PHP_VERSION_ID >= 70200) { - $version = sprintf( - '%s.%s.%s', - PHP_WINDOWS_VERSION_MAJOR, - PHP_WINDOWS_VERSION_MINOR, - PHP_WINDOWS_VERSION_BUILD - ); - $result = $version >= '10.0.15063'; - } - - return $result; - } - - private function getSourceLink(string $file, int $line) - { - if ($fmt = $this->displayOptions['fileLinkFormat']) { - return \is_string($fmt) ? strtr($fmt, ['%f' => $file, '%l' => $line]) : ($fmt->format($file, $line) ?: 'file://'.$file.'#L'.$line); - } - - return false; - } -} diff --git a/source/vendor/symfony/var-dumper/Dumper/ContextProvider/CliContextProvider.php b/source/vendor/symfony/var-dumper/Dumper/ContextProvider/CliContextProvider.php deleted file mode 100644 index 38f8789..0000000 --- a/source/vendor/symfony/var-dumper/Dumper/ContextProvider/CliContextProvider.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Dumper\ContextProvider; - -/** - * Tries to provide context on CLI. - * - * @author Maxime Steinhausser - */ -final class CliContextProvider implements ContextProviderInterface -{ - public function getContext(): ?array - { - if ('cli' !== \PHP_SAPI) { - return null; - } - - return [ - 'command_line' => $commandLine = implode(' ', $_SERVER['argv'] ?? []), - 'identifier' => hash('crc32b', $commandLine.$_SERVER['REQUEST_TIME_FLOAT']), - ]; - } -} diff --git a/source/vendor/symfony/var-dumper/Dumper/ContextProvider/ContextProviderInterface.php b/source/vendor/symfony/var-dumper/Dumper/ContextProvider/ContextProviderInterface.php deleted file mode 100644 index 38ef3b0..0000000 --- a/source/vendor/symfony/var-dumper/Dumper/ContextProvider/ContextProviderInterface.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Dumper\ContextProvider; - -/** - * Interface to provide contextual data about dump data clones sent to a server. - * - * @author Maxime Steinhausser - */ -interface ContextProviderInterface -{ - /** - * @return array|null Context data or null if unable to provide any context - */ - public function getContext(): ?array; -} diff --git a/source/vendor/symfony/var-dumper/Dumper/ContextProvider/RequestContextProvider.php b/source/vendor/symfony/var-dumper/Dumper/ContextProvider/RequestContextProvider.php deleted file mode 100644 index 3684a47..0000000 --- a/source/vendor/symfony/var-dumper/Dumper/ContextProvider/RequestContextProvider.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Dumper\ContextProvider; - -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\VarDumper\Caster\ReflectionCaster; -use Symfony\Component\VarDumper\Cloner\VarCloner; - -/** - * Tries to provide context from a request. - * - * @author Maxime Steinhausser - */ -final class RequestContextProvider implements ContextProviderInterface -{ - private $requestStack; - private $cloner; - - public function __construct(RequestStack $requestStack) - { - $this->requestStack = $requestStack; - $this->cloner = new VarCloner(); - $this->cloner->setMaxItems(0); - $this->cloner->addCasters(ReflectionCaster::UNSET_CLOSURE_FILE_INFO); - } - - public function getContext(): ?array - { - if (null === $request = $this->requestStack->getCurrentRequest()) { - return null; - } - - $controller = $request->attributes->get('_controller'); - - return [ - 'uri' => $request->getUri(), - 'method' => $request->getMethod(), - 'controller' => $controller ? $this->cloner->cloneVar($controller) : $controller, - 'identifier' => spl_object_hash($request), - ]; - } -} diff --git a/source/vendor/symfony/var-dumper/Dumper/ContextProvider/SourceContextProvider.php b/source/vendor/symfony/var-dumper/Dumper/ContextProvider/SourceContextProvider.php deleted file mode 100644 index 2e2c818..0000000 --- a/source/vendor/symfony/var-dumper/Dumper/ContextProvider/SourceContextProvider.php +++ /dev/null @@ -1,126 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Dumper\ContextProvider; - -use Symfony\Component\HttpKernel\Debug\FileLinkFormatter; -use Symfony\Component\VarDumper\Cloner\VarCloner; -use Symfony\Component\VarDumper\Dumper\HtmlDumper; -use Symfony\Component\VarDumper\VarDumper; -use Twig\Template; - -/** - * Tries to provide context from sources (class name, file, line, code excerpt, ...). - * - * @author Nicolas Grekas - * @author Maxime Steinhausser - */ -final class SourceContextProvider implements ContextProviderInterface -{ - private $limit; - private $charset; - private $projectDir; - private $fileLinkFormatter; - - public function __construct(string $charset = null, string $projectDir = null, FileLinkFormatter $fileLinkFormatter = null, int $limit = 9) - { - $this->charset = $charset; - $this->projectDir = $projectDir; - $this->fileLinkFormatter = $fileLinkFormatter; - $this->limit = $limit; - } - - public function getContext(): ?array - { - $trace = debug_backtrace(\DEBUG_BACKTRACE_PROVIDE_OBJECT | \DEBUG_BACKTRACE_IGNORE_ARGS, $this->limit); - - $file = $trace[1]['file']; - $line = $trace[1]['line']; - $name = false; - $fileExcerpt = false; - - for ($i = 2; $i < $this->limit; ++$i) { - if (isset($trace[$i]['class'], $trace[$i]['function']) - && 'dump' === $trace[$i]['function'] - && VarDumper::class === $trace[$i]['class'] - ) { - $file = $trace[$i]['file'] ?? $file; - $line = $trace[$i]['line'] ?? $line; - - while (++$i < $this->limit) { - if (isset($trace[$i]['function'], $trace[$i]['file']) && empty($trace[$i]['class']) && !str_starts_with($trace[$i]['function'], 'call_user_func')) { - $file = $trace[$i]['file']; - $line = $trace[$i]['line']; - - break; - } elseif (isset($trace[$i]['object']) && $trace[$i]['object'] instanceof Template) { - $template = $trace[$i]['object']; - $name = $template->getTemplateName(); - $src = method_exists($template, 'getSourceContext') ? $template->getSourceContext()->getCode() : (method_exists($template, 'getSource') ? $template->getSource() : false); - $info = $template->getDebugInfo(); - if (isset($info[$trace[$i - 1]['line']])) { - $line = $info[$trace[$i - 1]['line']]; - $file = method_exists($template, 'getSourceContext') ? $template->getSourceContext()->getPath() : null; - - if ($src) { - $src = explode("\n", $src); - $fileExcerpt = []; - - for ($i = max($line - 3, 1), $max = min($line + 3, \count($src)); $i <= $max; ++$i) { - $fileExcerpt[] = ''.$this->htmlEncode($src[$i - 1]).'
      • '; - } - - $fileExcerpt = '
          '.implode("\n", $fileExcerpt).'
        '; - } - } - break; - } - } - break; - } - } - - if (false === $name) { - $name = str_replace('\\', '/', $file); - $name = substr($name, strrpos($name, '/') + 1); - } - - $context = ['name' => $name, 'file' => $file, 'line' => $line]; - $context['file_excerpt'] = $fileExcerpt; - - if (null !== $this->projectDir) { - $context['project_dir'] = $this->projectDir; - if (str_starts_with($file, $this->projectDir)) { - $context['file_relative'] = ltrim(substr($file, \strlen($this->projectDir)), \DIRECTORY_SEPARATOR); - } - } - - if ($this->fileLinkFormatter && $fileLink = $this->fileLinkFormatter->format($context['file'], $context['line'])) { - $context['file_link'] = $fileLink; - } - - return $context; - } - - private function htmlEncode(string $s): string - { - $html = ''; - - $dumper = new HtmlDumper(function ($line) use (&$html) { $html .= $line; }, $this->charset); - $dumper->setDumpHeader(''); - $dumper->setDumpBoundaries('', ''); - - $cloner = new VarCloner(); - $dumper->dump($cloner->cloneVar($s)); - - return substr(strip_tags($html), 1, -1); - } -} diff --git a/source/vendor/symfony/var-dumper/Dumper/ContextualizedDumper.php b/source/vendor/symfony/var-dumper/Dumper/ContextualizedDumper.php deleted file mode 100644 index 7638417..0000000 --- a/source/vendor/symfony/var-dumper/Dumper/ContextualizedDumper.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Dumper; - -use Symfony\Component\VarDumper\Cloner\Data; -use Symfony\Component\VarDumper\Dumper\ContextProvider\ContextProviderInterface; - -/** - * @author Kévin Thérage - */ -class ContextualizedDumper implements DataDumperInterface -{ - private $wrappedDumper; - private $contextProviders; - - /** - * @param ContextProviderInterface[] $contextProviders - */ - public function __construct(DataDumperInterface $wrappedDumper, array $contextProviders) - { - $this->wrappedDumper = $wrappedDumper; - $this->contextProviders = $contextProviders; - } - - public function dump(Data $data) - { - $context = []; - foreach ($this->contextProviders as $contextProvider) { - $context[\get_class($contextProvider)] = $contextProvider->getContext(); - } - - $this->wrappedDumper->dump($data->withContext($context)); - } -} diff --git a/source/vendor/symfony/var-dumper/Dumper/DataDumperInterface.php b/source/vendor/symfony/var-dumper/Dumper/DataDumperInterface.php deleted file mode 100644 index b173bcc..0000000 --- a/source/vendor/symfony/var-dumper/Dumper/DataDumperInterface.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Dumper; - -use Symfony\Component\VarDumper\Cloner\Data; - -/** - * DataDumperInterface for dumping Data objects. - * - * @author Nicolas Grekas - */ -interface DataDumperInterface -{ - public function dump(Data $data); -} diff --git a/source/vendor/symfony/var-dumper/Dumper/HtmlDumper.php b/source/vendor/symfony/var-dumper/Dumper/HtmlDumper.php deleted file mode 100644 index 8409a0c..0000000 --- a/source/vendor/symfony/var-dumper/Dumper/HtmlDumper.php +++ /dev/null @@ -1,1004 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Dumper; - -use Symfony\Component\VarDumper\Cloner\Cursor; -use Symfony\Component\VarDumper\Cloner\Data; - -/** - * HtmlDumper dumps variables as HTML. - * - * @author Nicolas Grekas - */ -class HtmlDumper extends CliDumper -{ - public static $defaultOutput = 'php://output'; - - protected static $themes = [ - 'dark' => [ - 'default' => 'background-color:#18171B; color:#FF8400; line-height:1.2em; font:12px Menlo, Monaco, Consolas, monospace; word-wrap: break-word; white-space: pre-wrap; position:relative; z-index:99999; word-break: break-all', - 'num' => 'font-weight:bold; color:#1299DA', - 'const' => 'font-weight:bold', - 'str' => 'font-weight:bold; color:#56DB3A', - 'note' => 'color:#1299DA', - 'ref' => 'color:#A0A0A0', - 'public' => 'color:#FFFFFF', - 'protected' => 'color:#FFFFFF', - 'private' => 'color:#FFFFFF', - 'meta' => 'color:#B729D9', - 'key' => 'color:#56DB3A', - 'index' => 'color:#1299DA', - 'ellipsis' => 'color:#FF8400', - 'ns' => 'user-select:none;', - ], - 'light' => [ - 'default' => 'background:none; color:#CC7832; line-height:1.2em; font:12px Menlo, Monaco, Consolas, monospace; word-wrap: break-word; white-space: pre-wrap; position:relative; z-index:99999; word-break: break-all', - 'num' => 'font-weight:bold; color:#1299DA', - 'const' => 'font-weight:bold', - 'str' => 'font-weight:bold; color:#629755;', - 'note' => 'color:#6897BB', - 'ref' => 'color:#6E6E6E', - 'public' => 'color:#262626', - 'protected' => 'color:#262626', - 'private' => 'color:#262626', - 'meta' => 'color:#B729D9', - 'key' => 'color:#789339', - 'index' => 'color:#1299DA', - 'ellipsis' => 'color:#CC7832', - 'ns' => 'user-select:none;', - ], - ]; - - protected $dumpHeader; - protected $dumpPrefix = '
        ';
        -    protected $dumpSuffix = '
        '; - protected $dumpId = 'sf-dump'; - protected $colors = true; - protected $headerIsDumped = false; - protected $lastDepth = -1; - protected $styles; - - private $displayOptions = [ - 'maxDepth' => 1, - 'maxStringLength' => 160, - 'fileLinkFormat' => null, - ]; - private $extraDisplayOptions = []; - - /** - * {@inheritdoc} - */ - public function __construct($output = null, string $charset = null, int $flags = 0) - { - AbstractDumper::__construct($output, $charset, $flags); - $this->dumpId = 'sf-dump-'.mt_rand(); - $this->displayOptions['fileLinkFormat'] = ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format'); - $this->styles = static::$themes['dark'] ?? self::$themes['dark']; - } - - /** - * {@inheritdoc} - */ - public function setStyles(array $styles) - { - $this->headerIsDumped = false; - $this->styles = $styles + $this->styles; - } - - public function setTheme(string $themeName) - { - if (!isset(static::$themes[$themeName])) { - throw new \InvalidArgumentException(sprintf('Theme "%s" does not exist in class "%s".', $themeName, static::class)); - } - - $this->setStyles(static::$themes[$themeName]); - } - - /** - * Configures display options. - * - * @param array $displayOptions A map of display options to customize the behavior - */ - public function setDisplayOptions(array $displayOptions) - { - $this->headerIsDumped = false; - $this->displayOptions = $displayOptions + $this->displayOptions; - } - - /** - * Sets an HTML header that will be dumped once in the output stream. - * - * @param string $header An HTML string - */ - public function setDumpHeader($header) - { - $this->dumpHeader = $header; - } - - /** - * Sets an HTML prefix and suffix that will encapse every single dump. - * - * @param string $prefix The prepended HTML string - * @param string $suffix The appended HTML string - */ - public function setDumpBoundaries($prefix, $suffix) - { - $this->dumpPrefix = $prefix; - $this->dumpSuffix = $suffix; - } - - /** - * {@inheritdoc} - */ - public function dump(Data $data, $output = null, array $extraDisplayOptions = []) - { - $this->extraDisplayOptions = $extraDisplayOptions; - $result = parent::dump($data, $output); - $this->dumpId = 'sf-dump-'.mt_rand(); - - return $result; - } - - /** - * Dumps the HTML header. - */ - protected function getDumpHeader() - { - $this->headerIsDumped = $this->outputStream ?? $this->lineDumper; - - if (null !== $this->dumpHeader) { - return $this->dumpHeader; - } - - $line = str_replace('{$options}', json_encode($this->displayOptions, \JSON_FORCE_OBJECT), <<<'EOHTML' -'.$this->dumpHeader; - } - - /** - * {@inheritdoc} - */ - public function dumpString(Cursor $cursor, $str, $bin, $cut) - { - if ('' === $str && isset($cursor->attr['img-data'], $cursor->attr['content-type'])) { - $this->dumpKey($cursor); - $this->line .= $this->style('default', $cursor->attr['img-size'] ?? '', []).' '; - $this->endValue($cursor); - $this->line .= $this->indentPad; - $this->line .= sprintf('', $cursor->attr['content-type'], base64_encode($cursor->attr['img-data'])); - $this->endValue($cursor); - } else { - parent::dumpString($cursor, $str, $bin, $cut); - } - } - - /** - * {@inheritdoc} - */ - public function enterHash(Cursor $cursor, $type, $class, $hasChild) - { - if (Cursor::HASH_OBJECT === $type) { - $cursor->attr['depth'] = $cursor->depth; - } - parent::enterHash($cursor, $type, $class, false); - - if ($cursor->skipChildren) { - $cursor->skipChildren = false; - $eol = ' class=sf-dump-compact>'; - } elseif ($this->expandNextHash) { - $this->expandNextHash = false; - $eol = ' class=sf-dump-expanded>'; - } else { - $eol = '>'; - } - - if ($hasChild) { - $this->line .= 'refIndex) { - $r = Cursor::HASH_OBJECT !== $type ? 1 - (Cursor::HASH_RESOURCE !== $type) : 2; - $r .= $r && 0 < $cursor->softRefHandle ? $cursor->softRefHandle : $cursor->refIndex; - - $this->line .= sprintf(' id=%s-ref%s', $this->dumpId, $r); - } - $this->line .= $eol; - $this->dumpLine($cursor->depth); - } - } - - /** - * {@inheritdoc} - */ - public function leaveHash(Cursor $cursor, $type, $class, $hasChild, $cut) - { - $this->dumpEllipsis($cursor, $hasChild, $cut); - if ($hasChild) { - $this->line .= ''; - } - parent::leaveHash($cursor, $type, $class, $hasChild, 0); - } - - /** - * {@inheritdoc} - */ - protected function style($style, $value, $attr = []) - { - if ('' === $value) { - return ''; - } - - $v = esc($value); - - if ('ref' === $style) { - if (empty($attr['count'])) { - return sprintf('%s', $v); - } - $r = ('#' !== $v[0] ? 1 - ('@' !== $v[0]) : 2).substr($value, 1); - - return sprintf('%s', $this->dumpId, $r, 1 + $attr['count'], $v); - } - - if ('const' === $style && isset($attr['value'])) { - $style .= sprintf(' title="%s"', esc(is_scalar($attr['value']) ? $attr['value'] : json_encode($attr['value']))); - } elseif ('public' === $style) { - $style .= sprintf(' title="%s"', empty($attr['dynamic']) ? 'Public property' : 'Runtime added dynamic property'); - } elseif ('str' === $style && 1 < $attr['length']) { - $style .= sprintf(' title="%d%s characters"', $attr['length'], $attr['binary'] ? ' binary or non-UTF-8' : ''); - } elseif ('note' === $style && 0 < ($attr['depth'] ?? 0) && false !== $c = strrpos($value, '\\')) { - $style .= ' title=""'; - $attr += [ - 'ellipsis' => \strlen($value) - $c, - 'ellipsis-type' => 'note', - 'ellipsis-tail' => 1, - ]; - } elseif ('protected' === $style) { - $style .= ' title="Protected property"'; - } elseif ('meta' === $style && isset($attr['title'])) { - $style .= sprintf(' title="%s"', esc($this->utf8Encode($attr['title']))); - } elseif ('private' === $style) { - $style .= sprintf(' title="Private property defined in class: `%s`"', esc($this->utf8Encode($attr['class']))); - } - $map = static::$controlCharsMap; - - if (isset($attr['ellipsis'])) { - $class = 'sf-dump-ellipsis'; - if (isset($attr['ellipsis-type'])) { - $class = sprintf('"%s sf-dump-ellipsis-%s"', $class, $attr['ellipsis-type']); - } - $label = esc(substr($value, -$attr['ellipsis'])); - $style = str_replace(' title="', " title=\"$v\n", $style); - $v = sprintf('%s', $class, substr($v, 0, -\strlen($label))); - - if (!empty($attr['ellipsis-tail'])) { - $tail = \strlen(esc(substr($value, -$attr['ellipsis'], $attr['ellipsis-tail']))); - $v .= sprintf('%s%s', $class, substr($label, 0, $tail), substr($label, $tail)); - } else { - $v .= $label; - } - } - - $v = "".preg_replace_callback(static::$controlCharsRx, function ($c) use ($map) { - $s = $b = ''; - }, $v).''; - - if (isset($attr['file']) && $href = $this->getSourceLink($attr['file'], $attr['line'] ?? 0)) { - $attr['href'] = $href; - } - if (isset($attr['href'])) { - $target = isset($attr['file']) ? '' : ' target="_blank"'; - $v = sprintf('%s', esc($this->utf8Encode($attr['href'])), $target, $v); - } - if (isset($attr['lang'])) { - $v = sprintf('%s', esc($attr['lang']), $v); - } - - return $v; - } - - /** - * {@inheritdoc} - */ - protected function dumpLine($depth, $endOfValue = false) - { - if (-1 === $this->lastDepth) { - $this->line = sprintf($this->dumpPrefix, $this->dumpId, $this->indentPad).$this->line; - } - if ($this->headerIsDumped !== ($this->outputStream ?? $this->lineDumper)) { - $this->line = $this->getDumpHeader().$this->line; - } - - if (-1 === $depth) { - $args = ['"'.$this->dumpId.'"']; - if ($this->extraDisplayOptions) { - $args[] = json_encode($this->extraDisplayOptions, \JSON_FORCE_OBJECT); - } - // Replace is for BC - $this->line .= sprintf(str_replace('"%s"', '%s', $this->dumpSuffix), implode(', ', $args)); - } - $this->lastDepth = $depth; - - $this->line = mb_convert_encoding($this->line, 'HTML-ENTITIES', 'UTF-8'); - - if (-1 === $depth) { - AbstractDumper::dumpLine(0); - } - AbstractDumper::dumpLine($depth); - } - - private function getSourceLink(string $file, int $line) - { - $options = $this->extraDisplayOptions + $this->displayOptions; - - if ($fmt = $options['fileLinkFormat']) { - return \is_string($fmt) ? strtr($fmt, ['%f' => $file, '%l' => $line]) : $fmt->format($file, $line); - } - - return false; - } -} - -function esc(string $str) -{ - return htmlspecialchars($str, \ENT_QUOTES, 'UTF-8'); -} diff --git a/source/vendor/symfony/var-dumper/Dumper/ServerDumper.php b/source/vendor/symfony/var-dumper/Dumper/ServerDumper.php deleted file mode 100644 index 94795bf..0000000 --- a/source/vendor/symfony/var-dumper/Dumper/ServerDumper.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Dumper; - -use Symfony\Component\VarDumper\Cloner\Data; -use Symfony\Component\VarDumper\Dumper\ContextProvider\ContextProviderInterface; -use Symfony\Component\VarDumper\Server\Connection; - -/** - * ServerDumper forwards serialized Data clones to a server. - * - * @author Maxime Steinhausser - */ -class ServerDumper implements DataDumperInterface -{ - private $connection; - private $wrappedDumper; - - /** - * @param string $host The server host - * @param DataDumperInterface|null $wrappedDumper A wrapped instance used whenever we failed contacting the server - * @param ContextProviderInterface[] $contextProviders Context providers indexed by context name - */ - public function __construct(string $host, DataDumperInterface $wrappedDumper = null, array $contextProviders = []) - { - $this->connection = new Connection($host, $contextProviders); - $this->wrappedDumper = $wrappedDumper; - } - - public function getContextProviders(): array - { - return $this->connection->getContextProviders(); - } - - /** - * {@inheritdoc} - */ - public function dump(Data $data) - { - if (!$this->connection->write($data) && $this->wrappedDumper) { - $this->wrappedDumper->dump($data); - } - } -} diff --git a/source/vendor/symfony/var-dumper/Exception/ThrowingCasterException.php b/source/vendor/symfony/var-dumper/Exception/ThrowingCasterException.php deleted file mode 100644 index 122f0d3..0000000 --- a/source/vendor/symfony/var-dumper/Exception/ThrowingCasterException.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Exception; - -/** - * @author Nicolas Grekas - */ -class ThrowingCasterException extends \Exception -{ - /** - * @param \Throwable $prev The exception thrown from the caster - */ - public function __construct(\Throwable $prev) - { - parent::__construct('Unexpected '.\get_class($prev).' thrown from a caster: '.$prev->getMessage(), 0, $prev); - } -} diff --git a/source/vendor/symfony/var-dumper/LICENSE b/source/vendor/symfony/var-dumper/LICENSE deleted file mode 100644 index c1f0aac..0000000 --- a/source/vendor/symfony/var-dumper/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2014-2021 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/source/vendor/symfony/var-dumper/README.md b/source/vendor/symfony/var-dumper/README.md deleted file mode 100644 index bdac244..0000000 --- a/source/vendor/symfony/var-dumper/README.md +++ /dev/null @@ -1,15 +0,0 @@ -VarDumper Component -=================== - -The VarDumper component provides mechanisms for walking through any arbitrary -PHP variable. It provides a better `dump()` function that you can use instead -of `var_dump`. - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/var_dumper/introduction.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/source/vendor/symfony/var-dumper/Resources/bin/var-dump-server b/source/vendor/symfony/var-dumper/Resources/bin/var-dump-server deleted file mode 100755 index 98c813a..0000000 --- a/source/vendor/symfony/var-dumper/Resources/bin/var-dump-server +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/env php - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * Starts a dump server to collect and output dumps on a single place with multiple formats support. - * - * @author Maxime Steinhausser - */ - -use Psr\Log\LoggerInterface; -use Symfony\Component\Console\Application; -use Symfony\Component\Console\Input\ArgvInput; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Logger\ConsoleLogger; -use Symfony\Component\Console\Output\ConsoleOutput; -use Symfony\Component\VarDumper\Command\ServerDumpCommand; -use Symfony\Component\VarDumper\Server\DumpServer; - -function includeIfExists(string $file): bool -{ - return file_exists($file) && include $file; -} - -if ( - !includeIfExists(__DIR__ . '/../../../../autoload.php') && - !includeIfExists(__DIR__ . '/../../vendor/autoload.php') && - !includeIfExists(__DIR__ . '/../../../../../../vendor/autoload.php') -) { - fwrite(STDERR, 'Install dependencies using Composer.'.PHP_EOL); - exit(1); -} - -if (!class_exists(Application::class)) { - fwrite(STDERR, 'You need the "symfony/console" component in order to run the VarDumper server.'.PHP_EOL); - exit(1); -} - -$input = new ArgvInput(); -$output = new ConsoleOutput(); -$defaultHost = '127.0.0.1:9912'; -$host = $input->getParameterOption(['--host'], $_SERVER['VAR_DUMPER_SERVER'] ?? $defaultHost, true); -$logger = interface_exists(LoggerInterface::class) ? new ConsoleLogger($output->getErrorOutput()) : null; - -$app = new Application(); - -$app->getDefinition()->addOption( - new InputOption('--host', null, InputOption::VALUE_REQUIRED, 'The address the server should listen to', $defaultHost) -); - -$app->add($command = new ServerDumpCommand(new DumpServer($host, $logger))) - ->getApplication() - ->setDefaultCommand($command->getName(), true) - ->run($input, $output) -; diff --git a/source/vendor/symfony/var-dumper/Resources/css/htmlDescriptor.css b/source/vendor/symfony/var-dumper/Resources/css/htmlDescriptor.css deleted file mode 100644 index 8f706d6..0000000 --- a/source/vendor/symfony/var-dumper/Resources/css/htmlDescriptor.css +++ /dev/null @@ -1,130 +0,0 @@ -body { - display: flex; - flex-direction: column-reverse; - justify-content: flex-end; - max-width: 1140px; - margin: auto; - padding: 15px; - word-wrap: break-word; - background-color: #F9F9F9; - color: #222; - font-family: Helvetica, Arial, sans-serif; - font-size: 14px; - line-height: 1.4; -} -p { - margin: 0; -} -a { - color: #218BC3; - text-decoration: none; -} -a:hover { - text-decoration: underline; -} -.text-small { - font-size: 12px !important; -} -article { - margin: 5px; - margin-bottom: 10px; -} -article > header > .row { - display: flex; - flex-direction: row; - align-items: baseline; - margin-bottom: 10px; -} -article > header > .row > .col { - flex: 1; - display: flex; - align-items: baseline; -} -article > header > .row > h2 { - font-size: 14px; - color: #222; - font-weight: normal; - font-family: "Lucida Console", monospace, sans-serif; - word-break: break-all; - margin: 20px 5px 0 0; - user-select: all; -} -article > header > .row > h2 > code { - white-space: nowrap; - user-select: none; - color: #cc2255; - background-color: #f7f7f9; - border: 1px solid #e1e1e8; - border-radius: 3px; - margin-right: 5px; - padding: 0 3px; -} -article > header > .row > time.col { - flex: 0; - text-align: right; - white-space: nowrap; - color: #999; - font-style: italic; -} -article > header ul.tags { - list-style: none; - padding: 0; - margin: 0; - font-size: 12px; -} -article > header ul.tags > li { - user-select: all; - margin-bottom: 2px; -} -article > header ul.tags > li > span.badge { - display: inline-block; - padding: .25em .4em; - margin-right: 5px; - border-radius: 4px; - background-color: #6c757d3b; - color: #524d4d; - font-size: 12px; - text-align: center; - font-weight: 700; - line-height: 1; - white-space: nowrap; - vertical-align: baseline; - user-select: none; -} -article > section.body { - border: 1px solid #d8d8d8; - background: #FFF; - padding: 10px; - border-radius: 3px; -} -pre.sf-dump { - border-radius: 3px; - margin-bottom: 0; -} -.hidden { - display: none !important; -} -.dumped-tag > .sf-dump { - display: inline-block; - margin: 0; - padding: 1px 5px; - line-height: 1.4; - vertical-align: top; - background-color: transparent; - user-select: auto; -} -.dumped-tag > pre.sf-dump, -.dumped-tag > .sf-dump-default { - color: #CC7832; - background: none; -} -.dumped-tag > .sf-dump .sf-dump-str { color: #629755; } -.dumped-tag > .sf-dump .sf-dump-private, -.dumped-tag > .sf-dump .sf-dump-protected, -.dumped-tag > .sf-dump .sf-dump-public { color: #262626; } -.dumped-tag > .sf-dump .sf-dump-note { color: #6897BB; } -.dumped-tag > .sf-dump .sf-dump-key { color: #789339; } -.dumped-tag > .sf-dump .sf-dump-ref { color: #6E6E6E; } -.dumped-tag > .sf-dump .sf-dump-ellipsis { color: #CC7832; max-width: 100em; } -.dumped-tag > .sf-dump .sf-dump-ellipsis-path { max-width: 5em; } -.dumped-tag > .sf-dump .sf-dump-ns { user-select: none; } diff --git a/source/vendor/symfony/var-dumper/Resources/functions/dump.php b/source/vendor/symfony/var-dumper/Resources/functions/dump.php deleted file mode 100644 index a485d57..0000000 --- a/source/vendor/symfony/var-dumper/Resources/functions/dump.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Component\VarDumper\VarDumper; - -if (!function_exists('dump')) { - /** - * @author Nicolas Grekas - */ - function dump($var, ...$moreVars) - { - VarDumper::dump($var); - - foreach ($moreVars as $v) { - VarDumper::dump($v); - } - - if (1 < func_num_args()) { - return func_get_args(); - } - - return $var; - } -} - -if (!function_exists('dd')) { - function dd(...$vars) - { - foreach ($vars as $v) { - VarDumper::dump($v); - } - - exit(1); - } -} diff --git a/source/vendor/symfony/var-dumper/Resources/js/htmlDescriptor.js b/source/vendor/symfony/var-dumper/Resources/js/htmlDescriptor.js deleted file mode 100644 index 63101e5..0000000 --- a/source/vendor/symfony/var-dumper/Resources/js/htmlDescriptor.js +++ /dev/null @@ -1,10 +0,0 @@ -document.addEventListener('DOMContentLoaded', function() { - let prev = null; - Array.from(document.getElementsByTagName('article')).reverse().forEach(function (article) { - const dedupId = article.dataset.dedupId; - if (dedupId === prev) { - article.getElementsByTagName('header')[0].classList.add('hidden'); - } - prev = dedupId; - }); -}); diff --git a/source/vendor/symfony/var-dumper/Server/Connection.php b/source/vendor/symfony/var-dumper/Server/Connection.php deleted file mode 100644 index 55d9214..0000000 --- a/source/vendor/symfony/var-dumper/Server/Connection.php +++ /dev/null @@ -1,95 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Server; - -use Symfony\Component\VarDumper\Cloner\Data; -use Symfony\Component\VarDumper\Dumper\ContextProvider\ContextProviderInterface; - -/** - * Forwards serialized Data clones to a server. - * - * @author Maxime Steinhausser - */ -class Connection -{ - private $host; - private $contextProviders; - private $socket; - - /** - * @param string $host The server host - * @param ContextProviderInterface[] $contextProviders Context providers indexed by context name - */ - public function __construct(string $host, array $contextProviders = []) - { - if (!str_contains($host, '://')) { - $host = 'tcp://'.$host; - } - - $this->host = $host; - $this->contextProviders = $contextProviders; - } - - public function getContextProviders(): array - { - return $this->contextProviders; - } - - public function write(Data $data): bool - { - $socketIsFresh = !$this->socket; - if (!$this->socket = $this->socket ?: $this->createSocket()) { - return false; - } - - $context = ['timestamp' => microtime(true)]; - foreach ($this->contextProviders as $name => $provider) { - $context[$name] = $provider->getContext(); - } - $context = array_filter($context); - $encodedPayload = base64_encode(serialize([$data, $context]))."\n"; - - set_error_handler([self::class, 'nullErrorHandler']); - try { - if (-1 !== stream_socket_sendto($this->socket, $encodedPayload)) { - return true; - } - if (!$socketIsFresh) { - stream_socket_shutdown($this->socket, \STREAM_SHUT_RDWR); - fclose($this->socket); - $this->socket = $this->createSocket(); - } - if (-1 !== stream_socket_sendto($this->socket, $encodedPayload)) { - return true; - } - } finally { - restore_error_handler(); - } - - return false; - } - - private static function nullErrorHandler(int $t, string $m) - { - // no-op - } - - private function createSocket() - { - set_error_handler([self::class, 'nullErrorHandler']); - try { - return stream_socket_client($this->host, $errno, $errstr, 3, \STREAM_CLIENT_CONNECT | \STREAM_CLIENT_ASYNC_CONNECT); - } finally { - restore_error_handler(); - } - } -} diff --git a/source/vendor/symfony/var-dumper/Server/DumpServer.php b/source/vendor/symfony/var-dumper/Server/DumpServer.php deleted file mode 100644 index 1c2c348..0000000 --- a/source/vendor/symfony/var-dumper/Server/DumpServer.php +++ /dev/null @@ -1,107 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Server; - -use Psr\Log\LoggerInterface; -use Symfony\Component\VarDumper\Cloner\Data; -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * A server collecting Data clones sent by a ServerDumper. - * - * @author Maxime Steinhausser - * - * @final - */ -class DumpServer -{ - private $host; - private $socket; - private $logger; - - public function __construct(string $host, LoggerInterface $logger = null) - { - if (!str_contains($host, '://')) { - $host = 'tcp://'.$host; - } - - $this->host = $host; - $this->logger = $logger; - } - - public function start(): void - { - if (!$this->socket = stream_socket_server($this->host, $errno, $errstr)) { - throw new \RuntimeException(sprintf('Server start failed on "%s": ', $this->host).$errstr.' '.$errno); - } - } - - public function listen(callable $callback): void - { - if (null === $this->socket) { - $this->start(); - } - - foreach ($this->getMessages() as $clientId => $message) { - $payload = @unserialize(base64_decode($message), ['allowed_classes' => [Data::class, Stub::class]]); - - // Impossible to decode the message, give up. - if (false === $payload) { - if ($this->logger) { - $this->logger->warning('Unable to decode a message from {clientId} client.', ['clientId' => $clientId]); - } - - continue; - } - - if (!\is_array($payload) || \count($payload) < 2 || !$payload[0] instanceof Data || !\is_array($payload[1])) { - if ($this->logger) { - $this->logger->warning('Invalid payload from {clientId} client. Expected an array of two elements (Data $data, array $context)', ['clientId' => $clientId]); - } - - continue; - } - - [$data, $context] = $payload; - - $callback($data, $context, $clientId); - } - } - - public function getHost(): string - { - return $this->host; - } - - private function getMessages(): iterable - { - $sockets = [(int) $this->socket => $this->socket]; - $write = []; - - while (true) { - $read = $sockets; - stream_select($read, $write, $write, null); - - foreach ($read as $stream) { - if ($this->socket === $stream) { - $stream = stream_socket_accept($this->socket); - $sockets[(int) $stream] = $stream; - } elseif (feof($stream)) { - unset($sockets[(int) $stream]); - fclose($stream); - } else { - yield (int) $stream => fgets($stream); - } - } - } - } -} diff --git a/source/vendor/symfony/var-dumper/VarDumper.php b/source/vendor/symfony/var-dumper/VarDumper.php deleted file mode 100644 index febc1e0..0000000 --- a/source/vendor/symfony/var-dumper/VarDumper.php +++ /dev/null @@ -1,66 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper; - -use Symfony\Component\VarDumper\Caster\ReflectionCaster; -use Symfony\Component\VarDumper\Cloner\VarCloner; -use Symfony\Component\VarDumper\Dumper\CliDumper; -use Symfony\Component\VarDumper\Dumper\ContextProvider\SourceContextProvider; -use Symfony\Component\VarDumper\Dumper\ContextualizedDumper; -use Symfony\Component\VarDumper\Dumper\HtmlDumper; - -// Load the global dump() function -require_once __DIR__.'/Resources/functions/dump.php'; - -/** - * @author Nicolas Grekas - */ -class VarDumper -{ - private static $handler; - - public static function dump($var) - { - if (null === self::$handler) { - $cloner = new VarCloner(); - $cloner->addCasters(ReflectionCaster::UNSET_CLOSURE_FILE_INFO); - - if (isset($_SERVER['VAR_DUMPER_FORMAT'])) { - $dumper = 'html' === $_SERVER['VAR_DUMPER_FORMAT'] ? new HtmlDumper() : new CliDumper(); - } else { - $dumper = \in_array(\PHP_SAPI, ['cli', 'phpdbg']) ? new CliDumper() : new HtmlDumper(); - } - - $dumper = new ContextualizedDumper($dumper, [new SourceContextProvider()]); - - self::$handler = function ($var) use ($cloner, $dumper) { - $dumper->dump($cloner->cloneVar($var)); - }; - } - - return (self::$handler)($var); - } - - public static function setHandler(callable $callable = null) - { - $prevHandler = self::$handler; - - // Prevent replacing the handler with expected format as soon as the env var was set: - if (isset($_SERVER['VAR_DUMPER_FORMAT'])) { - return $prevHandler; - } - - self::$handler = $callable; - - return $prevHandler; - } -} diff --git a/source/vendor/symfony/yaml/Command/LintCommand.php b/source/vendor/symfony/yaml/Command/LintCommand.php deleted file mode 100644 index 98eb8e1..0000000 --- a/source/vendor/symfony/yaml/Command/LintCommand.php +++ /dev/null @@ -1,255 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Yaml\Command; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Exception\RuntimeException; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\Yaml\Exception\ParseException; -use Symfony\Component\Yaml\Parser; -use Symfony\Component\Yaml\Yaml; - -/** - * Validates YAML files syntax and outputs encountered errors. - * - * @author Grégoire Pineau - * @author Robin Chalas - */ -class LintCommand extends Command -{ - protected static $defaultName = 'lint:yaml'; - - private $parser; - private $format; - private $displayCorrectFiles; - private $directoryIteratorProvider; - private $isReadableProvider; - - public function __construct(string $name = null, callable $directoryIteratorProvider = null, callable $isReadableProvider = null) - { - parent::__construct($name); - - $this->directoryIteratorProvider = $directoryIteratorProvider; - $this->isReadableProvider = $isReadableProvider; - } - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setDescription('Lint a file and outputs encountered errors') - ->addArgument('filename', InputArgument::IS_ARRAY, 'A file, a directory or "-" for reading from STDIN') - ->addOption('format', null, InputOption::VALUE_REQUIRED, 'The output format', 'txt') - ->addOption('parse-tags', null, InputOption::VALUE_NONE, 'Parse custom tags') - ->setHelp(<<%command.name% command lints a YAML file and outputs to STDOUT -the first encountered syntax error. - -You can validates YAML contents passed from STDIN: - - cat filename | php %command.full_name% - - -You can also validate the syntax of a file: - - php %command.full_name% filename - -Or of a whole directory: - - php %command.full_name% dirname - php %command.full_name% dirname --format=json - -EOF - ) - ; - } - - protected function execute(InputInterface $input, OutputInterface $output) - { - $io = new SymfonyStyle($input, $output); - $filenames = (array) $input->getArgument('filename'); - $this->format = $input->getOption('format'); - $this->displayCorrectFiles = $output->isVerbose(); - $flags = $input->getOption('parse-tags') ? Yaml::PARSE_CUSTOM_TAGS : 0; - - if (['-'] === $filenames) { - return $this->display($io, [$this->validate(file_get_contents('php://stdin'), $flags)]); - } - - // @deprecated to be removed in 5.0 - if (!$filenames) { - if (0 === ftell(\STDIN)) { - @trigger_error('Piping content from STDIN to the "lint:yaml" command without passing the dash symbol "-" as argument is deprecated since Symfony 4.4.', \E_USER_DEPRECATED); - - return $this->display($io, [$this->validate(file_get_contents('php://stdin'), $flags)]); - } - - throw new RuntimeException('Please provide a filename or pipe file content to STDIN.'); - } - - $filesInfo = []; - foreach ($filenames as $filename) { - if (!$this->isReadable($filename)) { - throw new RuntimeException(sprintf('File or directory "%s" is not readable.', $filename)); - } - - foreach ($this->getFiles($filename) as $file) { - $filesInfo[] = $this->validate(file_get_contents($file), $flags, $file); - } - } - - return $this->display($io, $filesInfo); - } - - private function validate(string $content, int $flags, string $file = null) - { - $prevErrorHandler = set_error_handler(function ($level, $message, $file, $line) use (&$prevErrorHandler) { - if (\E_USER_DEPRECATED === $level) { - throw new ParseException($message, $this->getParser()->getRealCurrentLineNb() + 1); - } - - return $prevErrorHandler ? $prevErrorHandler($level, $message, $file, $line) : false; - }); - - try { - $this->getParser()->parse($content, Yaml::PARSE_CONSTANT | $flags); - } catch (ParseException $e) { - return ['file' => $file, 'line' => $e->getParsedLine(), 'valid' => false, 'message' => $e->getMessage()]; - } finally { - restore_error_handler(); - } - - return ['file' => $file, 'valid' => true]; - } - - private function display(SymfonyStyle $io, array $files): int - { - switch ($this->format) { - case 'txt': - return $this->displayTxt($io, $files); - case 'json': - return $this->displayJson($io, $files); - default: - throw new InvalidArgumentException(sprintf('The format "%s" is not supported.', $this->format)); - } - } - - private function displayTxt(SymfonyStyle $io, array $filesInfo): int - { - $countFiles = \count($filesInfo); - $erroredFiles = 0; - $suggestTagOption = false; - - foreach ($filesInfo as $info) { - if ($info['valid'] && $this->displayCorrectFiles) { - $io->comment('OK'.($info['file'] ? sprintf(' in %s', $info['file']) : '')); - } elseif (!$info['valid']) { - ++$erroredFiles; - $io->text(' ERROR '.($info['file'] ? sprintf(' in %s', $info['file']) : '')); - $io->text(sprintf(' >> %s', $info['message'])); - - if (false !== strpos($info['message'], 'PARSE_CUSTOM_TAGS')) { - $suggestTagOption = true; - } - } - } - - if (0 === $erroredFiles) { - $io->success(sprintf('All %d YAML files contain valid syntax.', $countFiles)); - } else { - $io->warning(sprintf('%d YAML files have valid syntax and %d contain errors.%s', $countFiles - $erroredFiles, $erroredFiles, $suggestTagOption ? ' Use the --parse-tags option if you want parse custom tags.' : '')); - } - - return min($erroredFiles, 1); - } - - private function displayJson(SymfonyStyle $io, array $filesInfo): int - { - $errors = 0; - - array_walk($filesInfo, function (&$v) use (&$errors) { - $v['file'] = (string) $v['file']; - if (!$v['valid']) { - ++$errors; - } - - if (isset($v['message']) && false !== strpos($v['message'], 'PARSE_CUSTOM_TAGS')) { - $v['message'] .= ' Use the --parse-tags option if you want parse custom tags.'; - } - }); - - $io->writeln(json_encode($filesInfo, \JSON_PRETTY_PRINT | \JSON_UNESCAPED_SLASHES)); - - return min($errors, 1); - } - - private function getFiles(string $fileOrDirectory): iterable - { - if (is_file($fileOrDirectory)) { - yield new \SplFileInfo($fileOrDirectory); - - return; - } - - foreach ($this->getDirectoryIterator($fileOrDirectory) as $file) { - if (!\in_array($file->getExtension(), ['yml', 'yaml'])) { - continue; - } - - yield $file; - } - } - - private function getParser(): Parser - { - if (!$this->parser) { - $this->parser = new Parser(); - } - - return $this->parser; - } - - private function getDirectoryIterator(string $directory): iterable - { - $default = function ($directory) { - return new \RecursiveIteratorIterator( - new \RecursiveDirectoryIterator($directory, \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::FOLLOW_SYMLINKS), - \RecursiveIteratorIterator::LEAVES_ONLY - ); - }; - - if (null !== $this->directoryIteratorProvider) { - return ($this->directoryIteratorProvider)($directory, $default); - } - - return $default($directory); - } - - private function isReadable(string $fileOrDirectory): bool - { - $default = function ($fileOrDirectory) { - return is_readable($fileOrDirectory); - }; - - if (null !== $this->isReadableProvider) { - return ($this->isReadableProvider)($fileOrDirectory, $default); - } - - return $default($fileOrDirectory); - } -} diff --git a/source/vendor/symfony/yaml/Dumper.php b/source/vendor/symfony/yaml/Dumper.php deleted file mode 100644 index dcb104c..0000000 --- a/source/vendor/symfony/yaml/Dumper.php +++ /dev/null @@ -1,142 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Yaml; - -use Symfony\Component\Yaml\Tag\TaggedValue; - -/** - * Dumper dumps PHP variables to YAML strings. - * - * @author Fabien Potencier - * - * @final - */ -class Dumper -{ - /** - * The amount of spaces to use for indentation of nested nodes. - * - * @var int - */ - protected $indentation; - - public function __construct(int $indentation = 4) - { - if ($indentation < 1) { - throw new \InvalidArgumentException('The indentation must be greater than zero.'); - } - - $this->indentation = $indentation; - } - - /** - * Dumps a PHP value to YAML. - * - * @param mixed $input The PHP value - * @param int $inline The level where you switch to inline YAML - * @param int $indent The level of indentation (used internally) - * @param int $flags A bit field of Yaml::DUMP_* constants to customize the dumped YAML string - * - * @return string The YAML representation of the PHP value - */ - public function dump($input, int $inline = 0, int $indent = 0, int $flags = 0): string - { - $output = ''; - $prefix = $indent ? str_repeat(' ', $indent) : ''; - $dumpObjectAsInlineMap = true; - - if (Yaml::DUMP_OBJECT_AS_MAP & $flags && ($input instanceof \ArrayObject || $input instanceof \stdClass)) { - $dumpObjectAsInlineMap = empty((array) $input); - } - - if ($inline <= 0 || (!\is_array($input) && !$input instanceof TaggedValue && $dumpObjectAsInlineMap) || empty($input)) { - $output .= $prefix.Inline::dump($input, $flags); - } else { - $dumpAsMap = Inline::isHash($input); - - foreach ($input as $key => $value) { - if ('' !== $output && "\n" !== $output[-1]) { - $output .= "\n"; - } - - if (Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK & $flags && \is_string($value) && false !== strpos($value, "\n") && false === strpos($value, "\r")) { - // If the first line starts with a space character, the spec requires a blockIndicationIndicator - // http://www.yaml.org/spec/1.2/spec.html#id2793979 - $blockIndentationIndicator = (' ' === substr($value, 0, 1)) ? (string) $this->indentation : ''; - - if (isset($value[-2]) && "\n" === $value[-2] && "\n" === $value[-1]) { - $blockChompingIndicator = '+'; - } elseif ("\n" === $value[-1]) { - $blockChompingIndicator = ''; - } else { - $blockChompingIndicator = '-'; - } - - $output .= sprintf('%s%s%s |%s%s', $prefix, $dumpAsMap ? Inline::dump($key, $flags).':' : '-', '', $blockIndentationIndicator, $blockChompingIndicator); - - foreach (explode("\n", $value) as $row) { - if ('' === $row) { - $output .= "\n"; - } else { - $output .= sprintf("\n%s%s%s", $prefix, str_repeat(' ', $this->indentation), $row); - } - } - - continue; - } - - if ($value instanceof TaggedValue) { - $output .= sprintf('%s%s !%s', $prefix, $dumpAsMap ? Inline::dump($key, $flags).':' : '-', $value->getTag()); - - if (Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK & $flags && \is_string($value->getValue()) && false !== strpos($value->getValue(), "\n") && false === strpos($value->getValue(), "\r\n")) { - // If the first line starts with a space character, the spec requires a blockIndicationIndicator - // http://www.yaml.org/spec/1.2/spec.html#id2793979 - $blockIndentationIndicator = (' ' === substr($value->getValue(), 0, 1)) ? (string) $this->indentation : ''; - $output .= sprintf(' |%s', $blockIndentationIndicator); - - foreach (explode("\n", $value->getValue()) as $row) { - $output .= sprintf("\n%s%s%s", $prefix, str_repeat(' ', $this->indentation), $row); - } - - continue; - } - - if ($inline - 1 <= 0 || null === $value->getValue() || is_scalar($value->getValue())) { - $output .= ' '.$this->dump($value->getValue(), $inline - 1, 0, $flags)."\n"; - } else { - $output .= "\n"; - $output .= $this->dump($value->getValue(), $inline - 1, $dumpAsMap ? $indent + $this->indentation : $indent + 2, $flags); - } - - continue; - } - - $dumpObjectAsInlineMap = true; - - if (Yaml::DUMP_OBJECT_AS_MAP & $flags && ($value instanceof \ArrayObject || $value instanceof \stdClass)) { - $dumpObjectAsInlineMap = empty((array) $value); - } - - $willBeInlined = $inline - 1 <= 0 || !\is_array($value) && $dumpObjectAsInlineMap || empty($value); - - $output .= sprintf('%s%s%s%s', - $prefix, - $dumpAsMap ? Inline::dump($key, $flags).':' : '-', - $willBeInlined ? ' ' : "\n", - $this->dump($value, $inline - 1, $willBeInlined ? 0 : $indent + $this->indentation, $flags) - ).($willBeInlined ? "\n" : ''); - } - } - - return $output; - } -} diff --git a/source/vendor/symfony/yaml/Escaper.php b/source/vendor/symfony/yaml/Escaper.php deleted file mode 100644 index 9b809df..0000000 --- a/source/vendor/symfony/yaml/Escaper.php +++ /dev/null @@ -1,103 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Yaml; - -/** - * Escaper encapsulates escaping rules for single and double-quoted - * YAML strings. - * - * @author Matthew Lewinski - * - * @internal - */ -class Escaper -{ - // Characters that would cause a dumped string to require double quoting. - public const REGEX_CHARACTER_TO_ESCAPE = "[\\x00-\\x1f]|\x7f|\xc2\x85|\xc2\xa0|\xe2\x80\xa8|\xe2\x80\xa9"; - - // Mapping arrays for escaping a double quoted string. The backslash is - // first to ensure proper escaping because str_replace operates iteratively - // on the input arrays. This ordering of the characters avoids the use of strtr, - // which performs more slowly. - private const ESCAPEES = ['\\', '\\\\', '\\"', '"', - "\x00", "\x01", "\x02", "\x03", "\x04", "\x05", "\x06", "\x07", - "\x08", "\x09", "\x0a", "\x0b", "\x0c", "\x0d", "\x0e", "\x0f", - "\x10", "\x11", "\x12", "\x13", "\x14", "\x15", "\x16", "\x17", - "\x18", "\x19", "\x1a", "\x1b", "\x1c", "\x1d", "\x1e", "\x1f", - "\x7f", - "\xc2\x85", "\xc2\xa0", "\xe2\x80\xa8", "\xe2\x80\xa9", - ]; - private const ESCAPED = ['\\\\', '\\"', '\\\\', '\\"', - '\\0', '\\x01', '\\x02', '\\x03', '\\x04', '\\x05', '\\x06', '\\a', - '\\b', '\\t', '\\n', '\\v', '\\f', '\\r', '\\x0e', '\\x0f', - '\\x10', '\\x11', '\\x12', '\\x13', '\\x14', '\\x15', '\\x16', '\\x17', - '\\x18', '\\x19', '\\x1a', '\\e', '\\x1c', '\\x1d', '\\x1e', '\\x1f', - '\\x7f', - '\\N', '\\_', '\\L', '\\P', - ]; - - /** - * Determines if a PHP value would require double quoting in YAML. - * - * @param string $value A PHP value - * - * @return bool True if the value would require double quotes - */ - public static function requiresDoubleQuoting(string $value): bool - { - return 0 < preg_match('/'.self::REGEX_CHARACTER_TO_ESCAPE.'/u', $value); - } - - /** - * Escapes and surrounds a PHP value with double quotes. - * - * @param string $value A PHP value - * - * @return string The quoted, escaped string - */ - public static function escapeWithDoubleQuotes(string $value): string - { - return sprintf('"%s"', str_replace(self::ESCAPEES, self::ESCAPED, $value)); - } - - /** - * Determines if a PHP value would require single quoting in YAML. - * - * @param string $value A PHP value - * - * @return bool True if the value would require single quotes - */ - public static function requiresSingleQuoting(string $value): bool - { - // Determines if a PHP value is entirely composed of a value that would - // require single quoting in YAML. - if (\in_array(strtolower($value), ['null', '~', 'true', 'false', 'y', 'n', 'yes', 'no', 'on', 'off'])) { - return true; - } - - // Determines if the PHP value contains any single characters that would - // cause it to require single quoting in YAML. - return 0 < preg_match('/[ \s \' " \: \{ \} \[ \] , & \* \# \?] | \A[ \- ? | < > = ! % @ ` \p{Zs}]/xu', $value); - } - - /** - * Escapes and surrounds a PHP value with single quotes. - * - * @param string $value A PHP value - * - * @return string The quoted, escaped string - */ - public static function escapeWithSingleQuotes(string $value): string - { - return sprintf("'%s'", str_replace('\'', '\'\'', $value)); - } -} diff --git a/source/vendor/symfony/yaml/Exception/DumpException.php b/source/vendor/symfony/yaml/Exception/DumpException.php deleted file mode 100644 index cce972f..0000000 --- a/source/vendor/symfony/yaml/Exception/DumpException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Yaml\Exception; - -/** - * Exception class thrown when an error occurs during dumping. - * - * @author Fabien Potencier - */ -class DumpException extends RuntimeException -{ -} diff --git a/source/vendor/symfony/yaml/Exception/ExceptionInterface.php b/source/vendor/symfony/yaml/Exception/ExceptionInterface.php deleted file mode 100644 index 9091316..0000000 --- a/source/vendor/symfony/yaml/Exception/ExceptionInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Yaml\Exception; - -/** - * Exception interface for all exceptions thrown by the component. - * - * @author Fabien Potencier - */ -interface ExceptionInterface extends \Throwable -{ -} diff --git a/source/vendor/symfony/yaml/Exception/ParseException.php b/source/vendor/symfony/yaml/Exception/ParseException.php deleted file mode 100644 index 82c05a7..0000000 --- a/source/vendor/symfony/yaml/Exception/ParseException.php +++ /dev/null @@ -1,138 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Yaml\Exception; - -/** - * Exception class thrown when an error occurs during parsing. - * - * @author Fabien Potencier - */ -class ParseException extends RuntimeException -{ - private $parsedFile; - private $parsedLine; - private $snippet; - private $rawMessage; - - /** - * @param string $message The error message - * @param int $parsedLine The line where the error occurred - * @param string|null $snippet The snippet of code near the problem - * @param string|null $parsedFile The file name where the error occurred - */ - public function __construct(string $message, int $parsedLine = -1, string $snippet = null, string $parsedFile = null, \Throwable $previous = null) - { - $this->parsedFile = $parsedFile; - $this->parsedLine = $parsedLine; - $this->snippet = $snippet; - $this->rawMessage = $message; - - $this->updateRepr(); - - parent::__construct($this->message, 0, $previous); - } - - /** - * Gets the snippet of code near the error. - * - * @return string The snippet of code - */ - public function getSnippet() - { - return $this->snippet; - } - - /** - * Sets the snippet of code near the error. - * - * @param string $snippet The code snippet - */ - public function setSnippet($snippet) - { - $this->snippet = $snippet; - - $this->updateRepr(); - } - - /** - * Gets the filename where the error occurred. - * - * This method returns null if a string is parsed. - * - * @return string The filename - */ - public function getParsedFile() - { - return $this->parsedFile; - } - - /** - * Sets the filename where the error occurred. - * - * @param string $parsedFile The filename - */ - public function setParsedFile($parsedFile) - { - $this->parsedFile = $parsedFile; - - $this->updateRepr(); - } - - /** - * Gets the line where the error occurred. - * - * @return int The file line - */ - public function getParsedLine() - { - return $this->parsedLine; - } - - /** - * Sets the line where the error occurred. - * - * @param int $parsedLine The file line - */ - public function setParsedLine($parsedLine) - { - $this->parsedLine = $parsedLine; - - $this->updateRepr(); - } - - private function updateRepr() - { - $this->message = $this->rawMessage; - - $dot = false; - if ('.' === substr($this->message, -1)) { - $this->message = substr($this->message, 0, -1); - $dot = true; - } - - if (null !== $this->parsedFile) { - $this->message .= sprintf(' in %s', json_encode($this->parsedFile, \JSON_UNESCAPED_SLASHES | \JSON_UNESCAPED_UNICODE)); - } - - if ($this->parsedLine >= 0) { - $this->message .= sprintf(' at line %d', $this->parsedLine); - } - - if ($this->snippet) { - $this->message .= sprintf(' (near "%s")', $this->snippet); - } - - if ($dot) { - $this->message .= '.'; - } - } -} diff --git a/source/vendor/symfony/yaml/Exception/RuntimeException.php b/source/vendor/symfony/yaml/Exception/RuntimeException.php deleted file mode 100644 index 3f36b73..0000000 --- a/source/vendor/symfony/yaml/Exception/RuntimeException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Yaml\Exception; - -/** - * Exception class thrown when an error occurs during parsing. - * - * @author Romain Neutron - */ -class RuntimeException extends \RuntimeException implements ExceptionInterface -{ -} diff --git a/source/vendor/symfony/yaml/Inline.php b/source/vendor/symfony/yaml/Inline.php deleted file mode 100644 index 62fad41..0000000 --- a/source/vendor/symfony/yaml/Inline.php +++ /dev/null @@ -1,793 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Yaml; - -use Symfony\Component\Yaml\Exception\DumpException; -use Symfony\Component\Yaml\Exception\ParseException; -use Symfony\Component\Yaml\Tag\TaggedValue; - -/** - * Inline implements a YAML parser/dumper for the YAML inline syntax. - * - * @author Fabien Potencier - * - * @internal - */ -class Inline -{ - public const REGEX_QUOTED_STRING = '(?:"([^"\\\\]*+(?:\\\\.[^"\\\\]*+)*+)"|\'([^\']*+(?:\'\'[^\']*+)*+)\')'; - - public static $parsedLineNumber = -1; - public static $parsedFilename; - - private static $exceptionOnInvalidType = false; - private static $objectSupport = false; - private static $objectForMap = false; - private static $constantSupport = false; - - public static function initialize(int $flags, int $parsedLineNumber = null, string $parsedFilename = null) - { - self::$exceptionOnInvalidType = (bool) (Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE & $flags); - self::$objectSupport = (bool) (Yaml::PARSE_OBJECT & $flags); - self::$objectForMap = (bool) (Yaml::PARSE_OBJECT_FOR_MAP & $flags); - self::$constantSupport = (bool) (Yaml::PARSE_CONSTANT & $flags); - self::$parsedFilename = $parsedFilename; - - if (null !== $parsedLineNumber) { - self::$parsedLineNumber = $parsedLineNumber; - } - } - - /** - * Converts a YAML string to a PHP value. - * - * @param string $value A YAML string - * @param int $flags A bit field of PARSE_* constants to customize the YAML parser behavior - * @param array $references Mapping of variable names to values - * - * @return mixed A PHP value - * - * @throws ParseException - */ - public static function parse(string $value = null, int $flags = 0, array &$references = []) - { - self::initialize($flags); - - $value = trim($value); - - if ('' === $value) { - return ''; - } - - if (2 /* MB_OVERLOAD_STRING */ & (int) ini_get('mbstring.func_overload')) { - $mbEncoding = mb_internal_encoding(); - mb_internal_encoding('ASCII'); - } - - try { - $i = 0; - $tag = self::parseTag($value, $i, $flags); - switch ($value[$i]) { - case '[': - $result = self::parseSequence($value, $flags, $i, $references); - ++$i; - break; - case '{': - $result = self::parseMapping($value, $flags, $i, $references); - ++$i; - break; - default: - $result = self::parseScalar($value, $flags, null, $i, null === $tag, $references); - } - - // some comments are allowed at the end - if (preg_replace('/\s*#.*$/A', '', substr($value, $i))) { - throw new ParseException(sprintf('Unexpected characters near "%s".', substr($value, $i)), self::$parsedLineNumber + 1, $value, self::$parsedFilename); - } - - if (null !== $tag && '' !== $tag) { - return new TaggedValue($tag, $result); - } - - return $result; - } finally { - if (isset($mbEncoding)) { - mb_internal_encoding($mbEncoding); - } - } - } - - /** - * Dumps a given PHP variable to a YAML string. - * - * @param mixed $value The PHP variable to convert - * @param int $flags A bit field of Yaml::DUMP_* constants to customize the dumped YAML string - * - * @return string The YAML string representing the PHP value - * - * @throws DumpException When trying to dump PHP resource - */ - public static function dump($value, int $flags = 0): string - { - switch (true) { - case \is_resource($value): - if (Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE & $flags) { - throw new DumpException(sprintf('Unable to dump PHP resources in a YAML file ("%s").', get_resource_type($value))); - } - - return self::dumpNull($flags); - case $value instanceof \DateTimeInterface: - return $value->format('c'); - case $value instanceof \UnitEnum: - return sprintf('!php/const %s::%s', \get_class($value), $value->name); - case \is_object($value): - if ($value instanceof TaggedValue) { - return '!'.$value->getTag().' '.self::dump($value->getValue(), $flags); - } - - if (Yaml::DUMP_OBJECT & $flags) { - return '!php/object '.self::dump(serialize($value)); - } - - if (Yaml::DUMP_OBJECT_AS_MAP & $flags && ($value instanceof \stdClass || $value instanceof \ArrayObject)) { - $output = []; - - foreach ($value as $key => $val) { - $output[] = sprintf('%s: %s', self::dump($key, $flags), self::dump($val, $flags)); - } - - return sprintf('{ %s }', implode(', ', $output)); - } - - if (Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE & $flags) { - throw new DumpException('Object support when dumping a YAML file has been disabled.'); - } - - return self::dumpNull($flags); - case \is_array($value): - return self::dumpArray($value, $flags); - case null === $value: - return self::dumpNull($flags); - case true === $value: - return 'true'; - case false === $value: - return 'false'; - case \is_int($value): - return $value; - case is_numeric($value) && false === strpbrk($value, "\f\n\r\t\v"): - $locale = setlocale(\LC_NUMERIC, 0); - if (false !== $locale) { - setlocale(\LC_NUMERIC, 'C'); - } - if (\is_float($value)) { - $repr = (string) $value; - if (is_infinite($value)) { - $repr = str_ireplace('INF', '.Inf', $repr); - } elseif (floor($value) == $value && $repr == $value) { - // Preserve float data type since storing a whole number will result in integer value. - $repr = '!!float '.$repr; - } - } else { - $repr = \is_string($value) ? "'$value'" : (string) $value; - } - if (false !== $locale) { - setlocale(\LC_NUMERIC, $locale); - } - - return $repr; - case '' == $value: - return "''"; - case self::isBinaryString($value): - return '!!binary '.base64_encode($value); - case Escaper::requiresDoubleQuoting($value): - return Escaper::escapeWithDoubleQuotes($value); - case Escaper::requiresSingleQuoting($value): - case Parser::preg_match('{^[0-9]+[_0-9]*$}', $value): - case Parser::preg_match(self::getHexRegex(), $value): - case Parser::preg_match(self::getTimestampRegex(), $value): - return Escaper::escapeWithSingleQuotes($value); - default: - return $value; - } - } - - /** - * Check if given array is hash or just normal indexed array. - * - * @param array|\ArrayObject|\stdClass $value The PHP array or array-like object to check - * - * @return bool true if value is hash array, false otherwise - */ - public static function isHash($value): bool - { - if ($value instanceof \stdClass || $value instanceof \ArrayObject) { - return true; - } - - $expectedKey = 0; - - foreach ($value as $key => $val) { - if ($key !== $expectedKey++) { - return true; - } - } - - return false; - } - - /** - * Dumps a PHP array to a YAML string. - * - * @param array $value The PHP array to dump - * @param int $flags A bit field of Yaml::DUMP_* constants to customize the dumped YAML string - * - * @return string The YAML string representing the PHP array - */ - private static function dumpArray(array $value, int $flags): string - { - // array - if (($value || Yaml::DUMP_EMPTY_ARRAY_AS_SEQUENCE & $flags) && !self::isHash($value)) { - $output = []; - foreach ($value as $val) { - $output[] = self::dump($val, $flags); - } - - return sprintf('[%s]', implode(', ', $output)); - } - - // hash - $output = []; - foreach ($value as $key => $val) { - $output[] = sprintf('%s: %s', self::dump($key, $flags), self::dump($val, $flags)); - } - - return sprintf('{ %s }', implode(', ', $output)); - } - - private static function dumpNull(int $flags): string - { - if (Yaml::DUMP_NULL_AS_TILDE & $flags) { - return '~'; - } - - return 'null'; - } - - /** - * Parses a YAML scalar. - * - * @return mixed - * - * @throws ParseException When malformed inline YAML string is parsed - */ - public static function parseScalar(string $scalar, int $flags = 0, array $delimiters = null, int &$i = 0, bool $evaluate = true, array &$references = []) - { - if (\in_array($scalar[$i], ['"', "'"])) { - // quoted scalar - $output = self::parseQuotedScalar($scalar, $i); - - if (null !== $delimiters) { - $tmp = ltrim(substr($scalar, $i), " \n"); - if ('' === $tmp) { - throw new ParseException(sprintf('Unexpected end of line, expected one of "%s".', implode('', $delimiters)), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); - } - if (!\in_array($tmp[0], $delimiters)) { - throw new ParseException(sprintf('Unexpected characters (%s).', substr($scalar, $i)), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); - } - } - } else { - // "normal" string - if (!$delimiters) { - $output = substr($scalar, $i); - $i += \strlen($output); - - // remove comments - if (Parser::preg_match('/[ \t]+#/', $output, $match, \PREG_OFFSET_CAPTURE)) { - $output = substr($output, 0, $match[0][1]); - } - } elseif (Parser::preg_match('/^(.*?)('.implode('|', $delimiters).')/', substr($scalar, $i), $match)) { - $output = $match[1]; - $i += \strlen($output); - $output = trim($output); - } else { - throw new ParseException(sprintf('Malformed inline YAML string: "%s".', $scalar), self::$parsedLineNumber + 1, null, self::$parsedFilename); - } - - // a non-quoted string cannot start with @ or ` (reserved) nor with a scalar indicator (| or >) - if ($output && ('@' === $output[0] || '`' === $output[0] || '|' === $output[0] || '>' === $output[0] || '%' === $output[0])) { - throw new ParseException(sprintf('The reserved indicator "%s" cannot start a plain scalar; you need to quote the scalar.', $output[0]), self::$parsedLineNumber + 1, $output, self::$parsedFilename); - } - - if ($evaluate) { - $output = self::evaluateScalar($output, $flags, $references); - } - } - - return $output; - } - - /** - * Parses a YAML quoted scalar. - * - * @throws ParseException When malformed inline YAML string is parsed - */ - private static function parseQuotedScalar(string $scalar, int &$i): string - { - if (!Parser::preg_match('/'.self::REGEX_QUOTED_STRING.'/Au', substr($scalar, $i), $match)) { - throw new ParseException(sprintf('Malformed inline YAML string: "%s".', substr($scalar, $i)), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); - } - - $output = substr($match[0], 1, \strlen($match[0]) - 2); - - $unescaper = new Unescaper(); - if ('"' == $scalar[$i]) { - $output = $unescaper->unescapeDoubleQuotedString($output); - } else { - $output = $unescaper->unescapeSingleQuotedString($output); - } - - $i += \strlen($match[0]); - - return $output; - } - - /** - * Parses a YAML sequence. - * - * @throws ParseException When malformed inline YAML string is parsed - */ - private static function parseSequence(string $sequence, int $flags, int &$i = 0, array &$references = []): array - { - $output = []; - $len = \strlen($sequence); - ++$i; - - // [foo, bar, ...] - while ($i < $len) { - if (']' === $sequence[$i]) { - return $output; - } - if (',' === $sequence[$i] || ' ' === $sequence[$i]) { - ++$i; - - continue; - } - - $tag = self::parseTag($sequence, $i, $flags); - switch ($sequence[$i]) { - case '[': - // nested sequence - $value = self::parseSequence($sequence, $flags, $i, $references); - break; - case '{': - // nested mapping - $value = self::parseMapping($sequence, $flags, $i, $references); - break; - default: - $isQuoted = \in_array($sequence[$i], ['"', "'"]); - $value = self::parseScalar($sequence, $flags, [',', ']'], $i, null === $tag, $references); - - // the value can be an array if a reference has been resolved to an array var - if (\is_string($value) && !$isQuoted && false !== strpos($value, ': ')) { - // embedded mapping? - try { - $pos = 0; - $value = self::parseMapping('{'.$value.'}', $flags, $pos, $references); - } catch (\InvalidArgumentException $e) { - // no, it's not - } - } - - if (\is_string($value) && '' !== $value && '&' === $value[0] && Parser::preg_match(Parser::REFERENCE_PATTERN, $value, $matches)) { - $references[$matches['ref']] = $matches['value']; - $value = $matches['value']; - } - - --$i; - } - - if (null !== $tag && '' !== $tag) { - $value = new TaggedValue($tag, $value); - } - - $output[] = $value; - - ++$i; - } - - throw new ParseException(sprintf('Malformed inline YAML string: "%s".', $sequence), self::$parsedLineNumber + 1, null, self::$parsedFilename); - } - - /** - * Parses a YAML mapping. - * - * @return array|\stdClass - * - * @throws ParseException When malformed inline YAML string is parsed - */ - private static function parseMapping(string $mapping, int $flags, int &$i = 0, array &$references = []) - { - $output = []; - $len = \strlen($mapping); - ++$i; - $allowOverwrite = false; - - // {foo: bar, bar:foo, ...} - while ($i < $len) { - switch ($mapping[$i]) { - case ' ': - case ',': - case "\n": - ++$i; - continue 2; - case '}': - if (self::$objectForMap) { - return (object) $output; - } - - return $output; - } - - // key - $offsetBeforeKeyParsing = $i; - $isKeyQuoted = \in_array($mapping[$i], ['"', "'"], true); - $key = self::parseScalar($mapping, $flags, [':', ' '], $i, false); - - if ($offsetBeforeKeyParsing === $i) { - throw new ParseException('Missing mapping key.', self::$parsedLineNumber + 1, $mapping); - } - - if ('!php/const' === $key) { - $key .= ' '.self::parseScalar($mapping, $flags, [':'], $i, false); - $key = self::evaluateScalar($key, $flags); - } - - if (false === $i = strpos($mapping, ':', $i)) { - break; - } - - if (!$isKeyQuoted) { - $evaluatedKey = self::evaluateScalar($key, $flags, $references); - - if ('' !== $key && $evaluatedKey !== $key && !\is_string($evaluatedKey) && !\is_int($evaluatedKey)) { - throw new ParseException('Implicit casting of incompatible mapping keys to strings is not supported. Quote your evaluable mapping keys instead.', self::$parsedLineNumber + 1, $mapping); - } - } - - if (!$isKeyQuoted && (!isset($mapping[$i + 1]) || !\in_array($mapping[$i + 1], [' ', ',', '[', ']', '{', '}', "\n"], true))) { - throw new ParseException('Colons must be followed by a space or an indication character (i.e. " ", ",", "[", "]", "{", "}").', self::$parsedLineNumber + 1, $mapping); - } - - if ('<<' === $key) { - $allowOverwrite = true; - } - - while ($i < $len) { - if (':' === $mapping[$i] || ' ' === $mapping[$i] || "\n" === $mapping[$i]) { - ++$i; - - continue; - } - - $tag = self::parseTag($mapping, $i, $flags); - switch ($mapping[$i]) { - case '[': - // nested sequence - $value = self::parseSequence($mapping, $flags, $i, $references); - // Spec: Keys MUST be unique; first one wins. - // Parser cannot abort this mapping earlier, since lines - // are processed sequentially. - // But overwriting is allowed when a merge node is used in current block. - if ('<<' === $key) { - foreach ($value as $parsedValue) { - $output += $parsedValue; - } - } elseif ($allowOverwrite || !isset($output[$key])) { - if (null !== $tag) { - $output[$key] = new TaggedValue($tag, $value); - } else { - $output[$key] = $value; - } - } elseif (isset($output[$key])) { - throw new ParseException(sprintf('Duplicate key "%s" detected.', $key), self::$parsedLineNumber + 1, $mapping); - } - break; - case '{': - // nested mapping - $value = self::parseMapping($mapping, $flags, $i, $references); - // Spec: Keys MUST be unique; first one wins. - // Parser cannot abort this mapping earlier, since lines - // are processed sequentially. - // But overwriting is allowed when a merge node is used in current block. - if ('<<' === $key) { - $output += $value; - } elseif ($allowOverwrite || !isset($output[$key])) { - if (null !== $tag) { - $output[$key] = new TaggedValue($tag, $value); - } else { - $output[$key] = $value; - } - } elseif (isset($output[$key])) { - throw new ParseException(sprintf('Duplicate key "%s" detected.', $key), self::$parsedLineNumber + 1, $mapping); - } - break; - default: - $value = self::parseScalar($mapping, $flags, [',', '}', "\n"], $i, null === $tag, $references); - // Spec: Keys MUST be unique; first one wins. - // Parser cannot abort this mapping earlier, since lines - // are processed sequentially. - // But overwriting is allowed when a merge node is used in current block. - if ('<<' === $key) { - $output += $value; - } elseif ($allowOverwrite || !isset($output[$key])) { - if (\is_string($value) && '' !== $value && '&' === $value[0] && Parser::preg_match(Parser::REFERENCE_PATTERN, $value, $matches)) { - $references[$matches['ref']] = $matches['value']; - $value = $matches['value']; - } - - if (null !== $tag) { - $output[$key] = new TaggedValue($tag, $value); - } else { - $output[$key] = $value; - } - } elseif (isset($output[$key])) { - throw new ParseException(sprintf('Duplicate key "%s" detected.', $key), self::$parsedLineNumber + 1, $mapping); - } - --$i; - } - ++$i; - - continue 2; - } - } - - throw new ParseException(sprintf('Malformed inline YAML string: "%s".', $mapping), self::$parsedLineNumber + 1, null, self::$parsedFilename); - } - - /** - * Evaluates scalars and replaces magic values. - * - * @return mixed The evaluated YAML string - * - * @throws ParseException when object parsing support was disabled and the parser detected a PHP object or when a reference could not be resolved - */ - private static function evaluateScalar(string $scalar, int $flags, array &$references = []) - { - $scalar = trim($scalar); - $scalarLower = strtolower($scalar); - - if (0 === strpos($scalar, '*')) { - if (false !== $pos = strpos($scalar, '#')) { - $value = substr($scalar, 1, $pos - 2); - } else { - $value = substr($scalar, 1); - } - - // an unquoted * - if (false === $value || '' === $value) { - throw new ParseException('A reference must contain at least one character.', self::$parsedLineNumber + 1, $value, self::$parsedFilename); - } - - if (!\array_key_exists($value, $references)) { - throw new ParseException(sprintf('Reference "%s" does not exist.', $value), self::$parsedLineNumber + 1, $value, self::$parsedFilename); - } - - return $references[$value]; - } - - switch (true) { - case 'null' === $scalarLower: - case '' === $scalar: - case '~' === $scalar: - return null; - case 'true' === $scalarLower: - return true; - case 'false' === $scalarLower: - return false; - case '!' === $scalar[0]: - switch (true) { - case 0 === strpos($scalar, '!!str '): - return (string) substr($scalar, 6); - case 0 === strpos($scalar, '! '): - return substr($scalar, 2); - case 0 === strpos($scalar, '!php/object'): - if (self::$objectSupport) { - if (!isset($scalar[12])) { - return false; - } - - return unserialize(self::parseScalar(substr($scalar, 12))); - } - - if (self::$exceptionOnInvalidType) { - throw new ParseException('Object support when parsing a YAML file has been disabled.', self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); - } - - return null; - case 0 === strpos($scalar, '!php/const'): - if (self::$constantSupport) { - if (!isset($scalar[11])) { - return ''; - } - - $i = 0; - if (\defined($const = self::parseScalar(substr($scalar, 11), 0, null, $i, false))) { - return \constant($const); - } - - throw new ParseException(sprintf('The constant "%s" is not defined.', $const), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); - } - if (self::$exceptionOnInvalidType) { - throw new ParseException(sprintf('The string "%s" could not be parsed as a constant. Did you forget to pass the "Yaml::PARSE_CONSTANT" flag to the parser?', $scalar), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); - } - - return null; - case 0 === strpos($scalar, '!!float '): - return (float) substr($scalar, 8); - case 0 === strpos($scalar, '!!binary '): - return self::evaluateBinaryScalar(substr($scalar, 9)); - default: - throw new ParseException(sprintf('The string "%s" could not be parsed as it uses an unsupported built-in tag.', $scalar), self::$parsedLineNumber, $scalar, self::$parsedFilename); - } - - // Optimize for returning strings. - // no break - case '+' === $scalar[0] || '-' === $scalar[0] || '.' === $scalar[0] || is_numeric($scalar[0]): - if (Parser::preg_match('{^[+-]?[0-9][0-9_]*$}', $scalar)) { - $scalar = str_replace('_', '', (string) $scalar); - } - - switch (true) { - case ctype_digit($scalar): - if (preg_match('/^0[0-7]+$/', $scalar)) { - return octdec($scalar); - } - - $cast = (int) $scalar; - - return ($scalar === (string) $cast) ? $cast : $scalar; - case '-' === $scalar[0] && ctype_digit(substr($scalar, 1)): - if (preg_match('/^-0[0-7]+$/', $scalar)) { - return -octdec(substr($scalar, 1)); - } - - $cast = (int) $scalar; - - return ($scalar === (string) $cast) ? $cast : $scalar; - case is_numeric($scalar): - case Parser::preg_match(self::getHexRegex(), $scalar): - $scalar = str_replace('_', '', $scalar); - - return '0x' === $scalar[0].$scalar[1] ? hexdec($scalar) : (float) $scalar; - case '.inf' === $scalarLower: - case '.nan' === $scalarLower: - return -log(0); - case '-.inf' === $scalarLower: - return log(0); - case Parser::preg_match('/^(-|\+)?[0-9][0-9_]*(\.[0-9_]+)?$/', $scalar): - return (float) str_replace('_', '', $scalar); - case Parser::preg_match(self::getTimestampRegex(), $scalar): - // When no timezone is provided in the parsed date, YAML spec says we must assume UTC. - $time = new \DateTime($scalar, new \DateTimeZone('UTC')); - - if (Yaml::PARSE_DATETIME & $flags) { - return $time; - } - - try { - if (false !== $scalar = $time->getTimestamp()) { - return $scalar; - } - } catch (\ValueError $e) { - // no-op - } - - return $time->format('U'); - } - } - - return (string) $scalar; - } - - private static function parseTag(string $value, int &$i, int $flags): ?string - { - if ('!' !== $value[$i]) { - return null; - } - - $tagLength = strcspn($value, " \t\n[]{},", $i + 1); - $tag = substr($value, $i + 1, $tagLength); - - $nextOffset = $i + $tagLength + 1; - $nextOffset += strspn($value, ' ', $nextOffset); - - if ('' === $tag && (!isset($value[$nextOffset]) || \in_array($value[$nextOffset], [']', '}', ','], true))) { - throw new ParseException('Using the unquoted scalar value "!" is not supported. You must quote it.', self::$parsedLineNumber + 1, $value, self::$parsedFilename); - } - - // Is followed by a scalar and is a built-in tag - if ('' !== $tag && (!isset($value[$nextOffset]) || !\in_array($value[$nextOffset], ['[', '{'], true)) && ('!' === $tag[0] || 'str' === $tag || 'php/const' === $tag || 'php/object' === $tag)) { - // Manage in {@link self::evaluateScalar()} - return null; - } - - $i = $nextOffset; - - // Built-in tags - if ('' !== $tag && '!' === $tag[0]) { - throw new ParseException(sprintf('The built-in tag "!%s" is not implemented.', $tag), self::$parsedLineNumber + 1, $value, self::$parsedFilename); - } - - if ('' !== $tag && !isset($value[$i])) { - throw new ParseException(sprintf('Missing value for tag "%s".', $tag), self::$parsedLineNumber + 1, $value, self::$parsedFilename); - } - - if ('' === $tag || Yaml::PARSE_CUSTOM_TAGS & $flags) { - return $tag; - } - - throw new ParseException(sprintf('Tags support is not enabled. Enable the "Yaml::PARSE_CUSTOM_TAGS" flag to use "!%s".', $tag), self::$parsedLineNumber + 1, $value, self::$parsedFilename); - } - - public static function evaluateBinaryScalar(string $scalar): string - { - $parsedBinaryData = self::parseScalar(preg_replace('/\s/', '', $scalar)); - - if (0 !== (\strlen($parsedBinaryData) % 4)) { - throw new ParseException(sprintf('The normalized base64 encoded data (data without whitespace characters) length must be a multiple of four (%d bytes given).', \strlen($parsedBinaryData)), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); - } - - if (!Parser::preg_match('#^[A-Z0-9+/]+={0,2}$#i', $parsedBinaryData)) { - throw new ParseException(sprintf('The base64 encoded data (%s) contains invalid characters.', $parsedBinaryData), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); - } - - return base64_decode($parsedBinaryData, true); - } - - private static function isBinaryString(string $value) - { - return !preg_match('//u', $value) || preg_match('/[^\x00\x07-\x0d\x1B\x20-\xff]/', $value); - } - - /** - * Gets a regex that matches a YAML date. - * - * @return string The regular expression - * - * @see http://www.yaml.org/spec/1.2/spec.html#id2761573 - */ - private static function getTimestampRegex(): string - { - return <<[0-9][0-9][0-9][0-9]) - -(?P[0-9][0-9]?) - -(?P[0-9][0-9]?) - (?:(?:[Tt]|[ \t]+) - (?P[0-9][0-9]?) - :(?P[0-9][0-9]) - :(?P[0-9][0-9]) - (?:\.(?P[0-9]*))? - (?:[ \t]*(?PZ|(?P[-+])(?P[0-9][0-9]?) - (?::(?P[0-9][0-9]))?))?)? - $~x -EOF; - } - - /** - * Gets a regex that matches a YAML number in hexadecimal notation. - */ - private static function getHexRegex(): string - { - return '~^0x[0-9a-f_]++$~i'; - } -} diff --git a/source/vendor/symfony/yaml/LICENSE b/source/vendor/symfony/yaml/LICENSE deleted file mode 100644 index 9ff2d0d..0000000 --- a/source/vendor/symfony/yaml/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2021 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/source/vendor/symfony/yaml/Parser.php b/source/vendor/symfony/yaml/Parser.php deleted file mode 100644 index 32e6d34..0000000 --- a/source/vendor/symfony/yaml/Parser.php +++ /dev/null @@ -1,1315 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Yaml; - -use Symfony\Component\Yaml\Exception\ParseException; -use Symfony\Component\Yaml\Tag\TaggedValue; - -/** - * Parser parses YAML strings to convert them to PHP arrays. - * - * @author Fabien Potencier - * - * @final - */ -class Parser -{ - public const TAG_PATTERN = '(?P![\w!.\/:-]+)'; - public const BLOCK_SCALAR_HEADER_PATTERN = '(?P\||>)(?P\+|\-|\d+|\+\d+|\-\d+|\d+\+|\d+\-)?(?P +#.*)?'; - public const REFERENCE_PATTERN = '#^&(?P[^ ]++) *+(?P.*)#u'; - - private $filename; - private $offset = 0; - private $totalNumberOfLines; - private $lines = []; - private $currentLineNb = -1; - private $currentLine = ''; - private $refs = []; - private $skippedLineNumbers = []; - private $locallySkippedLineNumbers = []; - private $refsBeingParsed = []; - - /** - * Parses a YAML file into a PHP value. - * - * @param string $filename The path to the YAML file to be parsed - * @param int $flags A bit field of PARSE_* constants to customize the YAML parser behavior - * - * @return mixed The YAML converted to a PHP value - * - * @throws ParseException If the file could not be read or the YAML is not valid - */ - public function parseFile(string $filename, int $flags = 0) - { - if (!is_file($filename)) { - throw new ParseException(sprintf('File "%s" does not exist.', $filename)); - } - - if (!is_readable($filename)) { - throw new ParseException(sprintf('File "%s" cannot be read.', $filename)); - } - - $this->filename = $filename; - - try { - return $this->parse(file_get_contents($filename), $flags); - } finally { - $this->filename = null; - } - } - - /** - * Parses a YAML string to a PHP value. - * - * @param string $value A YAML string - * @param int $flags A bit field of PARSE_* constants to customize the YAML parser behavior - * - * @return mixed A PHP value - * - * @throws ParseException If the YAML is not valid - */ - public function parse(string $value, int $flags = 0) - { - if (false === preg_match('//u', $value)) { - throw new ParseException('The YAML value does not appear to be valid UTF-8.', -1, null, $this->filename); - } - - $this->refs = []; - - $mbEncoding = null; - - if (2 /* MB_OVERLOAD_STRING */ & (int) ini_get('mbstring.func_overload')) { - $mbEncoding = mb_internal_encoding(); - mb_internal_encoding('UTF-8'); - } - - try { - $data = $this->doParse($value, $flags); - } finally { - if (null !== $mbEncoding) { - mb_internal_encoding($mbEncoding); - } - $this->lines = []; - $this->currentLine = ''; - $this->refs = []; - $this->skippedLineNumbers = []; - $this->locallySkippedLineNumbers = []; - $this->totalNumberOfLines = null; - } - - return $data; - } - - private function doParse(string $value, int $flags) - { - $this->currentLineNb = -1; - $this->currentLine = ''; - $value = $this->cleanup($value); - $this->lines = explode("\n", $value); - $this->locallySkippedLineNumbers = []; - - if (null === $this->totalNumberOfLines) { - $this->totalNumberOfLines = \count($this->lines); - } - - if (!$this->moveToNextLine()) { - return null; - } - - $data = []; - $context = null; - $allowOverwrite = false; - - while ($this->isCurrentLineEmpty()) { - if (!$this->moveToNextLine()) { - return null; - } - } - - // Resolves the tag and returns if end of the document - if (null !== ($tag = $this->getLineTag($this->currentLine, $flags, false)) && !$this->moveToNextLine()) { - return new TaggedValue($tag, ''); - } - - do { - if ($this->isCurrentLineEmpty()) { - continue; - } - - // tab? - if ("\t" === $this->currentLine[0]) { - throw new ParseException('A YAML file cannot contain tabs as indentation.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); - } - - Inline::initialize($flags, $this->getRealCurrentLineNb(), $this->filename); - - $isRef = $mergeNode = false; - if ('-' === $this->currentLine[0] && self::preg_match('#^\-((?P\s+)(?P.+))?$#u', rtrim($this->currentLine), $values)) { - if ($context && 'mapping' == $context) { - throw new ParseException('You cannot define a sequence item when in a mapping.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); - } - $context = 'sequence'; - - if (isset($values['value']) && '&' === $values['value'][0] && self::preg_match(self::REFERENCE_PATTERN, $values['value'], $matches)) { - $isRef = $matches['ref']; - $this->refsBeingParsed[] = $isRef; - $values['value'] = $matches['value']; - } - - if (isset($values['value'][1]) && '?' === $values['value'][0] && ' ' === $values['value'][1]) { - throw new ParseException('Complex mappings are not supported.', $this->getRealCurrentLineNb() + 1, $this->currentLine); - } - - // array - if (isset($values['value']) && 0 === strpos(ltrim($values['value'], ' '), '-')) { - // Inline first child - $currentLineNumber = $this->getRealCurrentLineNb(); - - $sequenceIndentation = \strlen($values['leadspaces']) + 1; - $sequenceYaml = substr($this->currentLine, $sequenceIndentation); - $sequenceYaml .= "\n".$this->getNextEmbedBlock($sequenceIndentation, true); - - $data[] = $this->parseBlock($currentLineNumber, rtrim($sequenceYaml), $flags); - } elseif (!isset($values['value']) || '' == trim($values['value'], ' ') || 0 === strpos(ltrim($values['value'], ' '), '#')) { - $data[] = $this->parseBlock($this->getRealCurrentLineNb() + 1, $this->getNextEmbedBlock(null, true) ?? '', $flags); - } elseif (null !== $subTag = $this->getLineTag(ltrim($values['value'], ' '), $flags)) { - $data[] = new TaggedValue( - $subTag, - $this->parseBlock($this->getRealCurrentLineNb() + 1, $this->getNextEmbedBlock(null, true), $flags) - ); - } else { - if ( - isset($values['leadspaces']) - && ( - '!' === $values['value'][0] - || self::preg_match('#^(?P'.Inline::REGEX_QUOTED_STRING.'|[^ \'"\{\[].*?) *\:(\s+(?P.+?))?\s*$#u', $this->trimTag($values['value']), $matches) - ) - ) { - // this is a compact notation element, add to next block and parse - $block = $values['value']; - if ($this->isNextLineIndented()) { - $block .= "\n".$this->getNextEmbedBlock($this->getCurrentLineIndentation() + \strlen($values['leadspaces']) + 1); - } - - $data[] = $this->parseBlock($this->getRealCurrentLineNb(), $block, $flags); - } else { - $data[] = $this->parseValue($values['value'], $flags, $context); - } - } - if ($isRef) { - $this->refs[$isRef] = end($data); - array_pop($this->refsBeingParsed); - } - } elseif ( - self::preg_match('#^(?P(?:![^\s]++\s++)?(?:'.Inline::REGEX_QUOTED_STRING.'|(?:!?!php/const:)?[^ \'"\[\{!].*?)) *\:(( |\t)++(?P.+))?$#u', rtrim($this->currentLine), $values) - && (false === strpos($values['key'], ' #') || \in_array($values['key'][0], ['"', "'"])) - ) { - if ($context && 'sequence' == $context) { - throw new ParseException('You cannot define a mapping item when in a sequence.', $this->currentLineNb + 1, $this->currentLine, $this->filename); - } - $context = 'mapping'; - - try { - $key = Inline::parseScalar($values['key']); - } catch (ParseException $e) { - $e->setParsedLine($this->getRealCurrentLineNb() + 1); - $e->setSnippet($this->currentLine); - - throw $e; - } - - if (!\is_string($key) && !\is_int($key)) { - throw new ParseException((is_numeric($key) ? 'Numeric' : 'Non-string').' keys are not supported. Quote your evaluable mapping keys instead.', $this->getRealCurrentLineNb() + 1, $this->currentLine); - } - - // Convert float keys to strings, to avoid being converted to integers by PHP - if (\is_float($key)) { - $key = (string) $key; - } - - if ('<<' === $key && (!isset($values['value']) || '&' !== $values['value'][0] || !self::preg_match('#^&(?P[^ ]+)#u', $values['value'], $refMatches))) { - $mergeNode = true; - $allowOverwrite = true; - if (isset($values['value'][0]) && '*' === $values['value'][0]) { - $refName = substr(rtrim($values['value']), 1); - if (!\array_key_exists($refName, $this->refs)) { - if (false !== $pos = array_search($refName, $this->refsBeingParsed, true)) { - throw new ParseException(sprintf('Circular reference [%s] detected for reference "%s".', implode(', ', array_merge(\array_slice($this->refsBeingParsed, $pos), [$refName])), $refName), $this->currentLineNb + 1, $this->currentLine, $this->filename); - } - - throw new ParseException(sprintf('Reference "%s" does not exist.', $refName), $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); - } - - $refValue = $this->refs[$refName]; - - if (Yaml::PARSE_OBJECT_FOR_MAP & $flags && $refValue instanceof \stdClass) { - $refValue = (array) $refValue; - } - - if (!\is_array($refValue)) { - throw new ParseException('YAML merge keys used with a scalar value instead of an array.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); - } - - $data += $refValue; // array union - } else { - if (isset($values['value']) && '' !== $values['value']) { - $value = $values['value']; - } else { - $value = $this->getNextEmbedBlock(); - } - $parsed = $this->parseBlock($this->getRealCurrentLineNb() + 1, $value, $flags); - - if (Yaml::PARSE_OBJECT_FOR_MAP & $flags && $parsed instanceof \stdClass) { - $parsed = (array) $parsed; - } - - if (!\is_array($parsed)) { - throw new ParseException('YAML merge keys used with a scalar value instead of an array.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); - } - - if (isset($parsed[0])) { - // If the value associated with the merge key is a sequence, then this sequence is expected to contain mapping nodes - // and each of these nodes is merged in turn according to its order in the sequence. Keys in mapping nodes earlier - // in the sequence override keys specified in later mapping nodes. - foreach ($parsed as $parsedItem) { - if (Yaml::PARSE_OBJECT_FOR_MAP & $flags && $parsedItem instanceof \stdClass) { - $parsedItem = (array) $parsedItem; - } - - if (!\is_array($parsedItem)) { - throw new ParseException('Merge items must be arrays.', $this->getRealCurrentLineNb() + 1, $parsedItem, $this->filename); - } - - $data += $parsedItem; // array union - } - } else { - // If the value associated with the key is a single mapping node, each of its key/value pairs is inserted into the - // current mapping, unless the key already exists in it. - $data += $parsed; // array union - } - } - } elseif ('<<' !== $key && isset($values['value']) && '&' === $values['value'][0] && self::preg_match(self::REFERENCE_PATTERN, $values['value'], $matches)) { - $isRef = $matches['ref']; - $this->refsBeingParsed[] = $isRef; - $values['value'] = $matches['value']; - } - - $subTag = null; - if ($mergeNode) { - // Merge keys - } elseif (!isset($values['value']) || '' === $values['value'] || 0 === strpos($values['value'], '#') || (null !== $subTag = $this->getLineTag($values['value'], $flags)) || '<<' === $key) { - // hash - // if next line is less indented or equal, then it means that the current value is null - if (!$this->isNextLineIndented() && !$this->isNextLineUnIndentedCollection()) { - // Spec: Keys MUST be unique; first one wins. - // But overwriting is allowed when a merge node is used in current block. - if ($allowOverwrite || !isset($data[$key])) { - if (null !== $subTag) { - $data[$key] = new TaggedValue($subTag, ''); - } else { - $data[$key] = null; - } - } else { - throw new ParseException(sprintf('Duplicate key "%s" detected.', $key), $this->getRealCurrentLineNb() + 1, $this->currentLine); - } - } else { - // remember the parsed line number here in case we need it to provide some contexts in error messages below - $realCurrentLineNbKey = $this->getRealCurrentLineNb(); - $value = $this->parseBlock($this->getRealCurrentLineNb() + 1, $this->getNextEmbedBlock(), $flags); - if ('<<' === $key) { - $this->refs[$refMatches['ref']] = $value; - - if (Yaml::PARSE_OBJECT_FOR_MAP & $flags && $value instanceof \stdClass) { - $value = (array) $value; - } - - $data += $value; - } elseif ($allowOverwrite || !isset($data[$key])) { - // Spec: Keys MUST be unique; first one wins. - // But overwriting is allowed when a merge node is used in current block. - if (null !== $subTag) { - $data[$key] = new TaggedValue($subTag, $value); - } else { - $data[$key] = $value; - } - } else { - throw new ParseException(sprintf('Duplicate key "%s" detected.', $key), $realCurrentLineNbKey + 1, $this->currentLine); - } - } - } else { - $value = $this->parseValue(rtrim($values['value']), $flags, $context); - // Spec: Keys MUST be unique; first one wins. - // But overwriting is allowed when a merge node is used in current block. - if ($allowOverwrite || !isset($data[$key])) { - $data[$key] = $value; - } else { - throw new ParseException(sprintf('Duplicate key "%s" detected.', $key), $this->getRealCurrentLineNb() + 1, $this->currentLine); - } - } - if ($isRef) { - $this->refs[$isRef] = $data[$key]; - array_pop($this->refsBeingParsed); - } - } elseif ('"' === $this->currentLine[0] || "'" === $this->currentLine[0]) { - if (null !== $context) { - throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); - } - - try { - return Inline::parse($this->lexInlineQuotedString(), $flags, $this->refs); - } catch (ParseException $e) { - $e->setParsedLine($this->getRealCurrentLineNb() + 1); - $e->setSnippet($this->currentLine); - - throw $e; - } - } elseif ('{' === $this->currentLine[0]) { - if (null !== $context) { - throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); - } - - try { - $parsedMapping = Inline::parse($this->lexInlineMapping(), $flags, $this->refs); - - while ($this->moveToNextLine()) { - if (!$this->isCurrentLineEmpty()) { - throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); - } - } - - return $parsedMapping; - } catch (ParseException $e) { - $e->setParsedLine($this->getRealCurrentLineNb() + 1); - $e->setSnippet($this->currentLine); - - throw $e; - } - } elseif ('[' === $this->currentLine[0]) { - if (null !== $context) { - throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); - } - - try { - $parsedSequence = Inline::parse($this->lexInlineSequence(), $flags, $this->refs); - - while ($this->moveToNextLine()) { - if (!$this->isCurrentLineEmpty()) { - throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); - } - } - - return $parsedSequence; - } catch (ParseException $e) { - $e->setParsedLine($this->getRealCurrentLineNb() + 1); - $e->setSnippet($this->currentLine); - - throw $e; - } - } else { - // multiple documents are not supported - if ('---' === $this->currentLine) { - throw new ParseException('Multiple documents are not supported.', $this->currentLineNb + 1, $this->currentLine, $this->filename); - } - - if ($deprecatedUsage = (isset($this->currentLine[1]) && '?' === $this->currentLine[0] && ' ' === $this->currentLine[1])) { - throw new ParseException('Complex mappings are not supported.', $this->getRealCurrentLineNb() + 1, $this->currentLine); - } - - // 1-liner optionally followed by newline(s) - if (\is_string($value) && $this->lines[0] === trim($value)) { - try { - $value = Inline::parse($this->lines[0], $flags, $this->refs); - } catch (ParseException $e) { - $e->setParsedLine($this->getRealCurrentLineNb() + 1); - $e->setSnippet($this->currentLine); - - throw $e; - } - - return $value; - } - - // try to parse the value as a multi-line string as a last resort - if (0 === $this->currentLineNb) { - $previousLineWasNewline = false; - $previousLineWasTerminatedWithBackslash = false; - $value = ''; - - foreach ($this->lines as $line) { - if ('' !== ltrim($line) && '#' === ltrim($line)[0]) { - continue; - } - // If the indentation is not consistent at offset 0, it is to be considered as a ParseError - if (0 === $this->offset && !$deprecatedUsage && isset($line[0]) && ' ' === $line[0]) { - throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); - } - - if (false !== strpos($line, ': ')) { - @trigger_error('Support for mapping keys in multi-line blocks is deprecated since Symfony 4.3 and will throw a ParseException in 5.0.', \E_USER_DEPRECATED); - } - - if ('' === trim($line)) { - $value .= "\n"; - } elseif (!$previousLineWasNewline && !$previousLineWasTerminatedWithBackslash) { - $value .= ' '; - } - - if ('' !== trim($line) && '\\' === substr($line, -1)) { - $value .= ltrim(substr($line, 0, -1)); - } elseif ('' !== trim($line)) { - $value .= trim($line); - } - - if ('' === trim($line)) { - $previousLineWasNewline = true; - $previousLineWasTerminatedWithBackslash = false; - } elseif ('\\' === substr($line, -1)) { - $previousLineWasNewline = false; - $previousLineWasTerminatedWithBackslash = true; - } else { - $previousLineWasNewline = false; - $previousLineWasTerminatedWithBackslash = false; - } - } - - try { - return Inline::parse(trim($value)); - } catch (ParseException $e) { - // fall-through to the ParseException thrown below - } - } - - throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); - } - } while ($this->moveToNextLine()); - - if (null !== $tag) { - $data = new TaggedValue($tag, $data); - } - - if (Yaml::PARSE_OBJECT_FOR_MAP & $flags && !\is_object($data) && 'mapping' === $context) { - $object = new \stdClass(); - - foreach ($data as $key => $value) { - $object->$key = $value; - } - - $data = $object; - } - - return empty($data) ? null : $data; - } - - private function parseBlock(int $offset, string $yaml, int $flags) - { - $skippedLineNumbers = $this->skippedLineNumbers; - - foreach ($this->locallySkippedLineNumbers as $lineNumber) { - if ($lineNumber < $offset) { - continue; - } - - $skippedLineNumbers[] = $lineNumber; - } - - $parser = new self(); - $parser->offset = $offset; - $parser->totalNumberOfLines = $this->totalNumberOfLines; - $parser->skippedLineNumbers = $skippedLineNumbers; - $parser->refs = &$this->refs; - $parser->refsBeingParsed = $this->refsBeingParsed; - - return $parser->doParse($yaml, $flags); - } - - /** - * Returns the current line number (takes the offset into account). - * - * @internal - * - * @return int The current line number - */ - public function getRealCurrentLineNb(): int - { - $realCurrentLineNumber = $this->currentLineNb + $this->offset; - - foreach ($this->skippedLineNumbers as $skippedLineNumber) { - if ($skippedLineNumber > $realCurrentLineNumber) { - break; - } - - ++$realCurrentLineNumber; - } - - return $realCurrentLineNumber; - } - - /** - * Returns the current line indentation. - * - * @return int The current line indentation - */ - private function getCurrentLineIndentation(): int - { - return \strlen($this->currentLine) - \strlen(ltrim($this->currentLine, ' ')); - } - - /** - * Returns the next embed block of YAML. - * - * @param int|null $indentation The indent level at which the block is to be read, or null for default - * @param bool $inSequence True if the enclosing data structure is a sequence - * - * @return string A YAML string - * - * @throws ParseException When indentation problem are detected - */ - private function getNextEmbedBlock(int $indentation = null, bool $inSequence = false): string - { - $oldLineIndentation = $this->getCurrentLineIndentation(); - - if (!$this->moveToNextLine()) { - return ''; - } - - if (null === $indentation) { - $newIndent = null; - $movements = 0; - - do { - $EOF = false; - - // empty and comment-like lines do not influence the indentation depth - if ($this->isCurrentLineEmpty() || $this->isCurrentLineComment()) { - $EOF = !$this->moveToNextLine(); - - if (!$EOF) { - ++$movements; - } - } else { - $newIndent = $this->getCurrentLineIndentation(); - } - } while (!$EOF && null === $newIndent); - - for ($i = 0; $i < $movements; ++$i) { - $this->moveToPreviousLine(); - } - - $unindentedEmbedBlock = $this->isStringUnIndentedCollectionItem(); - - if (!$this->isCurrentLineEmpty() && 0 === $newIndent && !$unindentedEmbedBlock) { - throw new ParseException('Indentation problem.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); - } - } else { - $newIndent = $indentation; - } - - $data = []; - - if ($this->getCurrentLineIndentation() >= $newIndent) { - $data[] = substr($this->currentLine, $newIndent ?? 0); - } elseif ($this->isCurrentLineEmpty() || $this->isCurrentLineComment()) { - $data[] = $this->currentLine; - } else { - $this->moveToPreviousLine(); - - return ''; - } - - if ($inSequence && $oldLineIndentation === $newIndent && isset($data[0][0]) && '-' === $data[0][0]) { - // the previous line contained a dash but no item content, this line is a sequence item with the same indentation - // and therefore no nested list or mapping - $this->moveToPreviousLine(); - - return ''; - } - - $isItUnindentedCollection = $this->isStringUnIndentedCollectionItem(); - $isItComment = $this->isCurrentLineComment(); - - while ($this->moveToNextLine()) { - if ($isItComment && !$isItUnindentedCollection) { - $isItUnindentedCollection = $this->isStringUnIndentedCollectionItem(); - $isItComment = $this->isCurrentLineComment(); - } - - $indent = $this->getCurrentLineIndentation(); - - if ($isItUnindentedCollection && !$this->isCurrentLineEmpty() && !$this->isStringUnIndentedCollectionItem() && $newIndent === $indent) { - $this->moveToPreviousLine(); - break; - } - - if ($this->isCurrentLineBlank()) { - $data[] = substr($this->currentLine, $newIndent); - continue; - } - - if ($indent >= $newIndent) { - $data[] = substr($this->currentLine, $newIndent); - } elseif ($this->isCurrentLineComment()) { - $data[] = $this->currentLine; - } elseif (0 == $indent) { - $this->moveToPreviousLine(); - - break; - } else { - throw new ParseException('Indentation problem.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); - } - } - - return implode("\n", $data); - } - - private function hasMoreLines(): bool - { - return (\count($this->lines) - 1) > $this->currentLineNb; - } - - /** - * Moves the parser to the next line. - */ - private function moveToNextLine(): bool - { - if ($this->currentLineNb >= \count($this->lines) - 1) { - return false; - } - - $this->currentLine = $this->lines[++$this->currentLineNb]; - - return true; - } - - /** - * Moves the parser to the previous line. - */ - private function moveToPreviousLine(): bool - { - if ($this->currentLineNb < 1) { - return false; - } - - $this->currentLine = $this->lines[--$this->currentLineNb]; - - return true; - } - - /** - * Parses a YAML value. - * - * @param string $value A YAML value - * @param int $flags A bit field of PARSE_* constants to customize the YAML parser behavior - * @param string $context The parser context (either sequence or mapping) - * - * @return mixed A PHP value - * - * @throws ParseException When reference does not exist - */ - private function parseValue(string $value, int $flags, string $context) - { - if (0 === strpos($value, '*')) { - if (false !== $pos = strpos($value, '#')) { - $value = substr($value, 1, $pos - 2); - } else { - $value = substr($value, 1); - } - - if (!\array_key_exists($value, $this->refs)) { - if (false !== $pos = array_search($value, $this->refsBeingParsed, true)) { - throw new ParseException(sprintf('Circular reference [%s] detected for reference "%s".', implode(', ', array_merge(\array_slice($this->refsBeingParsed, $pos), [$value])), $value), $this->currentLineNb + 1, $this->currentLine, $this->filename); - } - - throw new ParseException(sprintf('Reference "%s" does not exist.', $value), $this->currentLineNb + 1, $this->currentLine, $this->filename); - } - - return $this->refs[$value]; - } - - if (\in_array($value[0], ['!', '|', '>'], true) && self::preg_match('/^(?:'.self::TAG_PATTERN.' +)?'.self::BLOCK_SCALAR_HEADER_PATTERN.'$/', $value, $matches)) { - $modifiers = $matches['modifiers'] ?? ''; - - $data = $this->parseBlockScalar($matches['separator'], preg_replace('#\d+#', '', $modifiers), abs((int) $modifiers)); - - if ('' !== $matches['tag'] && '!' !== $matches['tag']) { - if ('!!binary' === $matches['tag']) { - return Inline::evaluateBinaryScalar($data); - } - - return new TaggedValue(substr($matches['tag'], 1), $data); - } - - return $data; - } - - try { - if ('' !== $value && '{' === $value[0]) { - $cursor = \strlen(rtrim($this->currentLine)) - \strlen(rtrim($value)); - - return Inline::parse($this->lexInlineMapping($cursor), $flags, $this->refs); - } elseif ('' !== $value && '[' === $value[0]) { - $cursor = \strlen(rtrim($this->currentLine)) - \strlen(rtrim($value)); - - return Inline::parse($this->lexInlineSequence($cursor), $flags, $this->refs); - } - - switch ($value[0] ?? '') { - case '"': - case "'": - $cursor = \strlen(rtrim($this->currentLine)) - \strlen(rtrim($value)); - $parsedValue = Inline::parse($this->lexInlineQuotedString($cursor), $flags, $this->refs); - - if (isset($this->currentLine[$cursor]) && preg_replace('/\s*(#.*)?$/A', '', substr($this->currentLine, $cursor))) { - throw new ParseException(sprintf('Unexpected characters near "%s".', substr($this->currentLine, $cursor))); - } - - return $parsedValue; - default: - $lines = []; - - while ($this->moveToNextLine()) { - // unquoted strings end before the first unindented line - if (0 === $this->getCurrentLineIndentation()) { - $this->moveToPreviousLine(); - - break; - } - - $lines[] = trim($this->currentLine); - } - - for ($i = 0, $linesCount = \count($lines), $previousLineBlank = false; $i < $linesCount; ++$i) { - if ('' === $lines[$i]) { - $value .= "\n"; - $previousLineBlank = true; - } elseif ($previousLineBlank) { - $value .= $lines[$i]; - $previousLineBlank = false; - } else { - $value .= ' '.$lines[$i]; - $previousLineBlank = false; - } - } - - Inline::$parsedLineNumber = $this->getRealCurrentLineNb(); - - $parsedValue = Inline::parse($value, $flags, $this->refs); - - if ('mapping' === $context && \is_string($parsedValue) && '"' !== $value[0] && "'" !== $value[0] && '[' !== $value[0] && '{' !== $value[0] && '!' !== $value[0] && false !== strpos($parsedValue, ': ')) { - throw new ParseException('A colon cannot be used in an unquoted mapping value.', $this->getRealCurrentLineNb() + 1, $value, $this->filename); - } - - return $parsedValue; - } - } catch (ParseException $e) { - $e->setParsedLine($this->getRealCurrentLineNb() + 1); - $e->setSnippet($this->currentLine); - - throw $e; - } - } - - /** - * Parses a block scalar. - * - * @param string $style The style indicator that was used to begin this block scalar (| or >) - * @param string $chomping The chomping indicator that was used to begin this block scalar (+ or -) - * @param int $indentation The indentation indicator that was used to begin this block scalar - */ - private function parseBlockScalar(string $style, string $chomping = '', int $indentation = 0): string - { - $notEOF = $this->moveToNextLine(); - if (!$notEOF) { - return ''; - } - - $isCurrentLineBlank = $this->isCurrentLineBlank(); - $blockLines = []; - - // leading blank lines are consumed before determining indentation - while ($notEOF && $isCurrentLineBlank) { - // newline only if not EOF - if ($notEOF = $this->moveToNextLine()) { - $blockLines[] = ''; - $isCurrentLineBlank = $this->isCurrentLineBlank(); - } - } - - // determine indentation if not specified - if (0 === $indentation) { - $currentLineLength = \strlen($this->currentLine); - - for ($i = 0; $i < $currentLineLength && ' ' === $this->currentLine[$i]; ++$i) { - ++$indentation; - } - } - - if ($indentation > 0) { - $pattern = sprintf('/^ {%d}(.*)$/', $indentation); - - while ( - $notEOF && ( - $isCurrentLineBlank || - self::preg_match($pattern, $this->currentLine, $matches) - ) - ) { - if ($isCurrentLineBlank && \strlen($this->currentLine) > $indentation) { - $blockLines[] = substr($this->currentLine, $indentation); - } elseif ($isCurrentLineBlank) { - $blockLines[] = ''; - } else { - $blockLines[] = $matches[1]; - } - - // newline only if not EOF - if ($notEOF = $this->moveToNextLine()) { - $isCurrentLineBlank = $this->isCurrentLineBlank(); - } - } - } elseif ($notEOF) { - $blockLines[] = ''; - } - - if ($notEOF) { - $blockLines[] = ''; - $this->moveToPreviousLine(); - } elseif (!$notEOF && !$this->isCurrentLineLastLineInDocument()) { - $blockLines[] = ''; - } - - // folded style - if ('>' === $style) { - $text = ''; - $previousLineIndented = false; - $previousLineBlank = false; - - for ($i = 0, $blockLinesCount = \count($blockLines); $i < $blockLinesCount; ++$i) { - if ('' === $blockLines[$i]) { - $text .= "\n"; - $previousLineIndented = false; - $previousLineBlank = true; - } elseif (' ' === $blockLines[$i][0]) { - $text .= "\n".$blockLines[$i]; - $previousLineIndented = true; - $previousLineBlank = false; - } elseif ($previousLineIndented) { - $text .= "\n".$blockLines[$i]; - $previousLineIndented = false; - $previousLineBlank = false; - } elseif ($previousLineBlank || 0 === $i) { - $text .= $blockLines[$i]; - $previousLineIndented = false; - $previousLineBlank = false; - } else { - $text .= ' '.$blockLines[$i]; - $previousLineIndented = false; - $previousLineBlank = false; - } - } - } else { - $text = implode("\n", $blockLines); - } - - // deal with trailing newlines - if ('' === $chomping) { - $text = preg_replace('/\n+$/', "\n", $text); - } elseif ('-' === $chomping) { - $text = preg_replace('/\n+$/', '', $text); - } - - return $text; - } - - /** - * Returns true if the next line is indented. - * - * @return bool Returns true if the next line is indented, false otherwise - */ - private function isNextLineIndented(): bool - { - $currentIndentation = $this->getCurrentLineIndentation(); - $movements = 0; - - do { - $EOF = !$this->moveToNextLine(); - - if (!$EOF) { - ++$movements; - } - } while (!$EOF && ($this->isCurrentLineEmpty() || $this->isCurrentLineComment())); - - if ($EOF) { - return false; - } - - $ret = $this->getCurrentLineIndentation() > $currentIndentation; - - for ($i = 0; $i < $movements; ++$i) { - $this->moveToPreviousLine(); - } - - return $ret; - } - - /** - * Returns true if the current line is blank or if it is a comment line. - * - * @return bool Returns true if the current line is empty or if it is a comment line, false otherwise - */ - private function isCurrentLineEmpty(): bool - { - return $this->isCurrentLineBlank() || $this->isCurrentLineComment(); - } - - /** - * Returns true if the current line is blank. - * - * @return bool Returns true if the current line is blank, false otherwise - */ - private function isCurrentLineBlank(): bool - { - return '' == trim($this->currentLine, ' '); - } - - /** - * Returns true if the current line is a comment line. - * - * @return bool Returns true if the current line is a comment line, false otherwise - */ - private function isCurrentLineComment(): bool - { - //checking explicitly the first char of the trim is faster than loops or strpos - $ltrimmedLine = ltrim($this->currentLine, ' '); - - return '' !== $ltrimmedLine && '#' === $ltrimmedLine[0]; - } - - private function isCurrentLineLastLineInDocument(): bool - { - return ($this->offset + $this->currentLineNb) >= ($this->totalNumberOfLines - 1); - } - - /** - * Cleanups a YAML string to be parsed. - * - * @param string $value The input YAML string - * - * @return string A cleaned up YAML string - */ - private function cleanup(string $value): string - { - $value = str_replace(["\r\n", "\r"], "\n", $value); - - // strip YAML header - $count = 0; - $value = preg_replace('#^\%YAML[: ][\d\.]+.*\n#u', '', $value, -1, $count); - $this->offset += $count; - - // remove leading comments - $trimmedValue = preg_replace('#^(\#.*?\n)+#s', '', $value, -1, $count); - if (1 === $count) { - // items have been removed, update the offset - $this->offset += substr_count($value, "\n") - substr_count($trimmedValue, "\n"); - $value = $trimmedValue; - } - - // remove start of the document marker (---) - $trimmedValue = preg_replace('#^\-\-\-.*?\n#s', '', $value, -1, $count); - if (1 === $count) { - // items have been removed, update the offset - $this->offset += substr_count($value, "\n") - substr_count($trimmedValue, "\n"); - $value = $trimmedValue; - - // remove end of the document marker (...) - $value = preg_replace('#\.\.\.\s*$#', '', $value); - } - - return $value; - } - - /** - * Returns true if the next line starts unindented collection. - * - * @return bool Returns true if the next line starts unindented collection, false otherwise - */ - private function isNextLineUnIndentedCollection(): bool - { - $currentIndentation = $this->getCurrentLineIndentation(); - $movements = 0; - - do { - $EOF = !$this->moveToNextLine(); - - if (!$EOF) { - ++$movements; - } - } while (!$EOF && ($this->isCurrentLineEmpty() || $this->isCurrentLineComment())); - - if ($EOF) { - return false; - } - - $ret = $this->getCurrentLineIndentation() === $currentIndentation && $this->isStringUnIndentedCollectionItem(); - - for ($i = 0; $i < $movements; ++$i) { - $this->moveToPreviousLine(); - } - - return $ret; - } - - /** - * Returns true if the string is un-indented collection item. - * - * @return bool Returns true if the string is un-indented collection item, false otherwise - */ - private function isStringUnIndentedCollectionItem(): bool - { - return '-' === rtrim($this->currentLine) || 0 === strpos($this->currentLine, '- '); - } - - /** - * A local wrapper for "preg_match" which will throw a ParseException if there - * is an internal error in the PCRE engine. - * - * This avoids us needing to check for "false" every time PCRE is used - * in the YAML engine - * - * @throws ParseException on a PCRE internal error - * - * @see preg_last_error() - * - * @internal - */ - public static function preg_match(string $pattern, string $subject, array &$matches = null, int $flags = 0, int $offset = 0): int - { - if (false === $ret = preg_match($pattern, $subject, $matches, $flags, $offset)) { - switch (preg_last_error()) { - case \PREG_INTERNAL_ERROR: - $error = 'Internal PCRE error.'; - break; - case \PREG_BACKTRACK_LIMIT_ERROR: - $error = 'pcre.backtrack_limit reached.'; - break; - case \PREG_RECURSION_LIMIT_ERROR: - $error = 'pcre.recursion_limit reached.'; - break; - case \PREG_BAD_UTF8_ERROR: - $error = 'Malformed UTF-8 data.'; - break; - case \PREG_BAD_UTF8_OFFSET_ERROR: - $error = 'Offset doesn\'t correspond to the begin of a valid UTF-8 code point.'; - break; - default: - $error = 'Error.'; - } - - throw new ParseException($error); - } - - return $ret; - } - - /** - * Trim the tag on top of the value. - * - * Prevent values such as "!foo {quz: bar}" to be considered as - * a mapping block. - */ - private function trimTag(string $value): string - { - if ('!' === $value[0]) { - return ltrim(substr($value, 1, strcspn($value, " \r\n", 1)), ' '); - } - - return $value; - } - - private function getLineTag(string $value, int $flags, bool $nextLineCheck = true): ?string - { - if ('' === $value || '!' !== $value[0] || 1 !== self::preg_match('/^'.self::TAG_PATTERN.' *( +#.*)?$/', $value, $matches)) { - return null; - } - - if ($nextLineCheck && !$this->isNextLineIndented()) { - return null; - } - - $tag = substr($matches['tag'], 1); - - // Built-in tags - if ($tag && '!' === $tag[0]) { - throw new ParseException(sprintf('The built-in tag "!%s" is not implemented.', $tag), $this->getRealCurrentLineNb() + 1, $value, $this->filename); - } - - if (Yaml::PARSE_CUSTOM_TAGS & $flags) { - return $tag; - } - - throw new ParseException(sprintf('Tags support is not enabled. You must use the flag "Yaml::PARSE_CUSTOM_TAGS" to use "%s".', $matches['tag']), $this->getRealCurrentLineNb() + 1, $value, $this->filename); - } - - private function lexInlineQuotedString(int &$cursor = 0): string - { - $quotation = $this->currentLine[$cursor]; - $value = $quotation; - ++$cursor; - - $previousLineWasNewline = true; - $previousLineWasTerminatedWithBackslash = false; - $lineNumber = 0; - - do { - if (++$lineNumber > 1) { - $cursor += strspn($this->currentLine, ' ', $cursor); - } - - if ($this->isCurrentLineBlank()) { - $value .= "\n"; - } elseif (!$previousLineWasNewline && !$previousLineWasTerminatedWithBackslash) { - $value .= ' '; - } - - for (; \strlen($this->currentLine) > $cursor; ++$cursor) { - switch ($this->currentLine[$cursor]) { - case '\\': - if ("'" === $quotation) { - $value .= '\\'; - } elseif (isset($this->currentLine[++$cursor])) { - $value .= '\\'.$this->currentLine[$cursor]; - } - - break; - case $quotation: - ++$cursor; - - if ("'" === $quotation && isset($this->currentLine[$cursor]) && "'" === $this->currentLine[$cursor]) { - $value .= "''"; - break; - } - - return $value.$quotation; - default: - $value .= $this->currentLine[$cursor]; - } - } - - if ($this->isCurrentLineBlank()) { - $previousLineWasNewline = true; - $previousLineWasTerminatedWithBackslash = false; - } elseif ('\\' === $this->currentLine[-1]) { - $previousLineWasNewline = false; - $previousLineWasTerminatedWithBackslash = true; - } else { - $previousLineWasNewline = false; - $previousLineWasTerminatedWithBackslash = false; - } - - if ($this->hasMoreLines()) { - $cursor = 0; - } - } while ($this->moveToNextLine()); - - throw new ParseException('Malformed inline YAML string.'); - } - - private function lexUnquotedString(int &$cursor): string - { - $offset = $cursor; - $cursor += strcspn($this->currentLine, '[]{},: ', $cursor); - - if ($cursor === $offset) { - throw new ParseException('Malformed unquoted YAML string.'); - } - - return substr($this->currentLine, $offset, $cursor - $offset); - } - - private function lexInlineMapping(int &$cursor = 0): string - { - return $this->lexInlineStructure($cursor, '}'); - } - - private function lexInlineSequence(int &$cursor = 0): string - { - return $this->lexInlineStructure($cursor, ']'); - } - - private function lexInlineStructure(int &$cursor, string $closingTag): string - { - $value = $this->currentLine[$cursor]; - ++$cursor; - - do { - $this->consumeWhitespaces($cursor); - - while (isset($this->currentLine[$cursor])) { - switch ($this->currentLine[$cursor]) { - case '"': - case "'": - $value .= $this->lexInlineQuotedString($cursor); - break; - case ':': - case ',': - $value .= $this->currentLine[$cursor]; - ++$cursor; - break; - case '{': - $value .= $this->lexInlineMapping($cursor); - break; - case '[': - $value .= $this->lexInlineSequence($cursor); - break; - case $closingTag: - $value .= $this->currentLine[$cursor]; - ++$cursor; - - return $value; - case '#': - break 2; - default: - $value .= $this->lexUnquotedString($cursor); - } - - if ($this->consumeWhitespaces($cursor)) { - $value .= ' '; - } - } - - if ($this->hasMoreLines()) { - $cursor = 0; - } - } while ($this->moveToNextLine()); - - throw new ParseException('Malformed inline YAML string.'); - } - - private function consumeWhitespaces(int &$cursor): bool - { - $whitespacesConsumed = 0; - - do { - $whitespaceOnlyTokenLength = strspn($this->currentLine, ' ', $cursor); - $whitespacesConsumed += $whitespaceOnlyTokenLength; - $cursor += $whitespaceOnlyTokenLength; - - if (isset($this->currentLine[$cursor])) { - return 0 < $whitespacesConsumed; - } - - if ($this->hasMoreLines()) { - $cursor = 0; - } - } while ($this->moveToNextLine()); - - return 0 < $whitespacesConsumed; - } -} diff --git a/source/vendor/symfony/yaml/README.md b/source/vendor/symfony/yaml/README.md deleted file mode 100644 index ac25024..0000000 --- a/source/vendor/symfony/yaml/README.md +++ /dev/null @@ -1,13 +0,0 @@ -Yaml Component -============== - -The Yaml component loads and dumps YAML files. - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/yaml.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/source/vendor/symfony/yaml/Tag/TaggedValue.php b/source/vendor/symfony/yaml/Tag/TaggedValue.php deleted file mode 100644 index 4ea3406..0000000 --- a/source/vendor/symfony/yaml/Tag/TaggedValue.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Yaml\Tag; - -/** - * @author Nicolas Grekas - * @author Guilhem N. - */ -final class TaggedValue -{ - private $tag; - private $value; - - public function __construct(string $tag, $value) - { - $this->tag = $tag; - $this->value = $value; - } - - public function getTag(): string - { - return $this->tag; - } - - public function getValue() - { - return $this->value; - } -} diff --git a/source/vendor/symfony/yaml/Unescaper.php b/source/vendor/symfony/yaml/Unescaper.php deleted file mode 100644 index 6bdf216..0000000 --- a/source/vendor/symfony/yaml/Unescaper.php +++ /dev/null @@ -1,138 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Yaml; - -use Symfony\Component\Yaml\Exception\ParseException; - -/** - * Unescaper encapsulates unescaping rules for single and double-quoted - * YAML strings. - * - * @author Matthew Lewinski - * - * @internal - */ -class Unescaper -{ - /** - * Regex fragment that matches an escaped character in a double quoted string. - */ - public const REGEX_ESCAPED_CHARACTER = '\\\\(x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8}|.)'; - - /** - * Unescapes a single quoted string. - * - * @param string $value A single quoted string - * - * @return string The unescaped string - */ - public function unescapeSingleQuotedString(string $value): string - { - return str_replace('\'\'', '\'', $value); - } - - /** - * Unescapes a double quoted string. - * - * @param string $value A double quoted string - * - * @return string The unescaped string - */ - public function unescapeDoubleQuotedString(string $value): string - { - $callback = function ($match) { - return $this->unescapeCharacter($match[0]); - }; - - // evaluate the string - return preg_replace_callback('/'.self::REGEX_ESCAPED_CHARACTER.'/u', $callback, $value); - } - - /** - * Unescapes a character that was found in a double-quoted string. - * - * @param string $value An escaped character - * - * @return string The unescaped character - */ - private function unescapeCharacter(string $value): string - { - switch ($value[1]) { - case '0': - return "\x0"; - case 'a': - return "\x7"; - case 'b': - return "\x8"; - case 't': - return "\t"; - case "\t": - return "\t"; - case 'n': - return "\n"; - case 'v': - return "\xB"; - case 'f': - return "\xC"; - case 'r': - return "\r"; - case 'e': - return "\x1B"; - case ' ': - return ' '; - case '"': - return '"'; - case '/': - return '/'; - case '\\': - return '\\'; - case 'N': - // U+0085 NEXT LINE - return "\xC2\x85"; - case '_': - // U+00A0 NO-BREAK SPACE - return "\xC2\xA0"; - case 'L': - // U+2028 LINE SEPARATOR - return "\xE2\x80\xA8"; - case 'P': - // U+2029 PARAGRAPH SEPARATOR - return "\xE2\x80\xA9"; - case 'x': - return self::utf8chr(hexdec(substr($value, 2, 2))); - case 'u': - return self::utf8chr(hexdec(substr($value, 2, 4))); - case 'U': - return self::utf8chr(hexdec(substr($value, 2, 8))); - default: - throw new ParseException(sprintf('Found unknown escape character "%s".', $value)); - } - } - - /** - * Get the UTF-8 character for the given code point. - */ - private static function utf8chr(int $c): string - { - if (0x80 > $c %= 0x200000) { - return \chr($c); - } - if (0x800 > $c) { - return \chr(0xC0 | $c >> 6).\chr(0x80 | $c & 0x3F); - } - if (0x10000 > $c) { - return \chr(0xE0 | $c >> 12).\chr(0x80 | $c >> 6 & 0x3F).\chr(0x80 | $c & 0x3F); - } - - return \chr(0xF0 | $c >> 18).\chr(0x80 | $c >> 12 & 0x3F).\chr(0x80 | $c >> 6 & 0x3F).\chr(0x80 | $c & 0x3F); - } -} diff --git a/source/vendor/symfony/yaml/Yaml.php b/source/vendor/symfony/yaml/Yaml.php deleted file mode 100644 index 4fea47f..0000000 --- a/source/vendor/symfony/yaml/Yaml.php +++ /dev/null @@ -1,102 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Yaml; - -use Symfony\Component\Yaml\Exception\ParseException; - -/** - * Yaml offers convenience methods to load and dump YAML. - * - * @author Fabien Potencier - * - * @final - */ -class Yaml -{ - public const DUMP_OBJECT = 1; - public const PARSE_EXCEPTION_ON_INVALID_TYPE = 2; - public const PARSE_OBJECT = 4; - public const PARSE_OBJECT_FOR_MAP = 8; - public const DUMP_EXCEPTION_ON_INVALID_TYPE = 16; - public const PARSE_DATETIME = 32; - public const DUMP_OBJECT_AS_MAP = 64; - public const DUMP_MULTI_LINE_LITERAL_BLOCK = 128; - public const PARSE_CONSTANT = 256; - public const PARSE_CUSTOM_TAGS = 512; - public const DUMP_EMPTY_ARRAY_AS_SEQUENCE = 1024; - public const DUMP_NULL_AS_TILDE = 2048; - - /** - * Parses a YAML file into a PHP value. - * - * Usage: - * - * $array = Yaml::parseFile('config.yml'); - * print_r($array); - * - * @param string $filename The path to the YAML file to be parsed - * @param int $flags A bit field of PARSE_* constants to customize the YAML parser behavior - * - * @return mixed The YAML converted to a PHP value - * - * @throws ParseException If the file could not be read or the YAML is not valid - */ - public static function parseFile(string $filename, int $flags = 0) - { - $yaml = new Parser(); - - return $yaml->parseFile($filename, $flags); - } - - /** - * Parses YAML into a PHP value. - * - * Usage: - * - * $array = Yaml::parse(file_get_contents('config.yml')); - * print_r($array); - * - * - * @param string $input A string containing YAML - * @param int $flags A bit field of PARSE_* constants to customize the YAML parser behavior - * - * @return mixed The YAML converted to a PHP value - * - * @throws ParseException If the YAML is not valid - */ - public static function parse(string $input, int $flags = 0) - { - $yaml = new Parser(); - - return $yaml->parse($input, $flags); - } - - /** - * Dumps a PHP value to a YAML string. - * - * The dump method, when supplied with an array, will do its best - * to convert the array into friendly YAML. - * - * @param mixed $input The PHP value - * @param int $inline The level where you switch to inline YAML - * @param int $indent The amount of spaces to use for indentation of nested nodes - * @param int $flags A bit field of DUMP_* constants to customize the dumped YAML string - * - * @return string A YAML string representing the original PHP value - */ - public static function dump($input, int $inline = 2, int $indent = 4, int $flags = 0): string - { - $yaml = new Dumper($indent); - - return $yaml->dump($input, $inline, 0, $flags); - } -} diff --git a/source/vendor/twig/twig/.php-cs-fixer.dist.php b/source/vendor/twig/twig/.php-cs-fixer.dist.php deleted file mode 100644 index b07ac7f..0000000 --- a/source/vendor/twig/twig/.php-cs-fixer.dist.php +++ /dev/null @@ -1,20 +0,0 @@ -setRules([ - '@Symfony' => true, - '@Symfony:risky' => true, - '@PHPUnit75Migration:risky' => true, - 'php_unit_dedicate_assert' => ['target' => '5.6'], - 'array_syntax' => ['syntax' => 'short'], - 'php_unit_fqcn_annotation' => true, - 'no_unreachable_default_argument_value' => false, - 'braces' => ['allow_single_line_closure' => true], - 'heredoc_to_nowdoc' => false, - 'ordered_imports' => true, - 'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'], - 'native_function_invocation' => ['include' => ['@compiler_optimized'], 'scope' => 'all'], - ]) - ->setRiskyAllowed(true) - ->setFinder((new PhpCsFixer\Finder())->in(__DIR__)) -; diff --git a/source/vendor/twig/twig/LICENSE b/source/vendor/twig/twig/LICENSE deleted file mode 100644 index 4371e42..0000000 --- a/source/vendor/twig/twig/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009-2021 by the Twig Team. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of Twig nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/source/vendor/twig/twig/README.rst b/source/vendor/twig/twig/README.rst deleted file mode 100644 index d896ff5..0000000 --- a/source/vendor/twig/twig/README.rst +++ /dev/null @@ -1,24 +0,0 @@ -Twig, the flexible, fast, and secure template language for PHP -============================================================== - -Twig is a template language for PHP, released under the new BSD license (code -and documentation). - -Twig uses a syntax similar to the Django and Jinja template languages which -inspired the Twig runtime environment. - -Sponsors --------- - -.. raw:: html - - - Blackfire.io - - -More Information ----------------- - -Read the `documentation`_ for more information. - -.. _documentation: https://twig.symfony.com/documentation diff --git a/source/vendor/twig/twig/src/Cache/CacheInterface.php b/source/vendor/twig/twig/src/Cache/CacheInterface.php deleted file mode 100644 index 1c8bb1e..0000000 --- a/source/vendor/twig/twig/src/Cache/CacheInterface.php +++ /dev/null @@ -1,60 +0,0 @@ - - */ -interface CacheInterface -{ - /** - * Generates a cache key for the given template class name. - * - * @param string $name The template name - * @param string $className The template class name - * - * @return string - */ - public function generateKey($name, $className); - - /** - * Writes the compiled template to cache. - * - * @param string $key The cache key - * @param string $content The template representation as a PHP class - */ - public function write($key, $content); - - /** - * Loads a template from the cache. - * - * @param string $key The cache key - */ - public function load($key); - - /** - * Returns the modification timestamp of a key. - * - * @param string $key The cache key - * - * @return int - */ - public function getTimestamp($key); -} - -class_alias('Twig\Cache\CacheInterface', 'Twig_CacheInterface'); diff --git a/source/vendor/twig/twig/src/Cache/FilesystemCache.php b/source/vendor/twig/twig/src/Cache/FilesystemCache.php deleted file mode 100644 index cd6b663..0000000 --- a/source/vendor/twig/twig/src/Cache/FilesystemCache.php +++ /dev/null @@ -1,93 +0,0 @@ - - */ -class FilesystemCache implements CacheInterface -{ - public const FORCE_BYTECODE_INVALIDATION = 1; - - private $directory; - private $options; - - /** - * @param string $directory The root cache directory - * @param int $options A set of options - */ - public function __construct($directory, $options = 0) - { - $this->directory = rtrim($directory, '\/').'/'; - $this->options = $options; - } - - public function generateKey($name, $className) - { - $hash = hash('sha256', $className); - - return $this->directory.$hash[0].$hash[1].'/'.$hash.'.php'; - } - - public function load($key) - { - if (file_exists($key)) { - @include_once $key; - } - } - - public function write($key, $content) - { - $dir = \dirname($key); - if (!is_dir($dir)) { - if (false === @mkdir($dir, 0777, true)) { - clearstatcache(true, $dir); - if (!is_dir($dir)) { - throw new \RuntimeException(sprintf('Unable to create the cache directory (%s).', $dir)); - } - } - } elseif (!is_writable($dir)) { - throw new \RuntimeException(sprintf('Unable to write in the cache directory (%s).', $dir)); - } - - $tmpFile = tempnam($dir, basename($key)); - if (false !== @file_put_contents($tmpFile, $content) && @rename($tmpFile, $key)) { - @chmod($key, 0666 & ~umask()); - - if (self::FORCE_BYTECODE_INVALIDATION == ($this->options & self::FORCE_BYTECODE_INVALIDATION)) { - // Compile cached file into bytecode cache - if (\function_exists('opcache_invalidate') && filter_var(ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN)) { - @opcache_invalidate($key, true); - } elseif (\function_exists('apc_compile_file')) { - apc_compile_file($key); - } - } - - return; - } - - throw new \RuntimeException(sprintf('Failed to write cache file "%s".', $key)); - } - - public function getTimestamp($key) - { - if (!file_exists($key)) { - return 0; - } - - return (int) @filemtime($key); - } -} - -class_alias('Twig\Cache\FilesystemCache', 'Twig_Cache_Filesystem'); diff --git a/source/vendor/twig/twig/src/Cache/NullCache.php b/source/vendor/twig/twig/src/Cache/NullCache.php deleted file mode 100644 index c1b37c1..0000000 --- a/source/vendor/twig/twig/src/Cache/NullCache.php +++ /dev/null @@ -1,42 +0,0 @@ - - */ -class NullCache implements CacheInterface -{ - public function generateKey($name, $className) - { - return ''; - } - - public function write($key, $content) - { - } - - public function load($key) - { - } - - public function getTimestamp($key) - { - return 0; - } -} - -class_alias('Twig\Cache\NullCache', 'Twig_Cache_Null'); diff --git a/source/vendor/twig/twig/src/Compiler.php b/source/vendor/twig/twig/src/Compiler.php deleted file mode 100644 index e8ddf7b..0000000 --- a/source/vendor/twig/twig/src/Compiler.php +++ /dev/null @@ -1,288 +0,0 @@ - - */ -class Compiler implements \Twig_CompilerInterface -{ - protected $lastLine; - protected $source; - protected $indentation; - protected $env; - protected $debugInfo = []; - protected $sourceOffset; - protected $sourceLine; - protected $filename; - private $varNameSalt = 0; - - public function __construct(Environment $env) - { - $this->env = $env; - } - - /** - * @deprecated since 1.25 (to be removed in 2.0) - */ - public function getFilename() - { - @trigger_error(sprintf('The %s() method is deprecated since version 1.25 and will be removed in 2.0.', __FUNCTION__), \E_USER_DEPRECATED); - - return $this->filename; - } - - /** - * Returns the environment instance related to this compiler. - * - * @return Environment - */ - public function getEnvironment() - { - return $this->env; - } - - /** - * Gets the current PHP code after compilation. - * - * @return string The PHP code - */ - public function getSource() - { - return $this->source; - } - - /** - * Compiles a node. - * - * @param int $indentation The current indentation - * - * @return $this - */ - public function compile(\Twig_NodeInterface $node, $indentation = 0) - { - $this->lastLine = null; - $this->source = ''; - $this->debugInfo = []; - $this->sourceOffset = 0; - // source code starts at 1 (as we then increment it when we encounter new lines) - $this->sourceLine = 1; - $this->indentation = $indentation; - $this->varNameSalt = 0; - - if ($node instanceof ModuleNode) { - // to be removed in 2.0 - $this->filename = $node->getTemplateName(); - } - - $node->compile($this); - - return $this; - } - - public function subcompile(\Twig_NodeInterface $node, $raw = true) - { - if (false === $raw) { - $this->source .= str_repeat(' ', $this->indentation * 4); - } - - $node->compile($this); - - return $this; - } - - /** - * Adds a raw string to the compiled code. - * - * @param string $string The string - * - * @return $this - */ - public function raw($string) - { - $this->source .= $string; - - return $this; - } - - /** - * Writes a string to the compiled code by adding indentation. - * - * @return $this - */ - public function write() - { - $strings = \func_get_args(); - foreach ($strings as $string) { - $this->source .= str_repeat(' ', $this->indentation * 4).$string; - } - - return $this; - } - - /** - * Appends an indentation to the current PHP code after compilation. - * - * @return $this - * - * @deprecated since 1.27 (to be removed in 2.0). - */ - public function addIndentation() - { - @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use write(\'\') instead.', \E_USER_DEPRECATED); - - $this->source .= str_repeat(' ', $this->indentation * 4); - - return $this; - } - - /** - * Adds a quoted string to the compiled code. - * - * @param string $value The string - * - * @return $this - */ - public function string($value) - { - $this->source .= sprintf('"%s"', addcslashes($value, "\0\t\"\$\\")); - - return $this; - } - - /** - * Returns a PHP representation of a given value. - * - * @param mixed $value The value to convert - * - * @return $this - */ - public function repr($value) - { - if (\is_int($value) || \is_float($value)) { - if (false !== $locale = setlocale(\LC_NUMERIC, '0')) { - setlocale(\LC_NUMERIC, 'C'); - } - - $this->raw(var_export($value, true)); - - if (false !== $locale) { - setlocale(\LC_NUMERIC, $locale); - } - } elseif (null === $value) { - $this->raw('null'); - } elseif (\is_bool($value)) { - $this->raw($value ? 'true' : 'false'); - } elseif (\is_array($value)) { - $this->raw('['); - $first = true; - foreach ($value as $key => $v) { - if (!$first) { - $this->raw(', '); - } - $first = false; - $this->repr($key); - $this->raw(' => '); - $this->repr($v); - } - $this->raw(']'); - } else { - $this->string($value); - } - - return $this; - } - - /** - * Adds debugging information. - * - * @return $this - */ - public function addDebugInfo(\Twig_NodeInterface $node) - { - if ($node->getTemplateLine() != $this->lastLine) { - $this->write(sprintf("// line %d\n", $node->getTemplateLine())); - - // when mbstring.func_overload is set to 2 - // mb_substr_count() replaces substr_count() - // but they have different signatures! - if (((int) ini_get('mbstring.func_overload')) & 2) { - @trigger_error('Support for having "mbstring.func_overload" different from 0 is deprecated version 1.29 and will be removed in 2.0.', \E_USER_DEPRECATED); - - // this is much slower than the "right" version - $this->sourceLine += mb_substr_count(mb_substr($this->source, $this->sourceOffset), "\n"); - } else { - $this->sourceLine += substr_count($this->source, "\n", $this->sourceOffset); - } - $this->sourceOffset = \strlen($this->source); - $this->debugInfo[$this->sourceLine] = $node->getTemplateLine(); - - $this->lastLine = $node->getTemplateLine(); - } - - return $this; - } - - public function getDebugInfo() - { - ksort($this->debugInfo); - - return $this->debugInfo; - } - - /** - * Indents the generated code. - * - * @param int $step The number of indentation to add - * - * @return $this - */ - public function indent($step = 1) - { - $this->indentation += $step; - - return $this; - } - - /** - * Outdents the generated code. - * - * @param int $step The number of indentation to remove - * - * @return $this - * - * @throws \LogicException When trying to outdent too much so the indentation would become negative - */ - public function outdent($step = 1) - { - // can't outdent by more steps than the current indentation level - if ($this->indentation < $step) { - throw new \LogicException('Unable to call outdent() as the indentation would become negative.'); - } - - $this->indentation -= $step; - - return $this; - } - - public function getVarName() - { - return sprintf('__internal_%s', hash('sha256', __METHOD__.$this->varNameSalt++)); - } -} - -class_alias('Twig\Compiler', 'Twig_Compiler'); diff --git a/source/vendor/twig/twig/src/Environment.php b/source/vendor/twig/twig/src/Environment.php deleted file mode 100644 index 5f686fa..0000000 --- a/source/vendor/twig/twig/src/Environment.php +++ /dev/null @@ -1,1638 +0,0 @@ - - */ -class Environment -{ - public const VERSION = '1.44.4'; - public const VERSION_ID = 14404; - public const MAJOR_VERSION = 1; - public const MINOR_VERSION = 44; - public const RELEASE_VERSION = 4; - public const EXTRA_VERSION = ''; - - protected $charset; - protected $loader; - protected $debug; - protected $autoReload; - protected $cache; - protected $lexer; - protected $parser; - protected $compiler; - protected $baseTemplateClass; - protected $extensions; - protected $parsers; - protected $visitors; - protected $filters; - protected $tests; - protected $functions; - protected $globals; - protected $runtimeInitialized = false; - protected $extensionInitialized = false; - protected $loadedTemplates; - protected $strictVariables; - protected $unaryOperators; - protected $binaryOperators; - protected $templateClassPrefix = '__TwigTemplate_'; - protected $functionCallbacks = []; - protected $filterCallbacks = []; - protected $staging; - - private $originalCache; - private $bcWriteCacheFile = false; - private $bcGetCacheFilename = false; - private $lastModifiedExtension = 0; - private $extensionsByClass = []; - private $runtimeLoaders = []; - private $runtimes = []; - private $optionsHash; - - /** - * Constructor. - * - * Available options: - * - * * debug: When set to true, it automatically set "auto_reload" to true as - * well (default to false). - * - * * charset: The charset used by the templates (default to UTF-8). - * - * * base_template_class: The base template class to use for generated - * templates (default to \Twig\Template). - * - * * cache: An absolute path where to store the compiled templates, - * a \Twig\Cache\CacheInterface implementation, - * or false to disable compilation cache (default). - * - * * auto_reload: Whether to reload the template if the original source changed. - * If you don't provide the auto_reload option, it will be - * determined automatically based on the debug value. - * - * * strict_variables: Whether to ignore invalid variables in templates - * (default to false). - * - * * autoescape: Whether to enable auto-escaping (default to html): - * * false: disable auto-escaping - * * true: equivalent to html - * * html, js: set the autoescaping to one of the supported strategies - * * name: set the autoescaping strategy based on the template name extension - * * PHP callback: a PHP callback that returns an escaping strategy based on the template "name" - * - * * optimizations: A flag that indicates which optimizations to apply - * (default to -1 which means that all optimizations are enabled; - * set it to 0 to disable). - */ - public function __construct(LoaderInterface $loader = null, $options = []) - { - if (null !== $loader) { - $this->setLoader($loader); - } else { - @trigger_error('Not passing a "Twig\Lodaer\LoaderInterface" as the first constructor argument of "Twig\Environment" is deprecated since version 1.21.', \E_USER_DEPRECATED); - } - - $options = array_merge([ - 'debug' => false, - 'charset' => 'UTF-8', - 'base_template_class' => '\Twig\Template', - 'strict_variables' => false, - 'autoescape' => 'html', - 'cache' => false, - 'auto_reload' => null, - 'optimizations' => -1, - ], $options); - - $this->debug = (bool) $options['debug']; - $this->charset = null === $options['charset'] ? null : strtoupper($options['charset']); - $this->baseTemplateClass = $options['base_template_class']; - $this->autoReload = null === $options['auto_reload'] ? $this->debug : (bool) $options['auto_reload']; - $this->strictVariables = (bool) $options['strict_variables']; - $this->setCache($options['cache']); - - $this->addExtension(new CoreExtension()); - $this->addExtension(new EscaperExtension($options['autoescape'])); - $this->addExtension(new OptimizerExtension($options['optimizations'])); - $this->staging = new StagingExtension(); - - // For BC - if (\is_string($this->originalCache)) { - $r = new \ReflectionMethod($this, 'writeCacheFile'); - if (__CLASS__ !== $r->getDeclaringClass()->getName()) { - @trigger_error('The Twig\Environment::writeCacheFile method is deprecated since version 1.22 and will be removed in Twig 2.0.', \E_USER_DEPRECATED); - - $this->bcWriteCacheFile = true; - } - - $r = new \ReflectionMethod($this, 'getCacheFilename'); - if (__CLASS__ !== $r->getDeclaringClass()->getName()) { - @trigger_error('The Twig\Environment::getCacheFilename method is deprecated since version 1.22 and will be removed in Twig 2.0.', \E_USER_DEPRECATED); - - $this->bcGetCacheFilename = true; - } - } - } - - /** - * Gets the base template class for compiled templates. - * - * @return string The base template class name - */ - public function getBaseTemplateClass() - { - return $this->baseTemplateClass; - } - - /** - * Sets the base template class for compiled templates. - * - * @param string $class The base template class name - */ - public function setBaseTemplateClass($class) - { - $this->baseTemplateClass = $class; - $this->updateOptionsHash(); - } - - /** - * Enables debugging mode. - */ - public function enableDebug() - { - $this->debug = true; - $this->updateOptionsHash(); - } - - /** - * Disables debugging mode. - */ - public function disableDebug() - { - $this->debug = false; - $this->updateOptionsHash(); - } - - /** - * Checks if debug mode is enabled. - * - * @return bool true if debug mode is enabled, false otherwise - */ - public function isDebug() - { - return $this->debug; - } - - /** - * Enables the auto_reload option. - */ - public function enableAutoReload() - { - $this->autoReload = true; - } - - /** - * Disables the auto_reload option. - */ - public function disableAutoReload() - { - $this->autoReload = false; - } - - /** - * Checks if the auto_reload option is enabled. - * - * @return bool true if auto_reload is enabled, false otherwise - */ - public function isAutoReload() - { - return $this->autoReload; - } - - /** - * Enables the strict_variables option. - */ - public function enableStrictVariables() - { - $this->strictVariables = true; - $this->updateOptionsHash(); - } - - /** - * Disables the strict_variables option. - */ - public function disableStrictVariables() - { - $this->strictVariables = false; - $this->updateOptionsHash(); - } - - /** - * Checks if the strict_variables option is enabled. - * - * @return bool true if strict_variables is enabled, false otherwise - */ - public function isStrictVariables() - { - return $this->strictVariables; - } - - /** - * Gets the current cache implementation. - * - * @param bool $original Whether to return the original cache option or the real cache instance - * - * @return CacheInterface|string|false A Twig\Cache\CacheInterface implementation, - * an absolute path to the compiled templates, - * or false to disable cache - */ - public function getCache($original = true) - { - return $original ? $this->originalCache : $this->cache; - } - - /** - * Sets the current cache implementation. - * - * @param CacheInterface|string|false $cache A Twig\Cache\CacheInterface implementation, - * an absolute path to the compiled templates, - * or false to disable cache - */ - public function setCache($cache) - { - if (\is_string($cache)) { - $this->originalCache = $cache; - $this->cache = new FilesystemCache($cache); - } elseif (false === $cache) { - $this->originalCache = $cache; - $this->cache = new NullCache(); - } elseif (null === $cache) { - @trigger_error('Using "null" as the cache strategy is deprecated since version 1.23 and will be removed in Twig 2.0.', \E_USER_DEPRECATED); - $this->originalCache = false; - $this->cache = new NullCache(); - } elseif ($cache instanceof CacheInterface) { - $this->originalCache = $this->cache = $cache; - } else { - throw new \LogicException('Cache can only be a string, false, or a \Twig\Cache\CacheInterface implementation.'); - } - } - - /** - * Gets the cache filename for a given template. - * - * @param string $name The template name - * - * @return string|false The cache file name or false when caching is disabled - * - * @deprecated since 1.22 (to be removed in 2.0) - */ - public function getCacheFilename($name) - { - @trigger_error(sprintf('The %s method is deprecated since version 1.22 and will be removed in Twig 2.0.', __METHOD__), \E_USER_DEPRECATED); - - $key = $this->cache->generateKey($name, $this->getTemplateClass($name)); - - return !$key ? false : $key; - } - - /** - * Gets the template class associated with the given string. - * - * The generated template class is based on the following parameters: - * - * * The cache key for the given template; - * * The currently enabled extensions; - * * Whether the Twig C extension is available or not; - * * PHP version; - * * Twig version; - * * Options with what environment was created. - * - * @param string $name The name for which to calculate the template class name - * @param int|null $index The index if it is an embedded template - * - * @return string The template class name - */ - public function getTemplateClass($name, $index = null) - { - $key = $this->getLoader()->getCacheKey($name).$this->optionsHash; - - return $this->templateClassPrefix.hash('sha256', $key).(null === $index ? '' : '___'.$index); - } - - /** - * Gets the template class prefix. - * - * @return string The template class prefix - * - * @deprecated since 1.22 (to be removed in 2.0) - */ - public function getTemplateClassPrefix() - { - @trigger_error(sprintf('The %s method is deprecated since version 1.22 and will be removed in Twig 2.0.', __METHOD__), \E_USER_DEPRECATED); - - return $this->templateClassPrefix; - } - - /** - * Renders a template. - * - * @param string|TemplateWrapper $name The template name - * @param array $context An array of parameters to pass to the template - * - * @return string The rendered template - * - * @throws LoaderError When the template cannot be found - * @throws SyntaxError When an error occurred during compilation - * @throws RuntimeError When an error occurred during rendering - */ - public function render($name, array $context = []) - { - return $this->load($name)->render($context); - } - - /** - * Displays a template. - * - * @param string|TemplateWrapper $name The template name - * @param array $context An array of parameters to pass to the template - * - * @throws LoaderError When the template cannot be found - * @throws SyntaxError When an error occurred during compilation - * @throws RuntimeError When an error occurred during rendering - */ - public function display($name, array $context = []) - { - $this->load($name)->display($context); - } - - /** - * Loads a template. - * - * @param string|TemplateWrapper|\Twig\Template $name The template name - * - * @throws LoaderError When the template cannot be found - * @throws RuntimeError When a previously generated cache is corrupted - * @throws SyntaxError When an error occurred during compilation - * - * @return TemplateWrapper - */ - public function load($name) - { - if ($name instanceof TemplateWrapper) { - return $name; - } - - if ($name instanceof Template) { - return new TemplateWrapper($this, $name); - } - - return new TemplateWrapper($this, $this->loadTemplate($name)); - } - - /** - * Loads a template internal representation. - * - * This method is for internal use only and should never be called - * directly. - * - * @param string $name The template name - * @param int $index The index if it is an embedded template - * - * @return \Twig_TemplateInterface A template instance representing the given template name - * - * @throws LoaderError When the template cannot be found - * @throws RuntimeError When a previously generated cache is corrupted - * @throws SyntaxError When an error occurred during compilation - * - * @internal - */ - public function loadTemplate($name, $index = null) - { - return $this->loadClass($this->getTemplateClass($name), $name, $index); - } - - /** - * @internal - */ - public function loadClass($cls, $name, $index = null) - { - $mainCls = $cls; - if (null !== $index) { - $cls .= '___'.$index; - } - - if (isset($this->loadedTemplates[$cls])) { - return $this->loadedTemplates[$cls]; - } - - if (!class_exists($cls, false)) { - if ($this->bcGetCacheFilename) { - $key = $this->getCacheFilename($name); - } else { - $key = $this->cache->generateKey($name, $mainCls); - } - - if (!$this->isAutoReload() || $this->isTemplateFresh($name, $this->cache->getTimestamp($key))) { - $this->cache->load($key); - } - - $source = null; - if (!class_exists($cls, false)) { - $loader = $this->getLoader(); - if (!$loader instanceof SourceContextLoaderInterface) { - $source = new Source($loader->getSource($name), $name); - } else { - $source = $loader->getSourceContext($name); - } - - $content = $this->compileSource($source); - - if ($this->bcWriteCacheFile) { - $this->writeCacheFile($key, $content); - } else { - $this->cache->write($key, $content); - $this->cache->load($key); - } - - if (!class_exists($mainCls, false)) { - /* Last line of defense if either $this->bcWriteCacheFile was used, - * $this->cache is implemented as a no-op or we have a race condition - * where the cache was cleared between the above calls to write to and load from - * the cache. - */ - eval('?>'.$content); - } - } - - if (!class_exists($cls, false)) { - throw new RuntimeError(sprintf('Failed to load Twig template "%s", index "%s": cache might be corrupted.', $name, $index), -1, $source); - } - } - - if (!$this->runtimeInitialized) { - $this->initRuntime(); - } - - return $this->loadedTemplates[$cls] = new $cls($this); - } - - /** - * Creates a template from source. - * - * This method should not be used as a generic way to load templates. - * - * @param string $template The template source - * @param string $name An optional name of the template to be used in error messages - * - * @return TemplateWrapper A template instance representing the given template name - * - * @throws LoaderError When the template cannot be found - * @throws SyntaxError When an error occurred during compilation - */ - public function createTemplate($template, $name = null) - { - $hash = hash('sha256', $template, false); - if (null !== $name) { - $name = sprintf('%s (string template %s)', $name, $hash); - } else { - $name = sprintf('__string_template__%s', $hash); - } - - $loader = new ChainLoader([ - new ArrayLoader([$name => $template]), - $current = $this->getLoader(), - ]); - - $this->setLoader($loader); - try { - $template = new TemplateWrapper($this, $this->loadTemplate($name)); - } catch (\Exception $e) { - $this->setLoader($current); - - throw $e; - } catch (\Throwable $e) { - $this->setLoader($current); - - throw $e; - } - $this->setLoader($current); - - return $template; - } - - /** - * Returns true if the template is still fresh. - * - * Besides checking the loader for freshness information, - * this method also checks if the enabled extensions have - * not changed. - * - * @param string $name The template name - * @param int $time The last modification time of the cached template - * - * @return bool true if the template is fresh, false otherwise - */ - public function isTemplateFresh($name, $time) - { - if (0 === $this->lastModifiedExtension) { - foreach ($this->extensions as $extension) { - $r = new \ReflectionObject($extension); - if (file_exists($r->getFileName()) && ($extensionTime = filemtime($r->getFileName())) > $this->lastModifiedExtension) { - $this->lastModifiedExtension = $extensionTime; - } - } - } - - return $this->lastModifiedExtension <= $time && $this->getLoader()->isFresh($name, $time); - } - - /** - * Tries to load a template consecutively from an array. - * - * Similar to load() but it also accepts instances of \Twig\Template and - * \Twig\TemplateWrapper, and an array of templates where each is tried to be loaded. - * - * @param string|Template|\Twig\TemplateWrapper|array $names A template or an array of templates to try consecutively - * - * @return TemplateWrapper|Template - * - * @throws LoaderError When none of the templates can be found - * @throws SyntaxError When an error occurred during compilation - */ - public function resolveTemplate($names) - { - if (!\is_array($names)) { - $names = [$names]; - } - - foreach ($names as $name) { - if ($name instanceof Template) { - return $name; - } - if ($name instanceof TemplateWrapper) { - return $name; - } - - try { - return $this->loadTemplate($name); - } catch (LoaderError $e) { - if (1 === \count($names)) { - throw $e; - } - } - } - - throw new LoaderError(sprintf('Unable to find one of the following templates: "%s".', implode('", "', $names))); - } - - /** - * Clears the internal template cache. - * - * @deprecated since 1.18.3 (to be removed in 2.0) - */ - public function clearTemplateCache() - { - @trigger_error(sprintf('The %s method is deprecated since version 1.18.3 and will be removed in Twig 2.0.', __METHOD__), \E_USER_DEPRECATED); - - $this->loadedTemplates = []; - } - - /** - * Clears the template cache files on the filesystem. - * - * @deprecated since 1.22 (to be removed in 2.0) - */ - public function clearCacheFiles() - { - @trigger_error(sprintf('The %s method is deprecated since version 1.22 and will be removed in Twig 2.0.', __METHOD__), \E_USER_DEPRECATED); - - if (\is_string($this->originalCache)) { - foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->originalCache), \RecursiveIteratorIterator::LEAVES_ONLY) as $file) { - if ($file->isFile()) { - @unlink($file->getPathname()); - } - } - } - } - - /** - * Gets the Lexer instance. - * - * @return \Twig_LexerInterface - * - * @deprecated since 1.25 (to be removed in 2.0) - */ - public function getLexer() - { - @trigger_error(sprintf('The %s() method is deprecated since version 1.25 and will be removed in 2.0.', __FUNCTION__), \E_USER_DEPRECATED); - - if (null === $this->lexer) { - $this->lexer = new Lexer($this); - } - - return $this->lexer; - } - - public function setLexer(\Twig_LexerInterface $lexer) - { - $this->lexer = $lexer; - } - - /** - * Tokenizes a source code. - * - * @param string|Source $source The template source code - * @param string $name The template name (deprecated) - * - * @return TokenStream - * - * @throws SyntaxError When the code is syntactically wrong - */ - public function tokenize($source, $name = null) - { - if (!$source instanceof Source) { - @trigger_error(sprintf('Passing a string as the $source argument of %s() is deprecated since version 1.27. Pass a Twig\Source instance instead.', __METHOD__), \E_USER_DEPRECATED); - $source = new Source($source, $name); - } - - if (null === $this->lexer) { - $this->lexer = new Lexer($this); - } - - return $this->lexer->tokenize($source); - } - - /** - * Gets the Parser instance. - * - * @return \Twig_ParserInterface - * - * @deprecated since 1.25 (to be removed in 2.0) - */ - public function getParser() - { - @trigger_error(sprintf('The %s() method is deprecated since version 1.25 and will be removed in 2.0.', __FUNCTION__), \E_USER_DEPRECATED); - - if (null === $this->parser) { - $this->parser = new Parser($this); - } - - return $this->parser; - } - - public function setParser(\Twig_ParserInterface $parser) - { - $this->parser = $parser; - } - - /** - * Converts a token stream to a node tree. - * - * @return ModuleNode - * - * @throws SyntaxError When the token stream is syntactically or semantically wrong - */ - public function parse(TokenStream $stream) - { - if (null === $this->parser) { - $this->parser = new Parser($this); - } - - return $this->parser->parse($stream); - } - - /** - * Gets the Compiler instance. - * - * @return \Twig_CompilerInterface - * - * @deprecated since 1.25 (to be removed in 2.0) - */ - public function getCompiler() - { - @trigger_error(sprintf('The %s() method is deprecated since version 1.25 and will be removed in 2.0.', __FUNCTION__), \E_USER_DEPRECATED); - - if (null === $this->compiler) { - $this->compiler = new Compiler($this); - } - - return $this->compiler; - } - - public function setCompiler(\Twig_CompilerInterface $compiler) - { - $this->compiler = $compiler; - } - - /** - * Compiles a node and returns the PHP code. - * - * @return string The compiled PHP source code - */ - public function compile(\Twig_NodeInterface $node) - { - if (null === $this->compiler) { - $this->compiler = new Compiler($this); - } - - return $this->compiler->compile($node)->getSource(); - } - - /** - * Compiles a template source code. - * - * @param string|Source $source The template source code - * @param string $name The template name (deprecated) - * - * @return string The compiled PHP source code - * - * @throws SyntaxError When there was an error during tokenizing, parsing or compiling - */ - public function compileSource($source, $name = null) - { - if (!$source instanceof Source) { - @trigger_error(sprintf('Passing a string as the $source argument of %s() is deprecated since version 1.27. Pass a Twig\Source instance instead.', __METHOD__), \E_USER_DEPRECATED); - $source = new Source($source, $name); - } - - try { - return $this->compile($this->parse($this->tokenize($source))); - } catch (Error $e) { - $e->setSourceContext($source); - throw $e; - } catch (\Exception $e) { - throw new SyntaxError(sprintf('An exception has been thrown during the compilation of a template ("%s").', $e->getMessage()), -1, $source, $e); - } - } - - public function setLoader(LoaderInterface $loader) - { - if (!$loader instanceof SourceContextLoaderInterface && 0 !== strpos(\get_class($loader), 'Mock_')) { - @trigger_error(sprintf('Twig loader "%s" should implement Twig\Loader\SourceContextLoaderInterface since version 1.27.', \get_class($loader)), \E_USER_DEPRECATED); - } - - $this->loader = $loader; - } - - /** - * Gets the Loader instance. - * - * @return LoaderInterface - */ - public function getLoader() - { - if (null === $this->loader) { - throw new \LogicException('You must set a loader first.'); - } - - return $this->loader; - } - - /** - * Sets the default template charset. - * - * @param string $charset The default charset - */ - public function setCharset($charset) - { - $this->charset = strtoupper($charset); - } - - /** - * Gets the default template charset. - * - * @return string The default charset - */ - public function getCharset() - { - return $this->charset; - } - - /** - * Initializes the runtime environment. - * - * @deprecated since 1.23 (to be removed in 2.0) - */ - public function initRuntime() - { - $this->runtimeInitialized = true; - - foreach ($this->getExtensions() as $name => $extension) { - if (!$extension instanceof InitRuntimeInterface) { - $m = new \ReflectionMethod($extension, 'initRuntime'); - - $parentClass = $m->getDeclaringClass()->getName(); - if ('Twig_Extension' !== $parentClass && 'Twig\Extension\AbstractExtension' !== $parentClass) { - @trigger_error(sprintf('Defining the initRuntime() method in the "%s" extension is deprecated since version 1.23. Use the `needs_environment` option to get the \Twig_Environment instance in filters, functions, or tests; or explicitly implement Twig\Extension\InitRuntimeInterface if needed (not recommended).', $name), \E_USER_DEPRECATED); - } - } - - $extension->initRuntime($this); - } - } - - /** - * Returns true if the given extension is registered. - * - * @param string $class The extension class name - * - * @return bool Whether the extension is registered or not - */ - public function hasExtension($class) - { - $class = ltrim($class, '\\'); - if (!isset($this->extensionsByClass[$class]) && class_exists($class, false)) { - // For BC/FC with namespaced aliases - $class = new \ReflectionClass($class); - $class = $class->name; - } - - if (isset($this->extensions[$class])) { - if ($class !== \get_class($this->extensions[$class])) { - @trigger_error(sprintf('Referencing the "%s" extension by its name (defined by getName()) is deprecated since 1.26 and will be removed in Twig 2.0. Use the Fully Qualified Extension Class Name instead.', $class), \E_USER_DEPRECATED); - } - - return true; - } - - return isset($this->extensionsByClass[$class]); - } - - /** - * Adds a runtime loader. - */ - public function addRuntimeLoader(RuntimeLoaderInterface $loader) - { - $this->runtimeLoaders[] = $loader; - } - - /** - * Gets an extension by class name. - * - * @param string $class The extension class name - * - * @return ExtensionInterface - */ - public function getExtension($class) - { - $class = ltrim($class, '\\'); - if (!isset($this->extensionsByClass[$class]) && class_exists($class, false)) { - // For BC/FC with namespaced aliases - $class = new \ReflectionClass($class); - $class = $class->name; - } - - if (isset($this->extensions[$class])) { - if ($class !== \get_class($this->extensions[$class])) { - @trigger_error(sprintf('Referencing the "%s" extension by its name (defined by getName()) is deprecated since 1.26 and will be removed in Twig 2.0. Use the Fully Qualified Extension Class Name instead.', $class), \E_USER_DEPRECATED); - } - - return $this->extensions[$class]; - } - - if (!isset($this->extensionsByClass[$class])) { - throw new RuntimeError(sprintf('The "%s" extension is not enabled.', $class)); - } - - return $this->extensionsByClass[$class]; - } - - /** - * Returns the runtime implementation of a Twig element (filter/function/test). - * - * @param string $class A runtime class name - * - * @return object The runtime implementation - * - * @throws RuntimeError When the template cannot be found - */ - public function getRuntime($class) - { - if (isset($this->runtimes[$class])) { - return $this->runtimes[$class]; - } - - foreach ($this->runtimeLoaders as $loader) { - if (null !== $runtime = $loader->load($class)) { - return $this->runtimes[$class] = $runtime; - } - } - - throw new RuntimeError(sprintf('Unable to load the "%s" runtime.', $class)); - } - - public function addExtension(ExtensionInterface $extension) - { - if ($this->extensionInitialized) { - throw new \LogicException(sprintf('Unable to register extension "%s" as extensions have already been initialized.', $extension->getName())); - } - - $class = \get_class($extension); - if ($class !== $extension->getName()) { - if (isset($this->extensions[$extension->getName()])) { - unset($this->extensions[$extension->getName()], $this->extensionsByClass[$class]); - @trigger_error(sprintf('The possibility to register the same extension twice ("%s") is deprecated since version 1.23 and will be removed in Twig 2.0. Use proper PHP inheritance instead.', $extension->getName()), \E_USER_DEPRECATED); - } - } - - $this->lastModifiedExtension = 0; - $this->extensionsByClass[$class] = $extension; - $this->extensions[$extension->getName()] = $extension; - $this->updateOptionsHash(); - } - - /** - * Removes an extension by name. - * - * This method is deprecated and you should not use it. - * - * @param string $name The extension name - * - * @deprecated since 1.12 (to be removed in 2.0) - */ - public function removeExtension($name) - { - @trigger_error(sprintf('The %s method is deprecated since version 1.12 and will be removed in Twig 2.0.', __METHOD__), \E_USER_DEPRECATED); - - if ($this->extensionInitialized) { - throw new \LogicException(sprintf('Unable to remove extension "%s" as extensions have already been initialized.', $name)); - } - - $class = ltrim($name, '\\'); - if (!isset($this->extensionsByClass[$class]) && class_exists($class, false)) { - // For BC/FC with namespaced aliases - $class = new \ReflectionClass($class); - $class = $class->name; - } - - if (isset($this->extensions[$class])) { - if ($class !== \get_class($this->extensions[$class])) { - @trigger_error(sprintf('Referencing the "%s" extension by its name (defined by getName()) is deprecated since 1.26 and will be removed in Twig 2.0. Use the Fully Qualified Extension Class Name instead.', $class), \E_USER_DEPRECATED); - } - - unset($this->extensions[$class]); - } - - unset($this->extensions[$class]); - $this->updateOptionsHash(); - } - - /** - * Registers an array of extensions. - * - * @param array $extensions An array of extensions - */ - public function setExtensions(array $extensions) - { - foreach ($extensions as $extension) { - $this->addExtension($extension); - } - } - - /** - * Returns all registered extensions. - * - * @return ExtensionInterface[] An array of extensions (keys are for internal usage only and should not be relied on) - */ - public function getExtensions() - { - return $this->extensions; - } - - public function addTokenParser(TokenParserInterface $parser) - { - if ($this->extensionInitialized) { - throw new \LogicException('Unable to add a token parser as extensions have already been initialized.'); - } - - $this->staging->addTokenParser($parser); - } - - /** - * Gets the registered Token Parsers. - * - * @return \Twig_TokenParserBrokerInterface - * - * @internal - */ - public function getTokenParsers() - { - if (!$this->extensionInitialized) { - $this->initExtensions(); - } - - return $this->parsers; - } - - /** - * Gets registered tags. - * - * Be warned that this method cannot return tags defined by \Twig_TokenParserBrokerInterface classes. - * - * @return TokenParserInterface[] - * - * @internal - */ - public function getTags() - { - $tags = []; - foreach ($this->getTokenParsers()->getParsers() as $parser) { - if ($parser instanceof TokenParserInterface) { - $tags[$parser->getTag()] = $parser; - } - } - - return $tags; - } - - public function addNodeVisitor(NodeVisitorInterface $visitor) - { - if ($this->extensionInitialized) { - throw new \LogicException('Unable to add a node visitor as extensions have already been initialized.'); - } - - $this->staging->addNodeVisitor($visitor); - } - - /** - * Gets the registered Node Visitors. - * - * @return NodeVisitorInterface[] - * - * @internal - */ - public function getNodeVisitors() - { - if (!$this->extensionInitialized) { - $this->initExtensions(); - } - - return $this->visitors; - } - - /** - * Registers a Filter. - * - * @param string|TwigFilter $name The filter name or a \Twig_SimpleFilter instance - * @param \Twig_FilterInterface|TwigFilter $filter - */ - public function addFilter($name, $filter = null) - { - if (!$name instanceof TwigFilter && !($filter instanceof TwigFilter || $filter instanceof \Twig_FilterInterface)) { - throw new \LogicException('A filter must be an instance of \Twig_FilterInterface or \Twig_SimpleFilter.'); - } - - if ($name instanceof TwigFilter) { - $filter = $name; - $name = $filter->getName(); - } else { - @trigger_error(sprintf('Passing a name as a first argument to the %s method is deprecated since version 1.21. Pass an instance of "Twig_SimpleFilter" instead when defining filter "%s".', __METHOD__, $name), \E_USER_DEPRECATED); - } - - if ($this->extensionInitialized) { - throw new \LogicException(sprintf('Unable to add filter "%s" as extensions have already been initialized.', $name)); - } - - $this->staging->addFilter($name, $filter); - } - - /** - * Get a filter by name. - * - * Subclasses may override this method and load filters differently; - * so no list of filters is available. - * - * @param string $name The filter name - * - * @return \Twig_Filter|false - * - * @internal - */ - public function getFilter($name) - { - if (!$this->extensionInitialized) { - $this->initExtensions(); - } - - if (isset($this->filters[$name])) { - return $this->filters[$name]; - } - - foreach ($this->filters as $pattern => $filter) { - $pattern = str_replace('\\*', '(.*?)', preg_quote($pattern, '#'), $count); - - if ($count) { - if (preg_match('#^'.$pattern.'$#', $name, $matches)) { - array_shift($matches); - $filter->setArguments($matches); - - return $filter; - } - } - } - - foreach ($this->filterCallbacks as $callback) { - if (false !== $filter = \call_user_func($callback, $name)) { - return $filter; - } - } - - return false; - } - - public function registerUndefinedFilterCallback($callable) - { - $this->filterCallbacks[] = $callable; - } - - /** - * Gets the registered Filters. - * - * Be warned that this method cannot return filters defined with registerUndefinedFilterCallback. - * - * @return \Twig_FilterInterface[] - * - * @see registerUndefinedFilterCallback - * - * @internal - */ - public function getFilters() - { - if (!$this->extensionInitialized) { - $this->initExtensions(); - } - - return $this->filters; - } - - /** - * Registers a Test. - * - * @param string|TwigTest $name The test name or a \Twig_SimpleTest instance - * @param \Twig_TestInterface|TwigTest $test A \Twig_TestInterface instance or a \Twig_SimpleTest instance - */ - public function addTest($name, $test = null) - { - if (!$name instanceof TwigTest && !($test instanceof TwigTest || $test instanceof \Twig_TestInterface)) { - throw new \LogicException('A test must be an instance of \Twig_TestInterface or \Twig_SimpleTest.'); - } - - if ($name instanceof TwigTest) { - $test = $name; - $name = $test->getName(); - } else { - @trigger_error(sprintf('Passing a name as a first argument to the %s method is deprecated since version 1.21. Pass an instance of "Twig_SimpleTest" instead when defining test "%s".', __METHOD__, $name), \E_USER_DEPRECATED); - } - - if ($this->extensionInitialized) { - throw new \LogicException(sprintf('Unable to add test "%s" as extensions have already been initialized.', $name)); - } - - $this->staging->addTest($name, $test); - } - - /** - * Gets the registered Tests. - * - * @return \Twig_TestInterface[] - * - * @internal - */ - public function getTests() - { - if (!$this->extensionInitialized) { - $this->initExtensions(); - } - - return $this->tests; - } - - /** - * Gets a test by name. - * - * @param string $name The test name - * - * @return \Twig_Test|false - * - * @internal - */ - public function getTest($name) - { - if (!$this->extensionInitialized) { - $this->initExtensions(); - } - - if (isset($this->tests[$name])) { - return $this->tests[$name]; - } - - foreach ($this->tests as $pattern => $test) { - $pattern = str_replace('\\*', '(.*?)', preg_quote($pattern, '#'), $count); - - if ($count) { - if (preg_match('#^'.$pattern.'$#', $name, $matches)) { - array_shift($matches); - $test->setArguments($matches); - - return $test; - } - } - } - - return false; - } - - /** - * Registers a Function. - * - * @param string|TwigFunction $name The function name or a \Twig_SimpleFunction instance - * @param \Twig_FunctionInterface|TwigFunction $function - */ - public function addFunction($name, $function = null) - { - if (!$name instanceof TwigFunction && !($function instanceof TwigFunction || $function instanceof \Twig_FunctionInterface)) { - throw new \LogicException('A function must be an instance of \Twig_FunctionInterface or \Twig_SimpleFunction.'); - } - - if ($name instanceof TwigFunction) { - $function = $name; - $name = $function->getName(); - } else { - @trigger_error(sprintf('Passing a name as a first argument to the %s method is deprecated since version 1.21. Pass an instance of "Twig_SimpleFunction" instead when defining function "%s".', __METHOD__, $name), \E_USER_DEPRECATED); - } - - if ($this->extensionInitialized) { - throw new \LogicException(sprintf('Unable to add function "%s" as extensions have already been initialized.', $name)); - } - - $this->staging->addFunction($name, $function); - } - - /** - * Get a function by name. - * - * Subclasses may override this method and load functions differently; - * so no list of functions is available. - * - * @param string $name function name - * - * @return \Twig_Function|false - * - * @internal - */ - public function getFunction($name) - { - if (!$this->extensionInitialized) { - $this->initExtensions(); - } - - if (isset($this->functions[$name])) { - return $this->functions[$name]; - } - - foreach ($this->functions as $pattern => $function) { - $pattern = str_replace('\\*', '(.*?)', preg_quote($pattern, '#'), $count); - - if ($count) { - if (preg_match('#^'.$pattern.'$#', $name, $matches)) { - array_shift($matches); - $function->setArguments($matches); - - return $function; - } - } - } - - foreach ($this->functionCallbacks as $callback) { - if (false !== $function = \call_user_func($callback, $name)) { - return $function; - } - } - - return false; - } - - public function registerUndefinedFunctionCallback($callable) - { - $this->functionCallbacks[] = $callable; - } - - /** - * Gets registered functions. - * - * Be warned that this method cannot return functions defined with registerUndefinedFunctionCallback. - * - * @return \Twig_FunctionInterface[] - * - * @see registerUndefinedFunctionCallback - * - * @internal - */ - public function getFunctions() - { - if (!$this->extensionInitialized) { - $this->initExtensions(); - } - - return $this->functions; - } - - /** - * Registers a Global. - * - * New globals can be added before compiling or rendering a template; - * but after, you can only update existing globals. - * - * @param string $name The global name - * @param mixed $value The global value - */ - public function addGlobal($name, $value) - { - if ($this->extensionInitialized || $this->runtimeInitialized) { - if (null === $this->globals) { - $this->globals = $this->initGlobals(); - } - - if (!\array_key_exists($name, $this->globals)) { - // The deprecation notice must be turned into the following exception in Twig 2.0 - @trigger_error(sprintf('Registering global variable "%s" at runtime or when the extensions have already been initialized is deprecated since version 1.21.', $name), \E_USER_DEPRECATED); - //throw new \LogicException(sprintf('Unable to add global "%s" as the runtime or the extensions have already been initialized.', $name)); - } - } - - if ($this->extensionInitialized || $this->runtimeInitialized) { - // update the value - $this->globals[$name] = $value; - } else { - $this->staging->addGlobal($name, $value); - } - } - - /** - * Gets the registered Globals. - * - * @return array An array of globals - * - * @internal - */ - public function getGlobals() - { - if (!$this->runtimeInitialized && !$this->extensionInitialized) { - return $this->initGlobals(); - } - - if (null === $this->globals) { - $this->globals = $this->initGlobals(); - } - - return $this->globals; - } - - /** - * Merges a context with the defined globals. - * - * @param array $context An array representing the context - * - * @return array The context merged with the globals - */ - public function mergeGlobals(array $context) - { - // we don't use array_merge as the context being generally - // bigger than globals, this code is faster. - foreach ($this->getGlobals() as $key => $value) { - if (!\array_key_exists($key, $context)) { - $context[$key] = $value; - } - } - - return $context; - } - - /** - * Gets the registered unary Operators. - * - * @return array An array of unary operators - * - * @internal - */ - public function getUnaryOperators() - { - if (!$this->extensionInitialized) { - $this->initExtensions(); - } - - return $this->unaryOperators; - } - - /** - * Gets the registered binary Operators. - * - * @return array An array of binary operators - * - * @internal - */ - public function getBinaryOperators() - { - if (!$this->extensionInitialized) { - $this->initExtensions(); - } - - return $this->binaryOperators; - } - - /** - * @deprecated since 1.23 (to be removed in 2.0) - */ - public function computeAlternatives($name, $items) - { - @trigger_error(sprintf('The %s method is deprecated since version 1.23 and will be removed in Twig 2.0.', __METHOD__), \E_USER_DEPRECATED); - - return SyntaxError::computeAlternatives($name, $items); - } - - /** - * @internal - */ - protected function initGlobals() - { - $globals = []; - foreach ($this->extensions as $name => $extension) { - if (!$extension instanceof GlobalsInterface) { - $m = new \ReflectionMethod($extension, 'getGlobals'); - - $parentClass = $m->getDeclaringClass()->getName(); - if ('Twig_Extension' !== $parentClass && 'Twig\Extension\AbstractExtension' !== $parentClass) { - @trigger_error(sprintf('Defining the getGlobals() method in the "%s" extension without explicitly implementing Twig\Extension\GlobalsInterface is deprecated since version 1.23.', $name), \E_USER_DEPRECATED); - } - } - - $extGlob = $extension->getGlobals(); - if (!\is_array($extGlob)) { - throw new \UnexpectedValueException(sprintf('"%s::getGlobals()" must return an array of globals.', \get_class($extension))); - } - - $globals[] = $extGlob; - } - - $globals[] = $this->staging->getGlobals(); - - return \call_user_func_array('array_merge', $globals); - } - - /** - * @internal - */ - protected function initExtensions() - { - if ($this->extensionInitialized) { - return; - } - - $this->parsers = new \Twig_TokenParserBroker([], [], false); - $this->filters = []; - $this->functions = []; - $this->tests = []; - $this->visitors = []; - $this->unaryOperators = []; - $this->binaryOperators = []; - - foreach ($this->extensions as $extension) { - $this->initExtension($extension); - } - $this->initExtension($this->staging); - // Done at the end only, so that an exception during initialization does not mark the environment as initialized when catching the exception - $this->extensionInitialized = true; - } - - /** - * @internal - */ - protected function initExtension(ExtensionInterface $extension) - { - // filters - foreach ($extension->getFilters() as $name => $filter) { - if ($filter instanceof TwigFilter) { - $name = $filter->getName(); - } else { - @trigger_error(sprintf('Using an instance of "%s" for filter "%s" is deprecated since version 1.21. Use \Twig_SimpleFilter instead.', \get_class($filter), $name), \E_USER_DEPRECATED); - } - - $this->filters[$name] = $filter; - } - - // functions - foreach ($extension->getFunctions() as $name => $function) { - if ($function instanceof TwigFunction) { - $name = $function->getName(); - } else { - @trigger_error(sprintf('Using an instance of "%s" for function "%s" is deprecated since version 1.21. Use \Twig_SimpleFunction instead.', \get_class($function), $name), \E_USER_DEPRECATED); - } - - $this->functions[$name] = $function; - } - - // tests - foreach ($extension->getTests() as $name => $test) { - if ($test instanceof TwigTest) { - $name = $test->getName(); - } else { - @trigger_error(sprintf('Using an instance of "%s" for test "%s" is deprecated since version 1.21. Use \Twig_SimpleTest instead.', \get_class($test), $name), \E_USER_DEPRECATED); - } - - $this->tests[$name] = $test; - } - - // token parsers - foreach ($extension->getTokenParsers() as $parser) { - if ($parser instanceof TokenParserInterface) { - $this->parsers->addTokenParser($parser); - } elseif ($parser instanceof \Twig_TokenParserBrokerInterface) { - @trigger_error('Registering a \Twig_TokenParserBrokerInterface instance is deprecated since version 1.21.', \E_USER_DEPRECATED); - - $this->parsers->addTokenParserBroker($parser); - } else { - throw new \LogicException('getTokenParsers() must return an array of \Twig_TokenParserInterface or \Twig_TokenParserBrokerInterface instances.'); - } - } - - // node visitors - foreach ($extension->getNodeVisitors() as $visitor) { - $this->visitors[] = $visitor; - } - - // operators - if ($operators = $extension->getOperators()) { - if (!\is_array($operators)) { - throw new \InvalidArgumentException(sprintf('"%s::getOperators()" must return an array with operators, got "%s".', \get_class($extension), \is_object($operators) ? \get_class($operators) : \gettype($operators).(\is_resource($operators) ? '' : '#'.$operators))); - } - - if (2 !== \count($operators)) { - throw new \InvalidArgumentException(sprintf('"%s::getOperators()" must return an array of 2 elements, got %d.', \get_class($extension), \count($operators))); - } - - $this->unaryOperators = array_merge($this->unaryOperators, $operators[0]); - $this->binaryOperators = array_merge($this->binaryOperators, $operators[1]); - } - } - - /** - * @deprecated since 1.22 (to be removed in 2.0) - */ - protected function writeCacheFile($file, $content) - { - $this->cache->write($file, $content); - } - - private function updateOptionsHash() - { - $hashParts = array_merge( - array_keys($this->extensions), - [ - (int) \function_exists('twig_template_get_attributes'), - \PHP_MAJOR_VERSION, - \PHP_MINOR_VERSION, - self::VERSION, - (int) $this->debug, - $this->baseTemplateClass, - (int) $this->strictVariables, - ] - ); - $this->optionsHash = implode(':', $hashParts); - } -} - -class_alias('Twig\Environment', 'Twig_Environment'); diff --git a/source/vendor/twig/twig/src/Error/Error.php b/source/vendor/twig/twig/src/Error/Error.php deleted file mode 100644 index 3b781ff..0000000 --- a/source/vendor/twig/twig/src/Error/Error.php +++ /dev/null @@ -1,325 +0,0 @@ - - */ -class Error extends \Exception -{ - protected $lineno; - // to be renamed to name in 2.0 - protected $filename; - protected $rawMessage; - - private $sourcePath; - private $sourceCode; - - /** - * Constructor. - * - * Set the line number to -1 to enable its automatic guessing. - * Set the name to null to enable its automatic guessing. - * - * @param string $message The error message - * @param int $lineno The template line where the error occurred - * @param Source|string|null $source The source context where the error occurred - * @param \Exception $previous The previous exception - */ - public function __construct($message, $lineno = -1, $source = null, \Exception $previous = null) - { - if (null === $source) { - $name = null; - } elseif (!$source instanceof Source) { - // for compat with the Twig C ext., passing the template name as string is accepted - $name = $source; - } else { - $name = $source->getName(); - $this->sourceCode = $source->getCode(); - $this->sourcePath = $source->getPath(); - } - parent::__construct('', 0, $previous); - - $this->lineno = $lineno; - $this->filename = $name; - $this->rawMessage = $message; - $this->updateRepr(); - } - - /** - * Gets the raw message. - * - * @return string The raw message - */ - public function getRawMessage() - { - return $this->rawMessage; - } - - /** - * Gets the logical name where the error occurred. - * - * @return string The name - * - * @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead. - */ - public function getTemplateFile() - { - @trigger_error(sprintf('The "%s" method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', __METHOD__), \E_USER_DEPRECATED); - - return $this->filename; - } - - /** - * Sets the logical name where the error occurred. - * - * @param string $name The name - * - * @deprecated since 1.27 (to be removed in 2.0). Use setSourceContext() instead. - */ - public function setTemplateFile($name) - { - @trigger_error(sprintf('The "%s" method is deprecated since version 1.27 and will be removed in 2.0. Use setSourceContext() instead.', __METHOD__), \E_USER_DEPRECATED); - - $this->filename = $name; - - $this->updateRepr(); - } - - /** - * Gets the logical name where the error occurred. - * - * @return string The name - * - * @deprecated since 1.29 (to be removed in 2.0). Use getSourceContext() instead. - */ - public function getTemplateName() - { - @trigger_error(sprintf('The "%s" method is deprecated since version 1.29 and will be removed in 2.0. Use getSourceContext() instead.', __METHOD__), \E_USER_DEPRECATED); - - return $this->filename; - } - - /** - * Sets the logical name where the error occurred. - * - * @param string $name The name - * - * @deprecated since 1.29 (to be removed in 2.0). Use setSourceContext() instead. - */ - public function setTemplateName($name) - { - @trigger_error(sprintf('The "%s" method is deprecated since version 1.29 and will be removed in 2.0. Use setSourceContext() instead.', __METHOD__), \E_USER_DEPRECATED); - - $this->filename = $name; - $this->sourceCode = $this->sourcePath = null; - - $this->updateRepr(); - } - - /** - * Gets the template line where the error occurred. - * - * @return int The template line - */ - public function getTemplateLine() - { - return $this->lineno; - } - - /** - * Sets the template line where the error occurred. - * - * @param int $lineno The template line - */ - public function setTemplateLine($lineno) - { - $this->lineno = $lineno; - - $this->updateRepr(); - } - - /** - * Gets the source context of the Twig template where the error occurred. - * - * @return Source|null - */ - public function getSourceContext() - { - return $this->filename ? new Source($this->sourceCode, $this->filename, $this->sourcePath) : null; - } - - /** - * Sets the source context of the Twig template where the error occurred. - */ - public function setSourceContext(Source $source = null) - { - if (null === $source) { - $this->sourceCode = $this->filename = $this->sourcePath = null; - } else { - $this->sourceCode = $source->getCode(); - $this->filename = $source->getName(); - $this->sourcePath = $source->getPath(); - } - - $this->updateRepr(); - } - - public function guess() - { - $this->guessTemplateInfo(); - $this->updateRepr(); - } - - public function appendMessage($rawMessage) - { - $this->rawMessage .= $rawMessage; - $this->updateRepr(); - } - - /** - * @internal - */ - protected function updateRepr() - { - $this->message = $this->rawMessage; - - if ($this->sourcePath && $this->lineno > 0) { - $this->file = $this->sourcePath; - $this->line = $this->lineno; - - return; - } - - $dot = false; - if ('.' === substr($this->message, -1)) { - $this->message = substr($this->message, 0, -1); - $dot = true; - } - - $questionMark = false; - if ('?' === substr($this->message, -1)) { - $this->message = substr($this->message, 0, -1); - $questionMark = true; - } - - if ($this->filename) { - if (\is_string($this->filename) || (\is_object($this->filename) && method_exists($this->filename, '__toString'))) { - $name = sprintf('"%s"', $this->filename); - } else { - $name = json_encode($this->filename); - } - $this->message .= sprintf(' in %s', $name); - } - - if ($this->lineno && $this->lineno >= 0) { - $this->message .= sprintf(' at line %d', $this->lineno); - } - - if ($dot) { - $this->message .= '.'; - } - - if ($questionMark) { - $this->message .= '?'; - } - } - - /** - * @internal - */ - protected function guessTemplateInfo() - { - $template = null; - $templateClass = null; - - $backtrace = debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS | \DEBUG_BACKTRACE_PROVIDE_OBJECT); - foreach ($backtrace as $trace) { - if (isset($trace['object']) && $trace['object'] instanceof Template && 'Twig_Template' !== \get_class($trace['object'])) { - $currentClass = \get_class($trace['object']); - $isEmbedContainer = null === $templateClass ? false : 0 === strpos($templateClass, $currentClass); - if (null === $this->filename || ($this->filename == $trace['object']->getTemplateName() && !$isEmbedContainer)) { - $template = $trace['object']; - $templateClass = \get_class($trace['object']); - } - } - } - - // update template name - if (null !== $template && null === $this->filename) { - $this->filename = $template->getTemplateName(); - } - - // update template path if any - if (null !== $template && null === $this->sourcePath) { - $src = $template->getSourceContext(); - $this->sourceCode = $src->getCode(); - $this->sourcePath = $src->getPath(); - } - - if (null === $template || $this->lineno > -1) { - return; - } - - $r = new \ReflectionObject($template); - $file = $r->getFileName(); - - $exceptions = [$e = $this]; - while ($e instanceof self && $e = $e->getPrevious()) { - $exceptions[] = $e; - } - - while ($e = array_pop($exceptions)) { - $traces = $e->getTrace(); - array_unshift($traces, ['file' => $e->getFile(), 'line' => $e->getLine()]); - - while ($trace = array_shift($traces)) { - if (!isset($trace['file']) || !isset($trace['line']) || $file != $trace['file']) { - continue; - } - - foreach ($template->getDebugInfo() as $codeLine => $templateLine) { - if ($codeLine <= $trace['line']) { - // update template line - $this->lineno = $templateLine; - - return; - } - } - } - } - } -} - -class_alias('Twig\Error\Error', 'Twig_Error'); diff --git a/source/vendor/twig/twig/src/Error/LoaderError.php b/source/vendor/twig/twig/src/Error/LoaderError.php deleted file mode 100644 index dc5a9f1..0000000 --- a/source/vendor/twig/twig/src/Error/LoaderError.php +++ /dev/null @@ -1,23 +0,0 @@ - - */ -class LoaderError extends Error -{ -} - -class_alias('Twig\Error\LoaderError', 'Twig_Error_Loader'); diff --git a/source/vendor/twig/twig/src/Error/RuntimeError.php b/source/vendor/twig/twig/src/Error/RuntimeError.php deleted file mode 100644 index 9b3f36e..0000000 --- a/source/vendor/twig/twig/src/Error/RuntimeError.php +++ /dev/null @@ -1,24 +0,0 @@ - - */ -class RuntimeError extends Error -{ -} - -class_alias('Twig\Error\RuntimeError', 'Twig_Error_Runtime'); diff --git a/source/vendor/twig/twig/src/Error/SyntaxError.php b/source/vendor/twig/twig/src/Error/SyntaxError.php deleted file mode 100644 index 480e660..0000000 --- a/source/vendor/twig/twig/src/Error/SyntaxError.php +++ /dev/null @@ -1,57 +0,0 @@ - - */ -class SyntaxError extends Error -{ - /** - * Tweaks the error message to include suggestions. - * - * @param string $name The original name of the item that does not exist - * @param array $items An array of possible items - */ - public function addSuggestions($name, array $items) - { - if (!$alternatives = self::computeAlternatives($name, $items)) { - return; - } - - $this->appendMessage(sprintf(' Did you mean "%s"?', implode('", "', $alternatives))); - } - - /** - * @internal - * - * To be merged with the addSuggestions() method in 2.0. - */ - public static function computeAlternatives($name, $items) - { - $alternatives = []; - foreach ($items as $item) { - $lev = levenshtein($name, $item); - if ($lev <= \strlen($name) / 3 || false !== strpos($item, $name)) { - $alternatives[$item] = $lev; - } - } - asort($alternatives); - - return array_keys($alternatives); - } -} - -class_alias('Twig\Error\SyntaxError', 'Twig_Error_Syntax'); diff --git a/source/vendor/twig/twig/src/ExpressionParser.php b/source/vendor/twig/twig/src/ExpressionParser.php deleted file mode 100644 index 83d8802..0000000 --- a/source/vendor/twig/twig/src/ExpressionParser.php +++ /dev/null @@ -1,850 +0,0 @@ - - * - * @internal - */ -class ExpressionParser -{ - public const OPERATOR_LEFT = 1; - public const OPERATOR_RIGHT = 2; - - protected $parser; - protected $unaryOperators; - protected $binaryOperators; - - private $env; - - public function __construct(Parser $parser, $env = null) - { - $this->parser = $parser; - - if ($env instanceof Environment) { - $this->env = $env; - $this->unaryOperators = $env->getUnaryOperators(); - $this->binaryOperators = $env->getBinaryOperators(); - } else { - @trigger_error('Passing the operators as constructor arguments to '.__METHOD__.' is deprecated since version 1.27. Pass the environment instead.', \E_USER_DEPRECATED); - - $this->env = $parser->getEnvironment(); - $this->unaryOperators = func_get_arg(1); - $this->binaryOperators = func_get_arg(2); - } - } - - public function parseExpression($precedence = 0, $allowArrow = false) - { - if ($allowArrow && $arrow = $this->parseArrow()) { - return $arrow; - } - - $expr = $this->getPrimary(); - $token = $this->parser->getCurrentToken(); - while ($this->isBinary($token) && $this->binaryOperators[$token->getValue()]['precedence'] >= $precedence) { - $op = $this->binaryOperators[$token->getValue()]; - $this->parser->getStream()->next(); - - if ('is not' === $token->getValue()) { - $expr = $this->parseNotTestExpression($expr); - } elseif ('is' === $token->getValue()) { - $expr = $this->parseTestExpression($expr); - } elseif (isset($op['callable'])) { - $expr = \call_user_func($op['callable'], $this->parser, $expr); - } else { - $expr1 = $this->parseExpression(self::OPERATOR_LEFT === $op['associativity'] ? $op['precedence'] + 1 : $op['precedence']); - $class = $op['class']; - $expr = new $class($expr, $expr1, $token->getLine()); - } - - $token = $this->parser->getCurrentToken(); - } - - if (0 === $precedence) { - return $this->parseConditionalExpression($expr); - } - - return $expr; - } - - /** - * @return ArrowFunctionExpression|null - */ - private function parseArrow() - { - $stream = $this->parser->getStream(); - - // short array syntax (one argument, no parentheses)? - if ($stream->look(1)->test(Token::ARROW_TYPE)) { - $line = $stream->getCurrent()->getLine(); - $token = $stream->expect(Token::NAME_TYPE); - $names = [new AssignNameExpression($token->getValue(), $token->getLine())]; - $stream->expect(Token::ARROW_TYPE); - - return new ArrowFunctionExpression($this->parseExpression(0), new Node($names), $line); - } - - // first, determine if we are parsing an arrow function by finding => (long form) - $i = 0; - if (!$stream->look($i)->test(Token::PUNCTUATION_TYPE, '(')) { - return null; - } - ++$i; - while (true) { - // variable name - ++$i; - if (!$stream->look($i)->test(Token::PUNCTUATION_TYPE, ',')) { - break; - } - ++$i; - } - if (!$stream->look($i)->test(Token::PUNCTUATION_TYPE, ')')) { - return null; - } - ++$i; - if (!$stream->look($i)->test(Token::ARROW_TYPE)) { - return null; - } - - // yes, let's parse it properly - $token = $stream->expect(Token::PUNCTUATION_TYPE, '('); - $line = $token->getLine(); - - $names = []; - while (true) { - $token = $stream->expect(Token::NAME_TYPE); - $names[] = new AssignNameExpression($token->getValue(), $token->getLine()); - - if (!$stream->nextIf(Token::PUNCTUATION_TYPE, ',')) { - break; - } - } - $stream->expect(Token::PUNCTUATION_TYPE, ')'); - $stream->expect(Token::ARROW_TYPE); - - return new ArrowFunctionExpression($this->parseExpression(0), new Node($names), $line); - } - - protected function getPrimary() - { - $token = $this->parser->getCurrentToken(); - - if ($this->isUnary($token)) { - $operator = $this->unaryOperators[$token->getValue()]; - $this->parser->getStream()->next(); - $expr = $this->parseExpression($operator['precedence']); - $class = $operator['class']; - - return $this->parsePostfixExpression(new $class($expr, $token->getLine())); - } elseif ($token->test(Token::PUNCTUATION_TYPE, '(')) { - $this->parser->getStream()->next(); - $expr = $this->parseExpression(); - $this->parser->getStream()->expect(Token::PUNCTUATION_TYPE, ')', 'An opened parenthesis is not properly closed'); - - return $this->parsePostfixExpression($expr); - } - - return $this->parsePrimaryExpression(); - } - - protected function parseConditionalExpression($expr) - { - while ($this->parser->getStream()->nextIf(Token::PUNCTUATION_TYPE, '?')) { - if (!$this->parser->getStream()->nextIf(Token::PUNCTUATION_TYPE, ':')) { - $expr2 = $this->parseExpression(); - if ($this->parser->getStream()->nextIf(Token::PUNCTUATION_TYPE, ':')) { - $expr3 = $this->parseExpression(); - } else { - $expr3 = new ConstantExpression('', $this->parser->getCurrentToken()->getLine()); - } - } else { - $expr2 = $expr; - $expr3 = $this->parseExpression(); - } - - $expr = new ConditionalExpression($expr, $expr2, $expr3, $this->parser->getCurrentToken()->getLine()); - } - - return $expr; - } - - protected function isUnary(Token $token) - { - return $token->test(Token::OPERATOR_TYPE) && isset($this->unaryOperators[$token->getValue()]); - } - - protected function isBinary(Token $token) - { - return $token->test(Token::OPERATOR_TYPE) && isset($this->binaryOperators[$token->getValue()]); - } - - public function parsePrimaryExpression() - { - $token = $this->parser->getCurrentToken(); - switch ($token->getType()) { - case Token::NAME_TYPE: - $this->parser->getStream()->next(); - switch ($token->getValue()) { - case 'true': - case 'TRUE': - $node = new ConstantExpression(true, $token->getLine()); - break; - - case 'false': - case 'FALSE': - $node = new ConstantExpression(false, $token->getLine()); - break; - - case 'none': - case 'NONE': - case 'null': - case 'NULL': - $node = new ConstantExpression(null, $token->getLine()); - break; - - default: - if ('(' === $this->parser->getCurrentToken()->getValue()) { - $node = $this->getFunctionNode($token->getValue(), $token->getLine()); - } else { - $node = new NameExpression($token->getValue(), $token->getLine()); - } - } - break; - - case Token::NUMBER_TYPE: - $this->parser->getStream()->next(); - $node = new ConstantExpression($token->getValue(), $token->getLine()); - break; - - case Token::STRING_TYPE: - case Token::INTERPOLATION_START_TYPE: - $node = $this->parseStringExpression(); - break; - - case Token::OPERATOR_TYPE: - if (preg_match(Lexer::REGEX_NAME, $token->getValue(), $matches) && $matches[0] == $token->getValue()) { - // in this context, string operators are variable names - $this->parser->getStream()->next(); - $node = new NameExpression($token->getValue(), $token->getLine()); - break; - } elseif (isset($this->unaryOperators[$token->getValue()])) { - $class = $this->unaryOperators[$token->getValue()]['class']; - - $ref = new \ReflectionClass($class); - $negClass = 'Twig\Node\Expression\Unary\NegUnary'; - $posClass = 'Twig\Node\Expression\Unary\PosUnary'; - if (!(\in_array($ref->getName(), [$negClass, $posClass, 'Twig_Node_Expression_Unary_Neg', 'Twig_Node_Expression_Unary_Pos']) - || $ref->isSubclassOf($negClass) || $ref->isSubclassOf($posClass) - || $ref->isSubclassOf('Twig_Node_Expression_Unary_Neg') || $ref->isSubclassOf('Twig_Node_Expression_Unary_Pos')) - ) { - throw new SyntaxError(sprintf('Unexpected unary operator "%s".', $token->getValue()), $token->getLine(), $this->parser->getStream()->getSourceContext()); - } - - $this->parser->getStream()->next(); - $expr = $this->parsePrimaryExpression(); - - $node = new $class($expr, $token->getLine()); - break; - } - - // no break - default: - if ($token->test(Token::PUNCTUATION_TYPE, '[')) { - $node = $this->parseArrayExpression(); - } elseif ($token->test(Token::PUNCTUATION_TYPE, '{')) { - $node = $this->parseHashExpression(); - } elseif ($token->test(Token::OPERATOR_TYPE, '=') && ('==' === $this->parser->getStream()->look(-1)->getValue() || '!=' === $this->parser->getStream()->look(-1)->getValue())) { - throw new SyntaxError(sprintf('Unexpected operator of value "%s". Did you try to use "===" or "!==" for strict comparison? Use "is same as(value)" instead.', $token->getValue()), $token->getLine(), $this->parser->getStream()->getSourceContext()); - } else { - throw new SyntaxError(sprintf('Unexpected token "%s" of value "%s".', Token::typeToEnglish($token->getType()), $token->getValue()), $token->getLine(), $this->parser->getStream()->getSourceContext()); - } - } - - return $this->parsePostfixExpression($node); - } - - public function parseStringExpression() - { - $stream = $this->parser->getStream(); - - $nodes = []; - // a string cannot be followed by another string in a single expression - $nextCanBeString = true; - while (true) { - if ($nextCanBeString && $token = $stream->nextIf(Token::STRING_TYPE)) { - $nodes[] = new ConstantExpression($token->getValue(), $token->getLine()); - $nextCanBeString = false; - } elseif ($stream->nextIf(Token::INTERPOLATION_START_TYPE)) { - $nodes[] = $this->parseExpression(); - $stream->expect(Token::INTERPOLATION_END_TYPE); - $nextCanBeString = true; - } else { - break; - } - } - - $expr = array_shift($nodes); - foreach ($nodes as $node) { - $expr = new ConcatBinary($expr, $node, $node->getTemplateLine()); - } - - return $expr; - } - - public function parseArrayExpression() - { - $stream = $this->parser->getStream(); - $stream->expect(Token::PUNCTUATION_TYPE, '[', 'An array element was expected'); - - $node = new ArrayExpression([], $stream->getCurrent()->getLine()); - $first = true; - while (!$stream->test(Token::PUNCTUATION_TYPE, ']')) { - if (!$first) { - $stream->expect(Token::PUNCTUATION_TYPE, ',', 'An array element must be followed by a comma'); - - // trailing ,? - if ($stream->test(Token::PUNCTUATION_TYPE, ']')) { - break; - } - } - $first = false; - - $node->addElement($this->parseExpression()); - } - $stream->expect(Token::PUNCTUATION_TYPE, ']', 'An opened array is not properly closed'); - - return $node; - } - - public function parseHashExpression() - { - $stream = $this->parser->getStream(); - $stream->expect(Token::PUNCTUATION_TYPE, '{', 'A hash element was expected'); - - $node = new ArrayExpression([], $stream->getCurrent()->getLine()); - $first = true; - while (!$stream->test(Token::PUNCTUATION_TYPE, '}')) { - if (!$first) { - $stream->expect(Token::PUNCTUATION_TYPE, ',', 'A hash value must be followed by a comma'); - - // trailing ,? - if ($stream->test(Token::PUNCTUATION_TYPE, '}')) { - break; - } - } - $first = false; - - // a hash key can be: - // - // * a number -- 12 - // * a string -- 'a' - // * a name, which is equivalent to a string -- a - // * an expression, which must be enclosed in parentheses -- (1 + 2) - if ($token = $stream->nextIf(Token::NAME_TYPE)) { - $key = new ConstantExpression($token->getValue(), $token->getLine()); - - // {a} is a shortcut for {a:a} - if ($stream->test(Token::PUNCTUATION_TYPE, [',', '}'])) { - $value = new NameExpression($key->getAttribute('value'), $key->getTemplateLine()); - $node->addElement($value, $key); - continue; - } - } elseif (($token = $stream->nextIf(Token::STRING_TYPE)) || $token = $stream->nextIf(Token::NUMBER_TYPE)) { - $key = new ConstantExpression($token->getValue(), $token->getLine()); - } elseif ($stream->test(Token::PUNCTUATION_TYPE, '(')) { - $key = $this->parseExpression(); - } else { - $current = $stream->getCurrent(); - - throw new SyntaxError(sprintf('A hash key must be a quoted string, a number, a name, or an expression enclosed in parentheses (unexpected token "%s" of value "%s".', Token::typeToEnglish($current->getType()), $current->getValue()), $current->getLine(), $stream->getSourceContext()); - } - - $stream->expect(Token::PUNCTUATION_TYPE, ':', 'A hash key must be followed by a colon (:)'); - $value = $this->parseExpression(); - - $node->addElement($value, $key); - } - $stream->expect(Token::PUNCTUATION_TYPE, '}', 'An opened hash is not properly closed'); - - return $node; - } - - public function parsePostfixExpression($node) - { - while (true) { - $token = $this->parser->getCurrentToken(); - if (Token::PUNCTUATION_TYPE == $token->getType()) { - if ('.' == $token->getValue() || '[' == $token->getValue()) { - $node = $this->parseSubscriptExpression($node); - } elseif ('|' == $token->getValue()) { - $node = $this->parseFilterExpression($node); - } else { - break; - } - } else { - break; - } - } - - return $node; - } - - public function getFunctionNode($name, $line) - { - switch ($name) { - case 'parent': - $this->parseArguments(); - if (!\count($this->parser->getBlockStack())) { - throw new SyntaxError('Calling "parent" outside a block is forbidden.', $line, $this->parser->getStream()->getSourceContext()); - } - - if (!$this->parser->getParent() && !$this->parser->hasTraits()) { - throw new SyntaxError('Calling "parent" on a template that does not extend nor "use" another template is forbidden.', $line, $this->parser->getStream()->getSourceContext()); - } - - return new ParentExpression($this->parser->peekBlockStack(), $line); - case 'block': - $args = $this->parseArguments(); - if (\count($args) < 1) { - throw new SyntaxError('The "block" function takes one argument (the block name).', $line, $this->parser->getStream()->getSourceContext()); - } - - return new BlockReferenceExpression($args->getNode(0), \count($args) > 1 ? $args->getNode(1) : null, $line); - case 'attribute': - $args = $this->parseArguments(); - if (\count($args) < 2) { - throw new SyntaxError('The "attribute" function takes at least two arguments (the variable and the attributes).', $line, $this->parser->getStream()->getSourceContext()); - } - - return new GetAttrExpression($args->getNode(0), $args->getNode(1), \count($args) > 2 ? $args->getNode(2) : null, Template::ANY_CALL, $line); - default: - if (null !== $alias = $this->parser->getImportedSymbol('function', $name)) { - $arguments = new ArrayExpression([], $line); - foreach ($this->parseArguments() as $n) { - $arguments->addElement($n); - } - - $node = new MethodCallExpression($alias['node'], $alias['name'], $arguments, $line); - $node->setAttribute('safe', true); - - return $node; - } - - $args = $this->parseArguments(true); - $class = $this->getFunctionNodeClass($name, $line); - - return new $class($name, $args, $line); - } - } - - public function parseSubscriptExpression($node) - { - $stream = $this->parser->getStream(); - $token = $stream->next(); - $lineno = $token->getLine(); - $arguments = new ArrayExpression([], $lineno); - $type = Template::ANY_CALL; - if ('.' == $token->getValue()) { - $token = $stream->next(); - if ( - Token::NAME_TYPE == $token->getType() - || - Token::NUMBER_TYPE == $token->getType() - || - (Token::OPERATOR_TYPE == $token->getType() && preg_match(Lexer::REGEX_NAME, $token->getValue())) - ) { - $arg = new ConstantExpression($token->getValue(), $lineno); - - if ($stream->test(Token::PUNCTUATION_TYPE, '(')) { - $type = Template::METHOD_CALL; - foreach ($this->parseArguments() as $n) { - $arguments->addElement($n); - } - } - } else { - throw new SyntaxError('Expected name or number.', $lineno, $stream->getSourceContext()); - } - - if ($node instanceof NameExpression && null !== $this->parser->getImportedSymbol('template', $node->getAttribute('name'))) { - if (!$arg instanceof ConstantExpression) { - throw new SyntaxError(sprintf('Dynamic macro names are not supported (called on "%s").', $node->getAttribute('name')), $token->getLine(), $stream->getSourceContext()); - } - - $name = $arg->getAttribute('value'); - - if ($this->parser->isReservedMacroName($name)) { - throw new SyntaxError(sprintf('"%s" cannot be called as macro as it is a reserved keyword.', $name), $token->getLine(), $stream->getSourceContext()); - } - - $node = new MethodCallExpression($node, 'get'.$name, $arguments, $lineno); - $node->setAttribute('safe', true); - - return $node; - } - } else { - $type = Template::ARRAY_CALL; - - // slice? - $slice = false; - if ($stream->test(Token::PUNCTUATION_TYPE, ':')) { - $slice = true; - $arg = new ConstantExpression(0, $token->getLine()); - } else { - $arg = $this->parseExpression(); - } - - if ($stream->nextIf(Token::PUNCTUATION_TYPE, ':')) { - $slice = true; - } - - if ($slice) { - if ($stream->test(Token::PUNCTUATION_TYPE, ']')) { - $length = new ConstantExpression(null, $token->getLine()); - } else { - $length = $this->parseExpression(); - } - - $class = $this->getFilterNodeClass('slice', $token->getLine()); - $arguments = new Node([$arg, $length]); - $filter = new $class($node, new ConstantExpression('slice', $token->getLine()), $arguments, $token->getLine()); - - $stream->expect(Token::PUNCTUATION_TYPE, ']'); - - return $filter; - } - - $stream->expect(Token::PUNCTUATION_TYPE, ']'); - } - - return new GetAttrExpression($node, $arg, $arguments, $type, $lineno); - } - - public function parseFilterExpression($node) - { - $this->parser->getStream()->next(); - - return $this->parseFilterExpressionRaw($node); - } - - public function parseFilterExpressionRaw($node, $tag = null) - { - while (true) { - $token = $this->parser->getStream()->expect(Token::NAME_TYPE); - - $name = new ConstantExpression($token->getValue(), $token->getLine()); - if (!$this->parser->getStream()->test(Token::PUNCTUATION_TYPE, '(')) { - $arguments = new Node(); - } else { - $arguments = $this->parseArguments(true, false, true); - } - - $class = $this->getFilterNodeClass($name->getAttribute('value'), $token->getLine()); - - $node = new $class($node, $name, $arguments, $token->getLine(), $tag); - - if (!$this->parser->getStream()->test(Token::PUNCTUATION_TYPE, '|')) { - break; - } - - $this->parser->getStream()->next(); - } - - return $node; - } - - /** - * Parses arguments. - * - * @param bool $namedArguments Whether to allow named arguments or not - * @param bool $definition Whether we are parsing arguments for a function definition - * - * @return Node - * - * @throws SyntaxError - */ - public function parseArguments($namedArguments = false, $definition = false, $allowArrow = false) - { - $args = []; - $stream = $this->parser->getStream(); - - $stream->expect(Token::PUNCTUATION_TYPE, '(', 'A list of arguments must begin with an opening parenthesis'); - while (!$stream->test(Token::PUNCTUATION_TYPE, ')')) { - if (!empty($args)) { - $stream->expect(Token::PUNCTUATION_TYPE, ',', 'Arguments must be separated by a comma'); - - // if the comma above was a trailing comma, early exit the argument parse loop - if ($stream->test(Token::PUNCTUATION_TYPE, ')')) { - break; - } - } - - if ($definition) { - $token = $stream->expect(Token::NAME_TYPE, null, 'An argument must be a name'); - $value = new NameExpression($token->getValue(), $this->parser->getCurrentToken()->getLine()); - } else { - $value = $this->parseExpression(0, $allowArrow); - } - - $name = null; - if ($namedArguments && $token = $stream->nextIf(Token::OPERATOR_TYPE, '=')) { - if (!$value instanceof NameExpression) { - throw new SyntaxError(sprintf('A parameter name must be a string, "%s" given.', \get_class($value)), $token->getLine(), $stream->getSourceContext()); - } - $name = $value->getAttribute('name'); - - if ($definition) { - $value = $this->parsePrimaryExpression(); - - if (!$this->checkConstantExpression($value)) { - throw new SyntaxError('A default value for an argument must be a constant (a boolean, a string, a number, or an array).', $token->getLine(), $stream->getSourceContext()); - } - } else { - $value = $this->parseExpression(0, $allowArrow); - } - } - - if ($definition) { - if (null === $name) { - $name = $value->getAttribute('name'); - $value = new ConstantExpression(null, $this->parser->getCurrentToken()->getLine()); - } - $args[$name] = $value; - } else { - if (null === $name) { - $args[] = $value; - } else { - $args[$name] = $value; - } - } - } - $stream->expect(Token::PUNCTUATION_TYPE, ')', 'A list of arguments must be closed by a parenthesis'); - - return new Node($args); - } - - public function parseAssignmentExpression() - { - $stream = $this->parser->getStream(); - $targets = []; - while (true) { - $token = $this->parser->getCurrentToken(); - if ($stream->test(Token::OPERATOR_TYPE) && preg_match(Lexer::REGEX_NAME, $token->getValue())) { - // in this context, string operators are variable names - $this->parser->getStream()->next(); - } else { - $stream->expect(Token::NAME_TYPE, null, 'Only variables can be assigned to'); - } - $value = $token->getValue(); - if (\in_array(strtr($value, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'), ['true', 'false', 'none', 'null'])) { - throw new SyntaxError(sprintf('You cannot assign a value to "%s".', $value), $token->getLine(), $stream->getSourceContext()); - } - $targets[] = new AssignNameExpression($value, $token->getLine()); - - if (!$stream->nextIf(Token::PUNCTUATION_TYPE, ',')) { - break; - } - } - - return new Node($targets); - } - - public function parseMultitargetExpression() - { - $targets = []; - while (true) { - $targets[] = $this->parseExpression(); - if (!$this->parser->getStream()->nextIf(Token::PUNCTUATION_TYPE, ',')) { - break; - } - } - - return new Node($targets); - } - - private function parseNotTestExpression(\Twig_NodeInterface $node) - { - return new NotUnary($this->parseTestExpression($node), $this->parser->getCurrentToken()->getLine()); - } - - private function parseTestExpression(\Twig_NodeInterface $node) - { - $stream = $this->parser->getStream(); - list($name, $test) = $this->getTest($node->getTemplateLine()); - - $class = $this->getTestNodeClass($test); - $arguments = null; - if ($stream->test(Token::PUNCTUATION_TYPE, '(')) { - $arguments = $this->parseArguments(true); - } elseif ($test->hasOneMandatoryArgument()) { - $arguments = new Node([0 => $this->parsePrimaryExpression()]); - } - - return new $class($node, $name, $arguments, $this->parser->getCurrentToken()->getLine()); - } - - private function getTest($line) - { - $stream = $this->parser->getStream(); - $name = $stream->expect(Token::NAME_TYPE)->getValue(); - - if ($test = $this->env->getTest($name)) { - return [$name, $test]; - } - - if ($stream->test(Token::NAME_TYPE)) { - // try 2-words tests - $name = $name.' '.$this->parser->getCurrentToken()->getValue(); - - if ($test = $this->env->getTest($name)) { - $stream->next(); - - return [$name, $test]; - } - } - - $e = new SyntaxError(sprintf('Unknown "%s" test.', $name), $line, $stream->getSourceContext()); - $e->addSuggestions($name, array_keys($this->env->getTests())); - - throw $e; - } - - private function getTestNodeClass($test) - { - if ($test instanceof TwigTest && $test->isDeprecated()) { - $stream = $this->parser->getStream(); - $message = sprintf('Twig Test "%s" is deprecated', $test->getName()); - if (!\is_bool($test->getDeprecatedVersion())) { - $message .= sprintf(' since version %s', $test->getDeprecatedVersion()); - } - if ($test->getAlternative()) { - $message .= sprintf('. Use "%s" instead', $test->getAlternative()); - } - $src = $stream->getSourceContext(); - $message .= sprintf(' in %s at line %d.', $src->getPath() ?: $src->getName(), $stream->getCurrent()->getLine()); - - @trigger_error($message, \E_USER_DEPRECATED); - } - - if ($test instanceof TwigTest) { - return $test->getNodeClass(); - } - - return $test instanceof \Twig_Test_Node ? $test->getClass() : 'Twig\Node\Expression\TestExpression'; - } - - protected function getFunctionNodeClass($name, $line) - { - if (false === $function = $this->env->getFunction($name)) { - $e = new SyntaxError(sprintf('Unknown "%s" function.', $name), $line, $this->parser->getStream()->getSourceContext()); - $e->addSuggestions($name, array_keys($this->env->getFunctions())); - - throw $e; - } - - if ($function instanceof TwigFunction && $function->isDeprecated()) { - $message = sprintf('Twig Function "%s" is deprecated', $function->getName()); - if (!\is_bool($function->getDeprecatedVersion())) { - $message .= sprintf(' since version %s', $function->getDeprecatedVersion()); - } - if ($function->getAlternative()) { - $message .= sprintf('. Use "%s" instead', $function->getAlternative()); - } - $src = $this->parser->getStream()->getSourceContext(); - $message .= sprintf(' in %s at line %d.', $src->getPath() ?: $src->getName(), $line); - - @trigger_error($message, \E_USER_DEPRECATED); - } - - if ($function instanceof TwigFunction) { - return $function->getNodeClass(); - } - - return $function instanceof \Twig_Function_Node ? $function->getClass() : 'Twig\Node\Expression\FunctionExpression'; - } - - protected function getFilterNodeClass($name, $line) - { - if (false === $filter = $this->env->getFilter($name)) { - $e = new SyntaxError(sprintf('Unknown "%s" filter.', $name), $line, $this->parser->getStream()->getSourceContext()); - $e->addSuggestions($name, array_keys($this->env->getFilters())); - - throw $e; - } - - if ($filter instanceof TwigFilter && $filter->isDeprecated()) { - $message = sprintf('Twig Filter "%s" is deprecated', $filter->getName()); - if (!\is_bool($filter->getDeprecatedVersion())) { - $message .= sprintf(' since version %s', $filter->getDeprecatedVersion()); - } - if ($filter->getAlternative()) { - $message .= sprintf('. Use "%s" instead', $filter->getAlternative()); - } - $src = $this->parser->getStream()->getSourceContext(); - $message .= sprintf(' in %s at line %d.', $src->getPath() ?: $src->getName(), $line); - - @trigger_error($message, \E_USER_DEPRECATED); - } - - if ($filter instanceof TwigFilter) { - return $filter->getNodeClass(); - } - - return $filter instanceof \Twig_Filter_Node ? $filter->getClass() : 'Twig\Node\Expression\FilterExpression'; - } - - // checks that the node only contains "constant" elements - protected function checkConstantExpression(\Twig_NodeInterface $node) - { - if (!($node instanceof ConstantExpression || $node instanceof ArrayExpression - || $node instanceof NegUnary || $node instanceof PosUnary - )) { - return false; - } - - foreach ($node as $n) { - if (!$this->checkConstantExpression($n)) { - return false; - } - } - - return true; - } -} - -class_alias('Twig\ExpressionParser', 'Twig_ExpressionParser'); diff --git a/source/vendor/twig/twig/src/Extension/AbstractExtension.php b/source/vendor/twig/twig/src/Extension/AbstractExtension.php deleted file mode 100644 index cabe718..0000000 --- a/source/vendor/twig/twig/src/Extension/AbstractExtension.php +++ /dev/null @@ -1,72 +0,0 @@ -escapers[$strategy] = $callable; - } - - /** - * Gets all defined escapers. - * - * @return array An array of escapers - */ - public function getEscapers() - { - return $this->escapers; - } - - /** - * Sets the default format to be used by the date filter. - * - * @param string $format The default date format string - * @param string $dateIntervalFormat The default date interval format string - */ - public function setDateFormat($format = null, $dateIntervalFormat = null) - { - if (null !== $format) { - $this->dateFormats[0] = $format; - } - - if (null !== $dateIntervalFormat) { - $this->dateFormats[1] = $dateIntervalFormat; - } - } - - /** - * Gets the default format to be used by the date filter. - * - * @return array The default date format string and the default date interval format string - */ - public function getDateFormat() - { - return $this->dateFormats; - } - - /** - * Sets the default timezone to be used by the date filter. - * - * @param \DateTimeZone|string $timezone The default timezone string or a \DateTimeZone object - */ - public function setTimezone($timezone) - { - $this->timezone = $timezone instanceof \DateTimeZone ? $timezone : new \DateTimeZone($timezone); - } - - /** - * Gets the default timezone to be used by the date filter. - * - * @return \DateTimeZone The default timezone currently in use - */ - public function getTimezone() - { - if (null === $this->timezone) { - $this->timezone = new \DateTimeZone(date_default_timezone_get()); - } - - return $this->timezone; - } - - /** - * Sets the default format to be used by the number_format filter. - * - * @param int $decimal the number of decimal places to use - * @param string $decimalPoint the character(s) to use for the decimal point - * @param string $thousandSep the character(s) to use for the thousands separator - */ - public function setNumberFormat($decimal, $decimalPoint, $thousandSep) - { - $this->numberFormat = [$decimal, $decimalPoint, $thousandSep]; - } - - /** - * Get the default format used by the number_format filter. - * - * @return array The arguments for number_format() - */ - public function getNumberFormat() - { - return $this->numberFormat; - } - - public function getTokenParsers() - { - return [ - new ApplyTokenParser(), - new ForTokenParser(), - new IfTokenParser(), - new ExtendsTokenParser(), - new IncludeTokenParser(), - new BlockTokenParser(), - new UseTokenParser(), - new FilterTokenParser(), - new MacroTokenParser(), - new ImportTokenParser(), - new FromTokenParser(), - new SetTokenParser(), - new SpacelessTokenParser(), - new FlushTokenParser(), - new DoTokenParser(), - new EmbedTokenParser(), - new WithTokenParser(), - new DeprecatedTokenParser(), - ]; - } - - public function getFilters() - { - $filters = [ - // formatting filters - new TwigFilter('date', 'twig_date_format_filter', ['needs_environment' => true]), - new TwigFilter('date_modify', 'twig_date_modify_filter', ['needs_environment' => true]), - new TwigFilter('format', 'sprintf'), - new TwigFilter('replace', 'twig_replace_filter'), - new TwigFilter('number_format', 'twig_number_format_filter', ['needs_environment' => true]), - new TwigFilter('abs', 'abs'), - new TwigFilter('round', 'twig_round'), - - // encoding - new TwigFilter('url_encode', 'twig_urlencode_filter'), - new TwigFilter('json_encode', 'twig_jsonencode_filter'), - new TwigFilter('convert_encoding', 'twig_convert_encoding'), - - // string filters - new TwigFilter('title', 'twig_title_string_filter', ['needs_environment' => true]), - new TwigFilter('capitalize', 'twig_capitalize_string_filter', ['needs_environment' => true]), - new TwigFilter('upper', 'strtoupper'), - new TwigFilter('lower', 'strtolower'), - new TwigFilter('striptags', 'strip_tags'), - new TwigFilter('trim', 'twig_trim_filter'), - new TwigFilter('nl2br', 'nl2br', ['pre_escape' => 'html', 'is_safe' => ['html']]), - new TwigFilter('spaceless', 'twig_spaceless', ['is_safe' => ['html']]), - - // array helpers - new TwigFilter('join', 'twig_join_filter'), - new TwigFilter('split', 'twig_split_filter', ['needs_environment' => true]), - new TwigFilter('sort', 'twig_sort_filter'), - new TwigFilter('merge', 'twig_array_merge'), - new TwigFilter('batch', 'twig_array_batch'), - new TwigFilter('filter', 'twig_array_filter', ['needs_environment' => true]), - new TwigFilter('map', 'twig_array_map', ['needs_environment' => true]), - new TwigFilter('reduce', 'twig_array_reduce', ['needs_environment' => true]), - - // string/array filters - new TwigFilter('reverse', 'twig_reverse_filter', ['needs_environment' => true]), - new TwigFilter('length', 'twig_length_filter', ['needs_environment' => true]), - new TwigFilter('slice', 'twig_slice', ['needs_environment' => true]), - new TwigFilter('first', 'twig_first', ['needs_environment' => true]), - new TwigFilter('last', 'twig_last', ['needs_environment' => true]), - - // iteration and runtime - new TwigFilter('default', '_twig_default_filter', ['node_class' => '\Twig\Node\Expression\Filter\DefaultFilter']), - new TwigFilter('keys', 'twig_get_array_keys_filter'), - - // escaping - new TwigFilter('escape', 'twig_escape_filter', ['needs_environment' => true, 'is_safe_callback' => 'twig_escape_filter_is_safe']), - new TwigFilter('e', 'twig_escape_filter', ['needs_environment' => true, 'is_safe_callback' => 'twig_escape_filter_is_safe']), - ]; - - if (\function_exists('mb_get_info')) { - $filters[] = new TwigFilter('upper', 'twig_upper_filter', ['needs_environment' => true]); - $filters[] = new TwigFilter('lower', 'twig_lower_filter', ['needs_environment' => true]); - } - - return $filters; - } - - public function getFunctions() - { - return [ - new TwigFunction('max', 'max'), - new TwigFunction('min', 'min'), - new TwigFunction('range', 'range'), - new TwigFunction('constant', 'twig_constant'), - new TwigFunction('cycle', 'twig_cycle'), - new TwigFunction('random', 'twig_random', ['needs_environment' => true]), - new TwigFunction('date', 'twig_date_converter', ['needs_environment' => true]), - new TwigFunction('include', 'twig_include', ['needs_environment' => true, 'needs_context' => true, 'is_safe' => ['all']]), - new TwigFunction('source', 'twig_source', ['needs_environment' => true, 'is_safe' => ['all']]), - ]; - } - - public function getTests() - { - return [ - new TwigTest('even', null, ['node_class' => '\Twig\Node\Expression\Test\EvenTest']), - new TwigTest('odd', null, ['node_class' => '\Twig\Node\Expression\Test\OddTest']), - new TwigTest('defined', null, ['node_class' => '\Twig\Node\Expression\Test\DefinedTest']), - new TwigTest('sameas', null, ['node_class' => '\Twig\Node\Expression\Test\SameasTest', 'deprecated' => '1.21', 'alternative' => 'same as']), - new TwigTest('same as', null, ['node_class' => '\Twig\Node\Expression\Test\SameasTest', 'one_mandatory_argument' => true]), - new TwigTest('none', null, ['node_class' => '\Twig\Node\Expression\Test\NullTest']), - new TwigTest('null', null, ['node_class' => '\Twig\Node\Expression\Test\NullTest']), - new TwigTest('divisibleby', null, ['node_class' => '\Twig\Node\Expression\Test\DivisiblebyTest', 'deprecated' => '1.21', 'alternative' => 'divisible by']), - new TwigTest('divisible by', null, ['node_class' => '\Twig\Node\Expression\Test\DivisiblebyTest', 'one_mandatory_argument' => true]), - new TwigTest('constant', null, ['node_class' => '\Twig\Node\Expression\Test\ConstantTest']), - new TwigTest('empty', 'twig_test_empty'), - new TwigTest('iterable', 'twig_test_iterable'), - ]; - } - - public function getOperators() - { - return [ - [ - 'not' => ['precedence' => 50, 'class' => '\Twig\Node\Expression\Unary\NotUnary'], - '-' => ['precedence' => 500, 'class' => '\Twig\Node\Expression\Unary\NegUnary'], - '+' => ['precedence' => 500, 'class' => '\Twig\Node\Expression\Unary\PosUnary'], - ], - [ - 'or' => ['precedence' => 10, 'class' => '\Twig\Node\Expression\Binary\OrBinary', 'associativity' => ExpressionParser::OPERATOR_LEFT], - 'and' => ['precedence' => 15, 'class' => '\Twig\Node\Expression\Binary\AndBinary', 'associativity' => ExpressionParser::OPERATOR_LEFT], - 'b-or' => ['precedence' => 16, 'class' => '\Twig\Node\Expression\Binary\BitwiseOrBinary', 'associativity' => ExpressionParser::OPERATOR_LEFT], - 'b-xor' => ['precedence' => 17, 'class' => '\Twig\Node\Expression\Binary\BitwiseXorBinary', 'associativity' => ExpressionParser::OPERATOR_LEFT], - 'b-and' => ['precedence' => 18, 'class' => '\Twig\Node\Expression\Binary\BitwiseAndBinary', 'associativity' => ExpressionParser::OPERATOR_LEFT], - '==' => ['precedence' => 20, 'class' => '\Twig\Node\Expression\Binary\EqualBinary', 'associativity' => ExpressionParser::OPERATOR_LEFT], - '!=' => ['precedence' => 20, 'class' => '\Twig\Node\Expression\Binary\NotEqualBinary', 'associativity' => ExpressionParser::OPERATOR_LEFT], - '<' => ['precedence' => 20, 'class' => '\Twig\Node\Expression\Binary\LessBinary', 'associativity' => ExpressionParser::OPERATOR_LEFT], - '>' => ['precedence' => 20, 'class' => '\Twig\Node\Expression\Binary\GreaterBinary', 'associativity' => ExpressionParser::OPERATOR_LEFT], - '>=' => ['precedence' => 20, 'class' => '\Twig\Node\Expression\Binary\GreaterEqualBinary', 'associativity' => ExpressionParser::OPERATOR_LEFT], - '<=' => ['precedence' => 20, 'class' => '\Twig\Node\Expression\Binary\LessEqualBinary', 'associativity' => ExpressionParser::OPERATOR_LEFT], - 'not in' => ['precedence' => 20, 'class' => '\Twig\Node\Expression\Binary\NotInBinary', 'associativity' => ExpressionParser::OPERATOR_LEFT], - 'in' => ['precedence' => 20, 'class' => '\Twig\Node\Expression\Binary\InBinary', 'associativity' => ExpressionParser::OPERATOR_LEFT], - 'matches' => ['precedence' => 20, 'class' => '\Twig\Node\Expression\Binary\MatchesBinary', 'associativity' => ExpressionParser::OPERATOR_LEFT], - 'starts with' => ['precedence' => 20, 'class' => '\Twig\Node\Expression\Binary\StartsWithBinary', 'associativity' => ExpressionParser::OPERATOR_LEFT], - 'ends with' => ['precedence' => 20, 'class' => '\Twig\Node\Expression\Binary\EndsWithBinary', 'associativity' => ExpressionParser::OPERATOR_LEFT], - '..' => ['precedence' => 25, 'class' => '\Twig\Node\Expression\Binary\RangeBinary', 'associativity' => ExpressionParser::OPERATOR_LEFT], - '+' => ['precedence' => 30, 'class' => '\Twig\Node\Expression\Binary\AddBinary', 'associativity' => ExpressionParser::OPERATOR_LEFT], - '-' => ['precedence' => 30, 'class' => '\Twig\Node\Expression\Binary\SubBinary', 'associativity' => ExpressionParser::OPERATOR_LEFT], - '~' => ['precedence' => 40, 'class' => '\Twig\Node\Expression\Binary\ConcatBinary', 'associativity' => ExpressionParser::OPERATOR_LEFT], - '*' => ['precedence' => 60, 'class' => '\Twig\Node\Expression\Binary\MulBinary', 'associativity' => ExpressionParser::OPERATOR_LEFT], - '/' => ['precedence' => 60, 'class' => '\Twig\Node\Expression\Binary\DivBinary', 'associativity' => ExpressionParser::OPERATOR_LEFT], - '//' => ['precedence' => 60, 'class' => '\Twig\Node\Expression\Binary\FloorDivBinary', 'associativity' => ExpressionParser::OPERATOR_LEFT], - '%' => ['precedence' => 60, 'class' => '\Twig\Node\Expression\Binary\ModBinary', 'associativity' => ExpressionParser::OPERATOR_LEFT], - 'is' => ['precedence' => 100, 'associativity' => ExpressionParser::OPERATOR_LEFT], - 'is not' => ['precedence' => 100, 'associativity' => ExpressionParser::OPERATOR_LEFT], - '**' => ['precedence' => 200, 'class' => '\Twig\Node\Expression\Binary\PowerBinary', 'associativity' => ExpressionParser::OPERATOR_RIGHT], - '??' => ['precedence' => 300, 'class' => '\Twig\Node\Expression\NullCoalesceExpression', 'associativity' => ExpressionParser::OPERATOR_RIGHT], - ], - ]; - } - - public function getName() - { - return 'core'; - } -} - -class_alias('Twig\Extension\CoreExtension', 'Twig_Extension_Core'); -} - -namespace { -use Twig\Environment; -use Twig\Error\LoaderError; -use Twig\Error\RuntimeError; -use Twig\Loader\SourceContextLoaderInterface; -use Twig\Markup; -use Twig\Node\Expression\ConstantExpression; -use Twig\Node\Node; -use Twig\Template; -use Twig\TemplateWrapper; - -/** - * Cycles over a value. - * - * @param \ArrayAccess|array $values - * @param int $position The cycle position - * - * @return string The next value in the cycle - */ -function twig_cycle($values, $position) -{ - if (!\is_array($values) && !$values instanceof \ArrayAccess) { - return $values; - } - - return $values[$position % \count($values)]; -} - -/** - * Returns a random value depending on the supplied parameter type: - * - a random item from a \Traversable or array - * - a random character from a string - * - a random integer between 0 and the integer parameter. - * - * @param \Traversable|array|int|float|string $values The values to pick a random item from - * @param int|null $max Maximum value used when $values is an int - * - * @throws RuntimeError when $values is an empty array (does not apply to an empty string which is returned as is) - * - * @return mixed A random value from the given sequence - */ -function twig_random(Environment $env, $values = null, $max = null) -{ - if (null === $values) { - return null === $max ? mt_rand() : mt_rand(0, $max); - } - - if (\is_int($values) || \is_float($values)) { - if (null === $max) { - if ($values < 0) { - $max = 0; - $min = $values; - } else { - $max = $values; - $min = 0; - } - } else { - $min = $values; - $max = $max; - } - - return mt_rand($min, $max); - } - - if (\is_string($values)) { - if ('' === $values) { - return ''; - } - if (null !== $charset = $env->getCharset()) { - if ('UTF-8' !== $charset) { - $values = twig_convert_encoding($values, 'UTF-8', $charset); - } - - // unicode version of str_split() - // split at all positions, but not after the start and not before the end - $values = preg_split('/(? $value) { - $values[$i] = twig_convert_encoding($value, $charset, 'UTF-8'); - } - } - } else { - return $values[mt_rand(0, \strlen($values) - 1)]; - } - } - - if (!twig_test_iterable($values)) { - return $values; - } - - $values = twig_to_array($values); - - if (0 === \count($values)) { - throw new RuntimeError('The random function cannot pick from an empty array.'); - } - - return $values[array_rand($values, 1)]; -} - -/** - * Converts a date to the given format. - * - * {{ post.published_at|date("m/d/Y") }} - * - * @param \DateTime|\DateTimeInterface|\DateInterval|string $date A date - * @param string|null $format The target format, null to use the default - * @param \DateTimeZone|string|false|null $timezone The target timezone, null to use the default, false to leave unchanged - * - * @return string The formatted date - */ -function twig_date_format_filter(Environment $env, $date, $format = null, $timezone = null) -{ - if (null === $format) { - $formats = $env->getExtension('\Twig\Extension\CoreExtension')->getDateFormat(); - $format = $date instanceof \DateInterval ? $formats[1] : $formats[0]; - } - - if ($date instanceof \DateInterval) { - return $date->format($format); - } - - return twig_date_converter($env, $date, $timezone)->format($format); -} - -/** - * Returns a new date object modified. - * - * {{ post.published_at|date_modify("-1day")|date("m/d/Y") }} - * - * @param \DateTime|string $date A date - * @param string $modifier A modifier string - * - * @return \DateTime - */ -function twig_date_modify_filter(Environment $env, $date, $modifier) -{ - $date = twig_date_converter($env, $date, false); - $resultDate = $date->modify($modifier); - - // This is a hack to ensure PHP 5.2 support and support for \DateTimeImmutable - // \DateTime::modify does not return the modified \DateTime object < 5.3.0 - // and \DateTimeImmutable does not modify $date. - return null === $resultDate ? $date : $resultDate; -} - -/** - * Converts an input to a \DateTime instance. - * - * {% if date(user.created_at) < date('+2days') %} - * {# do something #} - * {% endif %} - * - * @param \DateTime|\DateTimeInterface|string|null $date A date - * @param \DateTimeZone|string|false|null $timezone The target timezone, null to use the default, false to leave unchanged - * - * @return \DateTimeInterface - */ -function twig_date_converter(Environment $env, $date = null, $timezone = null) -{ - // determine the timezone - if (false !== $timezone) { - if (null === $timezone) { - $timezone = $env->getExtension('\Twig\Extension\CoreExtension')->getTimezone(); - } elseif (!$timezone instanceof \DateTimeZone) { - $timezone = new \DateTimeZone($timezone); - } - } - - // immutable dates - if ($date instanceof \DateTimeImmutable) { - return false !== $timezone ? $date->setTimezone($timezone) : $date; - } - - if ($date instanceof \DateTime || $date instanceof \DateTimeInterface) { - $date = clone $date; - if (false !== $timezone) { - $date->setTimezone($timezone); - } - - return $date; - } - - if (null === $date || 'now' === $date) { - if (null === $date) { - $date = 'now'; - } - - return new \DateTime($date, false !== $timezone ? $timezone : $env->getExtension('\Twig\Extension\CoreExtension')->getTimezone()); - } - - $asString = (string) $date; - if (ctype_digit($asString) || (!empty($asString) && '-' === $asString[0] && ctype_digit(substr($asString, 1)))) { - $date = new \DateTime('@'.$date); - } else { - $date = new \DateTime($date, $env->getExtension('\Twig\Extension\CoreExtension')->getTimezone()); - } - - if (false !== $timezone) { - $date->setTimezone($timezone); - } - - return $date; -} - -/** - * Replaces strings within a string. - * - * @param string $str String to replace in - * @param array|\Traversable $from Replace values - * @param string|null $to Replace to, deprecated (@see https://secure.php.net/manual/en/function.strtr.php) - * - * @return string - */ -function twig_replace_filter($str, $from, $to = null) -{ - if (\is_string($from) && \is_string($to)) { - @trigger_error('Using "replace" with character by character replacement is deprecated since version 1.22 and will be removed in Twig 2.0', \E_USER_DEPRECATED); - - return strtr($str, $from, $to); - } - - if (!twig_test_iterable($from)) { - throw new RuntimeError(sprintf('The "replace" filter expects an array or "Traversable" as replace values, got "%s".', \is_object($from) ? \get_class($from) : \gettype($from))); - } - - return strtr($str, twig_to_array($from)); -} - -/** - * Rounds a number. - * - * @param int|float $value The value to round - * @param int|float $precision The rounding precision - * @param string $method The method to use for rounding - * - * @return int|float The rounded number - */ -function twig_round($value, $precision = 0, $method = 'common') -{ - if ('common' === $method) { - return round($value, $precision); - } - - if ('ceil' !== $method && 'floor' !== $method) { - throw new RuntimeError('The round filter only supports the "common", "ceil", and "floor" methods.'); - } - - return $method($value * 10 ** $precision) / 10 ** $precision; -} - -/** - * Number format filter. - * - * All of the formatting options can be left null, in that case the defaults will - * be used. Supplying any of the parameters will override the defaults set in the - * environment object. - * - * @param mixed $number A float/int/string of the number to format - * @param int $decimal the number of decimal points to display - * @param string $decimalPoint the character(s) to use for the decimal point - * @param string $thousandSep the character(s) to use for the thousands separator - * - * @return string The formatted number - */ -function twig_number_format_filter(Environment $env, $number, $decimal = null, $decimalPoint = null, $thousandSep = null) -{ - $defaults = $env->getExtension('\Twig\Extension\CoreExtension')->getNumberFormat(); - if (null === $decimal) { - $decimal = $defaults[0]; - } - - if (null === $decimalPoint) { - $decimalPoint = $defaults[1]; - } - - if (null === $thousandSep) { - $thousandSep = $defaults[2]; - } - - return number_format((float) $number, $decimal, $decimalPoint, $thousandSep); -} - -/** - * URL encodes (RFC 3986) a string as a path segment or an array as a query string. - * - * @param string|array $url A URL or an array of query parameters - * - * @return string The URL encoded value - */ -function twig_urlencode_filter($url) -{ - if (\is_array($url)) { - if (\defined('PHP_QUERY_RFC3986')) { - return http_build_query($url, '', '&', \PHP_QUERY_RFC3986); - } - - return http_build_query($url, '', '&'); - } - - return rawurlencode($url); -} - -/** - * JSON encodes a variable. - * - * @param mixed $value the value to encode - * @param int $options Bitmask consisting of JSON_HEX_QUOT, JSON_HEX_TAG, JSON_HEX_AMP, JSON_HEX_APOS, JSON_NUMERIC_CHECK, JSON_PRETTY_PRINT, JSON_UNESCAPED_SLASHES, JSON_FORCE_OBJECT - * - * @return mixed The JSON encoded value - */ -function twig_jsonencode_filter($value, $options = 0) -{ - if ($value instanceof Markup) { - $value = (string) $value; - } elseif (\is_array($value)) { - array_walk_recursive($value, '_twig_markup2string'); - } - - return json_encode($value, $options); -} - -function _twig_markup2string(&$value) -{ - if ($value instanceof Markup) { - $value = (string) $value; - } -} - -/** - * Merges an array with another one. - * - * {% set items = { 'apple': 'fruit', 'orange': 'fruit' } %} - * - * {% set items = items|merge({ 'peugeot': 'car' }) %} - * - * {# items now contains { 'apple': 'fruit', 'orange': 'fruit', 'peugeot': 'car' } #} - * - * @param array|\Traversable $arr1 An array - * @param array|\Traversable $arr2 An array - * - * @return array The merged array - */ -function twig_array_merge($arr1, $arr2) -{ - if (!twig_test_iterable($arr1)) { - throw new RuntimeError(sprintf('The merge filter only works with arrays or "Traversable", got "%s" as first argument.', \gettype($arr1))); - } - - if (!twig_test_iterable($arr2)) { - throw new RuntimeError(sprintf('The merge filter only works with arrays or "Traversable", got "%s" as second argument.', \gettype($arr2))); - } - - return array_merge(twig_to_array($arr1), twig_to_array($arr2)); -} - -/** - * Slices a variable. - * - * @param mixed $item A variable - * @param int $start Start of the slice - * @param int $length Size of the slice - * @param bool $preserveKeys Whether to preserve key or not (when the input is an array) - * - * @return mixed The sliced variable - */ -function twig_slice(Environment $env, $item, $start, $length = null, $preserveKeys = false) -{ - if ($item instanceof \Traversable) { - while ($item instanceof \IteratorAggregate) { - $item = $item->getIterator(); - } - - if ($start >= 0 && $length >= 0 && $item instanceof \Iterator) { - try { - return iterator_to_array(new \LimitIterator($item, $start, null === $length ? -1 : $length), $preserveKeys); - } catch (\OutOfBoundsException $e) { - return []; - } - } - - $item = iterator_to_array($item, $preserveKeys); - } - - if (\is_array($item)) { - return \array_slice($item, $start, $length, $preserveKeys); - } - - $item = (string) $item; - - if (\function_exists('mb_get_info') && null !== $charset = $env->getCharset()) { - return (string) mb_substr($item, $start, null === $length ? mb_strlen($item, $charset) - $start : $length, $charset); - } - - return (string) (null === $length ? substr($item, $start) : substr($item, $start, $length)); -} - -/** - * Returns the first element of the item. - * - * @param mixed $item A variable - * - * @return mixed The first element of the item - */ -function twig_first(Environment $env, $item) -{ - $elements = twig_slice($env, $item, 0, 1, false); - - return \is_string($elements) ? $elements : current($elements); -} - -/** - * Returns the last element of the item. - * - * @param mixed $item A variable - * - * @return mixed The last element of the item - */ -function twig_last(Environment $env, $item) -{ - $elements = twig_slice($env, $item, -1, 1, false); - - return \is_string($elements) ? $elements : current($elements); -} - -/** - * Joins the values to a string. - * - * The separators between elements are empty strings per default, you can define them with the optional parameters. - * - * {{ [1, 2, 3]|join(', ', ' and ') }} - * {# returns 1, 2 and 3 #} - * - * {{ [1, 2, 3]|join('|') }} - * {# returns 1|2|3 #} - * - * {{ [1, 2, 3]|join }} - * {# returns 123 #} - * - * @param array $value An array - * @param string $glue The separator - * @param string|null $and The separator for the last pair - * - * @return string The concatenated string - */ -function twig_join_filter($value, $glue = '', $and = null) -{ - if (!twig_test_iterable($value)) { - $value = (array) $value; - } - - $value = twig_to_array($value, false); - - if (0 === \count($value)) { - return ''; - } - - if (null === $and || $and === $glue) { - return implode($glue, $value); - } - - if (1 === \count($value)) { - return $value[0]; - } - - return implode($glue, \array_slice($value, 0, -1)).$and.$value[\count($value) - 1]; -} - -/** - * Splits the string into an array. - * - * {{ "one,two,three"|split(',') }} - * {# returns [one, two, three] #} - * - * {{ "one,two,three,four,five"|split(',', 3) }} - * {# returns [one, two, "three,four,five"] #} - * - * {{ "123"|split('') }} - * {# returns [1, 2, 3] #} - * - * {{ "aabbcc"|split('', 2) }} - * {# returns [aa, bb, cc] #} - * - * @param string $value A string - * @param string $delimiter The delimiter - * @param int $limit The limit - * - * @return array The split string as an array - */ -function twig_split_filter(Environment $env, $value, $delimiter, $limit = null) -{ - if (\strlen($delimiter) > 0) { - return null === $limit ? explode($delimiter, $value) : explode($delimiter, $value, $limit); - } - - if (!\function_exists('mb_get_info') || null === $charset = $env->getCharset()) { - return str_split($value, null === $limit ? 1 : $limit); - } - - if ($limit <= 1) { - return preg_split('/(?getIterator(); - } - - if ($array instanceof \Iterator) { - $keys = []; - $array->rewind(); - while ($array->valid()) { - $keys[] = $array->key(); - $array->next(); - } - - return $keys; - } - - $keys = []; - foreach ($array as $key => $item) { - $keys[] = $key; - } - - return $keys; - } - - if (!\is_array($array)) { - return []; - } - - return array_keys($array); -} - -/** - * Reverses a variable. - * - * @param array|\Traversable|string $item An array, a \Traversable instance, or a string - * @param bool $preserveKeys Whether to preserve key or not - * - * @return mixed The reversed input - */ -function twig_reverse_filter(Environment $env, $item, $preserveKeys = false) -{ - if ($item instanceof \Traversable) { - return array_reverse(iterator_to_array($item), $preserveKeys); - } - - if (\is_array($item)) { - return array_reverse($item, $preserveKeys); - } - - if (null !== $charset = $env->getCharset()) { - $string = (string) $item; - - if ('UTF-8' !== $charset) { - $item = twig_convert_encoding($string, 'UTF-8', $charset); - } - - preg_match_all('/./us', $item, $matches); - - $string = implode('', array_reverse($matches[0])); - - if ('UTF-8' !== $charset) { - $string = twig_convert_encoding($string, $charset, 'UTF-8'); - } - - return $string; - } - - return strrev((string) $item); -} - -/** - * Sorts an array. - * - * @param array|\Traversable $array - * - * @return array - */ -function twig_sort_filter($array) -{ - if ($array instanceof \Traversable) { - $array = iterator_to_array($array); - } elseif (!\is_array($array)) { - throw new RuntimeError(sprintf('The sort filter only works with arrays or "Traversable", got "%s".', \gettype($array))); - } - - asort($array); - - return $array; -} - -/** - * @internal - */ -function twig_in_filter($value, $compare) -{ - if ($value instanceof Markup) { - $value = (string) $value; - } - if ($compare instanceof Markup) { - $compare = (string) $compare; - } - - if (\is_array($compare)) { - return \in_array($value, $compare, \is_object($value) || \is_resource($value)); - } elseif (\is_string($compare) && (\is_string($value) || \is_int($value) || \is_float($value))) { - return '' === $value || false !== strpos($compare, (string) $value); - } elseif ($compare instanceof \Traversable) { - if (\is_object($value) || \is_resource($value)) { - foreach ($compare as $item) { - if ($item === $value) { - return true; - } - } - } else { - foreach ($compare as $item) { - if ($item == $value) { - return true; - } - } - } - - return false; - } - - return false; -} - -/** - * Returns a trimmed string. - * - * @return string - * - * @throws RuntimeError When an invalid trimming side is used (not a string or not 'left', 'right', or 'both') - */ -function twig_trim_filter($string, $characterMask = null, $side = 'both') -{ - if (null === $characterMask) { - $characterMask = " \t\n\r\0\x0B"; - } - - switch ($side) { - case 'both': - return trim($string, $characterMask); - case 'left': - return ltrim($string, $characterMask); - case 'right': - return rtrim($string, $characterMask); - default: - throw new RuntimeError('Trimming side must be "left", "right" or "both".'); - } -} - -/** - * Removes whitespaces between HTML tags. - * - * @return string - */ -function twig_spaceless($content) -{ - return trim(preg_replace('/>\s+<', $content)); -} - -/** - * Escapes a string. - * - * @param mixed $string The value to be escaped - * @param string $strategy The escaping strategy - * @param string $charset The charset - * @param bool $autoescape Whether the function is called by the auto-escaping feature (true) or by the developer (false) - * - * @return string - */ -function twig_escape_filter(Environment $env, $string, $strategy = 'html', $charset = null, $autoescape = false) -{ - if ($autoescape && $string instanceof Markup) { - return $string; - } - - if (!\is_string($string)) { - if (\is_object($string) && method_exists($string, '__toString')) { - $string = (string) $string; - } elseif (\in_array($strategy, ['html', 'js', 'css', 'html_attr', 'url'])) { - return $string; - } - } - - if ('' === $string) { - return ''; - } - - if (null === $charset) { - $charset = $env->getCharset(); - } - - switch ($strategy) { - case 'html': - // see https://secure.php.net/htmlspecialchars - - // Using a static variable to avoid initializing the array - // each time the function is called. Moving the declaration on the - // top of the function slow downs other escaping strategies. - static $htmlspecialcharsCharsets = [ - 'ISO-8859-1' => true, 'ISO8859-1' => true, - 'ISO-8859-15' => true, 'ISO8859-15' => true, - 'utf-8' => true, 'UTF-8' => true, - 'CP866' => true, 'IBM866' => true, '866' => true, - 'CP1251' => true, 'WINDOWS-1251' => true, 'WIN-1251' => true, - '1251' => true, - 'CP1252' => true, 'WINDOWS-1252' => true, '1252' => true, - 'KOI8-R' => true, 'KOI8-RU' => true, 'KOI8R' => true, - 'BIG5' => true, '950' => true, - 'GB2312' => true, '936' => true, - 'BIG5-HKSCS' => true, - 'SHIFT_JIS' => true, 'SJIS' => true, '932' => true, - 'EUC-JP' => true, 'EUCJP' => true, - 'ISO8859-5' => true, 'ISO-8859-5' => true, 'MACROMAN' => true, - ]; - - if (isset($htmlspecialcharsCharsets[$charset])) { - return htmlspecialchars($string, \ENT_QUOTES | \ENT_SUBSTITUTE, $charset); - } - - if (isset($htmlspecialcharsCharsets[strtoupper($charset)])) { - // cache the lowercase variant for future iterations - $htmlspecialcharsCharsets[$charset] = true; - - return htmlspecialchars($string, \ENT_QUOTES | \ENT_SUBSTITUTE, $charset); - } - - $string = twig_convert_encoding($string, 'UTF-8', $charset); - $string = htmlspecialchars($string, \ENT_QUOTES | \ENT_SUBSTITUTE, 'UTF-8'); - - return twig_convert_encoding($string, $charset, 'UTF-8'); - - case 'js': - // escape all non-alphanumeric characters - // into their \x or \uHHHH representations - if ('UTF-8' !== $charset) { - $string = twig_convert_encoding($string, 'UTF-8', $charset); - } - - if (!preg_match('//u', $string)) { - throw new RuntimeError('The string to escape is not a valid UTF-8 string.'); - } - - $string = preg_replace_callback('#[^a-zA-Z0-9,\._]#Su', '_twig_escape_js_callback', $string); - - if ('UTF-8' !== $charset) { - $string = twig_convert_encoding($string, $charset, 'UTF-8'); - } - - return $string; - - case 'css': - if ('UTF-8' !== $charset) { - $string = twig_convert_encoding($string, 'UTF-8', $charset); - } - - if (!preg_match('//u', $string)) { - throw new RuntimeError('The string to escape is not a valid UTF-8 string.'); - } - - $string = preg_replace_callback('#[^a-zA-Z0-9]#Su', '_twig_escape_css_callback', $string); - - if ('UTF-8' !== $charset) { - $string = twig_convert_encoding($string, $charset, 'UTF-8'); - } - - return $string; - - case 'html_attr': - if ('UTF-8' !== $charset) { - $string = twig_convert_encoding($string, 'UTF-8', $charset); - } - - if (!preg_match('//u', $string)) { - throw new RuntimeError('The string to escape is not a valid UTF-8 string.'); - } - - $string = preg_replace_callback('#[^a-zA-Z0-9,\.\-_]#Su', '_twig_escape_html_attr_callback', $string); - - if ('UTF-8' !== $charset) { - $string = twig_convert_encoding($string, $charset, 'UTF-8'); - } - - return $string; - - case 'url': - return rawurlencode($string); - - default: - static $escapers; - - if (null === $escapers) { - $escapers = $env->getExtension('\Twig\Extension\CoreExtension')->getEscapers(); - } - - if (isset($escapers[$strategy])) { - return \call_user_func($escapers[$strategy], $env, $string, $charset); - } - - $validStrategies = implode(', ', array_merge(['html', 'js', 'url', 'css', 'html_attr'], array_keys($escapers))); - - throw new RuntimeError(sprintf('Invalid escaping strategy "%s" (valid ones: %s).', $strategy, $validStrategies)); - } -} - -/** - * @internal - */ -function twig_escape_filter_is_safe(Node $filterArgs) -{ - foreach ($filterArgs as $arg) { - if ($arg instanceof ConstantExpression) { - return [$arg->getAttribute('value')]; - } - - return []; - } - - return ['html']; -} - -if (\function_exists('mb_convert_encoding')) { - function twig_convert_encoding($string, $to, $from) - { - return mb_convert_encoding($string, $to, $from); - } -} elseif (\function_exists('iconv')) { - function twig_convert_encoding($string, $to, $from) - { - return iconv($from, $to, $string); - } -} else { - function twig_convert_encoding($string, $to, $from) - { - throw new RuntimeError('No suitable convert encoding function (use UTF-8 as your encoding or install the iconv or mbstring extension).'); - } -} - -if (\function_exists('mb_ord')) { - function twig_ord($string) - { - return mb_ord($string, 'UTF-8'); - } -} else { - function twig_ord($string) - { - $code = ($string = unpack('C*', substr($string, 0, 4))) ? $string[1] : 0; - if (0xF0 <= $code) { - return (($code - 0xF0) << 18) + (($string[2] - 0x80) << 12) + (($string[3] - 0x80) << 6) + $string[4] - 0x80; - } - if (0xE0 <= $code) { - return (($code - 0xE0) << 12) + (($string[2] - 0x80) << 6) + $string[3] - 0x80; - } - if (0xC0 <= $code) { - return (($code - 0xC0) << 6) + $string[2] - 0x80; - } - - return $code; - } -} - -function _twig_escape_js_callback($matches) -{ - $char = $matches[0]; - - /* - * A few characters have short escape sequences in JSON and JavaScript. - * Escape sequences supported only by JavaScript, not JSON, are omitted. - * \" is also supported but omitted, because the resulting string is not HTML safe. - */ - static $shortMap = [ - '\\' => '\\\\', - '/' => '\\/', - "\x08" => '\b', - "\x0C" => '\f', - "\x0A" => '\n', - "\x0D" => '\r', - "\x09" => '\t', - ]; - - if (isset($shortMap[$char])) { - return $shortMap[$char]; - } - - $codepoint = mb_ord($char); - if (0x10000 > $codepoint) { - return sprintf('\u%04X', $codepoint); - } - - // Split characters outside the BMP into surrogate pairs - // https://tools.ietf.org/html/rfc2781.html#section-2.1 - $u = $codepoint - 0x10000; - $high = 0xD800 | ($u >> 10); - $low = 0xDC00 | ($u & 0x3FF); - - return sprintf('\u%04X\u%04X', $high, $low); -} - -function _twig_escape_css_callback($matches) -{ - $char = $matches[0]; - - return sprintf('\\%X ', 1 === \strlen($char) ? \ord($char) : twig_ord($char)); -} - -/** - * This function is adapted from code coming from Zend Framework. - * - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (https://www.zend.com) - * @license https://framework.zend.com/license/new-bsd New BSD License - */ -function _twig_escape_html_attr_callback($matches) -{ - $chr = $matches[0]; - $ord = \ord($chr); - - /* - * The following replaces characters undefined in HTML with the - * hex entity for the Unicode replacement character. - */ - if (($ord <= 0x1f && "\t" != $chr && "\n" != $chr && "\r" != $chr) || ($ord >= 0x7f && $ord <= 0x9f)) { - return '�'; - } - - /* - * Check if the current character to escape has a name entity we should - * replace it with while grabbing the hex value of the character. - */ - if (1 == \strlen($chr)) { - /* - * While HTML supports far more named entities, the lowest common denominator - * has become HTML5's XML Serialisation which is restricted to the those named - * entities that XML supports. Using HTML entities would result in this error: - * XML Parsing Error: undefined entity - */ - static $entityMap = [ - 34 => '"', /* quotation mark */ - 38 => '&', /* ampersand */ - 60 => '<', /* less-than sign */ - 62 => '>', /* greater-than sign */ - ]; - - if (isset($entityMap[$ord])) { - return $entityMap[$ord]; - } - - return sprintf('&#x%02X;', $ord); - } - - /* - * Per OWASP recommendations, we'll use hex entities for any other - * characters where a named entity does not exist. - */ - return sprintf('&#x%04X;', twig_ord($chr)); -} - -// add multibyte extensions if possible -if (\function_exists('mb_get_info')) { - /** - * Returns the length of a variable. - * - * @param mixed $thing A variable - * - * @return int The length of the value - */ - function twig_length_filter(Environment $env, $thing) - { - if (null === $thing) { - return 0; - } - - if (is_scalar($thing)) { - return mb_strlen($thing, $env->getCharset()); - } - - if ($thing instanceof \Countable || \is_array($thing) || $thing instanceof \SimpleXMLElement) { - return \count($thing); - } - - if ($thing instanceof \Traversable) { - return iterator_count($thing); - } - - if (\is_object($thing) && method_exists($thing, '__toString')) { - return mb_strlen((string) $thing, $env->getCharset()); - } - - return 1; - } - - /** - * Converts a string to uppercase. - * - * @param string $string A string - * - * @return string The uppercased string - */ - function twig_upper_filter(Environment $env, $string) - { - if (null !== $charset = $env->getCharset()) { - return mb_strtoupper($string, $charset); - } - - return strtoupper($string); - } - - /** - * Converts a string to lowercase. - * - * @param string $string A string - * - * @return string The lowercased string - */ - function twig_lower_filter(Environment $env, $string) - { - if (null !== $charset = $env->getCharset()) { - return mb_strtolower($string, $charset); - } - - return strtolower($string); - } - - /** - * Returns a titlecased string. - * - * @param string $string A string - * - * @return string The titlecased string - */ - function twig_title_string_filter(Environment $env, $string) - { - if (null !== $charset = $env->getCharset()) { - return mb_convert_case($string, \MB_CASE_TITLE, $charset); - } - - return ucwords(strtolower($string)); - } - - /** - * Returns a capitalized string. - * - * @param string $string A string - * - * @return string The capitalized string - */ - function twig_capitalize_string_filter(Environment $env, $string) - { - if (null !== $charset = $env->getCharset()) { - return mb_strtoupper(mb_substr($string, 0, 1, $charset), $charset).mb_strtolower(mb_substr($string, 1, mb_strlen($string, $charset), $charset), $charset); - } - - return ucfirst(strtolower($string)); - } -} -// and byte fallback -else { - /** - * Returns the length of a variable. - * - * @param mixed $thing A variable - * - * @return int The length of the value - */ - function twig_length_filter(Environment $env, $thing) - { - if (null === $thing) { - return 0; - } - - if (is_scalar($thing)) { - return \strlen($thing); - } - - if ($thing instanceof \SimpleXMLElement) { - return \count($thing); - } - - if (\is_object($thing) && method_exists($thing, '__toString') && !$thing instanceof \Countable) { - return \strlen((string) $thing); - } - - if ($thing instanceof \Countable || \is_array($thing)) { - return \count($thing); - } - - if ($thing instanceof \IteratorAggregate) { - return iterator_count($thing); - } - - return 1; - } - - /** - * Returns a titlecased string. - * - * @param string $string A string - * - * @return string The titlecased string - */ - function twig_title_string_filter(Environment $env, $string) - { - return ucwords(strtolower($string)); - } - - /** - * Returns a capitalized string. - * - * @param string $string A string - * - * @return string The capitalized string - */ - function twig_capitalize_string_filter(Environment $env, $string) - { - return ucfirst(strtolower($string)); - } -} - -/** - * @internal - */ -function twig_ensure_traversable($seq) -{ - if ($seq instanceof \Traversable || \is_array($seq)) { - return $seq; - } - - return []; -} - -/** - * @internal - */ -function twig_to_array($seq, $preserveKeys = true) -{ - if ($seq instanceof \Traversable) { - return iterator_to_array($seq, $preserveKeys); - } - - if (!\is_array($seq)) { - return $seq; - } - - return $preserveKeys ? $seq : array_values($seq); -} - -/** - * Checks if a variable is empty. - * - * {# evaluates to true if the foo variable is null, false, or the empty string #} - * {% if foo is empty %} - * {# ... #} - * {% endif %} - * - * @param mixed $value A variable - * - * @return bool true if the value is empty, false otherwise - */ -function twig_test_empty($value) -{ - if ($value instanceof \Countable) { - return 0 === \count($value); - } - - if ($value instanceof \Traversable) { - return !iterator_count($value); - } - - if (\is_object($value) && method_exists($value, '__toString')) { - return '' === (string) $value; - } - - return '' === $value || false === $value || null === $value || [] === $value; -} - -/** - * Checks if a variable is traversable. - * - * {# evaluates to true if the foo variable is an array or a traversable object #} - * {% if foo is iterable %} - * {# ... #} - * {% endif %} - * - * @param mixed $value A variable - * - * @return bool true if the value is traversable - */ -function twig_test_iterable($value) -{ - return $value instanceof \Traversable || \is_array($value); -} - -/** - * Renders a template. - * - * @param array $context - * @param string|array $template The template to render or an array of templates to try consecutively - * @param array $variables The variables to pass to the template - * @param bool $withContext - * @param bool $ignoreMissing Whether to ignore missing templates or not - * @param bool $sandboxed Whether to sandbox the template or not - * - * @return string The rendered template - */ -function twig_include(Environment $env, $context, $template, $variables = [], $withContext = true, $ignoreMissing = false, $sandboxed = false) -{ - $alreadySandboxed = false; - $sandbox = null; - if ($withContext) { - $variables = array_merge($context, $variables); - } - - if ($isSandboxed = $sandboxed && $env->hasExtension('\Twig\Extension\SandboxExtension')) { - $sandbox = $env->getExtension('\Twig\Extension\SandboxExtension'); - if (!$alreadySandboxed = $sandbox->isSandboxed()) { - $sandbox->enableSandbox(); - } - - foreach ((\is_array($template) ? $template : [$template]) as $name) { - // if a Template instance is passed, it might have been instantiated outside of a sandbox, check security - if ($name instanceof TemplateWrapper || $name instanceof Template) { - $name->unwrap()->checkSecurity(); - } - } - } - - $loaded = null; - try { - $loaded = $env->resolveTemplate($template); - } catch (LoaderError $e) { - if (!$ignoreMissing) { - if ($isSandboxed && !$alreadySandboxed) { - $sandbox->disableSandbox(); - } - - throw $e; - } - } catch (\Throwable $e) { - if ($isSandboxed && !$alreadySandboxed) { - $sandbox->disableSandbox(); - } - - throw $e; - } catch (\Exception $e) { - if ($isSandboxed && !$alreadySandboxed) { - $sandbox->disableSandbox(); - } - - throw $e; - } - - try { - $ret = $loaded ? $loaded->render($variables) : ''; - } catch (\Exception $e) { - if ($isSandboxed && !$alreadySandboxed) { - $sandbox->disableSandbox(); - } - - throw $e; - } - - if ($isSandboxed && !$alreadySandboxed) { - $sandbox->disableSandbox(); - } - - return $ret; -} - -/** - * Returns a template content without rendering it. - * - * @param string $name The template name - * @param bool $ignoreMissing Whether to ignore missing templates or not - * - * @return string The template source - */ -function twig_source(Environment $env, $name, $ignoreMissing = false) -{ - $loader = $env->getLoader(); - try { - if (!$loader instanceof SourceContextLoaderInterface) { - return $loader->getSource($name); - } else { - return $loader->getSourceContext($name)->getCode(); - } - } catch (LoaderError $e) { - if (!$ignoreMissing) { - throw $e; - } - } -} - -/** - * Provides the ability to get constants from instances as well as class/global constants. - * - * @param string $constant The name of the constant - * @param object|null $object The object to get the constant from - * - * @return string - */ -function twig_constant($constant, $object = null) -{ - if (null !== $object) { - $constant = \get_class($object).'::'.$constant; - } - - return \constant($constant); -} - -/** - * Checks if a constant exists. - * - * @param string $constant The name of the constant - * @param object|null $object The object to get the constant from - * - * @return bool - */ -function twig_constant_is_defined($constant, $object = null) -{ - if (null !== $object) { - $constant = \get_class($object).'::'.$constant; - } - - return \defined($constant); -} - -/** - * Batches item. - * - * @param array $items An array of items - * @param int $size The size of the batch - * @param mixed $fill A value used to fill missing items - * - * @return array - */ -function twig_array_batch($items, $size, $fill = null, $preserveKeys = true) -{ - if (!twig_test_iterable($items)) { - throw new RuntimeError(sprintf('The "batch" filter expects an array or "Traversable", got "%s".', \is_object($items) ? \get_class($items) : \gettype($items))); - } - - $size = ceil($size); - - $result = array_chunk(twig_to_array($items, $preserveKeys), $size, $preserveKeys); - - if (null !== $fill && $result) { - $last = \count($result) - 1; - if ($fillCount = $size - \count($result[$last])) { - for ($i = 0; $i < $fillCount; ++$i) { - $result[$last][] = $fill; - } - } - } - - return $result; -} - -function twig_array_filter(Environment $env, $array, $arrow) -{ - if (!twig_test_iterable($array)) { - throw new RuntimeError(sprintf('The "filter" filter expects an array or "Traversable", got "%s".', \is_object($array) ? \get_class($array) : \gettype($array))); - } - - if (!$arrow instanceof Closure && $env->hasExtension('\Twig\Extension\SandboxExtension') && $env->getExtension('\Twig\Extension\SandboxExtension')->isSandboxed()) { - throw new RuntimeError('The callable passed to "filter" filter must be a Closure in sandbox mode.'); - } - - if (\is_array($array)) { - if (\PHP_VERSION_ID >= 50600) { - return array_filter($array, $arrow, \ARRAY_FILTER_USE_BOTH); - } - - return array_filter($array, $arrow); - } - - // the IteratorIterator wrapping is needed as some internal PHP classes are \Traversable but do not implement \Iterator - return new \CallbackFilterIterator(new \IteratorIterator($array), $arrow); -} - -function twig_array_map(Environment $env, $array, $arrow) -{ - if (!$arrow instanceof Closure && $env->hasExtension('\Twig\Extension\SandboxExtension') && $env->getExtension('\Twig\Extension\SandboxExtension')->isSandboxed()) { - throw new RuntimeError('The callable passed to the "map" filter must be a Closure in sandbox mode.'); - } - - $r = []; - foreach ($array as $k => $v) { - $r[$k] = $arrow($v, $k); - } - - return $r; -} - -function twig_array_reduce(Environment $env, $array, $arrow, $initial = null) -{ - if (!$arrow instanceof Closure && $env->hasExtension('\Twig\Extension\SandboxExtension') && $env->getExtension('\Twig\Extension\SandboxExtension')->isSandboxed()) { - throw new RuntimeError('The callable passed to the "reduce" filter must be a Closure in sandbox mode.'); - } - - if (!\is_array($array)) { - if (!$array instanceof \Traversable) { - throw new RuntimeError(sprintf('The "reduce" filter only works with arrays or "Traversable", got "%s" as first argument.', \gettype($array))); - } - - $array = iterator_to_array($array); - } - - return array_reduce($array, $arrow, $initial); -} -} diff --git a/source/vendor/twig/twig/src/Extension/DebugExtension.php b/source/vendor/twig/twig/src/Extension/DebugExtension.php deleted file mode 100644 index 09b0223..0000000 --- a/source/vendor/twig/twig/src/Extension/DebugExtension.php +++ /dev/null @@ -1,76 +0,0 @@ - $isDumpOutputHtmlSafe ? ['html'] : [], 'needs_context' => true, 'needs_environment' => true, 'is_variadic' => true]), - ]; - } - - public function getName() - { - return 'debug'; - } -} - -class_alias('Twig\Extension\DebugExtension', 'Twig_Extension_Debug'); -} - -namespace { -use Twig\Environment; -use Twig\Template; -use Twig\TemplateWrapper; - -function twig_var_dump(Environment $env, $context, array $vars = []) -{ - if (!$env->isDebug()) { - return; - } - - ob_start(); - - if (!$vars) { - $vars = []; - foreach ($context as $key => $value) { - if (!$value instanceof Template && !$value instanceof TemplateWrapper) { - $vars[$key] = $value; - } - } - - var_dump($vars); - } else { - foreach ($vars as $var) { - var_dump($var); - } - } - - return ob_get_clean(); -} -} diff --git a/source/vendor/twig/twig/src/Extension/EscaperExtension.php b/source/vendor/twig/twig/src/Extension/EscaperExtension.php deleted file mode 100644 index fc3e30b..0000000 --- a/source/vendor/twig/twig/src/Extension/EscaperExtension.php +++ /dev/null @@ -1,120 +0,0 @@ -setDefaultStrategy($defaultStrategy); - } - - public function getTokenParsers() - { - return [new AutoEscapeTokenParser()]; - } - - public function getNodeVisitors() - { - return [new EscaperNodeVisitor()]; - } - - public function getFilters() - { - return [ - new TwigFilter('raw', 'twig_raw_filter', ['is_safe' => ['all']]), - ]; - } - - /** - * Sets the default strategy to use when not defined by the user. - * - * The strategy can be a valid PHP callback that takes the template - * name as an argument and returns the strategy to use. - * - * @param string|false|callable $defaultStrategy An escaping strategy - */ - public function setDefaultStrategy($defaultStrategy) - { - // for BC - if (true === $defaultStrategy) { - @trigger_error('Using "true" as the default strategy is deprecated since version 1.21. Use "html" instead.', \E_USER_DEPRECATED); - - $defaultStrategy = 'html'; - } - - if ('filename' === $defaultStrategy) { - @trigger_error('Using "filename" as the default strategy is deprecated since version 1.27. Use "name" instead.', \E_USER_DEPRECATED); - - $defaultStrategy = 'name'; - } - - if ('name' === $defaultStrategy) { - $defaultStrategy = ['\Twig\FileExtensionEscapingStrategy', 'guess']; - } - - $this->defaultStrategy = $defaultStrategy; - } - - /** - * Gets the default strategy to use when not defined by the user. - * - * @param string $name The template name - * - * @return string|false The default strategy to use for the template - */ - public function getDefaultStrategy($name) - { - // disable string callables to avoid calling a function named html or js, - // or any other upcoming escaping strategy - if (!\is_string($this->defaultStrategy) && false !== $this->defaultStrategy) { - return \call_user_func($this->defaultStrategy, $name); - } - - return $this->defaultStrategy; - } - - public function getName() - { - return 'escaper'; - } -} - -class_alias('Twig\Extension\EscaperExtension', 'Twig_Extension_Escaper'); -} - -namespace { -/** - * Marks a variable as being safe. - * - * @param string $string A PHP variable - * - * @return string - */ -function twig_raw_filter($string) -{ - return $string; -} -} diff --git a/source/vendor/twig/twig/src/Extension/ExtensionInterface.php b/source/vendor/twig/twig/src/Extension/ExtensionInterface.php deleted file mode 100644 index 72b31e9..0000000 --- a/source/vendor/twig/twig/src/Extension/ExtensionInterface.php +++ /dev/null @@ -1,101 +0,0 @@ - - */ -interface ExtensionInterface -{ - /** - * Initializes the runtime environment. - * - * This is where you can load some file that contains filter functions for instance. - * - * @deprecated since 1.23 (to be removed in 2.0), implement \Twig_Extension_InitRuntimeInterface instead - */ - public function initRuntime(Environment $environment); - - /** - * Returns the token parser instances to add to the existing list. - * - * @return TokenParserInterface[] - */ - public function getTokenParsers(); - - /** - * Returns the node visitor instances to add to the existing list. - * - * @return NodeVisitorInterface[] - */ - public function getNodeVisitors(); - - /** - * Returns a list of filters to add to the existing list. - * - * @return TwigFilter[] - */ - public function getFilters(); - - /** - * Returns a list of tests to add to the existing list. - * - * @return TwigTest[] - */ - public function getTests(); - - /** - * Returns a list of functions to add to the existing list. - * - * @return TwigFunction[] - */ - public function getFunctions(); - - /** - * Returns a list of operators to add to the existing list. - * - * @return array First array of unary operators, second array of binary operators - */ - public function getOperators(); - - /** - * Returns a list of global variables to add to the existing list. - * - * @return array An array of global variables - * - * @deprecated since 1.23 (to be removed in 2.0), implement \Twig_Extension_GlobalsInterface instead - */ - public function getGlobals(); - - /** - * Returns the name of the extension. - * - * @return string The extension name - * - * @deprecated since 1.26 (to be removed in 2.0), not used anymore internally - */ - public function getName(); -} - -class_alias('Twig\Extension\ExtensionInterface', 'Twig_ExtensionInterface'); - -// Ensure that the aliased name is loaded to keep BC for classes implementing the typehint with the old aliased name. -class_exists('Twig\Environment'); diff --git a/source/vendor/twig/twig/src/Extension/GlobalsInterface.php b/source/vendor/twig/twig/src/Extension/GlobalsInterface.php deleted file mode 100644 index 1f54e25..0000000 --- a/source/vendor/twig/twig/src/Extension/GlobalsInterface.php +++ /dev/null @@ -1,26 +0,0 @@ - - */ -interface GlobalsInterface -{ -} - -class_alias('Twig\Extension\GlobalsInterface', 'Twig_Extension_GlobalsInterface'); diff --git a/source/vendor/twig/twig/src/Extension/InitRuntimeInterface.php b/source/vendor/twig/twig/src/Extension/InitRuntimeInterface.php deleted file mode 100644 index f71d9cb..0000000 --- a/source/vendor/twig/twig/src/Extension/InitRuntimeInterface.php +++ /dev/null @@ -1,26 +0,0 @@ - - */ -interface InitRuntimeInterface -{ -} - -class_alias('Twig\Extension\InitRuntimeInterface', 'Twig_Extension_InitRuntimeInterface'); diff --git a/source/vendor/twig/twig/src/Extension/OptimizerExtension.php b/source/vendor/twig/twig/src/Extension/OptimizerExtension.php deleted file mode 100644 index 3e13740..0000000 --- a/source/vendor/twig/twig/src/Extension/OptimizerExtension.php +++ /dev/null @@ -1,39 +0,0 @@ -optimizers = $optimizers; - } - - public function getNodeVisitors() - { - return [new OptimizerNodeVisitor($this->optimizers)]; - } - - public function getName() - { - return 'optimizer'; - } -} - -class_alias('Twig\Extension\OptimizerExtension', 'Twig_Extension_Optimizer'); diff --git a/source/vendor/twig/twig/src/Extension/ProfilerExtension.php b/source/vendor/twig/twig/src/Extension/ProfilerExtension.php deleted file mode 100644 index ad49458..0000000 --- a/source/vendor/twig/twig/src/Extension/ProfilerExtension.php +++ /dev/null @@ -1,53 +0,0 @@ -actives[] = $profile; - } - - public function enter(Profile $profile) - { - $this->actives[0]->addProfile($profile); - array_unshift($this->actives, $profile); - } - - public function leave(Profile $profile) - { - $profile->leave(); - array_shift($this->actives); - - if (1 === \count($this->actives)) { - $this->actives[0]->leave(); - } - } - - public function getNodeVisitors() - { - return [new ProfilerNodeVisitor(static::class)]; - } - - public function getName() - { - return 'profiler'; - } -} - -class_alias('Twig\Extension\ProfilerExtension', 'Twig_Extension_Profiler'); diff --git a/source/vendor/twig/twig/src/Extension/RuntimeExtensionInterface.php b/source/vendor/twig/twig/src/Extension/RuntimeExtensionInterface.php deleted file mode 100644 index 63bc3b1..0000000 --- a/source/vendor/twig/twig/src/Extension/RuntimeExtensionInterface.php +++ /dev/null @@ -1,19 +0,0 @@ - - */ -interface RuntimeExtensionInterface -{ -} diff --git a/source/vendor/twig/twig/src/Extension/SandboxExtension.php b/source/vendor/twig/twig/src/Extension/SandboxExtension.php deleted file mode 100644 index 818c8c9..0000000 --- a/source/vendor/twig/twig/src/Extension/SandboxExtension.php +++ /dev/null @@ -1,109 +0,0 @@ -policy = $policy; - $this->sandboxedGlobally = $sandboxed; - } - - public function getTokenParsers() - { - return [new SandboxTokenParser()]; - } - - public function getNodeVisitors() - { - return [new SandboxNodeVisitor()]; - } - - public function enableSandbox() - { - $this->sandboxed = true; - } - - public function disableSandbox() - { - $this->sandboxed = false; - } - - public function isSandboxed() - { - return $this->sandboxedGlobally || $this->sandboxed; - } - - public function isSandboxedGlobally() - { - return $this->sandboxedGlobally; - } - - public function setSecurityPolicy(SecurityPolicyInterface $policy) - { - $this->policy = $policy; - } - - public function getSecurityPolicy() - { - return $this->policy; - } - - public function checkSecurity($tags, $filters, $functions) - { - if ($this->isSandboxed()) { - $this->policy->checkSecurity($tags, $filters, $functions); - } - } - - public function checkMethodAllowed($obj, $method) - { - if ($this->isSandboxed()) { - $this->policy->checkMethodAllowed($obj, $method); - } - } - - public function checkPropertyAllowed($obj, $method) - { - if ($this->isSandboxed()) { - $this->policy->checkPropertyAllowed($obj, $method); - } - } - - public function ensureToStringAllowed($obj) - { - if ($this->isSandboxed() && \is_object($obj) && method_exists($obj, '__toString')) { - $this->policy->checkMethodAllowed($obj, '__toString'); - } - - return $obj; - } - - public function getName() - { - return 'sandbox'; - } -} - -class_alias('Twig\Extension\SandboxExtension', 'Twig_Extension_Sandbox'); diff --git a/source/vendor/twig/twig/src/Extension/StagingExtension.php b/source/vendor/twig/twig/src/Extension/StagingExtension.php deleted file mode 100644 index a60ea21..0000000 --- a/source/vendor/twig/twig/src/Extension/StagingExtension.php +++ /dev/null @@ -1,117 +0,0 @@ - - * - * @internal - */ -class StagingExtension extends AbstractExtension -{ - protected $functions = []; - protected $filters = []; - protected $visitors = []; - protected $tokenParsers = []; - protected $globals = []; - protected $tests = []; - - public function addFunction($name, $function) - { - if (isset($this->functions[$name])) { - @trigger_error(sprintf('Overriding function "%s" that is already registered is deprecated since version 1.30 and won\'t be possible anymore in 2.0.', $name), \E_USER_DEPRECATED); - } - - $this->functions[$name] = $function; - } - - public function getFunctions() - { - return $this->functions; - } - - public function addFilter($name, $filter) - { - if (isset($this->filters[$name])) { - @trigger_error(sprintf('Overriding filter "%s" that is already registered is deprecated since version 1.30 and won\'t be possible anymore in 2.0.', $name), \E_USER_DEPRECATED); - } - - $this->filters[$name] = $filter; - } - - public function getFilters() - { - return $this->filters; - } - - public function addNodeVisitor(NodeVisitorInterface $visitor) - { - $this->visitors[] = $visitor; - } - - public function getNodeVisitors() - { - return $this->visitors; - } - - public function addTokenParser(TokenParserInterface $parser) - { - if (isset($this->tokenParsers[$parser->getTag()])) { - @trigger_error(sprintf('Overriding tag "%s" that is already registered is deprecated since version 1.30 and won\'t be possible anymore in 2.0.', $parser->getTag()), \E_USER_DEPRECATED); - } - - $this->tokenParsers[$parser->getTag()] = $parser; - } - - public function getTokenParsers() - { - return $this->tokenParsers; - } - - public function addGlobal($name, $value) - { - $this->globals[$name] = $value; - } - - public function getGlobals() - { - return $this->globals; - } - - public function addTest($name, $test) - { - if (isset($this->tests[$name])) { - @trigger_error(sprintf('Overriding test "%s" that is already registered is deprecated since version 1.30 and won\'t be possible anymore in 2.0.', $name), \E_USER_DEPRECATED); - } - - $this->tests[$name] = $test; - } - - public function getTests() - { - return $this->tests; - } - - public function getName() - { - return 'staging'; - } -} - -class_alias('Twig\Extension\StagingExtension', 'Twig_Extension_Staging'); diff --git a/source/vendor/twig/twig/src/Extension/StringLoaderExtension.php b/source/vendor/twig/twig/src/Extension/StringLoaderExtension.php deleted file mode 100644 index 93ac834..0000000 --- a/source/vendor/twig/twig/src/Extension/StringLoaderExtension.php +++ /dev/null @@ -1,54 +0,0 @@ - true]), - ]; - } - - public function getName() - { - return 'string_loader'; - } -} - -class_alias('Twig\Extension\StringLoaderExtension', 'Twig_Extension_StringLoader'); -} - -namespace { -use Twig\Environment; -use Twig\TemplateWrapper; - -/** - * Loads a template from a string. - * - * {{ include(template_from_string("Hello {{ name }}")) }} - * - * @param string $template A template as a string or object implementing __toString() - * @param string $name An optional name of the template to be used in error messages - * - * @return TemplateWrapper - */ -function twig_template_from_string(Environment $env, $template, $name = null) -{ - return $env->createTemplate((string) $template, $name); -} -} diff --git a/source/vendor/twig/twig/src/FileExtensionEscapingStrategy.php b/source/vendor/twig/twig/src/FileExtensionEscapingStrategy.php deleted file mode 100644 index d79106c..0000000 --- a/source/vendor/twig/twig/src/FileExtensionEscapingStrategy.php +++ /dev/null @@ -1,62 +0,0 @@ - - */ -class FileExtensionEscapingStrategy -{ - /** - * Guesses the best autoescaping strategy based on the file name. - * - * @param string $name The template name - * - * @return string|false The escaping strategy name to use or false to disable - */ - public static function guess($name) - { - if (\in_array(substr($name, -1), ['/', '\\'])) { - return 'html'; // return html for directories - } - - if ('.twig' === substr($name, -5)) { - $name = substr($name, 0, -5); - } - - $extension = pathinfo($name, \PATHINFO_EXTENSION); - - switch ($extension) { - case 'js': - return 'js'; - - case 'css': - return 'css'; - - case 'txt': - return false; - - default: - return 'html'; - } - } -} - -class_alias('Twig\FileExtensionEscapingStrategy', 'Twig_FileExtensionEscapingStrategy'); diff --git a/source/vendor/twig/twig/src/Lexer.php b/source/vendor/twig/twig/src/Lexer.php deleted file mode 100644 index cf13d49..0000000 --- a/source/vendor/twig/twig/src/Lexer.php +++ /dev/null @@ -1,538 +0,0 @@ - - */ -class Lexer implements \Twig_LexerInterface -{ - protected $tokens; - protected $code; - protected $cursor; - protected $lineno; - protected $end; - protected $state; - protected $states; - protected $brackets; - protected $env; - // to be renamed to $name in 2.0 (where it is private) - protected $filename; - protected $options; - protected $regexes; - protected $position; - protected $positions; - protected $currentVarBlockLine; - - private $source; - - public const STATE_DATA = 0; - public const STATE_BLOCK = 1; - public const STATE_VAR = 2; - public const STATE_STRING = 3; - public const STATE_INTERPOLATION = 4; - - public const REGEX_NAME = '/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/A'; - public const REGEX_NUMBER = '/[0-9]+(?:\.[0-9]+)?([Ee][\+\-][0-9]+)?/A'; - public const REGEX_STRING = '/"([^#"\\\\]*(?:\\\\.[^#"\\\\]*)*)"|\'([^\'\\\\]*(?:\\\\.[^\'\\\\]*)*)\'/As'; - public const REGEX_DQ_STRING_DELIM = '/"/A'; - public const REGEX_DQ_STRING_PART = '/[^#"\\\\]*(?:(?:\\\\.|#(?!\{))[^#"\\\\]*)*/As'; - public const PUNCTUATION = '()[]{}?:.,|'; - - public function __construct(Environment $env, array $options = []) - { - $this->env = $env; - - $this->options = array_merge([ - 'tag_comment' => ['{#', '#}'], - 'tag_block' => ['{%', '%}'], - 'tag_variable' => ['{{', '}}'], - 'whitespace_trim' => '-', - 'whitespace_line_trim' => '~', - 'whitespace_line_chars' => ' \t\0\x0B', - 'interpolation' => ['#{', '}'], - ], $options); - - // when PHP 7.3 is the min version, we will be able to remove the '#' part in preg_quote as it's part of the default - $this->regexes = [ - // }} - 'lex_var' => '{ - \s* - (?:'. - preg_quote($this->options['whitespace_trim'].$this->options['tag_variable'][1], '#').'\s*'. // -}}\s* - '|'. - preg_quote($this->options['whitespace_line_trim'].$this->options['tag_variable'][1], '#').'['.$this->options['whitespace_line_chars'].']*'. // ~}}[ \t\0\x0B]* - '|'. - preg_quote($this->options['tag_variable'][1], '#'). // }} - ') - }Ax', - - // %} - 'lex_block' => '{ - \s* - (?:'. - preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1], '#').'\s*\n?'. // -%}\s*\n? - '|'. - preg_quote($this->options['whitespace_line_trim'].$this->options['tag_block'][1], '#').'['.$this->options['whitespace_line_chars'].']*'. // ~%}[ \t\0\x0B]* - '|'. - preg_quote($this->options['tag_block'][1], '#').'\n?'. // %}\n? - ') - }Ax', - - // {% endverbatim %} - 'lex_raw_data' => '{'. - preg_quote($this->options['tag_block'][0], '#'). // {% - '('. - $this->options['whitespace_trim']. // - - '|'. - $this->options['whitespace_line_trim']. // ~ - ')?\s*'. - '(?:end%s)'. // endraw or endverbatim - '\s*'. - '(?:'. - preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1], '#').'\s*'. // -%} - '|'. - preg_quote($this->options['whitespace_line_trim'].$this->options['tag_block'][1], '#').'['.$this->options['whitespace_line_chars'].']*'. // ~%}[ \t\0\x0B]* - '|'. - preg_quote($this->options['tag_block'][1], '#'). // %} - ') - }sx', - - 'operator' => $this->getOperatorRegex(), - - // #} - 'lex_comment' => '{ - (?:'. - preg_quote($this->options['whitespace_trim'].$this->options['tag_comment'][1], '#').'\s*\n?'. // -#}\s*\n? - '|'. - preg_quote($this->options['whitespace_line_trim'].$this->options['tag_comment'][1], '#').'['.$this->options['whitespace_line_chars'].']*'. // ~#}[ \t\0\x0B]* - '|'. - preg_quote($this->options['tag_comment'][1], '#').'\n?'. // #}\n? - ') - }sx', - - // verbatim %} - 'lex_block_raw' => '{ - \s* - (raw|verbatim) - \s* - (?:'. - preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1], '#').'\s*'. // -%}\s* - '|'. - preg_quote($this->options['whitespace_line_trim'].$this->options['tag_block'][1], '#').'['.$this->options['whitespace_line_chars'].']*'. // ~%}[ \t\0\x0B]* - '|'. - preg_quote($this->options['tag_block'][1], '#'). // %} - ') - }Asx', - - 'lex_block_line' => '{\s*line\s+(\d+)\s*'.preg_quote($this->options['tag_block'][1], '#').'}As', - - // {{ or {% or {# - 'lex_tokens_start' => '{ - ('. - preg_quote($this->options['tag_variable'][0], '#'). // {{ - '|'. - preg_quote($this->options['tag_block'][0], '#'). // {% - '|'. - preg_quote($this->options['tag_comment'][0], '#'). // {# - ')('. - preg_quote($this->options['whitespace_trim'], '#'). // - - '|'. - preg_quote($this->options['whitespace_line_trim'], '#'). // ~ - ')? - }sx', - 'interpolation_start' => '{'.preg_quote($this->options['interpolation'][0], '#').'\s*}A', - 'interpolation_end' => '{\s*'.preg_quote($this->options['interpolation'][1], '#').'}A', - ]; - } - - public function tokenize($code, $name = null) - { - if (!$code instanceof Source) { - @trigger_error(sprintf('Passing a string as the $code argument of %s() is deprecated since version 1.27 and will be removed in 2.0. Pass a \Twig\Source instance instead.', __METHOD__), \E_USER_DEPRECATED); - $this->source = new Source($code, $name); - } else { - $this->source = $code; - } - - if (((int) ini_get('mbstring.func_overload')) & 2) { - @trigger_error('Support for having "mbstring.func_overload" different from 0 is deprecated version 1.29 and will be removed in 2.0.', \E_USER_DEPRECATED); - } - - if (\function_exists('mb_internal_encoding') && ((int) ini_get('mbstring.func_overload')) & 2) { - $mbEncoding = mb_internal_encoding(); - mb_internal_encoding('ASCII'); - } else { - $mbEncoding = null; - } - - $this->code = str_replace(["\r\n", "\r"], "\n", $this->source->getCode()); - $this->filename = $this->source->getName(); - $this->cursor = 0; - $this->lineno = 1; - $this->end = \strlen($this->code); - $this->tokens = []; - $this->state = self::STATE_DATA; - $this->states = []; - $this->brackets = []; - $this->position = -1; - - // find all token starts in one go - preg_match_all($this->regexes['lex_tokens_start'], $this->code, $matches, \PREG_OFFSET_CAPTURE); - $this->positions = $matches; - - while ($this->cursor < $this->end) { - // dispatch to the lexing functions depending - // on the current state - switch ($this->state) { - case self::STATE_DATA: - $this->lexData(); - break; - - case self::STATE_BLOCK: - $this->lexBlock(); - break; - - case self::STATE_VAR: - $this->lexVar(); - break; - - case self::STATE_STRING: - $this->lexString(); - break; - - case self::STATE_INTERPOLATION: - $this->lexInterpolation(); - break; - } - } - - $this->pushToken(Token::EOF_TYPE); - - if (!empty($this->brackets)) { - list($expect, $lineno) = array_pop($this->brackets); - throw new SyntaxError(sprintf('Unclosed "%s".', $expect), $lineno, $this->source); - } - - if ($mbEncoding) { - mb_internal_encoding($mbEncoding); - } - - return new TokenStream($this->tokens, $this->source); - } - - protected function lexData() - { - // if no matches are left we return the rest of the template as simple text token - if ($this->position == \count($this->positions[0]) - 1) { - $this->pushToken(Token::TEXT_TYPE, substr($this->code, $this->cursor)); - $this->cursor = $this->end; - - return; - } - - // Find the first token after the current cursor - $position = $this->positions[0][++$this->position]; - while ($position[1] < $this->cursor) { - if ($this->position == \count($this->positions[0]) - 1) { - return; - } - $position = $this->positions[0][++$this->position]; - } - - // push the template text first - $text = $textContent = substr($this->code, $this->cursor, $position[1] - $this->cursor); - - // trim? - if (isset($this->positions[2][$this->position][0])) { - if ($this->options['whitespace_trim'] === $this->positions[2][$this->position][0]) { - // whitespace_trim detected ({%-, {{- or {#-) - $text = rtrim($text); - } elseif ($this->options['whitespace_line_trim'] === $this->positions[2][$this->position][0]) { - // whitespace_line_trim detected ({%~, {{~ or {#~) - // don't trim \r and \n - $text = rtrim($text, " \t\0\x0B"); - } - } - $this->pushToken(Token::TEXT_TYPE, $text); - $this->moveCursor($textContent.$position[0]); - - switch ($this->positions[1][$this->position][0]) { - case $this->options['tag_comment'][0]: - $this->lexComment(); - break; - - case $this->options['tag_block'][0]: - // raw data? - if (preg_match($this->regexes['lex_block_raw'], $this->code, $match, 0, $this->cursor)) { - $this->moveCursor($match[0]); - $this->lexRawData($match[1]); - // {% line \d+ %} - } elseif (preg_match($this->regexes['lex_block_line'], $this->code, $match, 0, $this->cursor)) { - $this->moveCursor($match[0]); - $this->lineno = (int) $match[1]; - } else { - $this->pushToken(Token::BLOCK_START_TYPE); - $this->pushState(self::STATE_BLOCK); - $this->currentVarBlockLine = $this->lineno; - } - break; - - case $this->options['tag_variable'][0]: - $this->pushToken(Token::VAR_START_TYPE); - $this->pushState(self::STATE_VAR); - $this->currentVarBlockLine = $this->lineno; - break; - } - } - - protected function lexBlock() - { - if (empty($this->brackets) && preg_match($this->regexes['lex_block'], $this->code, $match, 0, $this->cursor)) { - $this->pushToken(Token::BLOCK_END_TYPE); - $this->moveCursor($match[0]); - $this->popState(); - } else { - $this->lexExpression(); - } - } - - protected function lexVar() - { - if (empty($this->brackets) && preg_match($this->regexes['lex_var'], $this->code, $match, 0, $this->cursor)) { - $this->pushToken(Token::VAR_END_TYPE); - $this->moveCursor($match[0]); - $this->popState(); - } else { - $this->lexExpression(); - } - } - - protected function lexExpression() - { - // whitespace - if (preg_match('/\s+/A', $this->code, $match, 0, $this->cursor)) { - $this->moveCursor($match[0]); - - if ($this->cursor >= $this->end) { - throw new SyntaxError(sprintf('Unclosed "%s".', self::STATE_BLOCK === $this->state ? 'block' : 'variable'), $this->currentVarBlockLine, $this->source); - } - } - - // arrow function - if ('=' === $this->code[$this->cursor] && '>' === $this->code[$this->cursor + 1]) { - $this->pushToken(Token::ARROW_TYPE, '=>'); - $this->moveCursor('=>'); - } - // operators - elseif (preg_match($this->regexes['operator'], $this->code, $match, 0, $this->cursor)) { - $this->pushToken(Token::OPERATOR_TYPE, preg_replace('/\s+/', ' ', $match[0])); - $this->moveCursor($match[0]); - } - // names - elseif (preg_match(self::REGEX_NAME, $this->code, $match, 0, $this->cursor)) { - $this->pushToken(Token::NAME_TYPE, $match[0]); - $this->moveCursor($match[0]); - } - // numbers - elseif (preg_match(self::REGEX_NUMBER, $this->code, $match, 0, $this->cursor)) { - $number = (float) $match[0]; // floats - if (ctype_digit($match[0]) && $number <= \PHP_INT_MAX) { - $number = (int) $match[0]; // integers lower than the maximum - } - $this->pushToken(Token::NUMBER_TYPE, $number); - $this->moveCursor($match[0]); - } - // punctuation - elseif (false !== strpos(self::PUNCTUATION, $this->code[$this->cursor])) { - // opening bracket - if (false !== strpos('([{', $this->code[$this->cursor])) { - $this->brackets[] = [$this->code[$this->cursor], $this->lineno]; - } - // closing bracket - elseif (false !== strpos(')]}', $this->code[$this->cursor])) { - if (empty($this->brackets)) { - throw new SyntaxError(sprintf('Unexpected "%s".', $this->code[$this->cursor]), $this->lineno, $this->source); - } - - list($expect, $lineno) = array_pop($this->brackets); - if ($this->code[$this->cursor] != strtr($expect, '([{', ')]}')) { - throw new SyntaxError(sprintf('Unclosed "%s".', $expect), $lineno, $this->source); - } - } - - $this->pushToken(Token::PUNCTUATION_TYPE, $this->code[$this->cursor]); - ++$this->cursor; - } - // strings - elseif (preg_match(self::REGEX_STRING, $this->code, $match, 0, $this->cursor)) { - $this->pushToken(Token::STRING_TYPE, stripcslashes(substr($match[0], 1, -1))); - $this->moveCursor($match[0]); - } - // opening double quoted string - elseif (preg_match(self::REGEX_DQ_STRING_DELIM, $this->code, $match, 0, $this->cursor)) { - $this->brackets[] = ['"', $this->lineno]; - $this->pushState(self::STATE_STRING); - $this->moveCursor($match[0]); - } - // unlexable - else { - throw new SyntaxError(sprintf('Unexpected character "%s".', $this->code[$this->cursor]), $this->lineno, $this->source); - } - } - - protected function lexRawData($tag) - { - if ('raw' === $tag) { - @trigger_error(sprintf('Twig Tag "raw" is deprecated since version 1.21. Use "verbatim" instead in %s at line %d.', $this->filename, $this->lineno), \E_USER_DEPRECATED); - } - - if (!preg_match(str_replace('%s', $tag, $this->regexes['lex_raw_data']), $this->code, $match, \PREG_OFFSET_CAPTURE, $this->cursor)) { - throw new SyntaxError(sprintf('Unexpected end of file: Unclosed "%s" block.', $tag), $this->lineno, $this->source); - } - - $text = substr($this->code, $this->cursor, $match[0][1] - $this->cursor); - $this->moveCursor($text.$match[0][0]); - - // trim? - if (isset($match[1][0])) { - if ($this->options['whitespace_trim'] === $match[1][0]) { - // whitespace_trim detected ({%-, {{- or {#-) - $text = rtrim($text); - } else { - // whitespace_line_trim detected ({%~, {{~ or {#~) - // don't trim \r and \n - $text = rtrim($text, " \t\0\x0B"); - } - } - - $this->pushToken(Token::TEXT_TYPE, $text); - } - - protected function lexComment() - { - if (!preg_match($this->regexes['lex_comment'], $this->code, $match, \PREG_OFFSET_CAPTURE, $this->cursor)) { - throw new SyntaxError('Unclosed comment.', $this->lineno, $this->source); - } - - $this->moveCursor(substr($this->code, $this->cursor, $match[0][1] - $this->cursor).$match[0][0]); - } - - protected function lexString() - { - if (preg_match($this->regexes['interpolation_start'], $this->code, $match, 0, $this->cursor)) { - $this->brackets[] = [$this->options['interpolation'][0], $this->lineno]; - $this->pushToken(Token::INTERPOLATION_START_TYPE); - $this->moveCursor($match[0]); - $this->pushState(self::STATE_INTERPOLATION); - } elseif (preg_match(self::REGEX_DQ_STRING_PART, $this->code, $match, 0, $this->cursor) && \strlen($match[0]) > 0) { - $this->pushToken(Token::STRING_TYPE, stripcslashes($match[0])); - $this->moveCursor($match[0]); - } elseif (preg_match(self::REGEX_DQ_STRING_DELIM, $this->code, $match, 0, $this->cursor)) { - list($expect, $lineno) = array_pop($this->brackets); - if ('"' != $this->code[$this->cursor]) { - throw new SyntaxError(sprintf('Unclosed "%s".', $expect), $lineno, $this->source); - } - - $this->popState(); - ++$this->cursor; - } else { - // unlexable - throw new SyntaxError(sprintf('Unexpected character "%s".', $this->code[$this->cursor]), $this->lineno, $this->source); - } - } - - protected function lexInterpolation() - { - $bracket = end($this->brackets); - if ($this->options['interpolation'][0] === $bracket[0] && preg_match($this->regexes['interpolation_end'], $this->code, $match, 0, $this->cursor)) { - array_pop($this->brackets); - $this->pushToken(Token::INTERPOLATION_END_TYPE); - $this->moveCursor($match[0]); - $this->popState(); - } else { - $this->lexExpression(); - } - } - - protected function pushToken($type, $value = '') - { - // do not push empty text tokens - if (Token::TEXT_TYPE === $type && '' === $value) { - return; - } - - $this->tokens[] = new Token($type, $value, $this->lineno); - } - - protected function moveCursor($text) - { - $this->cursor += \strlen($text); - $this->lineno += substr_count($text, "\n"); - } - - protected function getOperatorRegex() - { - $operators = array_merge( - ['='], - array_keys($this->env->getUnaryOperators()), - array_keys($this->env->getBinaryOperators()) - ); - - $operators = array_combine($operators, array_map('strlen', $operators)); - arsort($operators); - - $regex = []; - foreach ($operators as $operator => $length) { - // an operator that ends with a character must be followed by - // a whitespace, a parenthesis, an opening map [ or sequence { - $r = preg_quote($operator, '/'); - if (ctype_alpha($operator[$length - 1])) { - $r .= '(?=[\s()\[{])'; - } - - // an operator that begins with a character must not have a dot or pipe before - if (ctype_alpha($operator[0])) { - $r = '(?states[] = $this->state; - $this->state = $state; - } - - protected function popState() - { - if (0 === \count($this->states)) { - throw new \LogicException('Cannot pop state without a previous state.'); - } - - $this->state = array_pop($this->states); - } -} - -class_alias('Twig\Lexer', 'Twig_Lexer'); diff --git a/source/vendor/twig/twig/src/Loader/ArrayLoader.php b/source/vendor/twig/twig/src/Loader/ArrayLoader.php deleted file mode 100644 index 5f2a1af..0000000 --- a/source/vendor/twig/twig/src/Loader/ArrayLoader.php +++ /dev/null @@ -1,102 +0,0 @@ - - */ -class ArrayLoader implements LoaderInterface, ExistsLoaderInterface, SourceContextLoaderInterface -{ - protected $templates = []; - - /** - * @param array $templates An array of templates (keys are the names, and values are the source code) - */ - public function __construct(array $templates = []) - { - $this->templates = $templates; - } - - /** - * Adds or overrides a template. - * - * @param string $name The template name - * @param string $template The template source - */ - public function setTemplate($name, $template) - { - $this->templates[(string) $name] = $template; - } - - public function getSource($name) - { - @trigger_error(sprintf('Calling "getSource" on "%s" is deprecated since 1.27. Use getSourceContext() instead.', static::class), \E_USER_DEPRECATED); - - $name = (string) $name; - if (!isset($this->templates[$name])) { - throw new LoaderError(sprintf('Template "%s" is not defined.', $name)); - } - - return $this->templates[$name]; - } - - public function getSourceContext($name) - { - $name = (string) $name; - if (!isset($this->templates[$name])) { - throw new LoaderError(sprintf('Template "%s" is not defined.', $name)); - } - - return new Source($this->templates[$name], $name); - } - - public function exists($name) - { - return isset($this->templates[(string) $name]); - } - - public function getCacheKey($name) - { - $name = (string) $name; - if (!isset($this->templates[$name])) { - throw new LoaderError(sprintf('Template "%s" is not defined.', $name)); - } - - return $name.':'.$this->templates[$name]; - } - - public function isFresh($name, $time) - { - $name = (string) $name; - if (!isset($this->templates[$name])) { - throw new LoaderError(sprintf('Template "%s" is not defined.', $name)); - } - - return true; - } -} - -class_alias('Twig\Loader\ArrayLoader', 'Twig_Loader_Array'); diff --git a/source/vendor/twig/twig/src/Loader/ChainLoader.php b/source/vendor/twig/twig/src/Loader/ChainLoader.php deleted file mode 100644 index 1df226c..0000000 --- a/source/vendor/twig/twig/src/Loader/ChainLoader.php +++ /dev/null @@ -1,164 +0,0 @@ - - */ -class ChainLoader implements LoaderInterface, ExistsLoaderInterface, SourceContextLoaderInterface -{ - private $hasSourceCache = []; - protected $loaders = []; - - /** - * @param LoaderInterface[] $loaders - */ - public function __construct(array $loaders = []) - { - foreach ($loaders as $loader) { - $this->addLoader($loader); - } - } - - public function addLoader(LoaderInterface $loader) - { - $this->loaders[] = $loader; - $this->hasSourceCache = []; - } - - /** - * @return LoaderInterface[] - */ - public function getLoaders() - { - return $this->loaders; - } - - public function getSource($name) - { - @trigger_error(sprintf('Calling "getSource" on "%s" is deprecated since 1.27. Use getSourceContext() instead.', static::class), \E_USER_DEPRECATED); - - $exceptions = []; - foreach ($this->loaders as $loader) { - if ($loader instanceof ExistsLoaderInterface && !$loader->exists($name)) { - continue; - } - - try { - return $loader->getSource($name); - } catch (LoaderError $e) { - $exceptions[] = $e->getMessage(); - } - } - - throw new LoaderError(sprintf('Template "%s" is not defined%s.', $name, $exceptions ? ' ('.implode(', ', $exceptions).')' : '')); - } - - public function getSourceContext($name) - { - $exceptions = []; - foreach ($this->loaders as $loader) { - if ($loader instanceof ExistsLoaderInterface && !$loader->exists($name)) { - continue; - } - - try { - if ($loader instanceof SourceContextLoaderInterface) { - return $loader->getSourceContext($name); - } - - return new Source($loader->getSource($name), $name); - } catch (LoaderError $e) { - $exceptions[] = $e->getMessage(); - } - } - - throw new LoaderError(sprintf('Template "%s" is not defined%s.', $name, $exceptions ? ' ('.implode(', ', $exceptions).')' : '')); - } - - public function exists($name) - { - $name = (string) $name; - - if (isset($this->hasSourceCache[$name])) { - return $this->hasSourceCache[$name]; - } - - foreach ($this->loaders as $loader) { - if ($loader instanceof ExistsLoaderInterface) { - if ($loader->exists($name)) { - return $this->hasSourceCache[$name] = true; - } - - continue; - } - - try { - if ($loader instanceof SourceContextLoaderInterface) { - $loader->getSourceContext($name); - } else { - $loader->getSource($name); - } - - return $this->hasSourceCache[$name] = true; - } catch (LoaderError $e) { - } - } - - return $this->hasSourceCache[$name] = false; - } - - public function getCacheKey($name) - { - $exceptions = []; - foreach ($this->loaders as $loader) { - if ($loader instanceof ExistsLoaderInterface && !$loader->exists($name)) { - continue; - } - - try { - return $loader->getCacheKey($name); - } catch (LoaderError $e) { - $exceptions[] = \get_class($loader).': '.$e->getMessage(); - } - } - - throw new LoaderError(sprintf('Template "%s" is not defined%s.', $name, $exceptions ? ' ('.implode(', ', $exceptions).')' : '')); - } - - public function isFresh($name, $time) - { - $exceptions = []; - foreach ($this->loaders as $loader) { - if ($loader instanceof ExistsLoaderInterface && !$loader->exists($name)) { - continue; - } - - try { - return $loader->isFresh($name, $time); - } catch (LoaderError $e) { - $exceptions[] = \get_class($loader).': '.$e->getMessage(); - } - } - - throw new LoaderError(sprintf('Template "%s" is not defined%s.', $name, $exceptions ? ' ('.implode(', ', $exceptions).')' : '')); - } -} - -class_alias('Twig\Loader\ChainLoader', 'Twig_Loader_Chain'); diff --git a/source/vendor/twig/twig/src/Loader/ExistsLoaderInterface.php b/source/vendor/twig/twig/src/Loader/ExistsLoaderInterface.php deleted file mode 100644 index 940d876..0000000 --- a/source/vendor/twig/twig/src/Loader/ExistsLoaderInterface.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * @deprecated since 1.12 (to be removed in 3.0) - */ -interface ExistsLoaderInterface -{ - /** - * Check if we have the source code of a template, given its name. - * - * @param string $name The name of the template to check if we can load - * - * @return bool If the template source code is handled by this loader or not - */ - public function exists($name); -} - -class_alias('Twig\Loader\ExistsLoaderInterface', 'Twig_ExistsLoaderInterface'); diff --git a/source/vendor/twig/twig/src/Loader/FilesystemLoader.php b/source/vendor/twig/twig/src/Loader/FilesystemLoader.php deleted file mode 100644 index 1912e05..0000000 --- a/source/vendor/twig/twig/src/Loader/FilesystemLoader.php +++ /dev/null @@ -1,323 +0,0 @@ - - */ -class FilesystemLoader implements LoaderInterface, ExistsLoaderInterface, SourceContextLoaderInterface -{ - /** Identifier of the main namespace. */ - public const MAIN_NAMESPACE = '__main__'; - - protected $paths = []; - protected $cache = []; - protected $errorCache = []; - - private $rootPath; - - /** - * @param string|array $paths A path or an array of paths where to look for templates - * @param string|null $rootPath The root path common to all relative paths (null for getcwd()) - */ - public function __construct($paths = [], $rootPath = null) - { - $this->rootPath = (null === $rootPath ? getcwd() : $rootPath).\DIRECTORY_SEPARATOR; - if (null !== $rootPath && false !== ($realPath = realpath($rootPath))) { - $this->rootPath = $realPath.\DIRECTORY_SEPARATOR; - } - - if ($paths) { - $this->setPaths($paths); - } - } - - /** - * Returns the paths to the templates. - * - * @param string $namespace A path namespace - * - * @return array The array of paths where to look for templates - */ - public function getPaths($namespace = self::MAIN_NAMESPACE) - { - return isset($this->paths[$namespace]) ? $this->paths[$namespace] : []; - } - - /** - * Returns the path namespaces. - * - * The main namespace is always defined. - * - * @return array The array of defined namespaces - */ - public function getNamespaces() - { - return array_keys($this->paths); - } - - /** - * Sets the paths where templates are stored. - * - * @param string|array $paths A path or an array of paths where to look for templates - * @param string $namespace A path namespace - */ - public function setPaths($paths, $namespace = self::MAIN_NAMESPACE) - { - if (!\is_array($paths)) { - $paths = [$paths]; - } - - $this->paths[$namespace] = []; - foreach ($paths as $path) { - $this->addPath($path, $namespace); - } - } - - /** - * Adds a path where templates are stored. - * - * @param string $path A path where to look for templates - * @param string $namespace A path namespace - * - * @throws LoaderError - */ - public function addPath($path, $namespace = self::MAIN_NAMESPACE) - { - // invalidate the cache - $this->cache = $this->errorCache = []; - - $checkPath = $this->isAbsolutePath($path) ? $path : $this->rootPath.$path; - if (!is_dir($checkPath)) { - throw new LoaderError(sprintf('The "%s" directory does not exist ("%s").', $path, $checkPath)); - } - - $this->paths[$namespace][] = rtrim($path, '/\\'); - } - - /** - * Prepends a path where templates are stored. - * - * @param string $path A path where to look for templates - * @param string $namespace A path namespace - * - * @throws LoaderError - */ - public function prependPath($path, $namespace = self::MAIN_NAMESPACE) - { - // invalidate the cache - $this->cache = $this->errorCache = []; - - $checkPath = $this->isAbsolutePath($path) ? $path : $this->rootPath.$path; - if (!is_dir($checkPath)) { - throw new LoaderError(sprintf('The "%s" directory does not exist ("%s").', $path, $checkPath)); - } - - $path = rtrim($path, '/\\'); - - if (!isset($this->paths[$namespace])) { - $this->paths[$namespace][] = $path; - } else { - array_unshift($this->paths[$namespace], $path); - } - } - - public function getSource($name) - { - @trigger_error(sprintf('Calling "getSource" on "%s" is deprecated since 1.27. Use getSourceContext() instead.', static::class), \E_USER_DEPRECATED); - - if (null === ($path = $this->findTemplate($name)) || false === $path) { - return ''; - } - - return file_get_contents($path); - } - - public function getSourceContext($name) - { - if (null === ($path = $this->findTemplate($name)) || false === $path) { - return new Source('', $name, ''); - } - - return new Source(file_get_contents($path), $name, $path); - } - - public function getCacheKey($name) - { - if (null === ($path = $this->findTemplate($name)) || false === $path) { - return ''; - } - $len = \strlen($this->rootPath); - if (0 === strncmp($this->rootPath, $path, $len)) { - return substr($path, $len); - } - - return $path; - } - - public function exists($name) - { - $name = $this->normalizeName($name); - - if (isset($this->cache[$name])) { - return true; - } - - try { - return null !== ($path = $this->findTemplate($name, false)) && false !== $path; - } catch (LoaderError $e) { - @trigger_error(sprintf('In %s::findTemplate(), you must accept a second argument that when set to "false" returns "false" instead of throwing an exception. Not supporting this argument is deprecated since version 1.27.', static::class), \E_USER_DEPRECATED); - - return false; - } - } - - public function isFresh($name, $time) - { - // false support to be removed in 3.0 - if (null === ($path = $this->findTemplate($name)) || false === $path) { - return false; - } - - return filemtime($path) < $time; - } - - /** - * Checks if the template can be found. - * - * @param string $name The template name - * - * @return string|false|null The template name or false/null - */ - protected function findTemplate($name) - { - $throw = \func_num_args() > 1 ? func_get_arg(1) : true; - $name = $this->normalizeName($name); - - if (isset($this->cache[$name])) { - return $this->cache[$name]; - } - - if (isset($this->errorCache[$name])) { - if (!$throw) { - return false; - } - - throw new LoaderError($this->errorCache[$name]); - } - - try { - $this->validateName($name); - - list($namespace, $shortname) = $this->parseName($name); - } catch (LoaderError $e) { - if (!$throw) { - return false; - } - - throw $e; - } - - if (!isset($this->paths[$namespace])) { - $this->errorCache[$name] = sprintf('There are no registered paths for namespace "%s".', $namespace); - - if (!$throw) { - return false; - } - - throw new LoaderError($this->errorCache[$name]); - } - - foreach ($this->paths[$namespace] as $path) { - if (!$this->isAbsolutePath($path)) { - $path = $this->rootPath.$path; - } - - if (is_file($path.'/'.$shortname)) { - if (false !== $realpath = realpath($path.'/'.$shortname)) { - return $this->cache[$name] = $realpath; - } - - return $this->cache[$name] = $path.'/'.$shortname; - } - } - - $this->errorCache[$name] = sprintf('Unable to find template "%s" (looked into: %s).', $name, implode(', ', $this->paths[$namespace])); - - if (!$throw) { - return false; - } - - throw new LoaderError($this->errorCache[$name]); - } - - protected function parseName($name, $default = self::MAIN_NAMESPACE) - { - if (isset($name[0]) && '@' == $name[0]) { - if (false === $pos = strpos($name, '/')) { - throw new LoaderError(sprintf('Malformed namespaced template name "%s" (expecting "@namespace/template_name").', $name)); - } - - $namespace = substr($name, 1, $pos - 1); - $shortname = substr($name, $pos + 1); - - return [$namespace, $shortname]; - } - - return [$default, $name]; - } - - protected function normalizeName($name) - { - return preg_replace('#/{2,}#', '/', str_replace('\\', '/', (string) $name)); - } - - protected function validateName($name) - { - if (false !== strpos($name, "\0")) { - throw new LoaderError('A template name cannot contain NUL bytes.'); - } - - $name = ltrim($name, '/'); - $parts = explode('/', $name); - $level = 0; - foreach ($parts as $part) { - if ('..' === $part) { - --$level; - } elseif ('.' !== $part) { - ++$level; - } - - if ($level < 0) { - throw new LoaderError(sprintf('Looks like you try to load a template outside configured directories (%s).', $name)); - } - } - } - - private function isAbsolutePath($file) - { - return strspn($file, '/\\', 0, 1) - || (\strlen($file) > 3 && ctype_alpha($file[0]) - && ':' === substr($file, 1, 1) - && strspn($file, '/\\', 2, 1) - ) - || null !== parse_url($file, \PHP_URL_SCHEME) - ; - } -} - -class_alias('Twig\Loader\FilesystemLoader', 'Twig_Loader_Filesystem'); diff --git a/source/vendor/twig/twig/src/Loader/LoaderInterface.php b/source/vendor/twig/twig/src/Loader/LoaderInterface.php deleted file mode 100644 index 15be7a8..0000000 --- a/source/vendor/twig/twig/src/Loader/LoaderInterface.php +++ /dev/null @@ -1,61 +0,0 @@ - - */ -interface LoaderInterface -{ - /** - * Gets the source code of a template, given its name. - * - * @param string $name The name of the template to load - * - * @return string The template source code - * - * @throws LoaderError When $name is not found - * - * @deprecated since 1.27 (to be removed in 2.0), implement Twig\Loader\SourceContextLoaderInterface - */ - public function getSource($name); - - /** - * Gets the cache key to use for the cache for a given template name. - * - * @param string $name The name of the template to load - * - * @return string The cache key - * - * @throws LoaderError When $name is not found - */ - public function getCacheKey($name); - - /** - * Returns true if the template is still fresh. - * - * @param string $name The template name - * @param int $time Timestamp of the last modification time of the - * cached template - * - * @return bool true if the template is fresh, false otherwise - * - * @throws LoaderError When $name is not found - */ - public function isFresh($name, $time); -} - -class_alias('Twig\Loader\LoaderInterface', 'Twig_LoaderInterface'); diff --git a/source/vendor/twig/twig/src/Loader/SourceContextLoaderInterface.php b/source/vendor/twig/twig/src/Loader/SourceContextLoaderInterface.php deleted file mode 100644 index 78b1fcd..0000000 --- a/source/vendor/twig/twig/src/Loader/SourceContextLoaderInterface.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * @deprecated since 1.27 (to be removed in 3.0) - */ -interface SourceContextLoaderInterface -{ - /** - * Returns the source context for a given template logical name. - * - * @param string $name The template logical name - * - * @return Source - * - * @throws LoaderError When $name is not found - */ - public function getSourceContext($name); -} - -class_alias('Twig\Loader\SourceContextLoaderInterface', 'Twig_SourceContextLoaderInterface'); diff --git a/source/vendor/twig/twig/src/Markup.php b/source/vendor/twig/twig/src/Markup.php deleted file mode 100644 index 384f41e..0000000 --- a/source/vendor/twig/twig/src/Markup.php +++ /dev/null @@ -1,44 +0,0 @@ - - */ -class Markup implements \Countable -{ - protected $content; - protected $charset; - - public function __construct($content, $charset) - { - $this->content = (string) $content; - $this->charset = $charset; - } - - public function __toString() - { - return $this->content; - } - - /** - * @return int - */ - public function count() - { - return \function_exists('mb_get_info') ? mb_strlen($this->content, $this->charset) : \strlen($this->content); - } -} - -class_alias('Twig\Markup', 'Twig_Markup'); diff --git a/source/vendor/twig/twig/src/Node/AutoEscapeNode.php b/source/vendor/twig/twig/src/Node/AutoEscapeNode.php deleted file mode 100644 index a940306..0000000 --- a/source/vendor/twig/twig/src/Node/AutoEscapeNode.php +++ /dev/null @@ -1,40 +0,0 @@ - - */ -class AutoEscapeNode extends Node -{ - public function __construct($value, \Twig_NodeInterface $body, $lineno, $tag = 'autoescape') - { - parent::__construct(['body' => $body], ['value' => $value], $lineno, $tag); - } - - public function compile(Compiler $compiler) - { - $compiler->subcompile($this->getNode('body')); - } -} - -class_alias('Twig\Node\AutoEscapeNode', 'Twig_Node_AutoEscape'); diff --git a/source/vendor/twig/twig/src/Node/BlockNode.php b/source/vendor/twig/twig/src/Node/BlockNode.php deleted file mode 100644 index 1ffc8ca..0000000 --- a/source/vendor/twig/twig/src/Node/BlockNode.php +++ /dev/null @@ -1,45 +0,0 @@ - - */ -class BlockNode extends Node -{ - public function __construct($name, \Twig_NodeInterface $body, $lineno, $tag = null) - { - parent::__construct(['body' => $body], ['name' => $name], $lineno, $tag); - } - - public function compile(Compiler $compiler) - { - $compiler - ->addDebugInfo($this) - ->write(sprintf("public function block_%s(\$context, array \$blocks = [])\n", $this->getAttribute('name')), "{\n") - ->indent() - ; - - $compiler - ->subcompile($this->getNode('body')) - ->outdent() - ->write("}\n\n") - ; - } -} - -class_alias('Twig\Node\BlockNode', 'Twig_Node_Block'); diff --git a/source/vendor/twig/twig/src/Node/BlockReferenceNode.php b/source/vendor/twig/twig/src/Node/BlockReferenceNode.php deleted file mode 100644 index de06909..0000000 --- a/source/vendor/twig/twig/src/Node/BlockReferenceNode.php +++ /dev/null @@ -1,38 +0,0 @@ - - */ -class BlockReferenceNode extends Node implements NodeOutputInterface -{ - public function __construct($name, $lineno, $tag = null) - { - parent::__construct([], ['name' => $name], $lineno, $tag); - } - - public function compile(Compiler $compiler) - { - $compiler - ->addDebugInfo($this) - ->write(sprintf("\$this->displayBlock('%s', \$context, \$blocks);\n", $this->getAttribute('name'))) - ; - } -} - -class_alias('Twig\Node\BlockReferenceNode', 'Twig_Node_BlockReference'); diff --git a/source/vendor/twig/twig/src/Node/BodyNode.php b/source/vendor/twig/twig/src/Node/BodyNode.php deleted file mode 100644 index 5290be5..0000000 --- a/source/vendor/twig/twig/src/Node/BodyNode.php +++ /dev/null @@ -1,23 +0,0 @@ - - */ -class BodyNode extends Node -{ -} - -class_alias('Twig\Node\BodyNode', 'Twig_Node_Body'); diff --git a/source/vendor/twig/twig/src/Node/CheckSecurityCallNode.php b/source/vendor/twig/twig/src/Node/CheckSecurityCallNode.php deleted file mode 100644 index a78a38d..0000000 --- a/source/vendor/twig/twig/src/Node/CheckSecurityCallNode.php +++ /dev/null @@ -1,28 +0,0 @@ - - */ -class CheckSecurityCallNode extends Node -{ - public function compile(Compiler $compiler) - { - $compiler - ->write("\$this->sandbox = \$this->env->getExtension('\Twig\Extension\SandboxExtension');\n") - ->write("\$this->checkSecurity();\n") - ; - } -} diff --git a/source/vendor/twig/twig/src/Node/CheckSecurityNode.php b/source/vendor/twig/twig/src/Node/CheckSecurityNode.php deleted file mode 100644 index 5a5ae63..0000000 --- a/source/vendor/twig/twig/src/Node/CheckSecurityNode.php +++ /dev/null @@ -1,90 +0,0 @@ - - */ -class CheckSecurityNode extends Node -{ - protected $usedFilters; - protected $usedTags; - protected $usedFunctions; - - public function __construct(array $usedFilters, array $usedTags, array $usedFunctions) - { - $this->usedFilters = $usedFilters; - $this->usedTags = $usedTags; - $this->usedFunctions = $usedFunctions; - - parent::__construct(); - } - - public function compile(Compiler $compiler) - { - $tags = $filters = $functions = []; - foreach (['tags', 'filters', 'functions'] as $type) { - foreach ($this->{'used'.ucfirst($type)} as $name => $node) { - if ($node instanceof Node) { - ${$type}[$name] = $node->getTemplateLine(); - } else { - ${$type}[$node] = null; - } - } - } - - $compiler - ->write("\n") - ->write("public function checkSecurity()\n") - ->write("{\n") - ->indent() - ->write('static $tags = ')->repr(array_filter($tags))->raw(";\n") - ->write('static $filters = ')->repr(array_filter($filters))->raw(";\n") - ->write('static $functions = ')->repr(array_filter($functions))->raw(";\n\n") - ->write("try {\n") - ->indent() - ->write("\$this->sandbox->checkSecurity(\n") - ->indent() - ->write(!$tags ? "[],\n" : "['".implode("', '", array_keys($tags))."'],\n") - ->write(!$filters ? "[],\n" : "['".implode("', '", array_keys($filters))."'],\n") - ->write(!$functions ? "[]\n" : "['".implode("', '", array_keys($functions))."']\n") - ->outdent() - ->write(");\n") - ->outdent() - ->write("} catch (SecurityError \$e) {\n") - ->indent() - ->write("\$e->setSourceContext(\$this->getSourceContext());\n\n") - ->write("if (\$e instanceof SecurityNotAllowedTagError && isset(\$tags[\$e->getTagName()])) {\n") - ->indent() - ->write("\$e->setTemplateLine(\$tags[\$e->getTagName()]);\n") - ->outdent() - ->write("} elseif (\$e instanceof SecurityNotAllowedFilterError && isset(\$filters[\$e->getFilterName()])) {\n") - ->indent() - ->write("\$e->setTemplateLine(\$filters[\$e->getFilterName()]);\n") - ->outdent() - ->write("} elseif (\$e instanceof SecurityNotAllowedFunctionError && isset(\$functions[\$e->getFunctionName()])) {\n") - ->indent() - ->write("\$e->setTemplateLine(\$functions[\$e->getFunctionName()]);\n") - ->outdent() - ->write("}\n\n") - ->write("throw \$e;\n") - ->outdent() - ->write("}\n\n") - ->outdent() - ->write("}\n") - ; - } -} - -class_alias('Twig\Node\CheckSecurityNode', 'Twig_Node_CheckSecurity'); diff --git a/source/vendor/twig/twig/src/Node/CheckToStringNode.php b/source/vendor/twig/twig/src/Node/CheckToStringNode.php deleted file mode 100644 index 5d67467..0000000 --- a/source/vendor/twig/twig/src/Node/CheckToStringNode.php +++ /dev/null @@ -1,42 +0,0 @@ - - */ -class CheckToStringNode extends AbstractExpression -{ - public function __construct(AbstractExpression $expr) - { - parent::__construct(['expr' => $expr], [], $expr->getTemplateLine(), $expr->getNodeTag()); - } - - public function compile(Compiler $compiler) - { - $compiler - ->raw('$this->sandbox->ensureToStringAllowed(') - ->subcompile($this->getNode('expr')) - ->raw(')') - ; - } -} diff --git a/source/vendor/twig/twig/src/Node/DeprecatedNode.php b/source/vendor/twig/twig/src/Node/DeprecatedNode.php deleted file mode 100644 index 62c0dd4..0000000 --- a/source/vendor/twig/twig/src/Node/DeprecatedNode.php +++ /dev/null @@ -1,55 +0,0 @@ - - */ -class DeprecatedNode extends Node -{ - public function __construct(AbstractExpression $expr, $lineno, $tag = null) - { - parent::__construct(['expr' => $expr], [], $lineno, $tag); - } - - public function compile(Compiler $compiler) - { - $compiler->addDebugInfo($this); - - $expr = $this->getNode('expr'); - - if ($expr instanceof ConstantExpression) { - $compiler->write('@trigger_error(') - ->subcompile($expr); - } else { - $varName = $compiler->getVarName(); - $compiler->write(sprintf('$%s = ', $varName)) - ->subcompile($expr) - ->raw(";\n") - ->write(sprintf('@trigger_error($%s', $varName)); - } - - $compiler - ->raw('.') - ->string(sprintf(' ("%s" at line %d).', $this->getTemplateName(), $this->getTemplateLine())) - ->raw(", E_USER_DEPRECATED);\n") - ; - } -} - -class_alias('Twig\Node\DeprecatedNode', 'Twig_Node_Deprecated'); diff --git a/source/vendor/twig/twig/src/Node/DoNode.php b/source/vendor/twig/twig/src/Node/DoNode.php deleted file mode 100644 index 80c4cea..0000000 --- a/source/vendor/twig/twig/src/Node/DoNode.php +++ /dev/null @@ -1,40 +0,0 @@ - - */ -class DoNode extends Node -{ - public function __construct(AbstractExpression $expr, $lineno, $tag = null) - { - parent::__construct(['expr' => $expr], [], $lineno, $tag); - } - - public function compile(Compiler $compiler) - { - $compiler - ->addDebugInfo($this) - ->write('') - ->subcompile($this->getNode('expr')) - ->raw(";\n") - ; - } -} - -class_alias('Twig\Node\DoNode', 'Twig_Node_Do'); diff --git a/source/vendor/twig/twig/src/Node/EmbedNode.php b/source/vendor/twig/twig/src/Node/EmbedNode.php deleted file mode 100644 index dde3db1..0000000 --- a/source/vendor/twig/twig/src/Node/EmbedNode.php +++ /dev/null @@ -1,52 +0,0 @@ - - */ -class EmbedNode extends IncludeNode -{ - // we don't inject the module to avoid node visitors to traverse it twice (as it will be already visited in the main module) - public function __construct($name, $index, ?AbstractExpression $variables, $only, $ignoreMissing, $lineno, $tag = null) - { - parent::__construct(new ConstantExpression('not_used', $lineno), $variables, $only, $ignoreMissing, $lineno, $tag); - - $this->setAttribute('name', $name); - // to be removed in 2.0, used name instead - $this->setAttribute('filename', $name); - $this->setAttribute('index', $index); - } - - protected function addGetTemplate(Compiler $compiler) - { - $compiler - ->write('$this->loadTemplate(') - ->string($this->getAttribute('name')) - ->raw(', ') - ->repr($this->getTemplateName()) - ->raw(', ') - ->repr($this->getTemplateLine()) - ->raw(', ') - ->string($this->getAttribute('index')) - ->raw(')') - ; - } -} - -class_alias('Twig\Node\EmbedNode', 'Twig_Node_Embed'); diff --git a/source/vendor/twig/twig/src/Node/Expression/AbstractExpression.php b/source/vendor/twig/twig/src/Node/Expression/AbstractExpression.php deleted file mode 100644 index a352892..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/AbstractExpression.php +++ /dev/null @@ -1,26 +0,0 @@ - - */ -abstract class AbstractExpression extends Node -{ -} - -class_alias('Twig\Node\Expression\AbstractExpression', 'Twig_Node_Expression'); diff --git a/source/vendor/twig/twig/src/Node/Expression/ArrayExpression.php b/source/vendor/twig/twig/src/Node/Expression/ArrayExpression.php deleted file mode 100644 index cd63f93..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/ArrayExpression.php +++ /dev/null @@ -1,88 +0,0 @@ -index = -1; - foreach ($this->getKeyValuePairs() as $pair) { - if ($pair['key'] instanceof ConstantExpression && ctype_digit((string) $pair['key']->getAttribute('value')) && $pair['key']->getAttribute('value') > $this->index) { - $this->index = $pair['key']->getAttribute('value'); - } - } - } - - public function getKeyValuePairs() - { - $pairs = []; - - foreach (array_chunk($this->nodes, 2) as $pair) { - $pairs[] = [ - 'key' => $pair[0], - 'value' => $pair[1], - ]; - } - - return $pairs; - } - - public function hasElement(AbstractExpression $key) - { - foreach ($this->getKeyValuePairs() as $pair) { - // we compare the string representation of the keys - // to avoid comparing the line numbers which are not relevant here. - if ((string) $key === (string) $pair['key']) { - return true; - } - } - - return false; - } - - public function addElement(AbstractExpression $value, AbstractExpression $key = null) - { - if (null === $key) { - $key = new ConstantExpression(++$this->index, $value->getTemplateLine()); - } - - array_push($this->nodes, $key, $value); - } - - public function compile(Compiler $compiler) - { - $compiler->raw('['); - $first = true; - foreach ($this->getKeyValuePairs() as $pair) { - if (!$first) { - $compiler->raw(', '); - } - $first = false; - - $compiler - ->subcompile($pair['key']) - ->raw(' => ') - ->subcompile($pair['value']) - ; - } - $compiler->raw(']'); - } -} - -class_alias('Twig\Node\Expression\ArrayExpression', 'Twig_Node_Expression_Array'); diff --git a/source/vendor/twig/twig/src/Node/Expression/ArrowFunctionExpression.php b/source/vendor/twig/twig/src/Node/Expression/ArrowFunctionExpression.php deleted file mode 100644 index 36b77da..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/ArrowFunctionExpression.php +++ /dev/null @@ -1,64 +0,0 @@ - - */ -class ArrowFunctionExpression extends AbstractExpression -{ - public function __construct(AbstractExpression $expr, Node $names, $lineno, $tag = null) - { - parent::__construct(['expr' => $expr, 'names' => $names], [], $lineno, $tag); - } - - public function compile(Compiler $compiler) - { - $compiler - ->addDebugInfo($this) - ->raw('function (') - ; - foreach ($this->getNode('names') as $i => $name) { - if ($i) { - $compiler->raw(', '); - } - - $compiler - ->raw('$__') - ->raw($name->getAttribute('name')) - ->raw('__') - ; - } - $compiler - ->raw(') use ($context) { ') - ; - foreach ($this->getNode('names') as $name) { - $compiler - ->raw('$context["') - ->raw($name->getAttribute('name')) - ->raw('"] = $__') - ->raw($name->getAttribute('name')) - ->raw('__; ') - ; - } - $compiler - ->raw('return ') - ->subcompile($this->getNode('expr')) - ->raw('; }') - ; - } -} diff --git a/source/vendor/twig/twig/src/Node/Expression/AssignNameExpression.php b/source/vendor/twig/twig/src/Node/Expression/AssignNameExpression.php deleted file mode 100644 index 62c4ac0..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/AssignNameExpression.php +++ /dev/null @@ -1,29 +0,0 @@ -raw('$context[') - ->string($this->getAttribute('name')) - ->raw(']') - ; - } -} - -class_alias('Twig\Node\Expression\AssignNameExpression', 'Twig_Node_Expression_AssignName'); diff --git a/source/vendor/twig/twig/src/Node/Expression/Binary/AbstractBinary.php b/source/vendor/twig/twig/src/Node/Expression/Binary/AbstractBinary.php deleted file mode 100644 index 0600aee..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/Binary/AbstractBinary.php +++ /dev/null @@ -1,43 +0,0 @@ - $left, 'right' => $right], [], $lineno); - } - - public function compile(Compiler $compiler) - { - $compiler - ->raw('(') - ->subcompile($this->getNode('left')) - ->raw(' ') - ; - $this->operator($compiler); - $compiler - ->raw(' ') - ->subcompile($this->getNode('right')) - ->raw(')') - ; - } - - abstract public function operator(Compiler $compiler); -} - -class_alias('Twig\Node\Expression\Binary\AbstractBinary', 'Twig_Node_Expression_Binary'); diff --git a/source/vendor/twig/twig/src/Node/Expression/Binary/AddBinary.php b/source/vendor/twig/twig/src/Node/Expression/Binary/AddBinary.php deleted file mode 100644 index f7719a1..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/Binary/AddBinary.php +++ /dev/null @@ -1,25 +0,0 @@ -raw('+'); - } -} - -class_alias('Twig\Node\Expression\Binary\AddBinary', 'Twig_Node_Expression_Binary_Add'); diff --git a/source/vendor/twig/twig/src/Node/Expression/Binary/AndBinary.php b/source/vendor/twig/twig/src/Node/Expression/Binary/AndBinary.php deleted file mode 100644 index 484597d..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/Binary/AndBinary.php +++ /dev/null @@ -1,25 +0,0 @@ -raw('&&'); - } -} - -class_alias('Twig\Node\Expression\Binary\AndBinary', 'Twig_Node_Expression_Binary_And'); diff --git a/source/vendor/twig/twig/src/Node/Expression/Binary/BitwiseAndBinary.php b/source/vendor/twig/twig/src/Node/Expression/Binary/BitwiseAndBinary.php deleted file mode 100644 index cf28691..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/Binary/BitwiseAndBinary.php +++ /dev/null @@ -1,25 +0,0 @@ -raw('&'); - } -} - -class_alias('Twig\Node\Expression\Binary\BitwiseAndBinary', 'Twig_Node_Expression_Binary_BitwiseAnd'); diff --git a/source/vendor/twig/twig/src/Node/Expression/Binary/BitwiseOrBinary.php b/source/vendor/twig/twig/src/Node/Expression/Binary/BitwiseOrBinary.php deleted file mode 100644 index 7d5d260..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/Binary/BitwiseOrBinary.php +++ /dev/null @@ -1,25 +0,0 @@ -raw('|'); - } -} - -class_alias('Twig\Node\Expression\Binary\BitwiseOrBinary', 'Twig_Node_Expression_Binary_BitwiseOr'); diff --git a/source/vendor/twig/twig/src/Node/Expression/Binary/BitwiseXorBinary.php b/source/vendor/twig/twig/src/Node/Expression/Binary/BitwiseXorBinary.php deleted file mode 100644 index 7291987..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/Binary/BitwiseXorBinary.php +++ /dev/null @@ -1,25 +0,0 @@ -raw('^'); - } -} - -class_alias('Twig\Node\Expression\Binary\BitwiseXorBinary', 'Twig_Node_Expression_Binary_BitwiseXor'); diff --git a/source/vendor/twig/twig/src/Node/Expression/Binary/ConcatBinary.php b/source/vendor/twig/twig/src/Node/Expression/Binary/ConcatBinary.php deleted file mode 100644 index f6e5938..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/Binary/ConcatBinary.php +++ /dev/null @@ -1,25 +0,0 @@ -raw('.'); - } -} - -class_alias('Twig\Node\Expression\Binary\ConcatBinary', 'Twig_Node_Expression_Binary_Concat'); diff --git a/source/vendor/twig/twig/src/Node/Expression/Binary/DivBinary.php b/source/vendor/twig/twig/src/Node/Expression/Binary/DivBinary.php deleted file mode 100644 index ebfcc75..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/Binary/DivBinary.php +++ /dev/null @@ -1,25 +0,0 @@ -raw('/'); - } -} - -class_alias('Twig\Node\Expression\Binary\DivBinary', 'Twig_Node_Expression_Binary_Div'); diff --git a/source/vendor/twig/twig/src/Node/Expression/Binary/EndsWithBinary.php b/source/vendor/twig/twig/src/Node/Expression/Binary/EndsWithBinary.php deleted file mode 100644 index 41a0065..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/Binary/EndsWithBinary.php +++ /dev/null @@ -1,37 +0,0 @@ -getVarName(); - $right = $compiler->getVarName(); - $compiler - ->raw(sprintf('(is_string($%s = ', $left)) - ->subcompile($this->getNode('left')) - ->raw(sprintf(') && is_string($%s = ', $right)) - ->subcompile($this->getNode('right')) - ->raw(sprintf(') && (\'\' === $%2$s || $%2$s === substr($%1$s, -strlen($%2$s))))', $left, $right)) - ; - } - - public function operator(Compiler $compiler) - { - return $compiler->raw(''); - } -} - -class_alias('Twig\Node\Expression\Binary\EndsWithBinary', 'Twig_Node_Expression_Binary_EndsWith'); diff --git a/source/vendor/twig/twig/src/Node/Expression/Binary/EqualBinary.php b/source/vendor/twig/twig/src/Node/Expression/Binary/EqualBinary.php deleted file mode 100644 index 84904c3..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/Binary/EqualBinary.php +++ /dev/null @@ -1,24 +0,0 @@ -raw('=='); - } -} - -class_alias('Twig\Node\Expression\Binary\EqualBinary', 'Twig_Node_Expression_Binary_Equal'); diff --git a/source/vendor/twig/twig/src/Node/Expression/Binary/FloorDivBinary.php b/source/vendor/twig/twig/src/Node/Expression/Binary/FloorDivBinary.php deleted file mode 100644 index 4dd5e3d..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/Binary/FloorDivBinary.php +++ /dev/null @@ -1,31 +0,0 @@ -raw('(int) floor('); - parent::compile($compiler); - $compiler->raw(')'); - } - - public function operator(Compiler $compiler) - { - return $compiler->raw('/'); - } -} - -class_alias('Twig\Node\Expression\Binary\FloorDivBinary', 'Twig_Node_Expression_Binary_FloorDiv'); diff --git a/source/vendor/twig/twig/src/Node/Expression/Binary/GreaterBinary.php b/source/vendor/twig/twig/src/Node/Expression/Binary/GreaterBinary.php deleted file mode 100644 index be73001..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/Binary/GreaterBinary.php +++ /dev/null @@ -1,24 +0,0 @@ -raw('>'); - } -} - -class_alias('Twig\Node\Expression\Binary\GreaterBinary', 'Twig_Node_Expression_Binary_Greater'); diff --git a/source/vendor/twig/twig/src/Node/Expression/Binary/GreaterEqualBinary.php b/source/vendor/twig/twig/src/Node/Expression/Binary/GreaterEqualBinary.php deleted file mode 100644 index 5c2ae72..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/Binary/GreaterEqualBinary.php +++ /dev/null @@ -1,24 +0,0 @@ -raw('>='); - } -} - -class_alias('Twig\Node\Expression\Binary\GreaterEqualBinary', 'Twig_Node_Expression_Binary_GreaterEqual'); diff --git a/source/vendor/twig/twig/src/Node/Expression/Binary/InBinary.php b/source/vendor/twig/twig/src/Node/Expression/Binary/InBinary.php deleted file mode 100644 index f00b230..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/Binary/InBinary.php +++ /dev/null @@ -1,35 +0,0 @@ -raw('twig_in_filter(') - ->subcompile($this->getNode('left')) - ->raw(', ') - ->subcompile($this->getNode('right')) - ->raw(')') - ; - } - - public function operator(Compiler $compiler) - { - return $compiler->raw('in'); - } -} - -class_alias('Twig\Node\Expression\Binary\InBinary', 'Twig_Node_Expression_Binary_In'); diff --git a/source/vendor/twig/twig/src/Node/Expression/Binary/LessBinary.php b/source/vendor/twig/twig/src/Node/Expression/Binary/LessBinary.php deleted file mode 100644 index 2b202da..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/Binary/LessBinary.php +++ /dev/null @@ -1,24 +0,0 @@ -raw('<'); - } -} - -class_alias('Twig\Node\Expression\Binary\LessBinary', 'Twig_Node_Expression_Binary_Less'); diff --git a/source/vendor/twig/twig/src/Node/Expression/Binary/LessEqualBinary.php b/source/vendor/twig/twig/src/Node/Expression/Binary/LessEqualBinary.php deleted file mode 100644 index 4fffafe..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/Binary/LessEqualBinary.php +++ /dev/null @@ -1,24 +0,0 @@ -raw('<='); - } -} - -class_alias('Twig\Node\Expression\Binary\LessEqualBinary', 'Twig_Node_Expression_Binary_LessEqual'); diff --git a/source/vendor/twig/twig/src/Node/Expression/Binary/MatchesBinary.php b/source/vendor/twig/twig/src/Node/Expression/Binary/MatchesBinary.php deleted file mode 100644 index ae810b2..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/Binary/MatchesBinary.php +++ /dev/null @@ -1,35 +0,0 @@ -raw('preg_match(') - ->subcompile($this->getNode('right')) - ->raw(', ') - ->subcompile($this->getNode('left')) - ->raw(')') - ; - } - - public function operator(Compiler $compiler) - { - return $compiler->raw(''); - } -} - -class_alias('Twig\Node\Expression\Binary\MatchesBinary', 'Twig_Node_Expression_Binary_Matches'); diff --git a/source/vendor/twig/twig/src/Node/Expression/Binary/ModBinary.php b/source/vendor/twig/twig/src/Node/Expression/Binary/ModBinary.php deleted file mode 100644 index e6a2b36..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/Binary/ModBinary.php +++ /dev/null @@ -1,25 +0,0 @@ -raw('%'); - } -} - -class_alias('Twig\Node\Expression\Binary\ModBinary', 'Twig_Node_Expression_Binary_Mod'); diff --git a/source/vendor/twig/twig/src/Node/Expression/Binary/MulBinary.php b/source/vendor/twig/twig/src/Node/Expression/Binary/MulBinary.php deleted file mode 100644 index cd65f5d..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/Binary/MulBinary.php +++ /dev/null @@ -1,25 +0,0 @@ -raw('*'); - } -} - -class_alias('Twig\Node\Expression\Binary\MulBinary', 'Twig_Node_Expression_Binary_Mul'); diff --git a/source/vendor/twig/twig/src/Node/Expression/Binary/NotEqualBinary.php b/source/vendor/twig/twig/src/Node/Expression/Binary/NotEqualBinary.php deleted file mode 100644 index df5c6a2..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/Binary/NotEqualBinary.php +++ /dev/null @@ -1,24 +0,0 @@ -raw('!='); - } -} - -class_alias('Twig\Node\Expression\Binary\NotEqualBinary', 'Twig_Node_Expression_Binary_NotEqual'); diff --git a/source/vendor/twig/twig/src/Node/Expression/Binary/NotInBinary.php b/source/vendor/twig/twig/src/Node/Expression/Binary/NotInBinary.php deleted file mode 100644 index ed2034e..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/Binary/NotInBinary.php +++ /dev/null @@ -1,35 +0,0 @@ -raw('!twig_in_filter(') - ->subcompile($this->getNode('left')) - ->raw(', ') - ->subcompile($this->getNode('right')) - ->raw(')') - ; - } - - public function operator(Compiler $compiler) - { - return $compiler->raw('not in'); - } -} - -class_alias('Twig\Node\Expression\Binary\NotInBinary', 'Twig_Node_Expression_Binary_NotIn'); diff --git a/source/vendor/twig/twig/src/Node/Expression/Binary/OrBinary.php b/source/vendor/twig/twig/src/Node/Expression/Binary/OrBinary.php deleted file mode 100644 index 8f9da43..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/Binary/OrBinary.php +++ /dev/null @@ -1,25 +0,0 @@ -raw('||'); - } -} - -class_alias('Twig\Node\Expression\Binary\OrBinary', 'Twig_Node_Expression_Binary_Or'); diff --git a/source/vendor/twig/twig/src/Node/Expression/Binary/PowerBinary.php b/source/vendor/twig/twig/src/Node/Expression/Binary/PowerBinary.php deleted file mode 100644 index 10a8d94..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/Binary/PowerBinary.php +++ /dev/null @@ -1,39 +0,0 @@ -= 50600) { - return parent::compile($compiler); - } - - $compiler - ->raw('pow(') - ->subcompile($this->getNode('left')) - ->raw(', ') - ->subcompile($this->getNode('right')) - ->raw(')') - ; - } - - public function operator(Compiler $compiler) - { - return $compiler->raw('**'); - } -} - -class_alias('Twig\Node\Expression\Binary\PowerBinary', 'Twig_Node_Expression_Binary_Power'); diff --git a/source/vendor/twig/twig/src/Node/Expression/Binary/RangeBinary.php b/source/vendor/twig/twig/src/Node/Expression/Binary/RangeBinary.php deleted file mode 100644 index e9c0cdf..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/Binary/RangeBinary.php +++ /dev/null @@ -1,35 +0,0 @@ -raw('range(') - ->subcompile($this->getNode('left')) - ->raw(', ') - ->subcompile($this->getNode('right')) - ->raw(')') - ; - } - - public function operator(Compiler $compiler) - { - return $compiler->raw('..'); - } -} - -class_alias('Twig\Node\Expression\Binary\RangeBinary', 'Twig_Node_Expression_Binary_Range'); diff --git a/source/vendor/twig/twig/src/Node/Expression/Binary/StartsWithBinary.php b/source/vendor/twig/twig/src/Node/Expression/Binary/StartsWithBinary.php deleted file mode 100644 index 1fe59fb..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/Binary/StartsWithBinary.php +++ /dev/null @@ -1,37 +0,0 @@ -getVarName(); - $right = $compiler->getVarName(); - $compiler - ->raw(sprintf('(is_string($%s = ', $left)) - ->subcompile($this->getNode('left')) - ->raw(sprintf(') && is_string($%s = ', $right)) - ->subcompile($this->getNode('right')) - ->raw(sprintf(') && (\'\' === $%2$s || 0 === strpos($%1$s, $%2$s)))', $left, $right)) - ; - } - - public function operator(Compiler $compiler) - { - return $compiler->raw(''); - } -} - -class_alias('Twig\Node\Expression\Binary\StartsWithBinary', 'Twig_Node_Expression_Binary_StartsWith'); diff --git a/source/vendor/twig/twig/src/Node/Expression/Binary/SubBinary.php b/source/vendor/twig/twig/src/Node/Expression/Binary/SubBinary.php deleted file mode 100644 index 2546975..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/Binary/SubBinary.php +++ /dev/null @@ -1,25 +0,0 @@ -raw('-'); - } -} - -class_alias('Twig\Node\Expression\Binary\SubBinary', 'Twig_Node_Expression_Binary_Sub'); diff --git a/source/vendor/twig/twig/src/Node/Expression/BlockReferenceExpression.php b/source/vendor/twig/twig/src/Node/Expression/BlockReferenceExpression.php deleted file mode 100644 index 309da58..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/BlockReferenceExpression.php +++ /dev/null @@ -1,98 +0,0 @@ - - */ -class BlockReferenceExpression extends AbstractExpression -{ - /** - * @param Node|null $template - */ - public function __construct(\Twig_NodeInterface $name, $template, $lineno, $tag = null) - { - if (\is_bool($template)) { - @trigger_error(sprintf('The %s method "$asString" argument is deprecated since version 1.28 and will be removed in 2.0.', __METHOD__), \E_USER_DEPRECATED); - - $template = null; - } - - $nodes = ['name' => $name]; - if (null !== $template) { - $nodes['template'] = $template; - } - - parent::__construct($nodes, ['is_defined_test' => false, 'output' => false], $lineno, $tag); - } - - public function compile(Compiler $compiler) - { - if ($this->getAttribute('is_defined_test')) { - $this->compileTemplateCall($compiler, 'hasBlock'); - } else { - if ($this->getAttribute('output')) { - $compiler->addDebugInfo($this); - - $this - ->compileTemplateCall($compiler, 'displayBlock') - ->raw(";\n"); - } else { - $this->compileTemplateCall($compiler, 'renderBlock'); - } - } - } - - private function compileTemplateCall(Compiler $compiler, $method) - { - if (!$this->hasNode('template')) { - $compiler->write('$this'); - } else { - $compiler - ->write('$this->loadTemplate(') - ->subcompile($this->getNode('template')) - ->raw(', ') - ->repr($this->getTemplateName()) - ->raw(', ') - ->repr($this->getTemplateLine()) - ->raw(')') - ; - } - - $compiler->raw(sprintf('->%s', $method)); - $this->compileBlockArguments($compiler); - - return $compiler; - } - - private function compileBlockArguments(Compiler $compiler) - { - $compiler - ->raw('(') - ->subcompile($this->getNode('name')) - ->raw(', $context'); - - if (!$this->hasNode('template')) { - $compiler->raw(', $blocks'); - } - - return $compiler->raw(')'); - } -} - -class_alias('Twig\Node\Expression\BlockReferenceExpression', 'Twig_Node_Expression_BlockReference'); diff --git a/source/vendor/twig/twig/src/Node/Expression/CallExpression.php b/source/vendor/twig/twig/src/Node/Expression/CallExpression.php deleted file mode 100644 index d066737..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/CallExpression.php +++ /dev/null @@ -1,315 +0,0 @@ -hasAttribute('callable') && $callable = $this->getAttribute('callable')) { - if (\is_string($callable) && false === strpos($callable, '::')) { - $compiler->raw($callable); - } else { - list($r, $callable) = $this->reflectCallable($callable); - if ($r instanceof \ReflectionMethod && \is_string($callable[0])) { - if ($r->isStatic()) { - $compiler->raw(sprintf('%s::%s', $callable[0], $callable[1])); - } else { - $compiler->raw(sprintf('$this->env->getRuntime(\'%s\')->%s', $callable[0], $callable[1])); - } - } elseif ($r instanceof \ReflectionMethod && $callable[0] instanceof ExtensionInterface) { - $compiler->raw(sprintf('$this->env->getExtension(\'%s\')->%s', \get_class($callable[0]), $callable[1])); - } else { - $type = ucfirst($this->getAttribute('type')); - $compiler->raw(sprintf('call_user_func_array($this->env->get%s(\'%s\')->getCallable(), ', $type, $this->getAttribute('name'))); - $closingParenthesis = true; - $isArray = true; - } - } - } else { - $compiler->raw($this->getAttribute('thing')->compile()); - } - - $this->compileArguments($compiler, $isArray); - - if ($closingParenthesis) { - $compiler->raw(')'); - } - } - - protected function compileArguments(Compiler $compiler, $isArray = false) - { - $compiler->raw($isArray ? '[' : '('); - - $first = true; - - if ($this->hasAttribute('needs_environment') && $this->getAttribute('needs_environment')) { - $compiler->raw('$this->env'); - $first = false; - } - - if ($this->hasAttribute('needs_context') && $this->getAttribute('needs_context')) { - if (!$first) { - $compiler->raw(', '); - } - $compiler->raw('$context'); - $first = false; - } - - if ($this->hasAttribute('arguments')) { - foreach ($this->getAttribute('arguments') as $argument) { - if (!$first) { - $compiler->raw(', '); - } - $compiler->string($argument); - $first = false; - } - } - - if ($this->hasNode('node')) { - if (!$first) { - $compiler->raw(', '); - } - $compiler->subcompile($this->getNode('node')); - $first = false; - } - - if ($this->hasNode('arguments')) { - $callable = $this->hasAttribute('callable') ? $this->getAttribute('callable') : null; - - $arguments = $this->getArguments($callable, $this->getNode('arguments')); - - foreach ($arguments as $node) { - if (!$first) { - $compiler->raw(', '); - } - $compiler->subcompile($node); - $first = false; - } - } - - $compiler->raw($isArray ? ']' : ')'); - } - - protected function getArguments($callable, $arguments) - { - $callType = $this->getAttribute('type'); - $callName = $this->getAttribute('name'); - - $parameters = []; - $named = false; - foreach ($arguments as $name => $node) { - if (!\is_int($name)) { - $named = true; - $name = $this->normalizeName($name); - } elseif ($named) { - throw new SyntaxError(sprintf('Positional arguments cannot be used after named arguments for %s "%s".', $callType, $callName), $this->getTemplateLine(), $this->getSourceContext()); - } - - $parameters[$name] = $node; - } - - $isVariadic = $this->hasAttribute('is_variadic') && $this->getAttribute('is_variadic'); - if (!$named && !$isVariadic) { - return $parameters; - } - - if (!$callable) { - if ($named) { - $message = sprintf('Named arguments are not supported for %s "%s".', $callType, $callName); - } else { - $message = sprintf('Arbitrary positional arguments are not supported for %s "%s".', $callType, $callName); - } - - throw new \LogicException($message); - } - - $callableParameters = $this->getCallableParameters($callable, $isVariadic); - $arguments = []; - $names = []; - $missingArguments = []; - $optionalArguments = []; - $pos = 0; - foreach ($callableParameters as $callableParameter) { - $name = $this->normalizeName($callableParameter->name); - if (\PHP_VERSION_ID >= 80000 && 'range' === $callable) { - if ('start' === $name) { - $name = 'low'; - } elseif ('end' === $name) { - $name = 'high'; - } - } - - $names[] = $name; - - if (\array_key_exists($name, $parameters)) { - if (\array_key_exists($pos, $parameters)) { - throw new SyntaxError(sprintf('Argument "%s" is defined twice for %s "%s".', $name, $callType, $callName), $this->getTemplateLine(), $this->getSourceContext()); - } - - if (\count($missingArguments)) { - throw new SyntaxError(sprintf( - 'Argument "%s" could not be assigned for %s "%s(%s)" because it is mapped to an internal PHP function which cannot determine default value for optional argument%s "%s".', - $name, $callType, $callName, implode(', ', $names), \count($missingArguments) > 1 ? 's' : '', implode('", "', $missingArguments) - ), $this->getTemplateLine(), $this->getSourceContext()); - } - - $arguments = array_merge($arguments, $optionalArguments); - $arguments[] = $parameters[$name]; - unset($parameters[$name]); - $optionalArguments = []; - } elseif (\array_key_exists($pos, $parameters)) { - $arguments = array_merge($arguments, $optionalArguments); - $arguments[] = $parameters[$pos]; - unset($parameters[$pos]); - $optionalArguments = []; - ++$pos; - } elseif ($callableParameter->isDefaultValueAvailable()) { - $optionalArguments[] = new ConstantExpression($callableParameter->getDefaultValue(), -1); - } elseif ($callableParameter->isOptional()) { - if (empty($parameters)) { - break; - } else { - $missingArguments[] = $name; - } - } else { - throw new SyntaxError(sprintf('Value for argument "%s" is required for %s "%s".', $name, $callType, $callName), $this->getTemplateLine(), $this->getSourceContext()); - } - } - - if ($isVariadic) { - $arbitraryArguments = new ArrayExpression([], -1); - foreach ($parameters as $key => $value) { - if (\is_int($key)) { - $arbitraryArguments->addElement($value); - } else { - $arbitraryArguments->addElement($value, new ConstantExpression($key, -1)); - } - unset($parameters[$key]); - } - - if ($arbitraryArguments->count()) { - $arguments = array_merge($arguments, $optionalArguments); - $arguments[] = $arbitraryArguments; - } - } - - if (!empty($parameters)) { - $unknownParameter = null; - foreach ($parameters as $parameter) { - if ($parameter instanceof Node) { - $unknownParameter = $parameter; - break; - } - } - - throw new SyntaxError( - sprintf( - 'Unknown argument%s "%s" for %s "%s(%s)".', - \count($parameters) > 1 ? 's' : '', implode('", "', array_keys($parameters)), $callType, $callName, implode(', ', $names) - ), - $unknownParameter ? $unknownParameter->getTemplateLine() : $this->getTemplateLine(), - $unknownParameter ? $unknownParameter->getSourceContext() : $this->getSourceContext() - ); - } - - return $arguments; - } - - protected function normalizeName($name) - { - return strtolower(preg_replace(['/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'], ['\\1_\\2', '\\1_\\2'], $name)); - } - - private function getCallableParameters($callable, $isVariadic) - { - list($r) = $this->reflectCallable($callable); - if (null === $r) { - return []; - } - - $parameters = $r->getParameters(); - if ($this->hasNode('node')) { - array_shift($parameters); - } - if ($this->hasAttribute('needs_environment') && $this->getAttribute('needs_environment')) { - array_shift($parameters); - } - if ($this->hasAttribute('needs_context') && $this->getAttribute('needs_context')) { - array_shift($parameters); - } - if ($this->hasAttribute('arguments') && null !== $this->getAttribute('arguments')) { - foreach ($this->getAttribute('arguments') as $argument) { - array_shift($parameters); - } - } - if ($isVariadic) { - $argument = end($parameters); - $isArray = $argument && $argument->hasType() && 'array' === $argument->getType()->getName(); - if ($isArray && $argument->isDefaultValueAvailable() && [] === $argument->getDefaultValue()) { - array_pop($parameters); - } else { - $callableName = $r->name; - if ($r instanceof \ReflectionMethod) { - $callableName = $r->getDeclaringClass()->name.'::'.$callableName; - } - - throw new \LogicException(sprintf('The last parameter of "%s" for %s "%s" must be an array with default value, eg. "array $arg = []".', $callableName, $this->getAttribute('type'), $this->getAttribute('name'))); - } - } - - return $parameters; - } - - private function reflectCallable($callable) - { - if (null !== $this->reflector) { - return $this->reflector; - } - - if (\is_array($callable)) { - if (!method_exists($callable[0], $callable[1])) { - // __call() - return [null, []]; - } - $r = new \ReflectionMethod($callable[0], $callable[1]); - } elseif (\is_object($callable) && !$callable instanceof \Closure) { - $r = new \ReflectionObject($callable); - $r = $r->getMethod('__invoke'); - $callable = [$callable, '__invoke']; - } elseif (\is_string($callable) && false !== $pos = strpos($callable, '::')) { - $class = substr($callable, 0, $pos); - $method = substr($callable, $pos + 2); - if (!method_exists($class, $method)) { - // __staticCall() - return [null, []]; - } - $r = new \ReflectionMethod($callable); - $callable = [$class, $method]; - } else { - $r = new \ReflectionFunction($callable); - } - - return $this->reflector = [$r, $callable]; - } -} - -class_alias('Twig\Node\Expression\CallExpression', 'Twig_Node_Expression_Call'); diff --git a/source/vendor/twig/twig/src/Node/Expression/ConditionalExpression.php b/source/vendor/twig/twig/src/Node/Expression/ConditionalExpression.php deleted file mode 100644 index b611218..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/ConditionalExpression.php +++ /dev/null @@ -1,38 +0,0 @@ - $expr1, 'expr2' => $expr2, 'expr3' => $expr3], [], $lineno); - } - - public function compile(Compiler $compiler) - { - $compiler - ->raw('((') - ->subcompile($this->getNode('expr1')) - ->raw(') ? (') - ->subcompile($this->getNode('expr2')) - ->raw(') : (') - ->subcompile($this->getNode('expr3')) - ->raw('))') - ; - } -} - -class_alias('Twig\Node\Expression\ConditionalExpression', 'Twig_Node_Expression_Conditional'); diff --git a/source/vendor/twig/twig/src/Node/Expression/ConstantExpression.php b/source/vendor/twig/twig/src/Node/Expression/ConstantExpression.php deleted file mode 100644 index fd58264..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/ConstantExpression.php +++ /dev/null @@ -1,30 +0,0 @@ - $value], $lineno); - } - - public function compile(Compiler $compiler) - { - $compiler->repr($this->getAttribute('value')); - } -} - -class_alias('Twig\Node\Expression\ConstantExpression', 'Twig_Node_Expression_Constant'); diff --git a/source/vendor/twig/twig/src/Node/Expression/Filter/DefaultFilter.php b/source/vendor/twig/twig/src/Node/Expression/Filter/DefaultFilter.php deleted file mode 100644 index 7c5e2d2..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/Filter/DefaultFilter.php +++ /dev/null @@ -1,54 +0,0 @@ - - */ -class DefaultFilter extends FilterExpression -{ - public function __construct(\Twig_NodeInterface $node, ConstantExpression $filterName, \Twig_NodeInterface $arguments, $lineno, $tag = null) - { - $default = new FilterExpression($node, new ConstantExpression('default', $node->getTemplateLine()), $arguments, $node->getTemplateLine()); - - if ('default' === $filterName->getAttribute('value') && ($node instanceof NameExpression || $node instanceof GetAttrExpression)) { - $test = new DefinedTest(clone $node, 'defined', new Node(), $node->getTemplateLine()); - $false = \count($arguments) ? $arguments->getNode(0) : new ConstantExpression('', $node->getTemplateLine()); - - $node = new ConditionalExpression($test, $default, $false, $node->getTemplateLine()); - } else { - $node = $default; - } - - parent::__construct($node, $filterName, $arguments, $lineno, $tag); - } - - public function compile(Compiler $compiler) - { - $compiler->subcompile($this->getNode('node')); - } -} - -class_alias('Twig\Node\Expression\Filter\DefaultFilter', 'Twig_Node_Expression_Filter_Default'); diff --git a/source/vendor/twig/twig/src/Node/Expression/FilterExpression.php b/source/vendor/twig/twig/src/Node/Expression/FilterExpression.php deleted file mode 100644 index 6131c2f..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/FilterExpression.php +++ /dev/null @@ -1,47 +0,0 @@ - $node, 'filter' => $filterName, 'arguments' => $arguments], [], $lineno, $tag); - } - - public function compile(Compiler $compiler) - { - $name = $this->getNode('filter')->getAttribute('value'); - $filter = $compiler->getEnvironment()->getFilter($name); - - $this->setAttribute('name', $name); - $this->setAttribute('type', 'filter'); - $this->setAttribute('thing', $filter); - $this->setAttribute('needs_environment', $filter->needsEnvironment()); - $this->setAttribute('needs_context', $filter->needsContext()); - $this->setAttribute('arguments', $filter->getArguments()); - if ($filter instanceof \Twig_FilterCallableInterface || $filter instanceof TwigFilter) { - $this->setAttribute('callable', $filter->getCallable()); - } - if ($filter instanceof TwigFilter) { - $this->setAttribute('is_variadic', $filter->isVariadic()); - } - - $this->compileCallable($compiler); - } -} - -class_alias('Twig\Node\Expression\FilterExpression', 'Twig_Node_Expression_Filter'); diff --git a/source/vendor/twig/twig/src/Node/Expression/FunctionExpression.php b/source/vendor/twig/twig/src/Node/Expression/FunctionExpression.php deleted file mode 100644 index cf2c72b..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/FunctionExpression.php +++ /dev/null @@ -1,51 +0,0 @@ - $arguments], ['name' => $name, 'is_defined_test' => false], $lineno); - } - - public function compile(Compiler $compiler) - { - $name = $this->getAttribute('name'); - $function = $compiler->getEnvironment()->getFunction($name); - - $this->setAttribute('name', $name); - $this->setAttribute('type', 'function'); - $this->setAttribute('thing', $function); - $this->setAttribute('needs_environment', $function->needsEnvironment()); - $this->setAttribute('needs_context', $function->needsContext()); - $this->setAttribute('arguments', $function->getArguments()); - if ($function instanceof \Twig_FunctionCallableInterface || $function instanceof TwigFunction) { - $callable = $function->getCallable(); - if ('constant' === $name && $this->getAttribute('is_defined_test')) { - $callable = 'twig_constant_is_defined'; - } - - $this->setAttribute('callable', $callable); - } - if ($function instanceof TwigFunction) { - $this->setAttribute('is_variadic', $function->isVariadic()); - } - - $this->compileCallable($compiler); - } -} - -class_alias('Twig\Node\Expression\FunctionExpression', 'Twig_Node_Expression_Function'); diff --git a/source/vendor/twig/twig/src/Node/Expression/GetAttrExpression.php b/source/vendor/twig/twig/src/Node/Expression/GetAttrExpression.php deleted file mode 100644 index b8855f4..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/GetAttrExpression.php +++ /dev/null @@ -1,80 +0,0 @@ - $node, 'attribute' => $attribute]; - if (null !== $arguments) { - $nodes['arguments'] = $arguments; - } - - parent::__construct($nodes, ['type' => $type, 'is_defined_test' => false, 'ignore_strict_check' => false, 'disable_c_ext' => false], $lineno); - } - - public function compile(Compiler $compiler) - { - if ($this->getAttribute('disable_c_ext')) { - @trigger_error(sprintf('Using the "disable_c_ext" attribute on %s is deprecated since version 1.30 and will be removed in 2.0.', __CLASS__), \E_USER_DEPRECATED); - } - - if (\function_exists('twig_template_get_attributes') && !$this->getAttribute('disable_c_ext')) { - $compiler->raw('twig_template_get_attributes($this, '); - } else { - $compiler->raw('$this->getAttribute('); - } - - if ($this->getAttribute('ignore_strict_check')) { - $this->getNode('node')->setAttribute('ignore_strict_check', true); - } - - $compiler->subcompile($this->getNode('node')); - - $compiler->raw(', ')->subcompile($this->getNode('attribute')); - - // only generate optional arguments when needed (to make generated code more readable) - $needFourth = $this->getAttribute('ignore_strict_check'); - $needThird = $needFourth || $this->getAttribute('is_defined_test'); - $needSecond = $needThird || Template::ANY_CALL !== $this->getAttribute('type'); - $needFirst = $needSecond || $this->hasNode('arguments'); - - if ($needFirst) { - if ($this->hasNode('arguments')) { - $compiler->raw(', ')->subcompile($this->getNode('arguments')); - } else { - $compiler->raw(', []'); - } - } - - if ($needSecond) { - $compiler->raw(', ')->repr($this->getAttribute('type')); - } - - if ($needThird) { - $compiler->raw(', ')->repr($this->getAttribute('is_defined_test')); - } - - if ($needFourth) { - $compiler->raw(', ')->repr($this->getAttribute('ignore_strict_check')); - } - - $compiler->raw(')'); - } -} - -class_alias('Twig\Node\Expression\GetAttrExpression', 'Twig_Node_Expression_GetAttr'); diff --git a/source/vendor/twig/twig/src/Node/Expression/InlinePrint.php b/source/vendor/twig/twig/src/Node/Expression/InlinePrint.php deleted file mode 100644 index 469e736..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/InlinePrint.php +++ /dev/null @@ -1,35 +0,0 @@ - $node], [], $lineno); - } - - public function compile(Compiler $compiler) - { - $compiler - ->raw('print (') - ->subcompile($this->getNode('node')) - ->raw(')') - ; - } -} diff --git a/source/vendor/twig/twig/src/Node/Expression/MethodCallExpression.php b/source/vendor/twig/twig/src/Node/Expression/MethodCallExpression.php deleted file mode 100644 index f631124..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/MethodCallExpression.php +++ /dev/null @@ -1,48 +0,0 @@ - $node, 'arguments' => $arguments], ['method' => $method, 'safe' => false], $lineno); - - if ($node instanceof NameExpression) { - $node->setAttribute('always_defined', true); - } - } - - public function compile(Compiler $compiler) - { - $compiler - ->subcompile($this->getNode('node')) - ->raw('->') - ->raw($this->getAttribute('method')) - ->raw('(') - ; - $first = true; - foreach ($this->getNode('arguments')->getKeyValuePairs() as $pair) { - if (!$first) { - $compiler->raw(', '); - } - $first = false; - - $compiler->subcompile($pair['value']); - } - $compiler->raw(')'); - } -} - -class_alias('Twig\Node\Expression\MethodCallExpression', 'Twig_Node_Expression_MethodCall'); diff --git a/source/vendor/twig/twig/src/Node/Expression/NameExpression.php b/source/vendor/twig/twig/src/Node/Expression/NameExpression.php deleted file mode 100644 index e7be5ff..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/NameExpression.php +++ /dev/null @@ -1,119 +0,0 @@ - '$this', - '_context' => '$context', - '_charset' => '$this->env->getCharset()', - ]; - - public function __construct($name, $lineno) - { - parent::__construct([], ['name' => $name, 'is_defined_test' => false, 'ignore_strict_check' => false, 'always_defined' => false], $lineno); - } - - public function compile(Compiler $compiler) - { - $name = $this->getAttribute('name'); - - $compiler->addDebugInfo($this); - - if ($this->getAttribute('is_defined_test')) { - if ($this->isSpecial()) { - $compiler->repr(true); - } elseif (\PHP_VERSION_ID >= 70400) { - $compiler - ->raw('array_key_exists(') - ->string($name) - ->raw(', $context)') - ; - } else { - $compiler - ->raw('(isset($context[') - ->string($name) - ->raw(']) || array_key_exists(') - ->string($name) - ->raw(', $context))') - ; - } - } elseif ($this->isSpecial()) { - $compiler->raw($this->specialVars[$name]); - } elseif ($this->getAttribute('always_defined')) { - $compiler - ->raw('$context[') - ->string($name) - ->raw(']') - ; - } else { - if (\PHP_VERSION_ID >= 70000) { - // use PHP 7 null coalescing operator - $compiler - ->raw('($context[') - ->string($name) - ->raw('] ?? ') - ; - - if ($this->getAttribute('ignore_strict_check') || !$compiler->getEnvironment()->isStrictVariables()) { - $compiler->raw('null)'); - } else { - $compiler->raw('$this->getContext($context, ')->string($name)->raw('))'); - } - } elseif (\PHP_VERSION_ID >= 50400) { - // PHP 5.4 ternary operator performance was optimized - $compiler - ->raw('(isset($context[') - ->string($name) - ->raw(']) ? $context[') - ->string($name) - ->raw('] : ') - ; - - if ($this->getAttribute('ignore_strict_check') || !$compiler->getEnvironment()->isStrictVariables()) { - $compiler->raw('null)'); - } else { - $compiler->raw('$this->getContext($context, ')->string($name)->raw('))'); - } - } else { - $compiler - ->raw('$this->getContext($context, ') - ->string($name) - ; - - if ($this->getAttribute('ignore_strict_check')) { - $compiler->raw(', true'); - } - - $compiler - ->raw(')') - ; - } - } - } - - public function isSpecial() - { - return isset($this->specialVars[$this->getAttribute('name')]); - } - - public function isSimple() - { - return !$this->isSpecial() && !$this->getAttribute('is_defined_test'); - } -} - -class_alias('Twig\Node\Expression\NameExpression', 'Twig_Node_Expression_Name'); diff --git a/source/vendor/twig/twig/src/Node/Expression/NullCoalesceExpression.php b/source/vendor/twig/twig/src/Node/Expression/NullCoalesceExpression.php deleted file mode 100644 index 917d31a..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/NullCoalesceExpression.php +++ /dev/null @@ -1,62 +0,0 @@ -getTemplateLine()); - // for "block()", we don't need the null test as the return value is always a string - if (!$left instanceof BlockReferenceExpression) { - $test = new AndBinary( - $test, - new NotUnary(new NullTest($left, 'null', new Node(), $left->getTemplateLine()), $left->getTemplateLine()), - $left->getTemplateLine() - ); - } - - parent::__construct($test, $left, $right, $lineno); - } - - public function compile(Compiler $compiler) - { - /* - * This optimizes only one case. PHP 7 also supports more complex expressions - * that can return null. So, for instance, if log is defined, log("foo") ?? "..." works, - * but log($a["foo"]) ?? "..." does not if $a["foo"] is not defined. More advanced - * cases might be implemented as an optimizer node visitor, but has not been done - * as benefits are probably not worth the added complexity. - */ - if (\PHP_VERSION_ID >= 70000 && $this->getNode('expr2') instanceof NameExpression) { - $this->getNode('expr2')->setAttribute('always_defined', true); - $compiler - ->raw('((') - ->subcompile($this->getNode('expr2')) - ->raw(') ?? (') - ->subcompile($this->getNode('expr3')) - ->raw('))') - ; - } else { - parent::compile($compiler); - } - } -} - -class_alias('Twig\Node\Expression\NullCoalesceExpression', 'Twig_Node_Expression_NullCoalesce'); diff --git a/source/vendor/twig/twig/src/Node/Expression/ParentExpression.php b/source/vendor/twig/twig/src/Node/Expression/ParentExpression.php deleted file mode 100644 index 1247283..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/ParentExpression.php +++ /dev/null @@ -1,48 +0,0 @@ - - */ -class ParentExpression extends AbstractExpression -{ - public function __construct($name, $lineno, $tag = null) - { - parent::__construct([], ['output' => false, 'name' => $name], $lineno, $tag); - } - - public function compile(Compiler $compiler) - { - if ($this->getAttribute('output')) { - $compiler - ->addDebugInfo($this) - ->write('$this->displayParentBlock(') - ->string($this->getAttribute('name')) - ->raw(", \$context, \$blocks);\n") - ; - } else { - $compiler - ->raw('$this->renderParentBlock(') - ->string($this->getAttribute('name')) - ->raw(', $context, $blocks)') - ; - } - } -} - -class_alias('Twig\Node\Expression\ParentExpression', 'Twig_Node_Expression_Parent'); diff --git a/source/vendor/twig/twig/src/Node/Expression/TempNameExpression.php b/source/vendor/twig/twig/src/Node/Expression/TempNameExpression.php deleted file mode 100644 index ce0a158..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/TempNameExpression.php +++ /dev/null @@ -1,33 +0,0 @@ - $name], $lineno); - } - - public function compile(Compiler $compiler) - { - $compiler - ->raw('$_') - ->raw($this->getAttribute('name')) - ->raw('_') - ; - } -} - -class_alias('Twig\Node\Expression\TempNameExpression', 'Twig_Node_Expression_TempName'); diff --git a/source/vendor/twig/twig/src/Node/Expression/Test/ConstantTest.php b/source/vendor/twig/twig/src/Node/Expression/Test/ConstantTest.php deleted file mode 100644 index 78353a8..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/Test/ConstantTest.php +++ /dev/null @@ -1,51 +0,0 @@ - - */ -class ConstantTest extends TestExpression -{ - public function compile(Compiler $compiler) - { - $compiler - ->raw('(') - ->subcompile($this->getNode('node')) - ->raw(' === constant(') - ; - - if ($this->getNode('arguments')->hasNode(1)) { - $compiler - ->raw('get_class(') - ->subcompile($this->getNode('arguments')->getNode(1)) - ->raw(')."::".') - ; - } - - $compiler - ->subcompile($this->getNode('arguments')->getNode(0)) - ->raw('))') - ; - } -} - -class_alias('Twig\Node\Expression\Test\ConstantTest', 'Twig_Node_Expression_Test_Constant'); diff --git a/source/vendor/twig/twig/src/Node/Expression/Test/DefinedTest.php b/source/vendor/twig/twig/src/Node/Expression/Test/DefinedTest.php deleted file mode 100644 index e2b3a0b..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/Test/DefinedTest.php +++ /dev/null @@ -1,71 +0,0 @@ - - */ -class DefinedTest extends TestExpression -{ - public function __construct(\Twig_NodeInterface $node, $name, ?\Twig_NodeInterface $arguments, $lineno) - { - if ($node instanceof NameExpression) { - $node->setAttribute('is_defined_test', true); - } elseif ($node instanceof GetAttrExpression) { - $node->setAttribute('is_defined_test', true); - $this->changeIgnoreStrictCheck($node); - } elseif ($node instanceof BlockReferenceExpression) { - $node->setAttribute('is_defined_test', true); - } elseif ($node instanceof FunctionExpression && 'constant' === $node->getAttribute('name')) { - $node->setAttribute('is_defined_test', true); - } elseif ($node instanceof ConstantExpression || $node instanceof ArrayExpression) { - $node = new ConstantExpression(true, $node->getTemplateLine()); - } else { - throw new SyntaxError('The "defined" test only works with simple variables.', $lineno); - } - - parent::__construct($node, $name, $arguments, $lineno); - } - - protected function changeIgnoreStrictCheck(GetAttrExpression $node) - { - $node->setAttribute('ignore_strict_check', true); - - if ($node->getNode('node') instanceof GetAttrExpression) { - $this->changeIgnoreStrictCheck($node->getNode('node')); - } - } - - public function compile(Compiler $compiler) - { - $compiler->subcompile($this->getNode('node')); - } -} - -class_alias('Twig\Node\Expression\Test\DefinedTest', 'Twig_Node_Expression_Test_Defined'); diff --git a/source/vendor/twig/twig/src/Node/Expression/Test/DivisiblebyTest.php b/source/vendor/twig/twig/src/Node/Expression/Test/DivisiblebyTest.php deleted file mode 100644 index 05c8ad8..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/Test/DivisiblebyTest.php +++ /dev/null @@ -1,38 +0,0 @@ - - */ -class DivisiblebyTest extends TestExpression -{ - public function compile(Compiler $compiler) - { - $compiler - ->raw('(0 == ') - ->subcompile($this->getNode('node')) - ->raw(' % ') - ->subcompile($this->getNode('arguments')->getNode(0)) - ->raw(')') - ; - } -} - -class_alias('Twig\Node\Expression\Test\DivisiblebyTest', 'Twig_Node_Expression_Test_Divisibleby'); diff --git a/source/vendor/twig/twig/src/Node/Expression/Test/EvenTest.php b/source/vendor/twig/twig/src/Node/Expression/Test/EvenTest.php deleted file mode 100644 index 3b955d2..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/Test/EvenTest.php +++ /dev/null @@ -1,37 +0,0 @@ - - */ -class EvenTest extends TestExpression -{ - public function compile(Compiler $compiler) - { - $compiler - ->raw('(') - ->subcompile($this->getNode('node')) - ->raw(' % 2 == 0') - ->raw(')') - ; - } -} - -class_alias('Twig\Node\Expression\Test\EvenTest', 'Twig_Node_Expression_Test_Even'); diff --git a/source/vendor/twig/twig/src/Node/Expression/Test/NullTest.php b/source/vendor/twig/twig/src/Node/Expression/Test/NullTest.php deleted file mode 100644 index 24d3997..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/Test/NullTest.php +++ /dev/null @@ -1,36 +0,0 @@ - - */ -class NullTest extends TestExpression -{ - public function compile(Compiler $compiler) - { - $compiler - ->raw('(null === ') - ->subcompile($this->getNode('node')) - ->raw(')') - ; - } -} - -class_alias('Twig\Node\Expression\Test\NullTest', 'Twig_Node_Expression_Test_Null'); diff --git a/source/vendor/twig/twig/src/Node/Expression/Test/OddTest.php b/source/vendor/twig/twig/src/Node/Expression/Test/OddTest.php deleted file mode 100644 index 189e51e..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/Test/OddTest.php +++ /dev/null @@ -1,37 +0,0 @@ - - */ -class OddTest extends TestExpression -{ - public function compile(Compiler $compiler) - { - $compiler - ->raw('(') - ->subcompile($this->getNode('node')) - ->raw(' % 2 != 0') - ->raw(')') - ; - } -} - -class_alias('Twig\Node\Expression\Test\OddTest', 'Twig_Node_Expression_Test_Odd'); diff --git a/source/vendor/twig/twig/src/Node/Expression/Test/SameasTest.php b/source/vendor/twig/twig/src/Node/Expression/Test/SameasTest.php deleted file mode 100644 index 75f2b82..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/Test/SameasTest.php +++ /dev/null @@ -1,36 +0,0 @@ - - */ -class SameasTest extends TestExpression -{ - public function compile(Compiler $compiler) - { - $compiler - ->raw('(') - ->subcompile($this->getNode('node')) - ->raw(' === ') - ->subcompile($this->getNode('arguments')->getNode(0)) - ->raw(')') - ; - } -} - -class_alias('Twig\Node\Expression\Test\SameasTest', 'Twig_Node_Expression_Test_Sameas'); diff --git a/source/vendor/twig/twig/src/Node/Expression/TestExpression.php b/source/vendor/twig/twig/src/Node/Expression/TestExpression.php deleted file mode 100644 index fa3c18f..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/TestExpression.php +++ /dev/null @@ -1,51 +0,0 @@ - $node]; - if (null !== $arguments) { - $nodes['arguments'] = $arguments; - } - - parent::__construct($nodes, ['name' => $name], $lineno); - } - - public function compile(Compiler $compiler) - { - $name = $this->getAttribute('name'); - $test = $compiler->getEnvironment()->getTest($name); - - $this->setAttribute('name', $name); - $this->setAttribute('type', 'test'); - $this->setAttribute('thing', $test); - if ($test instanceof TwigTest) { - $this->setAttribute('arguments', $test->getArguments()); - } - if ($test instanceof \Twig_TestCallableInterface || $test instanceof TwigTest) { - $this->setAttribute('callable', $test->getCallable()); - } - if ($test instanceof TwigTest) { - $this->setAttribute('is_variadic', $test->isVariadic()); - } - - $this->compileCallable($compiler); - } -} - -class_alias('Twig\Node\Expression\TestExpression', 'Twig_Node_Expression_Test'); diff --git a/source/vendor/twig/twig/src/Node/Expression/Unary/AbstractUnary.php b/source/vendor/twig/twig/src/Node/Expression/Unary/AbstractUnary.php deleted file mode 100644 index 415c3d4..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/Unary/AbstractUnary.php +++ /dev/null @@ -1,35 +0,0 @@ - $node], [], $lineno); - } - - public function compile(Compiler $compiler) - { - $compiler->raw(' '); - $this->operator($compiler); - $compiler->subcompile($this->getNode('node')); - } - - abstract public function operator(Compiler $compiler); -} - -class_alias('Twig\Node\Expression\Unary\AbstractUnary', 'Twig_Node_Expression_Unary'); diff --git a/source/vendor/twig/twig/src/Node/Expression/Unary/NegUnary.php b/source/vendor/twig/twig/src/Node/Expression/Unary/NegUnary.php deleted file mode 100644 index dfb6f54..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/Unary/NegUnary.php +++ /dev/null @@ -1,25 +0,0 @@ -raw('-'); - } -} - -class_alias('Twig\Node\Expression\Unary\NegUnary', 'Twig_Node_Expression_Unary_Neg'); diff --git a/source/vendor/twig/twig/src/Node/Expression/Unary/NotUnary.php b/source/vendor/twig/twig/src/Node/Expression/Unary/NotUnary.php deleted file mode 100644 index 7bdde96..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/Unary/NotUnary.php +++ /dev/null @@ -1,25 +0,0 @@ -raw('!'); - } -} - -class_alias('Twig\Node\Expression\Unary\NotUnary', 'Twig_Node_Expression_Unary_Not'); diff --git a/source/vendor/twig/twig/src/Node/Expression/Unary/PosUnary.php b/source/vendor/twig/twig/src/Node/Expression/Unary/PosUnary.php deleted file mode 100644 index 52d5d0c..0000000 --- a/source/vendor/twig/twig/src/Node/Expression/Unary/PosUnary.php +++ /dev/null @@ -1,25 +0,0 @@ -raw('+'); - } -} - -class_alias('Twig\Node\Expression\Unary\PosUnary', 'Twig_Node_Expression_Unary_Pos'); diff --git a/source/vendor/twig/twig/src/Node/FlushNode.php b/source/vendor/twig/twig/src/Node/FlushNode.php deleted file mode 100644 index 6cbc489..0000000 --- a/source/vendor/twig/twig/src/Node/FlushNode.php +++ /dev/null @@ -1,37 +0,0 @@ - - */ -class FlushNode extends Node -{ - public function __construct($lineno, $tag) - { - parent::__construct([], [], $lineno, $tag); - } - - public function compile(Compiler $compiler) - { - $compiler - ->addDebugInfo($this) - ->write("flush();\n") - ; - } -} - -class_alias('Twig\Node\FlushNode', 'Twig_Node_Flush'); diff --git a/source/vendor/twig/twig/src/Node/ForLoopNode.php b/source/vendor/twig/twig/src/Node/ForLoopNode.php deleted file mode 100644 index 3902093..0000000 --- a/source/vendor/twig/twig/src/Node/ForLoopNode.php +++ /dev/null @@ -1,56 +0,0 @@ - - */ -class ForLoopNode extends Node -{ - public function __construct($lineno, $tag = null) - { - parent::__construct([], ['with_loop' => false, 'ifexpr' => false, 'else' => false], $lineno, $tag); - } - - public function compile(Compiler $compiler) - { - if ($this->getAttribute('else')) { - $compiler->write("\$context['_iterated'] = true;\n"); - } - - if ($this->getAttribute('with_loop')) { - $compiler - ->write("++\$context['loop']['index0'];\n") - ->write("++\$context['loop']['index'];\n") - ->write("\$context['loop']['first'] = false;\n") - ; - - if (!$this->getAttribute('ifexpr')) { - $compiler - ->write("if (isset(\$context['loop']['length'])) {\n") - ->indent() - ->write("--\$context['loop']['revindex0'];\n") - ->write("--\$context['loop']['revindex'];\n") - ->write("\$context['loop']['last'] = 0 === \$context['loop']['revindex0'];\n") - ->outdent() - ->write("}\n") - ; - } - } - } -} - -class_alias('Twig\Node\ForLoopNode', 'Twig_Node_ForLoop'); diff --git a/source/vendor/twig/twig/src/Node/ForNode.php b/source/vendor/twig/twig/src/Node/ForNode.php deleted file mode 100644 index 111da37..0000000 --- a/source/vendor/twig/twig/src/Node/ForNode.php +++ /dev/null @@ -1,119 +0,0 @@ - - */ -class ForNode extends Node -{ - protected $loop; - - public function __construct(AssignNameExpression $keyTarget, AssignNameExpression $valueTarget, AbstractExpression $seq, ?AbstractExpression $ifexpr, \Twig_NodeInterface $body, ?\Twig_NodeInterface $else, $lineno, $tag = null) - { - $body = new Node([$body, $this->loop = new ForLoopNode($lineno, $tag)]); - - if (null !== $ifexpr) { - $body = new IfNode(new Node([$ifexpr, $body]), null, $lineno, $tag); - } - - $nodes = ['key_target' => $keyTarget, 'value_target' => $valueTarget, 'seq' => $seq, 'body' => $body]; - if (null !== $else) { - $nodes['else'] = $else; - } - - parent::__construct($nodes, ['with_loop' => true, 'ifexpr' => null !== $ifexpr], $lineno, $tag); - } - - public function compile(Compiler $compiler) - { - $compiler - ->addDebugInfo($this) - ->write("\$context['_parent'] = \$context;\n") - ->write("\$context['_seq'] = twig_ensure_traversable(") - ->subcompile($this->getNode('seq')) - ->raw(");\n") - ; - - if ($this->hasNode('else')) { - $compiler->write("\$context['_iterated'] = false;\n"); - } - - if ($this->getAttribute('with_loop')) { - $compiler - ->write("\$context['loop'] = [\n") - ->write(" 'parent' => \$context['_parent'],\n") - ->write(" 'index0' => 0,\n") - ->write(" 'index' => 1,\n") - ->write(" 'first' => true,\n") - ->write("];\n") - ; - - if (!$this->getAttribute('ifexpr')) { - $compiler - ->write("if (is_array(\$context['_seq']) || (is_object(\$context['_seq']) && \$context['_seq'] instanceof \Countable)) {\n") - ->indent() - ->write("\$length = count(\$context['_seq']);\n") - ->write("\$context['loop']['revindex0'] = \$length - 1;\n") - ->write("\$context['loop']['revindex'] = \$length;\n") - ->write("\$context['loop']['length'] = \$length;\n") - ->write("\$context['loop']['last'] = 1 === \$length;\n") - ->outdent() - ->write("}\n") - ; - } - } - - $this->loop->setAttribute('else', $this->hasNode('else')); - $this->loop->setAttribute('with_loop', $this->getAttribute('with_loop')); - $this->loop->setAttribute('ifexpr', $this->getAttribute('ifexpr')); - - $compiler - ->write("foreach (\$context['_seq'] as ") - ->subcompile($this->getNode('key_target')) - ->raw(' => ') - ->subcompile($this->getNode('value_target')) - ->raw(") {\n") - ->indent() - ->subcompile($this->getNode('body')) - ->outdent() - ->write("}\n") - ; - - if ($this->hasNode('else')) { - $compiler - ->write("if (!\$context['_iterated']) {\n") - ->indent() - ->subcompile($this->getNode('else')) - ->outdent() - ->write("}\n") - ; - } - - $compiler->write("\$_parent = \$context['_parent'];\n"); - - // remove some "private" loop variables (needed for nested loops) - $compiler->write('unset($context[\'_seq\'], $context[\'_iterated\'], $context[\''.$this->getNode('key_target')->getAttribute('name').'\'], $context[\''.$this->getNode('value_target')->getAttribute('name').'\'], $context[\'_parent\'], $context[\'loop\']);'."\n"); - - // keep the values set in the inner context for variables defined in the outer context - $compiler->write("\$context = array_intersect_key(\$context, \$_parent) + \$_parent;\n"); - } -} - -class_alias('Twig\Node\ForNode', 'Twig_Node_For'); diff --git a/source/vendor/twig/twig/src/Node/IfNode.php b/source/vendor/twig/twig/src/Node/IfNode.php deleted file mode 100644 index da2ad34..0000000 --- a/source/vendor/twig/twig/src/Node/IfNode.php +++ /dev/null @@ -1,72 +0,0 @@ - - */ -class IfNode extends Node -{ - public function __construct(\Twig_NodeInterface $tests, ?\Twig_NodeInterface $else, $lineno, $tag = null) - { - $nodes = ['tests' => $tests]; - if (null !== $else) { - $nodes['else'] = $else; - } - - parent::__construct($nodes, [], $lineno, $tag); - } - - public function compile(Compiler $compiler) - { - $compiler->addDebugInfo($this); - for ($i = 0, $count = \count($this->getNode('tests')); $i < $count; $i += 2) { - if ($i > 0) { - $compiler - ->outdent() - ->write('} elseif (') - ; - } else { - $compiler - ->write('if (') - ; - } - - $compiler - ->subcompile($this->getNode('tests')->getNode($i)) - ->raw(") {\n") - ->indent() - ->subcompile($this->getNode('tests')->getNode($i + 1)) - ; - } - - if ($this->hasNode('else')) { - $compiler - ->outdent() - ->write("} else {\n") - ->indent() - ->subcompile($this->getNode('else')) - ; - } - - $compiler - ->outdent() - ->write("}\n"); - } -} - -class_alias('Twig\Node\IfNode', 'Twig_Node_If'); diff --git a/source/vendor/twig/twig/src/Node/ImportNode.php b/source/vendor/twig/twig/src/Node/ImportNode.php deleted file mode 100644 index 236db89..0000000 --- a/source/vendor/twig/twig/src/Node/ImportNode.php +++ /dev/null @@ -1,57 +0,0 @@ - - */ -class ImportNode extends Node -{ - public function __construct(AbstractExpression $expr, AbstractExpression $var, $lineno, $tag = null) - { - parent::__construct(['expr' => $expr, 'var' => $var], [], $lineno, $tag); - } - - public function compile(Compiler $compiler) - { - $compiler - ->addDebugInfo($this) - ->write('') - ->subcompile($this->getNode('var')) - ->raw(' = ') - ; - - if ($this->getNode('expr') instanceof NameExpression && '_self' === $this->getNode('expr')->getAttribute('name')) { - $compiler->raw('$this'); - } else { - $compiler - ->raw('$this->loadTemplate(') - ->subcompile($this->getNode('expr')) - ->raw(', ') - ->repr($this->getTemplateName()) - ->raw(', ') - ->repr($this->getTemplateLine()) - ->raw(')->unwrap()') - ; - } - - $compiler->raw(";\n"); - } -} - -class_alias('Twig\Node\ImportNode', 'Twig_Node_Import'); diff --git a/source/vendor/twig/twig/src/Node/IncludeNode.php b/source/vendor/twig/twig/src/Node/IncludeNode.php deleted file mode 100644 index d0b6184..0000000 --- a/source/vendor/twig/twig/src/Node/IncludeNode.php +++ /dev/null @@ -1,108 +0,0 @@ - - */ -class IncludeNode extends Node implements NodeOutputInterface -{ - public function __construct(AbstractExpression $expr, ?AbstractExpression $variables, $only, $ignoreMissing, $lineno, $tag = null) - { - $nodes = ['expr' => $expr]; - if (null !== $variables) { - $nodes['variables'] = $variables; - } - - parent::__construct($nodes, ['only' => (bool) $only, 'ignore_missing' => (bool) $ignoreMissing], $lineno, $tag); - } - - public function compile(Compiler $compiler) - { - $compiler->addDebugInfo($this); - - if ($this->getAttribute('ignore_missing')) { - $template = $compiler->getVarName(); - - $compiler - ->write(sprintf("$%s = null;\n", $template)) - ->write("try {\n") - ->indent() - ->write(sprintf('$%s = ', $template)) - ; - - $this->addGetTemplate($compiler); - - $compiler - ->raw(";\n") - ->outdent() - ->write("} catch (LoaderError \$e) {\n") - ->indent() - ->write("// ignore missing template\n") - ->outdent() - ->write("}\n") - ->write(sprintf("if ($%s) {\n", $template)) - ->indent() - ->write(sprintf('$%s->display(', $template)) - ; - $this->addTemplateArguments($compiler); - $compiler - ->raw(");\n") - ->outdent() - ->write("}\n") - ; - } else { - $this->addGetTemplate($compiler); - $compiler->raw('->display('); - $this->addTemplateArguments($compiler); - $compiler->raw(");\n"); - } - } - - protected function addGetTemplate(Compiler $compiler) - { - $compiler - ->write('$this->loadTemplate(') - ->subcompile($this->getNode('expr')) - ->raw(', ') - ->repr($this->getTemplateName()) - ->raw(', ') - ->repr($this->getTemplateLine()) - ->raw(')') - ; - } - - protected function addTemplateArguments(Compiler $compiler) - { - if (!$this->hasNode('variables')) { - $compiler->raw(false === $this->getAttribute('only') ? '$context' : '[]'); - } elseif (false === $this->getAttribute('only')) { - $compiler - ->raw('twig_array_merge($context, ') - ->subcompile($this->getNode('variables')) - ->raw(')') - ; - } else { - $compiler->raw('twig_to_array('); - $compiler->subcompile($this->getNode('variables')); - $compiler->raw(')'); - } - } -} - -class_alias('Twig\Node\IncludeNode', 'Twig_Node_Include'); diff --git a/source/vendor/twig/twig/src/Node/MacroNode.php b/source/vendor/twig/twig/src/Node/MacroNode.php deleted file mode 100644 index 50b0a8d..0000000 --- a/source/vendor/twig/twig/src/Node/MacroNode.php +++ /dev/null @@ -1,136 +0,0 @@ - - */ -class MacroNode extends Node -{ - public const VARARGS_NAME = 'varargs'; - - public function __construct($name, \Twig_NodeInterface $body, \Twig_NodeInterface $arguments, $lineno, $tag = null) - { - foreach ($arguments as $argumentName => $argument) { - if (self::VARARGS_NAME === $argumentName) { - throw new SyntaxError(sprintf('The argument "%s" in macro "%s" cannot be defined because the variable "%s" is reserved for arbitrary arguments.', self::VARARGS_NAME, $name, self::VARARGS_NAME), $argument->getTemplateLine(), $argument->getSourceContext()); - } - } - - parent::__construct(['body' => $body, 'arguments' => $arguments], ['name' => $name], $lineno, $tag); - } - - public function compile(Compiler $compiler) - { - $compiler - ->addDebugInfo($this) - ->write(sprintf('public function get%s(', $this->getAttribute('name'))) - ; - - $count = \count($this->getNode('arguments')); - $pos = 0; - foreach ($this->getNode('arguments') as $name => $default) { - $compiler - ->raw('$__'.$name.'__ = ') - ->subcompile($default) - ; - - if (++$pos < $count) { - $compiler->raw(', '); - } - } - - if (\PHP_VERSION_ID >= 50600) { - if ($count) { - $compiler->raw(', '); - } - - $compiler->raw('...$__varargs__'); - } - - $compiler - ->raw(")\n") - ->write("{\n") - ->indent() - ; - - $compiler - ->write("\$context = \$this->env->mergeGlobals([\n") - ->indent() - ; - - foreach ($this->getNode('arguments') as $name => $default) { - $compiler - ->write('') - ->string($name) - ->raw(' => $__'.$name.'__') - ->raw(",\n") - ; - } - - $compiler - ->write('') - ->string(self::VARARGS_NAME) - ->raw(' => ') - ; - - if (\PHP_VERSION_ID >= 50600) { - $compiler->raw("\$__varargs__,\n"); - } else { - $compiler - ->raw('func_num_args() > ') - ->repr($count) - ->raw(' ? array_slice(func_get_args(), ') - ->repr($count) - ->raw(") : [],\n") - ; - } - - $compiler - ->outdent() - ->write("]);\n\n") - ->write("\$blocks = [];\n\n") - ; - if ($compiler->getEnvironment()->isDebug()) { - $compiler->write("ob_start();\n"); - } else { - $compiler->write("ob_start(function () { return ''; });\n"); - } - $compiler - ->write("try {\n") - ->indent() - ->subcompile($this->getNode('body')) - ->outdent() - ->write("} catch (\Exception \$e) {\n") - ->indent() - ->write("ob_end_clean();\n\n") - ->write("throw \$e;\n") - ->outdent() - ->write("} catch (\Throwable \$e) {\n") - ->indent() - ->write("ob_end_clean();\n\n") - ->write("throw \$e;\n") - ->outdent() - ->write("}\n\n") - ->write("return ('' === \$tmp = ob_get_clean()) ? '' : new Markup(\$tmp, \$this->env->getCharset());\n") - ->outdent() - ->write("}\n\n") - ; - } -} - -class_alias('Twig\Node\MacroNode', 'Twig_Node_Macro'); diff --git a/source/vendor/twig/twig/src/Node/ModuleNode.php b/source/vendor/twig/twig/src/Node/ModuleNode.php deleted file mode 100644 index 325b925..0000000 --- a/source/vendor/twig/twig/src/Node/ModuleNode.php +++ /dev/null @@ -1,492 +0,0 @@ - - */ -class ModuleNode extends Node -{ - public function __construct(\Twig_NodeInterface $body, ?AbstractExpression $parent, \Twig_NodeInterface $blocks, \Twig_NodeInterface $macros, \Twig_NodeInterface $traits, $embeddedTemplates, $name, $source = '') - { - if (!$name instanceof Source) { - @trigger_error(sprintf('Passing a string as the $name argument of %s() is deprecated since version 1.27. Pass a \Twig\Source instance instead.', __METHOD__), \E_USER_DEPRECATED); - $source = new Source($source, $name); - } else { - $source = $name; - } - - $nodes = [ - 'body' => $body, - 'blocks' => $blocks, - 'macros' => $macros, - 'traits' => $traits, - 'display_start' => new Node(), - 'display_end' => new Node(), - 'constructor_start' => new Node(), - 'constructor_end' => new Node(), - 'class_end' => new Node(), - ]; - if (null !== $parent) { - $nodes['parent'] = $parent; - } - - // embedded templates are set as attributes so that they are only visited once by the visitors - parent::__construct($nodes, [ - // source to be remove in 2.0 - 'source' => $source->getCode(), - // filename to be remove in 2.0 (use getTemplateName() instead) - 'filename' => $source->getName(), - 'index' => null, - 'embedded_templates' => $embeddedTemplates, - ], 1); - - // populate the template name of all node children - $this->setTemplateName($source->getName()); - $this->setSourceContext($source); - } - - public function setIndex($index) - { - $this->setAttribute('index', $index); - } - - public function compile(Compiler $compiler) - { - $this->compileTemplate($compiler); - - foreach ($this->getAttribute('embedded_templates') as $template) { - $compiler->subcompile($template); - } - } - - protected function compileTemplate(Compiler $compiler) - { - if (!$this->getAttribute('index')) { - $compiler->write('compileClassHeader($compiler); - - if ( - \count($this->getNode('blocks')) - || \count($this->getNode('traits')) - || !$this->hasNode('parent') - || $this->getNode('parent') instanceof ConstantExpression - || \count($this->getNode('constructor_start')) - || \count($this->getNode('constructor_end')) - ) { - $this->compileConstructor($compiler); - } - - $this->compileGetParent($compiler); - - $this->compileDisplay($compiler); - - $compiler->subcompile($this->getNode('blocks')); - - $this->compileMacros($compiler); - - $this->compileGetTemplateName($compiler); - - $this->compileIsTraitable($compiler); - - $this->compileDebugInfo($compiler); - - $this->compileGetSource($compiler); - - $this->compileGetSourceContext($compiler); - - $this->compileClassFooter($compiler); - } - - protected function compileGetParent(Compiler $compiler) - { - if (!$this->hasNode('parent')) { - return; - } - $parent = $this->getNode('parent'); - - $compiler - ->write("protected function doGetParent(array \$context)\n", "{\n") - ->indent() - ->addDebugInfo($parent) - ->write('return ') - ; - - if ($parent instanceof ConstantExpression) { - $compiler->subcompile($parent); - } else { - $compiler - ->raw('$this->loadTemplate(') - ->subcompile($parent) - ->raw(', ') - ->repr($this->getSourceContext()->getName()) - ->raw(', ') - ->repr($parent->getTemplateLine()) - ->raw(')') - ; - } - - $compiler - ->raw(";\n") - ->outdent() - ->write("}\n\n") - ; - } - - protected function compileClassHeader(Compiler $compiler) - { - $compiler - ->write("\n\n") - ; - if (!$this->getAttribute('index')) { - $compiler - ->write("use Twig\Environment;\n") - ->write("use Twig\Error\LoaderError;\n") - ->write("use Twig\Error\RuntimeError;\n") - ->write("use Twig\Markup;\n") - ->write("use Twig\Sandbox\SecurityError;\n") - ->write("use Twig\Sandbox\SecurityNotAllowedTagError;\n") - ->write("use Twig\Sandbox\SecurityNotAllowedFilterError;\n") - ->write("use Twig\Sandbox\SecurityNotAllowedFunctionError;\n") - ->write("use Twig\Source;\n") - ->write("use Twig\Template;\n\n") - ; - } - $compiler - // if the template name contains */, add a blank to avoid a PHP parse error - ->write('/* '.str_replace('*/', '* /', $this->getSourceContext()->getName())." */\n") - ->write('class '.$compiler->getEnvironment()->getTemplateClass($this->getSourceContext()->getName(), $this->getAttribute('index'))) - ->raw(sprintf(" extends %s\n", $compiler->getEnvironment()->getBaseTemplateClass())) - ->write("{\n") - ->indent() - ; - } - - protected function compileConstructor(Compiler $compiler) - { - $compiler - ->write("public function __construct(Environment \$env)\n", "{\n") - ->indent() - ->subcompile($this->getNode('constructor_start')) - ->write("parent::__construct(\$env);\n\n") - ; - - // parent - if (!$this->hasNode('parent')) { - $compiler->write("\$this->parent = false;\n\n"); - } - - $countTraits = \count($this->getNode('traits')); - if ($countTraits) { - // traits - foreach ($this->getNode('traits') as $i => $trait) { - $this->compileLoadTemplate($compiler, $trait->getNode('template'), sprintf('$_trait_%s', $i)); - - $node = $trait->getNode('template'); - $compiler - ->addDebugInfo($node) - ->write(sprintf("if (!\$_trait_%s->isTraitable()) {\n", $i)) - ->indent() - ->write("throw new RuntimeError('Template \"'.") - ->subcompile($trait->getNode('template')) - ->raw(".'\" cannot be used as a trait.', ") - ->repr($node->getTemplateLine()) - ->raw(", \$this->getSourceContext());\n") - ->outdent() - ->write("}\n") - ->write(sprintf("\$_trait_%s_blocks = \$_trait_%s->getBlocks();\n\n", $i, $i)) - ; - - foreach ($trait->getNode('targets') as $key => $value) { - $compiler - ->write(sprintf('if (!isset($_trait_%s_blocks[', $i)) - ->string($key) - ->raw("])) {\n") - ->indent() - ->write("throw new RuntimeError(sprintf('Block ") - ->string($key) - ->raw(' is not defined in trait ') - ->subcompile($trait->getNode('template')) - ->raw(".'), ") - ->repr($node->getTemplateLine()) - ->raw(", \$this->getSourceContext());\n") - ->outdent() - ->write("}\n\n") - - ->write(sprintf('$_trait_%s_blocks[', $i)) - ->subcompile($value) - ->raw(sprintf('] = $_trait_%s_blocks[', $i)) - ->string($key) - ->raw(sprintf(']; unset($_trait_%s_blocks[', $i)) - ->string($key) - ->raw("]);\n\n") - ; - } - } - - if ($countTraits > 1) { - $compiler - ->write("\$this->traits = array_merge(\n") - ->indent() - ; - - for ($i = 0; $i < $countTraits; ++$i) { - $compiler - ->write(sprintf('$_trait_%s_blocks'.($i == $countTraits - 1 ? '' : ',')."\n", $i)) - ; - } - - $compiler - ->outdent() - ->write(");\n\n") - ; - } else { - $compiler - ->write("\$this->traits = \$_trait_0_blocks;\n\n") - ; - } - - $compiler - ->write("\$this->blocks = array_merge(\n") - ->indent() - ->write("\$this->traits,\n") - ->write("[\n") - ; - } else { - $compiler - ->write("\$this->blocks = [\n") - ; - } - - // blocks - $compiler - ->indent() - ; - - foreach ($this->getNode('blocks') as $name => $node) { - $compiler - ->write(sprintf("'%s' => [\$this, 'block_%s'],\n", $name, $name)) - ; - } - - if ($countTraits) { - $compiler - ->outdent() - ->write("]\n") - ->outdent() - ->write(");\n") - ; - } else { - $compiler - ->outdent() - ->write("];\n") - ; - } - - $compiler - ->subcompile($this->getNode('constructor_end')) - ->outdent() - ->write("}\n\n") - ; - } - - protected function compileDisplay(Compiler $compiler) - { - $compiler - ->write("protected function doDisplay(array \$context, array \$blocks = [])\n", "{\n") - ->indent() - ->subcompile($this->getNode('display_start')) - ->subcompile($this->getNode('body')) - ; - - if ($this->hasNode('parent')) { - $parent = $this->getNode('parent'); - - $compiler->addDebugInfo($parent); - if ($parent instanceof ConstantExpression) { - $compiler - ->write('$this->parent = $this->loadTemplate(') - ->subcompile($parent) - ->raw(', ') - ->repr($this->getSourceContext()->getName()) - ->raw(', ') - ->repr($parent->getTemplateLine()) - ->raw(");\n") - ; - $compiler->write('$this->parent'); - } else { - $compiler->write('$this->getParent($context)'); - } - $compiler->raw("->display(\$context, array_merge(\$this->blocks, \$blocks));\n"); - } - - $compiler - ->subcompile($this->getNode('display_end')) - ->outdent() - ->write("}\n\n") - ; - } - - protected function compileClassFooter(Compiler $compiler) - { - $compiler - ->subcompile($this->getNode('class_end')) - ->outdent() - ->write("}\n") - ; - } - - protected function compileMacros(Compiler $compiler) - { - $compiler->subcompile($this->getNode('macros')); - } - - protected function compileGetTemplateName(Compiler $compiler) - { - $compiler - ->write("public function getTemplateName()\n", "{\n") - ->indent() - ->write('return ') - ->repr($this->getSourceContext()->getName()) - ->raw(";\n") - ->outdent() - ->write("}\n\n") - ; - } - - protected function compileIsTraitable(Compiler $compiler) - { - // A template can be used as a trait if: - // * it has no parent - // * it has no macros - // * it has no body - // - // Put another way, a template can be used as a trait if it - // only contains blocks and use statements. - $traitable = !$this->hasNode('parent') && 0 === \count($this->getNode('macros')); - if ($traitable) { - if ($this->getNode('body') instanceof BodyNode) { - $nodes = $this->getNode('body')->getNode(0); - } else { - $nodes = $this->getNode('body'); - } - - if (!\count($nodes)) { - $nodes = new Node([$nodes]); - } - - foreach ($nodes as $node) { - if (!\count($node)) { - continue; - } - - if ($node instanceof TextNode && ctype_space($node->getAttribute('data'))) { - continue; - } - - if ($node instanceof BlockReferenceNode) { - continue; - } - - $traitable = false; - break; - } - } - - if ($traitable) { - return; - } - - $compiler - ->write("public function isTraitable()\n", "{\n") - ->indent() - ->write(sprintf("return %s;\n", $traitable ? 'true' : 'false')) - ->outdent() - ->write("}\n\n") - ; - } - - protected function compileDebugInfo(Compiler $compiler) - { - $compiler - ->write("public function getDebugInfo()\n", "{\n") - ->indent() - ->write(sprintf("return %s;\n", str_replace("\n", '', var_export(array_reverse($compiler->getDebugInfo(), true), true)))) - ->outdent() - ->write("}\n\n") - ; - } - - protected function compileGetSource(Compiler $compiler) - { - $compiler - ->write("/** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */\n") - ->write("public function getSource()\n", "{\n") - ->indent() - ->write("@trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED);\n\n") - ->write('return $this->getSourceContext()->getCode();') - ->raw("\n") - ->outdent() - ->write("}\n\n") - ; - } - - protected function compileGetSourceContext(Compiler $compiler) - { - $compiler - ->write("public function getSourceContext()\n", "{\n") - ->indent() - ->write('return new Source(') - ->string($compiler->getEnvironment()->isDebug() ? $this->getSourceContext()->getCode() : '') - ->raw(', ') - ->string($this->getSourceContext()->getName()) - ->raw(', ') - ->string($this->getSourceContext()->getPath()) - ->raw(");\n") - ->outdent() - ->write("}\n") - ; - } - - protected function compileLoadTemplate(Compiler $compiler, $node, $var) - { - if ($node instanceof ConstantExpression) { - $compiler - ->write(sprintf('%s = $this->loadTemplate(', $var)) - ->subcompile($node) - ->raw(', ') - ->repr($node->getTemplateName()) - ->raw(', ') - ->repr($node->getTemplateLine()) - ->raw(");\n") - ; - } else { - throw new \LogicException('Trait templates can only be constant nodes.'); - } - } -} - -class_alias('Twig\Node\ModuleNode', 'Twig_Node_Module'); diff --git a/source/vendor/twig/twig/src/Node/Node.php b/source/vendor/twig/twig/src/Node/Node.php deleted file mode 100644 index 68e0fd3..0000000 --- a/source/vendor/twig/twig/src/Node/Node.php +++ /dev/null @@ -1,280 +0,0 @@ - - */ -class Node implements \Twig_NodeInterface -{ - protected $nodes; - protected $attributes; - protected $lineno; - protected $tag; - - private $name; - private $sourceContext; - - /** - * @param array $nodes An array of named nodes - * @param array $attributes An array of attributes (should not be nodes) - * @param int $lineno The line number - * @param string $tag The tag name associated with the Node - */ - public function __construct(array $nodes = [], array $attributes = [], $lineno = 0, $tag = null) - { - foreach ($nodes as $name => $node) { - if (!$node instanceof \Twig_NodeInterface) { - @trigger_error(sprintf('Using "%s" for the value of node "%s" of "%s" is deprecated since version 1.25 and will be removed in 2.0.', \is_object($node) ? \get_class($node) : (null === $node ? 'null' : \gettype($node)), $name, static::class), \E_USER_DEPRECATED); - } - } - $this->nodes = $nodes; - $this->attributes = $attributes; - $this->lineno = $lineno; - $this->tag = $tag; - } - - public function __toString() - { - $attributes = []; - foreach ($this->attributes as $name => $value) { - $attributes[] = sprintf('%s: %s', $name, str_replace("\n", '', var_export($value, true))); - } - - $repr = [static::class.'('.implode(', ', $attributes)]; - - if (\count($this->nodes)) { - foreach ($this->nodes as $name => $node) { - $len = \strlen($name) + 4; - $noderepr = []; - foreach (explode("\n", (string) $node) as $line) { - $noderepr[] = str_repeat(' ', $len).$line; - } - - $repr[] = sprintf(' %s: %s', $name, ltrim(implode("\n", $noderepr))); - } - - $repr[] = ')'; - } else { - $repr[0] .= ')'; - } - - return implode("\n", $repr); - } - - /** - * @deprecated since 1.16.1 (to be removed in 2.0) - */ - public function toXml($asDom = false) - { - @trigger_error(sprintf('%s is deprecated since version 1.16.1 and will be removed in 2.0.', __METHOD__), \E_USER_DEPRECATED); - - $dom = new \DOMDocument('1.0', 'UTF-8'); - $dom->formatOutput = true; - $dom->appendChild($xml = $dom->createElement('twig')); - - $xml->appendChild($node = $dom->createElement('node')); - $node->setAttribute('class', static::class); - - foreach ($this->attributes as $name => $value) { - $node->appendChild($attribute = $dom->createElement('attribute')); - $attribute->setAttribute('name', $name); - $attribute->appendChild($dom->createTextNode($value)); - } - - foreach ($this->nodes as $name => $n) { - if (null === $n) { - continue; - } - - $child = $n->toXml(true)->getElementsByTagName('node')->item(0); - $child = $dom->importNode($child, true); - $child->setAttribute('name', $name); - - $node->appendChild($child); - } - - return $asDom ? $dom : $dom->saveXML(); - } - - public function compile(Compiler $compiler) - { - foreach ($this->nodes as $node) { - $node->compile($compiler); - } - } - - public function getTemplateLine() - { - return $this->lineno; - } - - /** - * @deprecated since 1.27 (to be removed in 2.0) - */ - public function getLine() - { - @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getTemplateLine() instead.', \E_USER_DEPRECATED); - - return $this->lineno; - } - - public function getNodeTag() - { - return $this->tag; - } - - /** - * @return bool - */ - public function hasAttribute($name) - { - return \array_key_exists($name, $this->attributes); - } - - /** - * @return mixed - */ - public function getAttribute($name) - { - if (!\array_key_exists($name, $this->attributes)) { - throw new \LogicException(sprintf('Attribute "%s" does not exist for Node "%s".', $name, static::class)); - } - - return $this->attributes[$name]; - } - - /** - * @param string $name - * @param mixed $value - */ - public function setAttribute($name, $value) - { - $this->attributes[$name] = $value; - } - - public function removeAttribute($name) - { - unset($this->attributes[$name]); - } - - /** - * @return bool - */ - public function hasNode($name) - { - return \array_key_exists($name, $this->nodes); - } - - /** - * @return Node - */ - public function getNode($name) - { - if (!\array_key_exists($name, $this->nodes)) { - throw new \LogicException(sprintf('Node "%s" does not exist for Node "%s".', $name, static::class)); - } - - return $this->nodes[$name]; - } - - public function setNode($name, $node = null) - { - if (!$node instanceof \Twig_NodeInterface) { - @trigger_error(sprintf('Using "%s" for the value of node "%s" of "%s" is deprecated since version 1.25 and will be removed in 2.0.', \is_object($node) ? \get_class($node) : (null === $node ? 'null' : \gettype($node)), $name, static::class), \E_USER_DEPRECATED); - } - - $this->nodes[$name] = $node; - } - - public function removeNode($name) - { - unset($this->nodes[$name]); - } - - /** - * @return int - */ - public function count() - { - return \count($this->nodes); - } - - /** - * @return \Traversable - */ - public function getIterator() - { - return new \ArrayIterator($this->nodes); - } - - public function setTemplateName($name) - { - $this->name = $name; - foreach ($this->nodes as $node) { - if (null !== $node) { - $node->setTemplateName($name); - } - } - } - - public function getTemplateName() - { - return $this->name; - } - - public function setSourceContext(Source $source) - { - $this->sourceContext = $source; - foreach ($this->nodes as $node) { - if ($node instanceof self) { - $node->setSourceContext($source); - } - } - } - - public function getSourceContext() - { - return $this->sourceContext; - } - - /** - * @deprecated since 1.27 (to be removed in 2.0) - */ - public function setFilename($name) - { - @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use setTemplateName() instead.', \E_USER_DEPRECATED); - - $this->setTemplateName($name); - } - - /** - * @deprecated since 1.27 (to be removed in 2.0) - */ - public function getFilename() - { - @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getTemplateName() instead.', \E_USER_DEPRECATED); - - return $this->name; - } -} - -class_alias('Twig\Node\Node', 'Twig_Node'); - -// Ensure that the aliased name is loaded to keep BC for classes implementing the typehint with the old aliased name. -class_exists('Twig\Compiler'); diff --git a/source/vendor/twig/twig/src/Node/NodeCaptureInterface.php b/source/vendor/twig/twig/src/Node/NodeCaptureInterface.php deleted file mode 100644 index 474003f..0000000 --- a/source/vendor/twig/twig/src/Node/NodeCaptureInterface.php +++ /dev/null @@ -1,23 +0,0 @@ - - */ -interface NodeCaptureInterface -{ -} - -class_alias('Twig\Node\NodeCaptureInterface', 'Twig_NodeCaptureInterface'); diff --git a/source/vendor/twig/twig/src/Node/NodeOutputInterface.php b/source/vendor/twig/twig/src/Node/NodeOutputInterface.php deleted file mode 100644 index 8b046ee..0000000 --- a/source/vendor/twig/twig/src/Node/NodeOutputInterface.php +++ /dev/null @@ -1,23 +0,0 @@ - - */ -interface NodeOutputInterface -{ -} - -class_alias('Twig\Node\NodeOutputInterface', 'Twig_NodeOutputInterface'); diff --git a/source/vendor/twig/twig/src/Node/PrintNode.php b/source/vendor/twig/twig/src/Node/PrintNode.php deleted file mode 100644 index 27f1ca4..0000000 --- a/source/vendor/twig/twig/src/Node/PrintNode.php +++ /dev/null @@ -1,41 +0,0 @@ - - */ -class PrintNode extends Node implements NodeOutputInterface -{ - public function __construct(AbstractExpression $expr, $lineno, $tag = null) - { - parent::__construct(['expr' => $expr], [], $lineno, $tag); - } - - public function compile(Compiler $compiler) - { - $compiler - ->addDebugInfo($this) - ->write('echo ') - ->subcompile($this->getNode('expr')) - ->raw(";\n") - ; - } -} - -class_alias('Twig\Node\PrintNode', 'Twig_Node_Print'); diff --git a/source/vendor/twig/twig/src/Node/SandboxNode.php b/source/vendor/twig/twig/src/Node/SandboxNode.php deleted file mode 100644 index 3dcd4d8..0000000 --- a/source/vendor/twig/twig/src/Node/SandboxNode.php +++ /dev/null @@ -1,54 +0,0 @@ - - */ -class SandboxNode extends Node -{ - public function __construct(\Twig_NodeInterface $body, $lineno, $tag = null) - { - parent::__construct(['body' => $body], [], $lineno, $tag); - } - - public function compile(Compiler $compiler) - { - $compiler - ->addDebugInfo($this) - ->write("if (!\$alreadySandboxed = \$this->sandbox->isSandboxed()) {\n") - ->indent() - ->write("\$this->sandbox->enableSandbox();\n") - ->outdent() - ->write("}\n") - ->write("try {\n") - ->indent() - ->subcompile($this->getNode('body')) - ->outdent() - ->write("} finally {\n") - ->indent() - ->write("if (!\$alreadySandboxed) {\n") - ->indent() - ->write("\$this->sandbox->disableSandbox();\n") - ->outdent() - ->write("}\n") - ->outdent() - ->write("}\n") - ; - } -} - -class_alias('Twig\Node\SandboxNode', 'Twig_Node_Sandbox'); diff --git a/source/vendor/twig/twig/src/Node/SandboxedPrintNode.php b/source/vendor/twig/twig/src/Node/SandboxedPrintNode.php deleted file mode 100644 index 2359af9..0000000 --- a/source/vendor/twig/twig/src/Node/SandboxedPrintNode.php +++ /dev/null @@ -1,69 +0,0 @@ - - */ -class SandboxedPrintNode extends PrintNode -{ - public function compile(Compiler $compiler) - { - $compiler - ->addDebugInfo($this) - ->write('echo ') - ; - $expr = $this->getNode('expr'); - if ($expr instanceof ConstantExpression) { - $compiler - ->subcompile($expr) - ->raw(";\n") - ; - } else { - $compiler - ->write('$this->env->getExtension(\'\Twig\Extension\SandboxExtension\')->ensureToStringAllowed(') - ->subcompile($expr) - ->raw(");\n") - ; - } - } - - /** - * Removes node filters. - * - * This is mostly needed when another visitor adds filters (like the escaper one). - * - * @return Node - */ - protected function removeNodeFilter(Node $node) - { - if ($node instanceof FilterExpression) { - return $this->removeNodeFilter($node->getNode('node')); - } - - return $node; - } -} - -class_alias('Twig\Node\SandboxedPrintNode', 'Twig_Node_SandboxedPrint'); diff --git a/source/vendor/twig/twig/src/Node/SetNode.php b/source/vendor/twig/twig/src/Node/SetNode.php deleted file mode 100644 index 656103b..0000000 --- a/source/vendor/twig/twig/src/Node/SetNode.php +++ /dev/null @@ -1,107 +0,0 @@ - - */ -class SetNode extends Node implements NodeCaptureInterface -{ - public function __construct($capture, \Twig_NodeInterface $names, \Twig_NodeInterface $values, $lineno, $tag = null) - { - parent::__construct(['names' => $names, 'values' => $values], ['capture' => $capture, 'safe' => false], $lineno, $tag); - - /* - * Optimizes the node when capture is used for a large block of text. - * - * {% set foo %}foo{% endset %} is compiled to $context['foo'] = new Twig\Markup("foo"); - */ - if ($this->getAttribute('capture')) { - $this->setAttribute('safe', true); - - $values = $this->getNode('values'); - if ($values instanceof TextNode) { - $this->setNode('values', new ConstantExpression($values->getAttribute('data'), $values->getTemplateLine())); - $this->setAttribute('capture', false); - } - } - } - - public function compile(Compiler $compiler) - { - $compiler->addDebugInfo($this); - - if (\count($this->getNode('names')) > 1) { - $compiler->write('list('); - foreach ($this->getNode('names') as $idx => $node) { - if ($idx) { - $compiler->raw(', '); - } - - $compiler->subcompile($node); - } - $compiler->raw(')'); - } else { - if ($this->getAttribute('capture')) { - if ($compiler->getEnvironment()->isDebug()) { - $compiler->write("ob_start();\n"); - } else { - $compiler->write("ob_start(function () { return ''; });\n"); - } - $compiler - ->subcompile($this->getNode('values')) - ; - } - - $compiler->subcompile($this->getNode('names'), false); - - if ($this->getAttribute('capture')) { - $compiler->raw(" = ('' === \$tmp = ob_get_clean()) ? '' : new Markup(\$tmp, \$this->env->getCharset())"); - } - } - - if (!$this->getAttribute('capture')) { - $compiler->raw(' = '); - - if (\count($this->getNode('names')) > 1) { - $compiler->write('['); - foreach ($this->getNode('values') as $idx => $value) { - if ($idx) { - $compiler->raw(', '); - } - - $compiler->subcompile($value); - } - $compiler->raw(']'); - } else { - if ($this->getAttribute('safe')) { - $compiler - ->raw("('' === \$tmp = ") - ->subcompile($this->getNode('values')) - ->raw(") ? '' : new Markup(\$tmp, \$this->env->getCharset())") - ; - } else { - $compiler->subcompile($this->getNode('values')); - } - } - } - - $compiler->raw(";\n"); - } -} - -class_alias('Twig\Node\SetNode', 'Twig_Node_Set'); diff --git a/source/vendor/twig/twig/src/Node/SetTempNode.php b/source/vendor/twig/twig/src/Node/SetTempNode.php deleted file mode 100644 index 918fb99..0000000 --- a/source/vendor/twig/twig/src/Node/SetTempNode.php +++ /dev/null @@ -1,44 +0,0 @@ - $name], $lineno); - } - - public function compile(Compiler $compiler) - { - $name = $this->getAttribute('name'); - $compiler - ->addDebugInfo($this) - ->write('if (isset($context[') - ->string($name) - ->raw('])) { $_') - ->raw($name) - ->raw('_ = $context[') - ->repr($name) - ->raw(']; } else { $_') - ->raw($name) - ->raw("_ = null; }\n") - ; - } -} - -class_alias('Twig\Node\SetTempNode', 'Twig_Node_SetTemp'); diff --git a/source/vendor/twig/twig/src/Node/SpacelessNode.php b/source/vendor/twig/twig/src/Node/SpacelessNode.php deleted file mode 100644 index c8d32da..0000000 --- a/source/vendor/twig/twig/src/Node/SpacelessNode.php +++ /dev/null @@ -1,47 +0,0 @@ - - */ -class SpacelessNode extends Node -{ - public function __construct(\Twig_NodeInterface $body, $lineno, $tag = 'spaceless') - { - parent::__construct(['body' => $body], [], $lineno, $tag); - } - - public function compile(Compiler $compiler) - { - $compiler - ->addDebugInfo($this) - ; - if ($compiler->getEnvironment()->isDebug()) { - $compiler->write("ob_start();\n"); - } else { - $compiler->write("ob_start(function () { return ''; });\n"); - } - $compiler - ->subcompile($this->getNode('body')) - ->write("echo trim(preg_replace('/>\s+<', ob_get_clean()));\n") - ; - } -} - -class_alias('Twig\Node\SpacelessNode', 'Twig_Node_Spaceless'); diff --git a/source/vendor/twig/twig/src/Node/TextNode.php b/source/vendor/twig/twig/src/Node/TextNode.php deleted file mode 100644 index 9ac435e..0000000 --- a/source/vendor/twig/twig/src/Node/TextNode.php +++ /dev/null @@ -1,40 +0,0 @@ - - */ -class TextNode extends Node implements NodeOutputInterface -{ - public function __construct($data, $lineno) - { - parent::__construct([], ['data' => $data], $lineno); - } - - public function compile(Compiler $compiler) - { - $compiler - ->addDebugInfo($this) - ->write('echo ') - ->string($this->getAttribute('data')) - ->raw(";\n") - ; - } -} - -class_alias('Twig\Node\TextNode', 'Twig_Node_Text'); diff --git a/source/vendor/twig/twig/src/Node/WithNode.php b/source/vendor/twig/twig/src/Node/WithNode.php deleted file mode 100644 index d291dcf..0000000 --- a/source/vendor/twig/twig/src/Node/WithNode.php +++ /dev/null @@ -1,72 +0,0 @@ - - */ -class WithNode extends Node -{ - public function __construct(Node $body, ?Node $variables, $only, $lineno, $tag = null) - { - $nodes = ['body' => $body]; - if (null !== $variables) { - $nodes['variables'] = $variables; - } - - parent::__construct($nodes, ['only' => (bool) $only], $lineno, $tag); - } - - public function compile(Compiler $compiler) - { - $compiler->addDebugInfo($this); - - if ($this->hasNode('variables')) { - $node = $this->getNode('variables'); - $varsName = $compiler->getVarName(); - $compiler - ->write(sprintf('$%s = ', $varsName)) - ->subcompile($node) - ->raw(";\n") - ->write(sprintf("if (!twig_test_iterable(\$%s)) {\n", $varsName)) - ->indent() - ->write("throw new RuntimeError('Variables passed to the \"with\" tag must be a hash.', ") - ->repr($node->getTemplateLine()) - ->raw(", \$this->getSourceContext());\n") - ->outdent() - ->write("}\n") - ->write(sprintf("\$%s = twig_to_array(\$%s);\n", $varsName, $varsName)) - ; - - if ($this->getAttribute('only')) { - $compiler->write("\$context = ['_parent' => \$context];\n"); - } else { - $compiler->write("\$context['_parent'] = \$context;\n"); - } - - $compiler->write(sprintf("\$context = \$this->env->mergeGlobals(array_merge(\$context, \$%s));\n", $varsName)); - } else { - $compiler->write("\$context['_parent'] = \$context;\n"); - } - - $compiler - ->subcompile($this->getNode('body')) - ->write("\$context = \$context['_parent'];\n") - ; - } -} - -class_alias('Twig\Node\WithNode', 'Twig_Node_With'); diff --git a/source/vendor/twig/twig/src/NodeTraverser.php b/source/vendor/twig/twig/src/NodeTraverser.php deleted file mode 100644 index bd25d3c..0000000 --- a/source/vendor/twig/twig/src/NodeTraverser.php +++ /dev/null @@ -1,89 +0,0 @@ - - */ -class NodeTraverser -{ - protected $env; - protected $visitors = []; - - /** - * @param NodeVisitorInterface[] $visitors - */ - public function __construct(Environment $env, array $visitors = []) - { - $this->env = $env; - foreach ($visitors as $visitor) { - $this->addVisitor($visitor); - } - } - - public function addVisitor(NodeVisitorInterface $visitor) - { - $this->visitors[$visitor->getPriority()][] = $visitor; - } - - /** - * Traverses a node and calls the registered visitors. - * - * @return \Twig_NodeInterface - */ - public function traverse(\Twig_NodeInterface $node) - { - ksort($this->visitors); - foreach ($this->visitors as $visitors) { - foreach ($visitors as $visitor) { - $node = $this->traverseForVisitor($visitor, $node); - } - } - - return $node; - } - - protected function traverseForVisitor(NodeVisitorInterface $visitor, \Twig_NodeInterface $node = null) - { - if (null === $node) { - return; - } - - $node = $visitor->enterNode($node, $this->env); - - foreach ($node as $k => $n) { - if (null === $n) { - continue; - } - - if (false !== ($m = $this->traverseForVisitor($visitor, $n)) && null !== $m) { - if ($m !== $n) { - $node->setNode($k, $m); - } - } else { - $node->removeNode($k); - } - } - - return $visitor->leaveNode($node, $this->env); - } -} - -class_alias('Twig\NodeTraverser', 'Twig_NodeTraverser'); diff --git a/source/vendor/twig/twig/src/NodeVisitor/AbstractNodeVisitor.php b/source/vendor/twig/twig/src/NodeVisitor/AbstractNodeVisitor.php deleted file mode 100644 index b66c3c6..0000000 --- a/source/vendor/twig/twig/src/NodeVisitor/AbstractNodeVisitor.php +++ /dev/null @@ -1,59 +0,0 @@ - - */ -abstract class AbstractNodeVisitor implements NodeVisitorInterface -{ - final public function enterNode(\Twig_NodeInterface $node, Environment $env) - { - if (!$node instanceof Node) { - throw new \LogicException(sprintf('%s only supports \Twig\Node\Node instances.', __CLASS__)); - } - - return $this->doEnterNode($node, $env); - } - - final public function leaveNode(\Twig_NodeInterface $node, Environment $env) - { - if (!$node instanceof Node) { - throw new \LogicException(sprintf('%s only supports \Twig\Node\Node instances.', __CLASS__)); - } - - return $this->doLeaveNode($node, $env); - } - - /** - * Called before child nodes are visited. - * - * @return Node The modified node - */ - abstract protected function doEnterNode(Node $node, Environment $env); - - /** - * Called after child nodes are visited. - * - * @return Node|false|null The modified node or null if the node must be removed - */ - abstract protected function doLeaveNode(Node $node, Environment $env); -} - -class_alias('Twig\NodeVisitor\AbstractNodeVisitor', 'Twig_BaseNodeVisitor'); diff --git a/source/vendor/twig/twig/src/NodeVisitor/EscaperNodeVisitor.php b/source/vendor/twig/twig/src/NodeVisitor/EscaperNodeVisitor.php deleted file mode 100644 index f6e16fa..0000000 --- a/source/vendor/twig/twig/src/NodeVisitor/EscaperNodeVisitor.php +++ /dev/null @@ -1,209 +0,0 @@ - - */ -class EscaperNodeVisitor extends AbstractNodeVisitor -{ - protected $statusStack = []; - protected $blocks = []; - protected $safeAnalysis; - protected $traverser; - protected $defaultStrategy = false; - protected $safeVars = []; - - public function __construct() - { - $this->safeAnalysis = new SafeAnalysisNodeVisitor(); - } - - protected function doEnterNode(Node $node, Environment $env) - { - if ($node instanceof ModuleNode) { - if ($env->hasExtension('\Twig\Extension\EscaperExtension') && $defaultStrategy = $env->getExtension('\Twig\Extension\EscaperExtension')->getDefaultStrategy($node->getTemplateName())) { - $this->defaultStrategy = $defaultStrategy; - } - $this->safeVars = []; - $this->blocks = []; - } elseif ($node instanceof AutoEscapeNode) { - $this->statusStack[] = $node->getAttribute('value'); - } elseif ($node instanceof BlockNode) { - $this->statusStack[] = isset($this->blocks[$node->getAttribute('name')]) ? $this->blocks[$node->getAttribute('name')] : $this->needEscaping($env); - } elseif ($node instanceof ImportNode) { - $this->safeVars[] = $node->getNode('var')->getAttribute('name'); - } - - return $node; - } - - protected function doLeaveNode(Node $node, Environment $env) - { - if ($node instanceof ModuleNode) { - $this->defaultStrategy = false; - $this->safeVars = []; - $this->blocks = []; - } elseif ($node instanceof FilterExpression) { - return $this->preEscapeFilterNode($node, $env); - } elseif ($node instanceof PrintNode && false !== $type = $this->needEscaping($env)) { - $expression = $node->getNode('expr'); - if ($expression instanceof ConditionalExpression && $this->shouldUnwrapConditional($expression, $env, $type)) { - return new DoNode($this->unwrapConditional($expression, $env, $type), $expression->getTemplateLine()); - } - - return $this->escapePrintNode($node, $env, $type); - } - - if ($node instanceof AutoEscapeNode || $node instanceof BlockNode) { - array_pop($this->statusStack); - } elseif ($node instanceof BlockReferenceNode) { - $this->blocks[$node->getAttribute('name')] = $this->needEscaping($env); - } - - return $node; - } - - private function shouldUnwrapConditional(ConditionalExpression $expression, Environment $env, $type) - { - $expr2Safe = $this->isSafeFor($type, $expression->getNode('expr2'), $env); - $expr3Safe = $this->isSafeFor($type, $expression->getNode('expr3'), $env); - - return $expr2Safe !== $expr3Safe; - } - - private function unwrapConditional(ConditionalExpression $expression, Environment $env, $type) - { - // convert "echo a ? b : c" to "a ? echo b : echo c" recursively - $expr2 = $expression->getNode('expr2'); - if ($expr2 instanceof ConditionalExpression && $this->shouldUnwrapConditional($expr2, $env, $type)) { - $expr2 = $this->unwrapConditional($expr2, $env, $type); - } else { - $expr2 = $this->escapeInlinePrintNode(new InlinePrint($expr2, $expr2->getTemplateLine()), $env, $type); - } - $expr3 = $expression->getNode('expr3'); - if ($expr3 instanceof ConditionalExpression && $this->shouldUnwrapConditional($expr3, $env, $type)) { - $expr3 = $this->unwrapConditional($expr3, $env, $type); - } else { - $expr3 = $this->escapeInlinePrintNode(new InlinePrint($expr3, $expr3->getTemplateLine()), $env, $type); - } - - return new ConditionalExpression($expression->getNode('expr1'), $expr2, $expr3, $expression->getTemplateLine()); - } - - private function escapeInlinePrintNode(InlinePrint $node, Environment $env, $type) - { - $expression = $node->getNode('node'); - - if ($this->isSafeFor($type, $expression, $env)) { - return $node; - } - - return new InlinePrint($this->getEscaperFilter($type, $expression), $node->getTemplateLine()); - } - - protected function escapePrintNode(PrintNode $node, Environment $env, $type) - { - if (false === $type) { - return $node; - } - - $expression = $node->getNode('expr'); - - if ($this->isSafeFor($type, $expression, $env)) { - return $node; - } - - $class = \get_class($node); - - return new $class($this->getEscaperFilter($type, $expression), $node->getTemplateLine()); - } - - protected function preEscapeFilterNode(FilterExpression $filter, Environment $env) - { - $name = $filter->getNode('filter')->getAttribute('value'); - - $type = $env->getFilter($name)->getPreEscape(); - if (null === $type) { - return $filter; - } - - $node = $filter->getNode('node'); - if ($this->isSafeFor($type, $node, $env)) { - return $filter; - } - - $filter->setNode('node', $this->getEscaperFilter($type, $node)); - - return $filter; - } - - protected function isSafeFor($type, \Twig_NodeInterface $expression, $env) - { - $safe = $this->safeAnalysis->getSafe($expression); - - if (null === $safe) { - if (null === $this->traverser) { - $this->traverser = new NodeTraverser($env, [$this->safeAnalysis]); - } - - $this->safeAnalysis->setSafeVars($this->safeVars); - - $this->traverser->traverse($expression); - $safe = $this->safeAnalysis->getSafe($expression); - } - - return \in_array($type, $safe) || \in_array('all', $safe); - } - - protected function needEscaping(Environment $env) - { - if (\count($this->statusStack)) { - return $this->statusStack[\count($this->statusStack) - 1]; - } - - return $this->defaultStrategy ? $this->defaultStrategy : false; - } - - protected function getEscaperFilter($type, \Twig_NodeInterface $node) - { - $line = $node->getTemplateLine(); - $name = new ConstantExpression('escape', $line); - $args = new Node([new ConstantExpression((string) $type, $line), new ConstantExpression(null, $line), new ConstantExpression(true, $line)]); - - return new FilterExpression($node, $name, $args, $line); - } - - public function getPriority() - { - return 0; - } -} - -class_alias('Twig\NodeVisitor\EscaperNodeVisitor', 'Twig_NodeVisitor_Escaper'); diff --git a/source/vendor/twig/twig/src/NodeVisitor/NodeVisitorInterface.php b/source/vendor/twig/twig/src/NodeVisitor/NodeVisitorInterface.php deleted file mode 100644 index 9b8730b..0000000 --- a/source/vendor/twig/twig/src/NodeVisitor/NodeVisitorInterface.php +++ /dev/null @@ -1,50 +0,0 @@ - - */ -interface NodeVisitorInterface -{ - /** - * Called before child nodes are visited. - * - * @return \Twig_NodeInterface The modified node - */ - public function enterNode(\Twig_NodeInterface $node, Environment $env); - - /** - * Called after child nodes are visited. - * - * @return \Twig_NodeInterface|false|null The modified node or null if the node must be removed - */ - public function leaveNode(\Twig_NodeInterface $node, Environment $env); - - /** - * Returns the priority for this visitor. - * - * Priority should be between -10 and 10 (0 is the default). - * - * @return int The priority level - */ - public function getPriority(); -} - -class_alias('Twig\NodeVisitor\NodeVisitorInterface', 'Twig_NodeVisitorInterface'); - -// Ensure that the aliased name is loaded to keep BC for classes implementing the typehint with the old aliased name. -class_exists('Twig\Environment'); diff --git a/source/vendor/twig/twig/src/NodeVisitor/OptimizerNodeVisitor.php b/source/vendor/twig/twig/src/NodeVisitor/OptimizerNodeVisitor.php deleted file mode 100644 index 2af5d45..0000000 --- a/source/vendor/twig/twig/src/NodeVisitor/OptimizerNodeVisitor.php +++ /dev/null @@ -1,273 +0,0 @@ - - */ -class OptimizerNodeVisitor extends AbstractNodeVisitor -{ - public const OPTIMIZE_ALL = -1; - public const OPTIMIZE_NONE = 0; - public const OPTIMIZE_FOR = 2; - public const OPTIMIZE_RAW_FILTER = 4; - public const OPTIMIZE_VAR_ACCESS = 8; - - protected $loops = []; - protected $loopsTargets = []; - protected $optimizers; - protected $prependedNodes = []; - protected $inABody = false; - - /** - * @param int $optimizers The optimizer mode - */ - public function __construct($optimizers = -1) - { - if (!\is_int($optimizers) || $optimizers > (self::OPTIMIZE_FOR | self::OPTIMIZE_RAW_FILTER | self::OPTIMIZE_VAR_ACCESS)) { - throw new \InvalidArgumentException(sprintf('Optimizer mode "%s" is not valid.', $optimizers)); - } - - $this->optimizers = $optimizers; - } - - protected function doEnterNode(Node $node, Environment $env) - { - if (self::OPTIMIZE_FOR === (self::OPTIMIZE_FOR & $this->optimizers)) { - $this->enterOptimizeFor($node, $env); - } - - if (\PHP_VERSION_ID < 50400 && self::OPTIMIZE_VAR_ACCESS === (self::OPTIMIZE_VAR_ACCESS & $this->optimizers) && !$env->isStrictVariables() && !$env->hasExtension('\Twig\Extension\SandboxExtension')) { - if ($this->inABody) { - if (!$node instanceof AbstractExpression) { - if ('Twig_Node' !== \get_class($node)) { - array_unshift($this->prependedNodes, []); - } - } else { - $node = $this->optimizeVariables($node, $env); - } - } elseif ($node instanceof BodyNode) { - $this->inABody = true; - } - } - - return $node; - } - - protected function doLeaveNode(Node $node, Environment $env) - { - $expression = $node instanceof AbstractExpression; - - if (self::OPTIMIZE_FOR === (self::OPTIMIZE_FOR & $this->optimizers)) { - $this->leaveOptimizeFor($node, $env); - } - - if (self::OPTIMIZE_RAW_FILTER === (self::OPTIMIZE_RAW_FILTER & $this->optimizers)) { - $node = $this->optimizeRawFilter($node, $env); - } - - $node = $this->optimizePrintNode($node, $env); - - if (self::OPTIMIZE_VAR_ACCESS === (self::OPTIMIZE_VAR_ACCESS & $this->optimizers) && !$env->isStrictVariables() && !$env->hasExtension('\Twig\Extension\SandboxExtension')) { - if ($node instanceof BodyNode) { - $this->inABody = false; - } elseif ($this->inABody) { - if (!$expression && 'Twig_Node' !== \get_class($node) && $prependedNodes = array_shift($this->prependedNodes)) { - $nodes = []; - foreach (array_unique($prependedNodes) as $name) { - $nodes[] = new SetTempNode($name, $node->getTemplateLine()); - } - - $nodes[] = $node; - $node = new Node($nodes); - } - } - } - - return $node; - } - - protected function optimizeVariables(\Twig_NodeInterface $node, Environment $env) - { - if ('Twig_Node_Expression_Name' === \get_class($node) && $node->isSimple()) { - $this->prependedNodes[0][] = $node->getAttribute('name'); - - return new TempNameExpression($node->getAttribute('name'), $node->getTemplateLine()); - } - - return $node; - } - - /** - * Optimizes print nodes. - * - * It replaces: - * - * * "echo $this->render(Parent)Block()" with "$this->display(Parent)Block()" - * - * @return \Twig_NodeInterface - */ - protected function optimizePrintNode(\Twig_NodeInterface $node, Environment $env) - { - if (!$node instanceof PrintNode) { - return $node; - } - - $exprNode = $node->getNode('expr'); - if ( - $exprNode instanceof BlockReferenceExpression || - $exprNode instanceof ParentExpression - ) { - $exprNode->setAttribute('output', true); - - return $exprNode; - } - - return $node; - } - - /** - * Removes "raw" filters. - * - * @return \Twig_NodeInterface - */ - protected function optimizeRawFilter(\Twig_NodeInterface $node, Environment $env) - { - if ($node instanceof FilterExpression && 'raw' == $node->getNode('filter')->getAttribute('value')) { - return $node->getNode('node'); - } - - return $node; - } - - /** - * Optimizes "for" tag by removing the "loop" variable creation whenever possible. - */ - protected function enterOptimizeFor(\Twig_NodeInterface $node, Environment $env) - { - if ($node instanceof ForNode) { - // disable the loop variable by default - $node->setAttribute('with_loop', false); - array_unshift($this->loops, $node); - array_unshift($this->loopsTargets, $node->getNode('value_target')->getAttribute('name')); - array_unshift($this->loopsTargets, $node->getNode('key_target')->getAttribute('name')); - } elseif (!$this->loops) { - // we are outside a loop - return; - } - - // when do we need to add the loop variable back? - - // the loop variable is referenced for the current loop - elseif ($node instanceof NameExpression && 'loop' === $node->getAttribute('name')) { - $node->setAttribute('always_defined', true); - $this->addLoopToCurrent(); - } - - // optimize access to loop targets - elseif ($node instanceof NameExpression && \in_array($node->getAttribute('name'), $this->loopsTargets)) { - $node->setAttribute('always_defined', true); - } - - // block reference - elseif ($node instanceof BlockReferenceNode || $node instanceof BlockReferenceExpression) { - $this->addLoopToCurrent(); - } - - // include without the only attribute - elseif ($node instanceof IncludeNode && !$node->getAttribute('only')) { - $this->addLoopToAll(); - } - - // include function without the with_context=false parameter - elseif ($node instanceof FunctionExpression - && 'include' === $node->getAttribute('name') - && (!$node->getNode('arguments')->hasNode('with_context') - || false !== $node->getNode('arguments')->getNode('with_context')->getAttribute('value') - ) - ) { - $this->addLoopToAll(); - } - - // the loop variable is referenced via an attribute - elseif ($node instanceof GetAttrExpression - && (!$node->getNode('attribute') instanceof ConstantExpression - || 'parent' === $node->getNode('attribute')->getAttribute('value') - ) - && (true === $this->loops[0]->getAttribute('with_loop') - || ($node->getNode('node') instanceof NameExpression - && 'loop' === $node->getNode('node')->getAttribute('name') - ) - ) - ) { - $this->addLoopToAll(); - } - } - - /** - * Optimizes "for" tag by removing the "loop" variable creation whenever possible. - */ - protected function leaveOptimizeFor(\Twig_NodeInterface $node, Environment $env) - { - if ($node instanceof ForNode) { - array_shift($this->loops); - array_shift($this->loopsTargets); - array_shift($this->loopsTargets); - } - } - - protected function addLoopToCurrent() - { - $this->loops[0]->setAttribute('with_loop', true); - } - - protected function addLoopToAll() - { - foreach ($this->loops as $loop) { - $loop->setAttribute('with_loop', true); - } - } - - public function getPriority() - { - return 255; - } -} - -class_alias('Twig\NodeVisitor\OptimizerNodeVisitor', 'Twig_NodeVisitor_Optimizer'); diff --git a/source/vendor/twig/twig/src/NodeVisitor/SafeAnalysisNodeVisitor.php b/source/vendor/twig/twig/src/NodeVisitor/SafeAnalysisNodeVisitor.php deleted file mode 100644 index 97a7a3e..0000000 --- a/source/vendor/twig/twig/src/NodeVisitor/SafeAnalysisNodeVisitor.php +++ /dev/null @@ -1,164 +0,0 @@ -safeVars = $safeVars; - } - - public function getSafe(\Twig_NodeInterface $node) - { - $hash = spl_object_hash($node); - if (!isset($this->data[$hash])) { - return; - } - - foreach ($this->data[$hash] as $bucket) { - if ($bucket['key'] !== $node) { - continue; - } - - if (\in_array('html_attr', $bucket['value'])) { - $bucket['value'][] = 'html'; - } - - return $bucket['value']; - } - } - - protected function setSafe(\Twig_NodeInterface $node, array $safe) - { - $hash = spl_object_hash($node); - if (isset($this->data[$hash])) { - foreach ($this->data[$hash] as &$bucket) { - if ($bucket['key'] === $node) { - $bucket['value'] = $safe; - - return; - } - } - } - $this->data[$hash][] = [ - 'key' => $node, - 'value' => $safe, - ]; - } - - protected function doEnterNode(Node $node, Environment $env) - { - return $node; - } - - protected function doLeaveNode(Node $node, Environment $env) - { - if ($node instanceof ConstantExpression) { - // constants are marked safe for all - $this->setSafe($node, ['all']); - } elseif ($node instanceof BlockReferenceExpression) { - // blocks are safe by definition - $this->setSafe($node, ['all']); - } elseif ($node instanceof ParentExpression) { - // parent block is safe by definition - $this->setSafe($node, ['all']); - } elseif ($node instanceof ConditionalExpression) { - // intersect safeness of both operands - $safe = $this->intersectSafe($this->getSafe($node->getNode('expr2')), $this->getSafe($node->getNode('expr3'))); - $this->setSafe($node, $safe); - } elseif ($node instanceof FilterExpression) { - // filter expression is safe when the filter is safe - $name = $node->getNode('filter')->getAttribute('value'); - $args = $node->getNode('arguments'); - if (false !== $filter = $env->getFilter($name)) { - $safe = $filter->getSafe($args); - if (null === $safe) { - $safe = $this->intersectSafe($this->getSafe($node->getNode('node')), $filter->getPreservesSafety()); - } - $this->setSafe($node, $safe); - } else { - $this->setSafe($node, []); - } - } elseif ($node instanceof FunctionExpression) { - // function expression is safe when the function is safe - $name = $node->getAttribute('name'); - $args = $node->getNode('arguments'); - $function = $env->getFunction($name); - if (false !== $function) { - $this->setSafe($node, $function->getSafe($args)); - } else { - $this->setSafe($node, []); - } - } elseif ($node instanceof MethodCallExpression) { - if ($node->getAttribute('safe')) { - $this->setSafe($node, ['all']); - } else { - $this->setSafe($node, []); - } - } elseif ($node instanceof GetAttrExpression && $node->getNode('node') instanceof NameExpression) { - $name = $node->getNode('node')->getAttribute('name'); - // attributes on template instances are safe - if ('_self' == $name || \in_array($name, $this->safeVars)) { - $this->setSafe($node, ['all']); - } else { - $this->setSafe($node, []); - } - } else { - $this->setSafe($node, []); - } - - return $node; - } - - protected function intersectSafe(array $a = null, array $b = null) - { - if (null === $a || null === $b) { - return []; - } - - if (\in_array('all', $a)) { - return $b; - } - - if (\in_array('all', $b)) { - return $a; - } - - return array_intersect($a, $b); - } - - public function getPriority() - { - return 0; - } -} - -class_alias('Twig\NodeVisitor\SafeAnalysisNodeVisitor', 'Twig_NodeVisitor_SafeAnalysis'); diff --git a/source/vendor/twig/twig/src/NodeVisitor/SandboxNodeVisitor.php b/source/vendor/twig/twig/src/NodeVisitor/SandboxNodeVisitor.php deleted file mode 100644 index 9bee9f5..0000000 --- a/source/vendor/twig/twig/src/NodeVisitor/SandboxNodeVisitor.php +++ /dev/null @@ -1,139 +0,0 @@ - - */ -class SandboxNodeVisitor extends AbstractNodeVisitor -{ - protected $inAModule = false; - protected $tags; - protected $filters; - protected $functions; - - private $needsToStringWrap = false; - - protected function doEnterNode(Node $node, Environment $env) - { - if ($node instanceof ModuleNode) { - $this->inAModule = true; - $this->tags = []; - $this->filters = []; - $this->functions = []; - - return $node; - } elseif ($this->inAModule) { - // look for tags - if ($node->getNodeTag() && !isset($this->tags[$node->getNodeTag()])) { - $this->tags[$node->getNodeTag()] = $node; - } - - // look for filters - if ($node instanceof FilterExpression && !isset($this->filters[$node->getNode('filter')->getAttribute('value')])) { - $this->filters[$node->getNode('filter')->getAttribute('value')] = $node; - } - - // look for functions - if ($node instanceof FunctionExpression && !isset($this->functions[$node->getAttribute('name')])) { - $this->functions[$node->getAttribute('name')] = $node; - } - - // the .. operator is equivalent to the range() function - if ($node instanceof RangeBinary && !isset($this->functions['range'])) { - $this->functions['range'] = $node; - } - - if ($node instanceof PrintNode) { - $this->needsToStringWrap = true; - $this->wrapNode($node, 'expr'); - } - - if ($node instanceof SetNode && !$node->getAttribute('capture')) { - $this->needsToStringWrap = true; - } - - // wrap outer nodes that can implicitly call __toString() - if ($this->needsToStringWrap) { - if ($node instanceof ConcatBinary) { - $this->wrapNode($node, 'left'); - $this->wrapNode($node, 'right'); - } - if ($node instanceof FilterExpression) { - $this->wrapNode($node, 'node'); - $this->wrapArrayNode($node, 'arguments'); - } - if ($node instanceof FunctionExpression) { - $this->wrapArrayNode($node, 'arguments'); - } - } - } - - return $node; - } - - protected function doLeaveNode(Node $node, Environment $env) - { - if ($node instanceof ModuleNode) { - $this->inAModule = false; - - $node->setNode('constructor_end', new Node([new CheckSecurityCallNode(), $node->getNode('constructor_end')])); - $node->setNode('class_end', new Node([new CheckSecurityNode($this->filters, $this->tags, $this->functions), $node->getNode('class_end')])); - } elseif ($this->inAModule) { - if ($node instanceof PrintNode || $node instanceof SetNode) { - $this->needsToStringWrap = false; - } - } - - return $node; - } - - private function wrapNode(Node $node, $name) - { - $expr = $node->getNode($name); - if ($expr instanceof NameExpression || $expr instanceof GetAttrExpression) { - $node->setNode($name, new CheckToStringNode($expr)); - } - } - - private function wrapArrayNode(Node $node, $name) - { - $args = $node->getNode($name); - foreach ($args as $name => $_) { - $this->wrapNode($args, $name); - } - } - - public function getPriority() - { - return 0; - } -} - -class_alias('Twig\NodeVisitor\SandboxNodeVisitor', 'Twig_NodeVisitor_Sandbox'); diff --git a/source/vendor/twig/twig/src/Parser.php b/source/vendor/twig/twig/src/Parser.php deleted file mode 100644 index 8763a4e..0000000 --- a/source/vendor/twig/twig/src/Parser.php +++ /dev/null @@ -1,439 +0,0 @@ - - */ -class Parser implements \Twig_ParserInterface -{ - protected $stack = []; - protected $stream; - protected $parent; - protected $handlers; - protected $visitors; - protected $expressionParser; - protected $blocks; - protected $blockStack; - protected $macros; - protected $env; - protected $reservedMacroNames; - protected $importedSymbols; - protected $traits; - protected $embeddedTemplates = []; - private $varNameSalt = 0; - - public function __construct(Environment $env) - { - $this->env = $env; - } - - /** - * @deprecated since 1.27 (to be removed in 2.0) - */ - public function getEnvironment() - { - @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0.', \E_USER_DEPRECATED); - - return $this->env; - } - - public function getVarName() - { - return sprintf('__internal_%s', hash('sha256', __METHOD__.$this->stream->getSourceContext()->getCode().$this->varNameSalt++)); - } - - /** - * @deprecated since 1.27 (to be removed in 2.0). Use $parser->getStream()->getSourceContext()->getPath() instead. - */ - public function getFilename() - { - @trigger_error(sprintf('The "%s" method is deprecated since version 1.27 and will be removed in 2.0. Use $parser->getStream()->getSourceContext()->getPath() instead.', __METHOD__), \E_USER_DEPRECATED); - - return $this->stream->getSourceContext()->getName(); - } - - public function parse(TokenStream $stream, $test = null, $dropNeedle = false) - { - // push all variables into the stack to keep the current state of the parser - // using get_object_vars() instead of foreach would lead to https://bugs.php.net/71336 - // This hack can be removed when min version if PHP 7.0 - $vars = []; - foreach ($this as $k => $v) { - $vars[$k] = $v; - } - - unset($vars['stack'], $vars['env'], $vars['handlers'], $vars['visitors'], $vars['expressionParser'], $vars['reservedMacroNames']); - $this->stack[] = $vars; - - // tag handlers - if (null === $this->handlers) { - $this->handlers = $this->env->getTokenParsers(); - $this->handlers->setParser($this); - } - - // node visitors - if (null === $this->visitors) { - $this->visitors = $this->env->getNodeVisitors(); - } - - if (null === $this->expressionParser) { - $this->expressionParser = new ExpressionParser($this, $this->env); - } - - $this->stream = $stream; - $this->parent = null; - $this->blocks = []; - $this->macros = []; - $this->traits = []; - $this->blockStack = []; - $this->importedSymbols = [[]]; - $this->embeddedTemplates = []; - $this->varNameSalt = 0; - - try { - $body = $this->subparse($test, $dropNeedle); - - if (null !== $this->parent && null === $body = $this->filterBodyNodes($body)) { - $body = new Node(); - } - } catch (SyntaxError $e) { - if (!$e->getSourceContext()) { - $e->setSourceContext($this->stream->getSourceContext()); - } - - if (!$e->getTemplateLine()) { - $e->setTemplateLine($this->stream->getCurrent()->getLine()); - } - - throw $e; - } - - $node = new ModuleNode(new BodyNode([$body]), $this->parent, new Node($this->blocks), new Node($this->macros), new Node($this->traits), $this->embeddedTemplates, $stream->getSourceContext()); - - $traverser = new NodeTraverser($this->env, $this->visitors); - - $node = $traverser->traverse($node); - - // restore previous stack so previous parse() call can resume working - foreach (array_pop($this->stack) as $key => $val) { - $this->$key = $val; - } - - return $node; - } - - public function subparse($test, $dropNeedle = false) - { - $lineno = $this->getCurrentToken()->getLine(); - $rv = []; - while (!$this->stream->isEOF()) { - switch ($this->getCurrentToken()->getType()) { - case Token::TEXT_TYPE: - $token = $this->stream->next(); - $rv[] = new TextNode($token->getValue(), $token->getLine()); - break; - - case Token::VAR_START_TYPE: - $token = $this->stream->next(); - $expr = $this->expressionParser->parseExpression(); - $this->stream->expect(Token::VAR_END_TYPE); - $rv[] = new PrintNode($expr, $token->getLine()); - break; - - case Token::BLOCK_START_TYPE: - $this->stream->next(); - $token = $this->getCurrentToken(); - - if (Token::NAME_TYPE !== $token->getType()) { - throw new SyntaxError('A block must start with a tag name.', $token->getLine(), $this->stream->getSourceContext()); - } - - if (null !== $test && \call_user_func($test, $token)) { - if ($dropNeedle) { - $this->stream->next(); - } - - if (1 === \count($rv)) { - return $rv[0]; - } - - return new Node($rv, [], $lineno); - } - - $subparser = $this->handlers->getTokenParser($token->getValue()); - if (null === $subparser) { - if (null !== $test) { - $e = new SyntaxError(sprintf('Unexpected "%s" tag', $token->getValue()), $token->getLine(), $this->stream->getSourceContext()); - - if (\is_array($test) && isset($test[0]) && $test[0] instanceof TokenParserInterface) { - $e->appendMessage(sprintf(' (expecting closing tag for the "%s" tag defined near line %s).', $test[0]->getTag(), $lineno)); - } - } else { - $e = new SyntaxError(sprintf('Unknown "%s" tag.', $token->getValue()), $token->getLine(), $this->stream->getSourceContext()); - $e->addSuggestions($token->getValue(), array_keys($this->env->getTags())); - } - - throw $e; - } - - $this->stream->next(); - - $node = $subparser->parse($token); - if (null !== $node) { - $rv[] = $node; - } - break; - - default: - throw new SyntaxError('Lexer or parser ended up in unsupported state.', $this->getCurrentToken()->getLine(), $this->stream->getSourceContext()); - } - } - - if (1 === \count($rv)) { - return $rv[0]; - } - - return new Node($rv, [], $lineno); - } - - /** - * @deprecated since 1.27 (to be removed in 2.0) - */ - public function addHandler($name, $class) - { - @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0.', \E_USER_DEPRECATED); - - $this->handlers[$name] = $class; - } - - /** - * @deprecated since 1.27 (to be removed in 2.0) - */ - public function addNodeVisitor(NodeVisitorInterface $visitor) - { - @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0.', \E_USER_DEPRECATED); - - $this->visitors[] = $visitor; - } - - public function getBlockStack() - { - return $this->blockStack; - } - - public function peekBlockStack() - { - return isset($this->blockStack[\count($this->blockStack) - 1]) ? $this->blockStack[\count($this->blockStack) - 1] : null; - } - - public function popBlockStack() - { - array_pop($this->blockStack); - } - - public function pushBlockStack($name) - { - $this->blockStack[] = $name; - } - - public function hasBlock($name) - { - return isset($this->blocks[$name]); - } - - public function getBlock($name) - { - return $this->blocks[$name]; - } - - public function setBlock($name, BlockNode $value) - { - $this->blocks[$name] = new BodyNode([$value], [], $value->getTemplateLine()); - } - - public function hasMacro($name) - { - return isset($this->macros[$name]); - } - - public function setMacro($name, MacroNode $node) - { - if ($this->isReservedMacroName($name)) { - throw new SyntaxError(sprintf('"%s" cannot be used as a macro name as it is a reserved keyword.', $name), $node->getTemplateLine(), $this->stream->getSourceContext()); - } - - $this->macros[$name] = $node; - } - - public function isReservedMacroName($name) - { - if (null === $this->reservedMacroNames) { - $this->reservedMacroNames = []; - $r = new \ReflectionClass($this->env->getBaseTemplateClass()); - foreach ($r->getMethods() as $method) { - $methodName = strtr($method->getName(), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'); - - if ('get' === substr($methodName, 0, 3) && isset($methodName[3])) { - $this->reservedMacroNames[] = substr($methodName, 3); - } - } - } - - return \in_array(strtr($name, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'), $this->reservedMacroNames); - } - - public function addTrait($trait) - { - $this->traits[] = $trait; - } - - public function hasTraits() - { - return \count($this->traits) > 0; - } - - public function embedTemplate(ModuleNode $template) - { - $template->setIndex(mt_rand()); - - $this->embeddedTemplates[] = $template; - } - - public function addImportedSymbol($type, $alias, $name = null, AbstractExpression $node = null) - { - $this->importedSymbols[0][$type][$alias] = ['name' => $name, 'node' => $node]; - } - - public function getImportedSymbol($type, $alias) - { - if (null !== $this->peekBlockStack()) { - foreach ($this->importedSymbols as $functions) { - if (isset($functions[$type][$alias])) { - if (\count($this->blockStack) > 1) { - return null; - } - - return $functions[$type][$alias]; - } - } - } else { - return isset($this->importedSymbols[0][$type][$alias]) ? $this->importedSymbols[0][$type][$alias] : null; - } - } - - public function isMainScope() - { - return 1 === \count($this->importedSymbols); - } - - public function pushLocalScope() - { - array_unshift($this->importedSymbols, []); - } - - public function popLocalScope() - { - array_shift($this->importedSymbols); - } - - /** - * @return ExpressionParser - */ - public function getExpressionParser() - { - return $this->expressionParser; - } - - public function getParent() - { - return $this->parent; - } - - public function setParent($parent) - { - $this->parent = $parent; - } - - /** - * @return TokenStream - */ - public function getStream() - { - return $this->stream; - } - - /** - * @return Token - */ - public function getCurrentToken() - { - return $this->stream->getCurrent(); - } - - protected function filterBodyNodes(\Twig_NodeInterface $node) - { - // check that the body does not contain non-empty output nodes - if ( - ($node instanceof TextNode && !ctype_space($node->getAttribute('data'))) - || - (!$node instanceof TextNode && !$node instanceof BlockReferenceNode && $node instanceof NodeOutputInterface) - ) { - if (false !== strpos((string) $node, \chr(0xEF).\chr(0xBB).\chr(0xBF))) { - $t = substr($node->getAttribute('data'), 3); - if ('' === $t || ctype_space($t)) { - // bypass empty nodes starting with a BOM - return; - } - } - - throw new SyntaxError('A template that extends another one cannot include content outside Twig blocks. Did you forget to put the content inside a {% block %} tag?', $node->getTemplateLine(), $this->stream->getSourceContext()); - } - - // bypass nodes that will "capture" the output - if ($node instanceof NodeCaptureInterface) { - return $node; - } - - if ($node instanceof NodeOutputInterface) { - return; - } - - foreach ($node as $k => $n) { - if (null !== $n && null === $this->filterBodyNodes($n)) { - $node->removeNode($k); - } - } - - return $node; - } -} - -class_alias('Twig\Parser', 'Twig_Parser'); diff --git a/source/vendor/twig/twig/src/Profiler/Dumper/BaseDumper.php b/source/vendor/twig/twig/src/Profiler/Dumper/BaseDumper.php deleted file mode 100644 index d965dc7..0000000 --- a/source/vendor/twig/twig/src/Profiler/Dumper/BaseDumper.php +++ /dev/null @@ -1,65 +0,0 @@ - - */ -abstract class BaseDumper -{ - private $root; - - public function dump(Profile $profile) - { - return $this->dumpProfile($profile); - } - - abstract protected function formatTemplate(Profile $profile, $prefix); - - abstract protected function formatNonTemplate(Profile $profile, $prefix); - - abstract protected function formatTime(Profile $profile, $percent); - - private function dumpProfile(Profile $profile, $prefix = '', $sibling = false) - { - if ($profile->isRoot()) { - $this->root = $profile->getDuration(); - $start = $profile->getName(); - } else { - if ($profile->isTemplate()) { - $start = $this->formatTemplate($profile, $prefix); - } else { - $start = $this->formatNonTemplate($profile, $prefix); - } - $prefix .= $sibling ? '│ ' : ' '; - } - - $percent = $this->root ? $profile->getDuration() / $this->root * 100 : 0; - - if ($profile->getDuration() * 1000 < 1) { - $str = $start."\n"; - } else { - $str = sprintf("%s %s\n", $start, $this->formatTime($profile, $percent)); - } - - $nCount = \count($profile->getProfiles()); - foreach ($profile as $i => $p) { - $str .= $this->dumpProfile($p, $prefix, $i + 1 !== $nCount); - } - - return $str; - } -} - -class_alias('Twig\Profiler\Dumper\BaseDumper', 'Twig_Profiler_Dumper_Base'); diff --git a/source/vendor/twig/twig/src/Profiler/Dumper/BlackfireDumper.php b/source/vendor/twig/twig/src/Profiler/Dumper/BlackfireDumper.php deleted file mode 100644 index a1c3c7b..0000000 --- a/source/vendor/twig/twig/src/Profiler/Dumper/BlackfireDumper.php +++ /dev/null @@ -1,76 +0,0 @@ - - * - * @final - */ -class BlackfireDumper -{ - public function dump(Profile $profile) - { - $data = []; - $this->dumpProfile('main()', $profile, $data); - $this->dumpChildren('main()', $profile, $data); - - $start = sprintf('%f', microtime(true)); - $str = << $values) { - $str .= "{$name}//{$values['ct']} {$values['wt']} {$values['mu']} {$values['pmu']}\n"; - } - - return $str; - } - - private function dumpChildren($parent, Profile $profile, &$data) - { - foreach ($profile as $p) { - if ($p->isTemplate()) { - $name = $p->getTemplate(); - } else { - $name = sprintf('%s::%s(%s)', $p->getTemplate(), $p->getType(), $p->getName()); - } - $this->dumpProfile(sprintf('%s==>%s', $parent, $name), $p, $data); - $this->dumpChildren($name, $p, $data); - } - } - - private function dumpProfile($edge, Profile $profile, &$data) - { - if (isset($data[$edge])) { - ++$data[$edge]['ct']; - $data[$edge]['wt'] += floor($profile->getDuration() * 1000000); - $data[$edge]['mu'] += $profile->getMemoryUsage(); - $data[$edge]['pmu'] += $profile->getPeakMemoryUsage(); - } else { - $data[$edge] = [ - 'ct' => 1, - 'wt' => floor($profile->getDuration() * 1000000), - 'mu' => $profile->getMemoryUsage(), - 'pmu' => $profile->getPeakMemoryUsage(), - ]; - } - } -} - -class_alias('Twig\Profiler\Dumper\BlackfireDumper', 'Twig_Profiler_Dumper_Blackfire'); diff --git a/source/vendor/twig/twig/src/Profiler/Dumper/HtmlDumper.php b/source/vendor/twig/twig/src/Profiler/Dumper/HtmlDumper.php deleted file mode 100644 index c70b405..0000000 --- a/source/vendor/twig/twig/src/Profiler/Dumper/HtmlDumper.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * @final - */ -class HtmlDumper extends BaseDumper -{ - private static $colors = [ - 'block' => '#dfd', - 'macro' => '#ddf', - 'template' => '#ffd', - 'big' => '#d44', - ]; - - public function dump(Profile $profile) - { - return '
        '.parent::dump($profile).'
        '; - } - - protected function formatTemplate(Profile $profile, $prefix) - { - return sprintf('%s└ %s', $prefix, self::$colors['template'], $profile->getTemplate()); - } - - protected function formatNonTemplate(Profile $profile, $prefix) - { - return sprintf('%s└ %s::%s(%s)', $prefix, $profile->getTemplate(), $profile->getType(), isset(self::$colors[$profile->getType()]) ? self::$colors[$profile->getType()] : 'auto', $profile->getName()); - } - - protected function formatTime(Profile $profile, $percent) - { - return sprintf('%.2fms/%.0f%%', $percent > 20 ? self::$colors['big'] : 'auto', $profile->getDuration() * 1000, $percent); - } -} - -class_alias('Twig\Profiler\Dumper\HtmlDumper', 'Twig_Profiler_Dumper_Html'); diff --git a/source/vendor/twig/twig/src/Profiler/Dumper/TextDumper.php b/source/vendor/twig/twig/src/Profiler/Dumper/TextDumper.php deleted file mode 100644 index c6b5158..0000000 --- a/source/vendor/twig/twig/src/Profiler/Dumper/TextDumper.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * @final - */ -class TextDumper extends BaseDumper -{ - protected function formatTemplate(Profile $profile, $prefix) - { - return sprintf('%s└ %s', $prefix, $profile->getTemplate()); - } - - protected function formatNonTemplate(Profile $profile, $prefix) - { - return sprintf('%s└ %s::%s(%s)', $prefix, $profile->getTemplate(), $profile->getType(), $profile->getName()); - } - - protected function formatTime(Profile $profile, $percent) - { - return sprintf('%.2fms/%.0f%%', $profile->getDuration() * 1000, $percent); - } -} - -class_alias('Twig\Profiler\Dumper\TextDumper', 'Twig_Profiler_Dumper_Text'); diff --git a/source/vendor/twig/twig/src/Profiler/Node/EnterProfileNode.php b/source/vendor/twig/twig/src/Profiler/Node/EnterProfileNode.php deleted file mode 100644 index 8ffd3dc..0000000 --- a/source/vendor/twig/twig/src/Profiler/Node/EnterProfileNode.php +++ /dev/null @@ -1,44 +0,0 @@ - - */ -class EnterProfileNode extends Node -{ - public function __construct($extensionName, $type, $name, $varName) - { - parent::__construct([], ['extension_name' => $extensionName, 'name' => $name, 'type' => $type, 'var_name' => $varName]); - } - - public function compile(Compiler $compiler) - { - $compiler - ->write(sprintf('$%s = $this->env->getExtension(', $this->getAttribute('var_name'))) - ->repr($this->getAttribute('extension_name')) - ->raw(");\n") - ->write(sprintf('$%s->enter($%s = new \Twig\Profiler\Profile($this->getTemplateName(), ', $this->getAttribute('var_name'), $this->getAttribute('var_name').'_prof')) - ->repr($this->getAttribute('type')) - ->raw(', ') - ->repr($this->getAttribute('name')) - ->raw("));\n\n") - ; - } -} - -class_alias('Twig\Profiler\Node\EnterProfileNode', 'Twig_Profiler_Node_EnterProfile'); diff --git a/source/vendor/twig/twig/src/Profiler/Node/LeaveProfileNode.php b/source/vendor/twig/twig/src/Profiler/Node/LeaveProfileNode.php deleted file mode 100644 index 3b7a74d..0000000 --- a/source/vendor/twig/twig/src/Profiler/Node/LeaveProfileNode.php +++ /dev/null @@ -1,38 +0,0 @@ - - */ -class LeaveProfileNode extends Node -{ - public function __construct($varName) - { - parent::__construct([], ['var_name' => $varName]); - } - - public function compile(Compiler $compiler) - { - $compiler - ->write("\n") - ->write(sprintf("\$%s->leave(\$%s);\n\n", $this->getAttribute('var_name'), $this->getAttribute('var_name').'_prof')) - ; - } -} - -class_alias('Twig\Profiler\Node\LeaveProfileNode', 'Twig_Profiler_Node_LeaveProfile'); diff --git a/source/vendor/twig/twig/src/Profiler/NodeVisitor/ProfilerNodeVisitor.php b/source/vendor/twig/twig/src/Profiler/NodeVisitor/ProfilerNodeVisitor.php deleted file mode 100644 index 41ca9e1..0000000 --- a/source/vendor/twig/twig/src/Profiler/NodeVisitor/ProfilerNodeVisitor.php +++ /dev/null @@ -1,80 +0,0 @@ - - * - * @final - */ -class ProfilerNodeVisitor extends AbstractNodeVisitor -{ - private $extensionName; - - public function __construct($extensionName) - { - $this->extensionName = $extensionName; - } - - protected function doEnterNode(Node $node, Environment $env) - { - return $node; - } - - protected function doLeaveNode(Node $node, Environment $env) - { - if ($node instanceof ModuleNode) { - $varName = $this->getVarName(); - $node->setNode('display_start', new Node([new EnterProfileNode($this->extensionName, Profile::TEMPLATE, $node->getTemplateName(), $varName), $node->getNode('display_start')])); - $node->setNode('display_end', new Node([new LeaveProfileNode($varName), $node->getNode('display_end')])); - } elseif ($node instanceof BlockNode) { - $varName = $this->getVarName(); - $node->setNode('body', new BodyNode([ - new EnterProfileNode($this->extensionName, Profile::BLOCK, $node->getAttribute('name'), $varName), - $node->getNode('body'), - new LeaveProfileNode($varName), - ])); - } elseif ($node instanceof MacroNode) { - $varName = $this->getVarName(); - $node->setNode('body', new BodyNode([ - new EnterProfileNode($this->extensionName, Profile::MACRO, $node->getAttribute('name'), $varName), - $node->getNode('body'), - new LeaveProfileNode($varName), - ])); - } - - return $node; - } - - private function getVarName() - { - return sprintf('__internal_%s', hash('sha256', $this->extensionName)); - } - - public function getPriority() - { - return 0; - } -} - -class_alias('Twig\Profiler\NodeVisitor\ProfilerNodeVisitor', 'Twig_Profiler_NodeVisitor_Profiler'); diff --git a/source/vendor/twig/twig/src/Profiler/Profile.php b/source/vendor/twig/twig/src/Profiler/Profile.php deleted file mode 100644 index 60ae02e..0000000 --- a/source/vendor/twig/twig/src/Profiler/Profile.php +++ /dev/null @@ -1,188 +0,0 @@ - - * - * @final - */ -class Profile implements \IteratorAggregate, \Serializable -{ - public const ROOT = 'ROOT'; - public const BLOCK = 'block'; - public const TEMPLATE = 'template'; - public const MACRO = 'macro'; - - private $template; - private $name; - private $type; - private $starts = []; - private $ends = []; - private $profiles = []; - - public function __construct($template = 'main', $type = self::ROOT, $name = 'main') - { - $this->template = $template; - $this->type = $type; - $this->name = 0 === strpos($name, '__internal_') ? 'INTERNAL' : $name; - $this->enter(); - } - - public function getTemplate() - { - return $this->template; - } - - public function getType() - { - return $this->type; - } - - public function getName() - { - return $this->name; - } - - public function isRoot() - { - return self::ROOT === $this->type; - } - - public function isTemplate() - { - return self::TEMPLATE === $this->type; - } - - public function isBlock() - { - return self::BLOCK === $this->type; - } - - public function isMacro() - { - return self::MACRO === $this->type; - } - - public function getProfiles() - { - return $this->profiles; - } - - public function addProfile(self $profile) - { - $this->profiles[] = $profile; - } - - /** - * Returns the duration in microseconds. - * - * @return float - */ - public function getDuration() - { - if ($this->isRoot() && $this->profiles) { - // for the root node with children, duration is the sum of all child durations - $duration = 0; - foreach ($this->profiles as $profile) { - $duration += $profile->getDuration(); - } - - return $duration; - } - - return isset($this->ends['wt']) && isset($this->starts['wt']) ? $this->ends['wt'] - $this->starts['wt'] : 0; - } - - /** - * Returns the memory usage in bytes. - * - * @return int - */ - public function getMemoryUsage() - { - return isset($this->ends['mu']) && isset($this->starts['mu']) ? $this->ends['mu'] - $this->starts['mu'] : 0; - } - - /** - * Returns the peak memory usage in bytes. - * - * @return int - */ - public function getPeakMemoryUsage() - { - return isset($this->ends['pmu']) && isset($this->starts['pmu']) ? $this->ends['pmu'] - $this->starts['pmu'] : 0; - } - - /** - * Starts the profiling. - */ - public function enter() - { - $this->starts = [ - 'wt' => microtime(true), - 'mu' => memory_get_usage(), - 'pmu' => memory_get_peak_usage(), - ]; - } - - /** - * Stops the profiling. - */ - public function leave() - { - $this->ends = [ - 'wt' => microtime(true), - 'mu' => memory_get_usage(), - 'pmu' => memory_get_peak_usage(), - ]; - } - - public function reset() - { - $this->starts = $this->ends = $this->profiles = []; - $this->enter(); - } - - public function getIterator(): \Traversable - { - return new \ArrayIterator($this->profiles); - } - - public function serialize(): string - { - return serialize($this->__serialize()); - } - - public function unserialize($data): void - { - $this->__unserialize(unserialize($data)); - } - - /** - * @internal - */ - public function __serialize(): array - { - return [$this->template, $this->name, $this->type, $this->starts, $this->ends, $this->profiles]; - } - - /** - * @internal - */ - public function __unserialize(array $data): void - { - list($this->template, $this->name, $this->type, $this->starts, $this->ends, $this->profiles) = $data; - } -} - -class_alias('Twig\Profiler\Profile', 'Twig_Profiler_Profile'); diff --git a/source/vendor/twig/twig/src/RuntimeLoader/ContainerRuntimeLoader.php b/source/vendor/twig/twig/src/RuntimeLoader/ContainerRuntimeLoader.php deleted file mode 100644 index 04a6602..0000000 --- a/source/vendor/twig/twig/src/RuntimeLoader/ContainerRuntimeLoader.php +++ /dev/null @@ -1,41 +0,0 @@ - - * @author Robin Chalas - */ -class ContainerRuntimeLoader implements RuntimeLoaderInterface -{ - private $container; - - public function __construct(ContainerInterface $container) - { - $this->container = $container; - } - - public function load($class) - { - if ($this->container->has($class)) { - return $this->container->get($class); - } - } -} - -class_alias('Twig\RuntimeLoader\ContainerRuntimeLoader', 'Twig_ContainerRuntimeLoader'); diff --git a/source/vendor/twig/twig/src/RuntimeLoader/FactoryRuntimeLoader.php b/source/vendor/twig/twig/src/RuntimeLoader/FactoryRuntimeLoader.php deleted file mode 100644 index 43b5f24..0000000 --- a/source/vendor/twig/twig/src/RuntimeLoader/FactoryRuntimeLoader.php +++ /dev/null @@ -1,41 +0,0 @@ - - */ -class FactoryRuntimeLoader implements RuntimeLoaderInterface -{ - private $map; - - /** - * @param array $map An array where keys are class names and values factory callables - */ - public function __construct($map = []) - { - $this->map = $map; - } - - public function load($class) - { - if (isset($this->map[$class])) { - $runtimeFactory = $this->map[$class]; - - return $runtimeFactory(); - } - } -} - -class_alias('Twig\RuntimeLoader\FactoryRuntimeLoader', 'Twig_FactoryRuntimeLoader'); diff --git a/source/vendor/twig/twig/src/RuntimeLoader/RuntimeLoaderInterface.php b/source/vendor/twig/twig/src/RuntimeLoader/RuntimeLoaderInterface.php deleted file mode 100644 index 4eb5ad8..0000000 --- a/source/vendor/twig/twig/src/RuntimeLoader/RuntimeLoaderInterface.php +++ /dev/null @@ -1,31 +0,0 @@ - - */ -interface RuntimeLoaderInterface -{ - /** - * Creates the runtime implementation of a Twig element (filter/function/test). - * - * @param string $class A runtime class - * - * @return object|null The runtime instance or null if the loader does not know how to create the runtime for this class - */ - public function load($class); -} - -class_alias('Twig\RuntimeLoader\RuntimeLoaderInterface', 'Twig_RuntimeLoaderInterface'); diff --git a/source/vendor/twig/twig/src/Sandbox/SecurityError.php b/source/vendor/twig/twig/src/Sandbox/SecurityError.php deleted file mode 100644 index 5f96d46..0000000 --- a/source/vendor/twig/twig/src/Sandbox/SecurityError.php +++ /dev/null @@ -1,25 +0,0 @@ - - */ -class SecurityError extends Error -{ -} - -class_alias('Twig\Sandbox\SecurityError', 'Twig_Sandbox_SecurityError'); diff --git a/source/vendor/twig/twig/src/Sandbox/SecurityNotAllowedFilterError.php b/source/vendor/twig/twig/src/Sandbox/SecurityNotAllowedFilterError.php deleted file mode 100644 index fa0fdee..0000000 --- a/source/vendor/twig/twig/src/Sandbox/SecurityNotAllowedFilterError.php +++ /dev/null @@ -1,35 +0,0 @@ - - */ -class SecurityNotAllowedFilterError extends SecurityError -{ - private $filterName; - - public function __construct($message, $functionName, $lineno = -1, $filename = null, \Exception $previous = null) - { - parent::__construct($message, $lineno, $filename, $previous); - $this->filterName = $functionName; - } - - public function getFilterName() - { - return $this->filterName; - } -} - -class_alias('Twig\Sandbox\SecurityNotAllowedFilterError', 'Twig_Sandbox_SecurityNotAllowedFilterError'); diff --git a/source/vendor/twig/twig/src/Sandbox/SecurityNotAllowedFunctionError.php b/source/vendor/twig/twig/src/Sandbox/SecurityNotAllowedFunctionError.php deleted file mode 100644 index 8f23f93..0000000 --- a/source/vendor/twig/twig/src/Sandbox/SecurityNotAllowedFunctionError.php +++ /dev/null @@ -1,35 +0,0 @@ - - */ -class SecurityNotAllowedFunctionError extends SecurityError -{ - private $functionName; - - public function __construct($message, $functionName, $lineno = -1, $filename = null, \Exception $previous = null) - { - parent::__construct($message, $lineno, $filename, $previous); - $this->functionName = $functionName; - } - - public function getFunctionName() - { - return $this->functionName; - } -} - -class_alias('Twig\Sandbox\SecurityNotAllowedFunctionError', 'Twig_Sandbox_SecurityNotAllowedFunctionError'); diff --git a/source/vendor/twig/twig/src/Sandbox/SecurityNotAllowedMethodError.php b/source/vendor/twig/twig/src/Sandbox/SecurityNotAllowedMethodError.php deleted file mode 100644 index 62e13f4..0000000 --- a/source/vendor/twig/twig/src/Sandbox/SecurityNotAllowedMethodError.php +++ /dev/null @@ -1,42 +0,0 @@ - - */ -class SecurityNotAllowedMethodError extends SecurityError -{ - private $className; - private $methodName; - - public function __construct($message, $className, $methodName, $lineno = -1, $filename = null, \Exception $previous = null) - { - parent::__construct($message, $lineno, $filename, $previous); - $this->className = $className; - $this->methodName = $methodName; - } - - public function getClassName() - { - return $this->className; - } - - public function getMethodName() - { - return $this->methodName; - } -} - -class_alias('Twig\Sandbox\SecurityNotAllowedMethodError', 'Twig_Sandbox_SecurityNotAllowedMethodError'); diff --git a/source/vendor/twig/twig/src/Sandbox/SecurityNotAllowedPropertyError.php b/source/vendor/twig/twig/src/Sandbox/SecurityNotAllowedPropertyError.php deleted file mode 100644 index 3bf5305..0000000 --- a/source/vendor/twig/twig/src/Sandbox/SecurityNotAllowedPropertyError.php +++ /dev/null @@ -1,42 +0,0 @@ - - */ -class SecurityNotAllowedPropertyError extends SecurityError -{ - private $className; - private $propertyName; - - public function __construct($message, $className, $propertyName, $lineno = -1, $filename = null, \Exception $previous = null) - { - parent::__construct($message, $lineno, $filename, $previous); - $this->className = $className; - $this->propertyName = $propertyName; - } - - public function getClassName() - { - return $this->className; - } - - public function getPropertyName() - { - return $this->propertyName; - } -} - -class_alias('Twig\Sandbox\SecurityNotAllowedPropertyError', 'Twig_Sandbox_SecurityNotAllowedPropertyError'); diff --git a/source/vendor/twig/twig/src/Sandbox/SecurityNotAllowedTagError.php b/source/vendor/twig/twig/src/Sandbox/SecurityNotAllowedTagError.php deleted file mode 100644 index de283b4..0000000 --- a/source/vendor/twig/twig/src/Sandbox/SecurityNotAllowedTagError.php +++ /dev/null @@ -1,35 +0,0 @@ - - */ -class SecurityNotAllowedTagError extends SecurityError -{ - private $tagName; - - public function __construct($message, $tagName, $lineno = -1, $filename = null, \Exception $previous = null) - { - parent::__construct($message, $lineno, $filename, $previous); - $this->tagName = $tagName; - } - - public function getTagName() - { - return $this->tagName; - } -} - -class_alias('Twig\Sandbox\SecurityNotAllowedTagError', 'Twig_Sandbox_SecurityNotAllowedTagError'); diff --git a/source/vendor/twig/twig/src/Sandbox/SecurityPolicy.php b/source/vendor/twig/twig/src/Sandbox/SecurityPolicy.php deleted file mode 100644 index 6038435..0000000 --- a/source/vendor/twig/twig/src/Sandbox/SecurityPolicy.php +++ /dev/null @@ -1,129 +0,0 @@ - - */ -class SecurityPolicy implements SecurityPolicyInterface -{ - protected $allowedTags; - protected $allowedFilters; - protected $allowedMethods; - protected $allowedProperties; - protected $allowedFunctions; - - public function __construct(array $allowedTags = [], array $allowedFilters = [], array $allowedMethods = [], array $allowedProperties = [], array $allowedFunctions = []) - { - $this->allowedTags = $allowedTags; - $this->allowedFilters = $allowedFilters; - $this->setAllowedMethods($allowedMethods); - $this->allowedProperties = $allowedProperties; - $this->allowedFunctions = $allowedFunctions; - } - - public function setAllowedTags(array $tags) - { - $this->allowedTags = $tags; - } - - public function setAllowedFilters(array $filters) - { - $this->allowedFilters = $filters; - } - - public function setAllowedMethods(array $methods) - { - $this->allowedMethods = []; - foreach ($methods as $class => $m) { - $this->allowedMethods[$class] = array_map(function ($value) { return strtr($value, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'); }, \is_array($m) ? $m : [$m]); - } - } - - public function setAllowedProperties(array $properties) - { - $this->allowedProperties = $properties; - } - - public function setAllowedFunctions(array $functions) - { - $this->allowedFunctions = $functions; - } - - public function checkSecurity($tags, $filters, $functions) - { - foreach ($tags as $tag) { - if (!\in_array($tag, $this->allowedTags)) { - throw new SecurityNotAllowedTagError(sprintf('Tag "%s" is not allowed.', $tag), $tag); - } - } - - foreach ($filters as $filter) { - if (!\in_array($filter, $this->allowedFilters)) { - throw new SecurityNotAllowedFilterError(sprintf('Filter "%s" is not allowed.', $filter), $filter); - } - } - - foreach ($functions as $function) { - if (!\in_array($function, $this->allowedFunctions)) { - throw new SecurityNotAllowedFunctionError(sprintf('Function "%s" is not allowed.', $function), $function); - } - } - } - - public function checkMethodAllowed($obj, $method) - { - if ($obj instanceof \Twig_TemplateInterface || $obj instanceof Markup) { - return; - } - - $allowed = false; - $method = strtr($method, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'); - foreach ($this->allowedMethods as $class => $methods) { - if ($obj instanceof $class) { - $allowed = \in_array($method, $methods); - - break; - } - } - - if (!$allowed) { - $class = \get_class($obj); - throw new SecurityNotAllowedMethodError(sprintf('Calling "%s" method on a "%s" object is not allowed.', $method, $class), $class, $method); - } - } - - public function checkPropertyAllowed($obj, $property) - { - $allowed = false; - foreach ($this->allowedProperties as $class => $properties) { - if ($obj instanceof $class) { - $allowed = \in_array($property, \is_array($properties) ? $properties : [$properties]); - - break; - } - } - - if (!$allowed) { - $class = \get_class($obj); - throw new SecurityNotAllowedPropertyError(sprintf('Calling "%s" property on a "%s" object is not allowed.', $property, $class), $class, $property); - } - } -} - -class_alias('Twig\Sandbox\SecurityPolicy', 'Twig_Sandbox_SecurityPolicy'); diff --git a/source/vendor/twig/twig/src/Sandbox/SecurityPolicyInterface.php b/source/vendor/twig/twig/src/Sandbox/SecurityPolicyInterface.php deleted file mode 100644 index a31863f..0000000 --- a/source/vendor/twig/twig/src/Sandbox/SecurityPolicyInterface.php +++ /dev/null @@ -1,28 +0,0 @@ - - */ -interface SecurityPolicyInterface -{ - public function checkSecurity($tags, $filters, $functions); - - public function checkMethodAllowed($obj, $method); - - public function checkPropertyAllowed($obj, $method); -} - -class_alias('Twig\Sandbox\SecurityPolicyInterface', 'Twig_Sandbox_SecurityPolicyInterface'); diff --git a/source/vendor/twig/twig/src/Source.php b/source/vendor/twig/twig/src/Source.php deleted file mode 100644 index 32a8216..0000000 --- a/source/vendor/twig/twig/src/Source.php +++ /dev/null @@ -1,55 +0,0 @@ - - */ -class Source -{ - private $code; - private $name; - private $path; - - /** - * @param string $code The template source code - * @param string $name The template logical name - * @param string $path The filesystem path of the template if any - */ - public function __construct($code, $name, $path = '') - { - $this->code = $code; - $this->name = $name; - $this->path = $path; - } - - public function getCode() - { - return $this->code; - } - - public function getName() - { - return $this->name; - } - - public function getPath() - { - return $this->path; - } -} - -class_alias('Twig\Source', 'Twig_Source'); diff --git a/source/vendor/twig/twig/src/Template.php b/source/vendor/twig/twig/src/Template.php deleted file mode 100644 index 876d1ca..0000000 --- a/source/vendor/twig/twig/src/Template.php +++ /dev/null @@ -1,731 +0,0 @@ -load() - * instead, which returns an instance of \Twig\TemplateWrapper. - * - * @author Fabien Potencier - * - * @internal - */ -abstract class Template implements \Twig_TemplateInterface -{ - /** - * @internal - */ - protected static $cache = []; - - protected $parent; - protected $parents = []; - protected $env; - protected $blocks = []; - protected $traits = []; - protected $sandbox; - - public function __construct(Environment $env) - { - $this->env = $env; - } - - /** - * @internal this method will be removed in 2.0 and is only used internally to provide an upgrade path from 1.x to 2.0 - */ - public function __toString() - { - return $this->getTemplateName(); - } - - /** - * Returns the template name. - * - * @return string The template name - */ - abstract public function getTemplateName(); - - /** - * Returns debug information about the template. - * - * @return array Debug information - */ - public function getDebugInfo() - { - return []; - } - - /** - * Returns the template source code. - * - * @return string The template source code - * - * @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead - */ - public function getSource() - { - @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', \E_USER_DEPRECATED); - - return ''; - } - - /** - * Returns information about the original template source code. - * - * @return Source - */ - public function getSourceContext() - { - return new Source('', $this->getTemplateName()); - } - - /** - * @deprecated since 1.20 (to be removed in 2.0) - */ - public function getEnvironment() - { - @trigger_error('The '.__METHOD__.' method is deprecated since version 1.20 and will be removed in 2.0.', \E_USER_DEPRECATED); - - return $this->env; - } - - /** - * Returns the parent template. - * - * This method is for internal use only and should never be called - * directly. - * - * @return \Twig_TemplateInterface|TemplateWrapper|false The parent template or false if there is no parent - * - * @internal - */ - public function getParent(array $context) - { - if (null !== $this->parent) { - return $this->parent; - } - - try { - $parent = $this->doGetParent($context); - - if (false === $parent) { - return false; - } - - if ($parent instanceof self || $parent instanceof TemplateWrapper) { - return $this->parents[$parent->getSourceContext()->getName()] = $parent; - } - - if (!isset($this->parents[$parent])) { - $this->parents[$parent] = $this->loadTemplate($parent); - } - } catch (LoaderError $e) { - $e->setSourceContext(null); - $e->guess(); - - throw $e; - } - - return $this->parents[$parent]; - } - - protected function doGetParent(array $context) - { - return false; - } - - public function isTraitable() - { - return true; - } - - /** - * Displays a parent block. - * - * This method is for internal use only and should never be called - * directly. - * - * @param string $name The block name to display from the parent - * @param array $context The context - * @param array $blocks The current set of blocks - */ - public function displayParentBlock($name, array $context, array $blocks = []) - { - $name = (string) $name; - - if (isset($this->traits[$name])) { - $this->traits[$name][0]->displayBlock($name, $context, $blocks, false); - } elseif (false !== $parent = $this->getParent($context)) { - $parent->displayBlock($name, $context, $blocks, false); - } else { - throw new RuntimeError(sprintf('The template has no parent and no traits defining the "%s" block.', $name), -1, $this->getSourceContext()); - } - } - - /** - * Displays a block. - * - * This method is for internal use only and should never be called - * directly. - * - * @param string $name The block name to display - * @param array $context The context - * @param array $blocks The current set of blocks - * @param bool $useBlocks Whether to use the current set of blocks - */ - public function displayBlock($name, array $context, array $blocks = [], $useBlocks = true) - { - $name = (string) $name; - - if ($useBlocks && isset($blocks[$name])) { - $template = $blocks[$name][0]; - $block = $blocks[$name][1]; - } elseif (isset($this->blocks[$name])) { - $template = $this->blocks[$name][0]; - $block = $this->blocks[$name][1]; - } else { - $template = null; - $block = null; - } - - // avoid RCEs when sandbox is enabled - if (null !== $template && !$template instanceof self) { - throw new \LogicException('A block must be a method on a \Twig\Template instance.'); - } - - if (null !== $template) { - try { - $template->$block($context, $blocks); - } catch (Error $e) { - if (!$e->getSourceContext()) { - $e->setSourceContext($template->getSourceContext()); - } - - // this is mostly useful for \Twig\Error\LoaderError exceptions - // see \Twig\Error\LoaderError - if (-1 === $e->getTemplateLine()) { - $e->guess(); - } - - throw $e; - } catch (\Exception $e) { - $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $template->getSourceContext(), $e); - $e->guess(); - - throw $e; - } - } elseif (false !== $parent = $this->getParent($context)) { - $parent->displayBlock($name, $context, array_merge($this->blocks, $blocks), false); - } else { - @trigger_error(sprintf('Silent display of undefined block "%s" in template "%s" is deprecated since version 1.29 and will throw an exception in 2.0. Use the "block(\'%s\') is defined" expression to test for block existence.', $name, $this->getTemplateName(), $name), \E_USER_DEPRECATED); - } - } - - /** - * Renders a parent block. - * - * This method is for internal use only and should never be called - * directly. - * - * @param string $name The block name to render from the parent - * @param array $context The context - * @param array $blocks The current set of blocks - * - * @return string The rendered block - */ - public function renderParentBlock($name, array $context, array $blocks = []) - { - if ($this->env->isDebug()) { - ob_start(); - } else { - ob_start(function () { return ''; }); - } - $this->displayParentBlock($name, $context, $blocks); - - return ob_get_clean(); - } - - /** - * Renders a block. - * - * This method is for internal use only and should never be called - * directly. - * - * @param string $name The block name to render - * @param array $context The context - * @param array $blocks The current set of blocks - * @param bool $useBlocks Whether to use the current set of blocks - * - * @return string The rendered block - */ - public function renderBlock($name, array $context, array $blocks = [], $useBlocks = true) - { - if ($this->env->isDebug()) { - ob_start(); - } else { - ob_start(function () { return ''; }); - } - $this->displayBlock($name, $context, $blocks, $useBlocks); - - return ob_get_clean(); - } - - /** - * Returns whether a block exists or not in the current context of the template. - * - * This method checks blocks defined in the current template - * or defined in "used" traits or defined in parent templates. - * - * @param string $name The block name - * @param array $context The context - * @param array $blocks The current set of blocks - * - * @return bool true if the block exists, false otherwise - */ - public function hasBlock($name, array $context = null, array $blocks = []) - { - if (null === $context) { - @trigger_error('The '.__METHOD__.' method is internal and should never be called; calling it directly is deprecated since version 1.28 and won\'t be possible anymore in 2.0.', \E_USER_DEPRECATED); - - return isset($this->blocks[(string) $name]); - } - - if (isset($blocks[$name])) { - return $blocks[$name][0] instanceof self; - } - - if (isset($this->blocks[$name])) { - return true; - } - - if (false !== $parent = $this->getParent($context)) { - return $parent->hasBlock($name, $context); - } - - return false; - } - - /** - * Returns all block names in the current context of the template. - * - * This method checks blocks defined in the current template - * or defined in "used" traits or defined in parent templates. - * - * @param array $context The context - * @param array $blocks The current set of blocks - * - * @return array An array of block names - */ - public function getBlockNames(array $context = null, array $blocks = []) - { - if (null === $context) { - @trigger_error('The '.__METHOD__.' method is internal and should never be called; calling it directly is deprecated since version 1.28 and won\'t be possible anymore in 2.0.', \E_USER_DEPRECATED); - - return array_keys($this->blocks); - } - - $names = array_merge(array_keys($blocks), array_keys($this->blocks)); - - if (false !== $parent = $this->getParent($context)) { - $names = array_merge($names, $parent->getBlockNames($context)); - } - - return array_unique($names); - } - - /** - * @return Template|TemplateWrapper - */ - protected function loadTemplate($template, $templateName = null, $line = null, $index = null) - { - try { - if (\is_array($template)) { - return $this->env->resolveTemplate($template); - } - - if ($template instanceof self || $template instanceof TemplateWrapper) { - return $template; - } - - if ($template === $this->getTemplateName()) { - $class = static::class; - if (false !== $pos = strrpos($class, '___', -1)) { - $class = substr($class, 0, $pos); - } - - return $this->env->loadClass($class, $template, $index); - } - - return $this->env->loadTemplate($template, $index); - } catch (Error $e) { - if (!$e->getSourceContext()) { - $e->setSourceContext($templateName ? new Source('', $templateName) : $this->getSourceContext()); - } - - if ($e->getTemplateLine() > 0) { - throw $e; - } - - if (!$line) { - $e->guess(); - } else { - $e->setTemplateLine($line); - } - - throw $e; - } - } - - /** - * @internal - * - * @return Template - */ - public function unwrap() - { - return $this; - } - - /** - * Returns all blocks. - * - * This method is for internal use only and should never be called - * directly. - * - * @return array An array of blocks - */ - public function getBlocks() - { - return $this->blocks; - } - - public function display(array $context, array $blocks = []) - { - $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks)); - } - - public function render(array $context) - { - $level = ob_get_level(); - if ($this->env->isDebug()) { - ob_start(); - } else { - ob_start(function () { return ''; }); - } - try { - $this->display($context); - } catch (\Exception $e) { - while (ob_get_level() > $level) { - ob_end_clean(); - } - - throw $e; - } catch (\Throwable $e) { - while (ob_get_level() > $level) { - ob_end_clean(); - } - - throw $e; - } - - return ob_get_clean(); - } - - protected function displayWithErrorHandling(array $context, array $blocks = []) - { - try { - $this->doDisplay($context, $blocks); - } catch (Error $e) { - if (!$e->getSourceContext()) { - $e->setSourceContext($this->getSourceContext()); - } - - // this is mostly useful for \Twig\Error\LoaderError exceptions - // see \Twig\Error\LoaderError - if (-1 === $e->getTemplateLine()) { - $e->guess(); - } - - throw $e; - } catch (\Exception $e) { - $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e); - $e->guess(); - - throw $e; - } - } - - /** - * Auto-generated method to display the template with the given context. - * - * @param array $context An array of parameters to pass to the template - * @param array $blocks An array of blocks to pass to the template - */ - abstract protected function doDisplay(array $context, array $blocks = []); - - /** - * Returns a variable from the context. - * - * This method is for internal use only and should never be called - * directly. - * - * This method should not be overridden in a sub-class as this is an - * implementation detail that has been introduced to optimize variable - * access for versions of PHP before 5.4. This is not a way to override - * the way to get a variable value. - * - * @param array $context The context - * @param string $item The variable to return from the context - * @param bool $ignoreStrictCheck Whether to ignore the strict variable check or not - * - * @return mixed The content of the context variable - * - * @throws RuntimeError if the variable does not exist and Twig is running in strict mode - * - * @internal - */ - final protected function getContext($context, $item, $ignoreStrictCheck = false) - { - if (!\array_key_exists($item, $context)) { - if ($ignoreStrictCheck || !$this->env->isStrictVariables()) { - return; - } - - throw new RuntimeError(sprintf('Variable "%s" does not exist.', $item), -1, $this->getSourceContext()); - } - - return $context[$item]; - } - - /** - * Returns the attribute value for a given array/object. - * - * @param mixed $object The object or array from where to get the item - * @param mixed $item The item to get from the array or object - * @param array $arguments An array of arguments to pass if the item is an object method - * @param string $type The type of attribute (@see \Twig\Template constants) - * @param bool $isDefinedTest Whether this is only a defined check - * @param bool $ignoreStrictCheck Whether to ignore the strict attribute check or not - * - * @return mixed The attribute value, or a Boolean when $isDefinedTest is true, or null when the attribute is not set and $ignoreStrictCheck is true - * - * @throws RuntimeError if the attribute does not exist and Twig is running in strict mode and $isDefinedTest is false - * - * @internal - */ - protected function getAttribute($object, $item, array $arguments = [], $type = self::ANY_CALL, $isDefinedTest = false, $ignoreStrictCheck = false) - { - // array - if (self::METHOD_CALL !== $type) { - $arrayItem = \is_bool($item) || \is_float($item) ? (int) $item : $item; - - if (((\is_array($object) || $object instanceof \ArrayObject) && (isset($object[$arrayItem]) || \array_key_exists($arrayItem, (array) $object))) - || ($object instanceof \ArrayAccess && isset($object[$arrayItem])) - ) { - if ($isDefinedTest) { - return true; - } - - return $object[$arrayItem]; - } - - if (self::ARRAY_CALL === $type || !\is_object($object)) { - if ($isDefinedTest) { - return false; - } - - if ($ignoreStrictCheck || !$this->env->isStrictVariables()) { - return; - } - - if ($object instanceof \ArrayAccess) { - $message = sprintf('Key "%s" in object with ArrayAccess of class "%s" does not exist.', $arrayItem, \get_class($object)); - } elseif (\is_object($object)) { - $message = sprintf('Impossible to access a key "%s" on an object of class "%s" that does not implement ArrayAccess interface.', $item, \get_class($object)); - } elseif (\is_array($object)) { - if (empty($object)) { - $message = sprintf('Key "%s" does not exist as the array is empty.', $arrayItem); - } else { - $message = sprintf('Key "%s" for array with keys "%s" does not exist.', $arrayItem, implode(', ', array_keys($object))); - } - } elseif (self::ARRAY_CALL === $type) { - if (null === $object) { - $message = sprintf('Impossible to access a key ("%s") on a null variable.', $item); - } else { - $message = sprintf('Impossible to access a key ("%s") on a %s variable ("%s").', $item, \gettype($object), $object); - } - } elseif (null === $object) { - $message = sprintf('Impossible to access an attribute ("%s") on a null variable.', $item); - } else { - $message = sprintf('Impossible to access an attribute ("%s") on a %s variable ("%s").', $item, \gettype($object), $object); - } - - throw new RuntimeError($message, -1, $this->getSourceContext()); - } - } - - if (!\is_object($object)) { - if ($isDefinedTest) { - return false; - } - - if ($ignoreStrictCheck || !$this->env->isStrictVariables()) { - return; - } - - if (null === $object) { - $message = sprintf('Impossible to invoke a method ("%s") on a null variable.', $item); - } elseif (\is_array($object)) { - $message = sprintf('Impossible to invoke a method ("%s") on an array.', $item); - } else { - $message = sprintf('Impossible to invoke a method ("%s") on a %s variable ("%s").', $item, \gettype($object), $object); - } - - throw new RuntimeError($message, -1, $this->getSourceContext()); - } - - // object property - if (self::METHOD_CALL !== $type && !$object instanceof self) { // \Twig\Template does not have public properties, and we don't want to allow access to internal ones - if (isset($object->$item) || \array_key_exists((string) $item, (array) $object)) { - if ($isDefinedTest) { - return true; - } - - if ($this->env->hasExtension('\Twig\Extension\SandboxExtension')) { - $this->env->getExtension('\Twig\Extension\SandboxExtension')->checkPropertyAllowed($object, $item); - } - - return $object->$item; - } - } - - $class = \get_class($object); - - // object method - if (!isset(self::$cache[$class])) { - // get_class_methods returns all methods accessible in the scope, but we only want public ones to be accessible in templates - if ($object instanceof self) { - $ref = new \ReflectionClass($class); - $methods = []; - - foreach ($ref->getMethods(\ReflectionMethod::IS_PUBLIC) as $refMethod) { - // Accessing the environment from templates is forbidden to prevent untrusted changes to the environment - if ('getenvironment' !== strtr($refMethod->name, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')) { - $methods[] = $refMethod->name; - } - } - } else { - $methods = get_class_methods($object); - } - // sort values to have consistent behavior, so that "get" methods win precedence over "is" methods - sort($methods); - - $cache = []; - - foreach ($methods as $method) { - $cache[$method] = $method; - $cache[$lcName = strtr($method, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')] = $method; - - if ('g' === $lcName[0] && 0 === strpos($lcName, 'get')) { - $name = substr($method, 3); - $lcName = substr($lcName, 3); - } elseif ('i' === $lcName[0] && 0 === strpos($lcName, 'is')) { - $name = substr($method, 2); - $lcName = substr($lcName, 2); - } else { - continue; - } - - // skip get() and is() methods (in which case, $name is empty) - if ($name) { - if (!isset($cache[$name])) { - $cache[$name] = $method; - } - if (!isset($cache[$lcName])) { - $cache[$lcName] = $method; - } - } - } - self::$cache[$class] = $cache; - } - - $call = false; - if (isset(self::$cache[$class][$item])) { - $method = self::$cache[$class][$item]; - } elseif (isset(self::$cache[$class][$lcItem = strtr($item, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')])) { - $method = self::$cache[$class][$lcItem]; - } elseif (isset(self::$cache[$class]['__call'])) { - $method = $item; - $call = true; - } else { - if ($isDefinedTest) { - return false; - } - - if ($ignoreStrictCheck || !$this->env->isStrictVariables()) { - return; - } - - throw new RuntimeError(sprintf('Neither the property "%1$s" nor one of the methods "%1$s()", "get%1$s()"/"is%1$s()" or "__call()" exist and have public access in class "%2$s".', $item, $class), -1, $this->getSourceContext()); - } - - if ($isDefinedTest) { - return true; - } - - if ($this->env->hasExtension('\Twig\Extension\SandboxExtension')) { - $this->env->getExtension('\Twig\Extension\SandboxExtension')->checkMethodAllowed($object, $method); - } - - // Some objects throw exceptions when they have __call, and the method we try - // to call is not supported. If ignoreStrictCheck is true, we should return null. - try { - if (!$arguments) { - $ret = $object->$method(); - } else { - $ret = \call_user_func_array([$object, $method], $arguments); - } - } catch (\BadMethodCallException $e) { - if ($call && ($ignoreStrictCheck || !$this->env->isStrictVariables())) { - return; - } - throw $e; - } - - // @deprecated in 1.28 - if ($object instanceof \Twig_TemplateInterface) { - $self = $object->getTemplateName() === $this->getTemplateName(); - $message = sprintf('Calling "%s" on template "%s" from template "%s" is deprecated since version 1.28 and won\'t be supported anymore in 2.0.', $item, $object->getTemplateName(), $this->getTemplateName()); - if ('renderBlock' === $method || 'displayBlock' === $method) { - $message .= sprintf(' Use block("%s"%s) instead).', $arguments[0], $self ? '' : ', template'); - } elseif ('hasBlock' === $method) { - $message .= sprintf(' Use "block("%s"%s) is defined" instead).', $arguments[0], $self ? '' : ', template'); - } elseif ('render' === $method || 'display' === $method) { - $message .= sprintf(' Use include("%s") instead).', $object->getTemplateName()); - } - @trigger_error($message, \E_USER_DEPRECATED); - - return '' === $ret ? '' : new Markup($ret, $this->env->getCharset()); - } - - return $ret; - } -} - -class_alias('Twig\Template', 'Twig_Template'); diff --git a/source/vendor/twig/twig/src/TemplateWrapper.php b/source/vendor/twig/twig/src/TemplateWrapper.php deleted file mode 100644 index e265409..0000000 --- a/source/vendor/twig/twig/src/TemplateWrapper.php +++ /dev/null @@ -1,161 +0,0 @@ - - */ -final class TemplateWrapper -{ - private $env; - private $template; - - /** - * This method is for internal use only and should never be called - * directly (use Twig\Environment::load() instead). - * - * @internal - */ - public function __construct(Environment $env, Template $template) - { - $this->env = $env; - $this->template = $template; - } - - /** - * Renders the template. - * - * @param array $context An array of parameters to pass to the template - * - * @return string The rendered template - */ - public function render($context = []) - { - // using func_get_args() allows to not expose the blocks argument - // as it should only be used by internal code - return $this->template->render($context, \func_num_args() > 1 ? func_get_arg(1) : []); - } - - /** - * Displays the template. - * - * @param array $context An array of parameters to pass to the template - */ - public function display($context = []) - { - // using func_get_args() allows to not expose the blocks argument - // as it should only be used by internal code - $this->template->display($context, \func_num_args() > 1 ? func_get_arg(1) : []); - } - - /** - * Checks if a block is defined. - * - * @param string $name The block name - * @param array $context An array of parameters to pass to the template - * - * @return bool - */ - public function hasBlock($name, $context = []) - { - return $this->template->hasBlock($name, $context); - } - - /** - * Returns defined block names in the template. - * - * @param array $context An array of parameters to pass to the template - * - * @return string[] An array of defined template block names - */ - public function getBlockNames($context = []) - { - return $this->template->getBlockNames($context); - } - - /** - * Renders a template block. - * - * @param string $name The block name to render - * @param array $context An array of parameters to pass to the template - * - * @return string The rendered block - */ - public function renderBlock($name, $context = []) - { - $context = $this->env->mergeGlobals($context); - $level = ob_get_level(); - if ($this->env->isDebug()) { - ob_start(); - } else { - ob_start(function () { return ''; }); - } - try { - $this->template->displayBlock($name, $context); - } catch (\Exception $e) { - while (ob_get_level() > $level) { - ob_end_clean(); - } - - throw $e; - } catch (\Throwable $e) { - while (ob_get_level() > $level) { - ob_end_clean(); - } - - throw $e; - } - - return ob_get_clean(); - } - - /** - * Displays a template block. - * - * @param string $name The block name to render - * @param array $context An array of parameters to pass to the template - */ - public function displayBlock($name, $context = []) - { - $this->template->displayBlock($name, $this->env->mergeGlobals($context)); - } - - /** - * @return Source - */ - public function getSourceContext() - { - return $this->template->getSourceContext(); - } - - /** - * @return string - */ - public function getTemplateName() - { - return $this->template->getTemplateName(); - } - - /** - * @internal - * - * @return Template - */ - public function unwrap() - { - return $this->template; - } -} - -class_alias('Twig\TemplateWrapper', 'Twig_TemplateWrapper'); diff --git a/source/vendor/twig/twig/src/Test/IntegrationTestCase.php b/source/vendor/twig/twig/src/Test/IntegrationTestCase.php deleted file mode 100644 index c968364..0000000 --- a/source/vendor/twig/twig/src/Test/IntegrationTestCase.php +++ /dev/null @@ -1,257 +0,0 @@ - - * @author Karma Dordrak - */ -abstract class IntegrationTestCase extends TestCase -{ - /** - * @return string - */ - abstract protected function getFixturesDir(); - - /** - * @return RuntimeLoaderInterface[] - */ - protected function getRuntimeLoaders() - { - return []; - } - - /** - * @return ExtensionInterface[] - */ - protected function getExtensions() - { - return []; - } - - /** - * @return TwigFilter[] - */ - protected function getTwigFilters() - { - return []; - } - - /** - * @return TwigFunction[] - */ - protected function getTwigFunctions() - { - return []; - } - - /** - * @return TwigTest[] - */ - protected function getTwigTests() - { - return []; - } - - /** - * @dataProvider getTests - */ - public function testIntegration($file, $message, $condition, $templates, $exception, $outputs) - { - $this->doIntegrationTest($file, $message, $condition, $templates, $exception, $outputs); - } - - /** - * @dataProvider getLegacyTests - * @group legacy - */ - public function testLegacyIntegration($file, $message, $condition, $templates, $exception, $outputs) - { - $this->doIntegrationTest($file, $message, $condition, $templates, $exception, $outputs); - } - - public function getTests($name, $legacyTests = false) - { - $fixturesDir = realpath($this->getFixturesDir()); - $tests = []; - - foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($fixturesDir), \RecursiveIteratorIterator::LEAVES_ONLY) as $file) { - if (!preg_match('/\.test$/', $file)) { - continue; - } - - if ($legacyTests xor false !== strpos($file->getRealpath(), '.legacy.test')) { - continue; - } - - $test = file_get_contents($file->getRealpath()); - - if (preg_match('/--TEST--\s*(.*?)\s*(?:--CONDITION--\s*(.*))?\s*((?:--TEMPLATE(?:\(.*?\))?--(?:.*?))+)\s*(?:--DATA--\s*(.*))?\s*--EXCEPTION--\s*(.*)/sx', $test, $match)) { - $message = $match[1]; - $condition = $match[2]; - $templates = self::parseTemplates($match[3]); - $exception = $match[5]; - $outputs = [[null, $match[4], null, '']]; - } elseif (preg_match('/--TEST--\s*(.*?)\s*(?:--CONDITION--\s*(.*))?\s*((?:--TEMPLATE(?:\(.*?\))?--(?:.*?))+)--DATA--.*?--EXPECT--.*/s', $test, $match)) { - $message = $match[1]; - $condition = $match[2]; - $templates = self::parseTemplates($match[3]); - $exception = false; - preg_match_all('/--DATA--(.*?)(?:--CONFIG--(.*?))?--EXPECT--(.*?)(?=\-\-DATA\-\-|$)/s', $test, $outputs, \PREG_SET_ORDER); - } else { - throw new \InvalidArgumentException(sprintf('Test "%s" is not valid.', str_replace($fixturesDir.'/', '', $file))); - } - - $tests[] = [str_replace($fixturesDir.'/', '', $file), $message, $condition, $templates, $exception, $outputs]; - } - - if ($legacyTests && empty($tests)) { - // add a dummy test to avoid a PHPUnit message - return [['not', '-', '', [], '', []]]; - } - - return $tests; - } - - public function getLegacyTests() - { - return $this->getTests('testLegacyIntegration', true); - } - - protected function doIntegrationTest($file, $message, $condition, $templates, $exception, $outputs) - { - if (!$outputs) { - $this->markTestSkipped('no tests to run'); - } - - if ($condition) { - eval('$ret = '.$condition.';'); - if (!$ret) { - $this->markTestSkipped($condition); - } - } - - $loader = new ArrayLoader($templates); - - foreach ($outputs as $i => $match) { - $config = array_merge([ - 'cache' => false, - 'strict_variables' => true, - ], $match[2] ? eval($match[2].';') : []); - $twig = new Environment($loader, $config); - $twig->addGlobal('global', 'global'); - foreach ($this->getRuntimeLoaders() as $runtimeLoader) { - $twig->addRuntimeLoader($runtimeLoader); - } - - foreach ($this->getExtensions() as $extension) { - $twig->addExtension($extension); - } - - foreach ($this->getTwigFilters() as $filter) { - $twig->addFilter($filter); - } - - foreach ($this->getTwigTests() as $test) { - $twig->addTest($test); - } - - foreach ($this->getTwigFunctions() as $function) { - $twig->addFunction($function); - } - - $p = new \ReflectionProperty($twig, 'templateClassPrefix'); - $p->setAccessible(true); - $p->setValue($twig, '__TwigTemplate_'.hash('sha256', uniqid(mt_rand(), true), false).'_'); - - try { - $template = $twig->load('index.twig'); - } catch (\Exception $e) { - if (false !== $exception) { - $message = $e->getMessage(); - $this->assertSame(trim($exception), trim(sprintf('%s: %s', \get_class($e), $message))); - $last = substr($message, \strlen($message) - 1); - $this->assertTrue('.' === $last || '?' === $last, 'Exception message must end with a dot or a question mark.'); - - return; - } - - throw new Error(sprintf('%s: %s', \get_class($e), $e->getMessage()), -1, null, $e); - } - - try { - $output = trim($template->render(eval($match[1].';')), "\n "); - } catch (\Exception $e) { - if (false !== $exception) { - $this->assertSame(trim($exception), trim(sprintf('%s: %s', \get_class($e), $e->getMessage()))); - - return; - } - - $e = new Error(sprintf('%s: %s', \get_class($e), $e->getMessage()), -1, null, $e); - - $output = trim(sprintf('%s: %s', \get_class($e), $e->getMessage())); - } - - if (false !== $exception) { - list($class) = explode(':', $exception); - $constraintClass = class_exists('PHPUnit\Framework\Constraint\Exception') ? 'PHPUnit\Framework\Constraint\Exception' : 'PHPUnit_Framework_Constraint_Exception'; - $this->assertThat(null, new $constraintClass($class)); - } - - $expected = trim($match[3], "\n "); - - if ($expected !== $output) { - printf("Compiled templates that failed on case %d:\n", $i + 1); - - foreach (array_keys($templates) as $name) { - echo "Template: $name\n"; - $loader = $twig->getLoader(); - if (!$loader instanceof SourceContextLoaderInterface) { - $source = new Source($loader->getSource($name), $name); - } else { - $source = $loader->getSourceContext($name); - } - echo $twig->compile($twig->parse($twig->tokenize($source))); - } - } - $this->assertEquals($expected, $output, $message.' (in '.$file.')'); - } - } - - protected static function parseTemplates($test) - { - $templates = []; - preg_match_all('/--TEMPLATE(?:\((.*?)\))?--(.*?)(?=\-\-TEMPLATE|$)/s', $test, $matches, \PREG_SET_ORDER); - foreach ($matches as $match) { - $templates[($match[1] ?: 'index.twig')] = $match[2]; - } - - return $templates; - } -} - -class_alias('Twig\Test\IntegrationTestCase', 'Twig_Test_IntegrationTestCase'); diff --git a/source/vendor/twig/twig/src/Test/NodeTestCase.php b/source/vendor/twig/twig/src/Test/NodeTestCase.php deleted file mode 100644 index f3358cb..0000000 --- a/source/vendor/twig/twig/src/Test/NodeTestCase.php +++ /dev/null @@ -1,79 +0,0 @@ -assertNodeCompilation($source, $node, $environment, $isPattern); - } - - public function assertNodeCompilation($source, Node $node, Environment $environment = null, $isPattern = false) - { - $compiler = $this->getCompiler($environment); - $compiler->compile($node); - - if ($isPattern) { - $this->assertStringMatchesFormat($source, trim($compiler->getSource())); - } else { - $this->assertEquals($source, trim($compiler->getSource())); - } - } - - protected function getCompiler(Environment $environment = null) - { - return new Compiler(null === $environment ? $this->getEnvironment() : $environment); - } - - protected function getEnvironment() - { - return new Environment(new ArrayLoader([])); - } - - protected function getVariableGetter($name, $line = false) - { - $line = $line > 0 ? "// line {$line}\n" : ''; - - if (\PHP_VERSION_ID >= 70000) { - return sprintf('%s($context["%s"] ?? null)', $line, $name); - } - - if (\PHP_VERSION_ID >= 50400) { - return sprintf('%s(isset($context["%s"]) ? $context["%s"] : null)', $line, $name, $name); - } - - return sprintf('%s$this->getContext($context, "%s")', $line, $name); - } - - protected function getAttributeGetter() - { - if (\function_exists('twig_template_get_attributes')) { - return 'twig_template_get_attributes($this, '; - } - - return '$this->getAttribute('; - } -} - -class_alias('Twig\Test\NodeTestCase', 'Twig_Test_NodeTestCase'); diff --git a/source/vendor/twig/twig/src/Token.php b/source/vendor/twig/twig/src/Token.php deleted file mode 100644 index 4c49a1d..0000000 --- a/source/vendor/twig/twig/src/Token.php +++ /dev/null @@ -1,215 +0,0 @@ - - * - * @final - */ -class Token -{ - protected $value; - protected $type; - protected $lineno; - - public const EOF_TYPE = -1; - public const TEXT_TYPE = 0; - public const BLOCK_START_TYPE = 1; - public const VAR_START_TYPE = 2; - public const BLOCK_END_TYPE = 3; - public const VAR_END_TYPE = 4; - public const NAME_TYPE = 5; - public const NUMBER_TYPE = 6; - public const STRING_TYPE = 7; - public const OPERATOR_TYPE = 8; - public const PUNCTUATION_TYPE = 9; - public const INTERPOLATION_START_TYPE = 10; - public const INTERPOLATION_END_TYPE = 11; - public const ARROW_TYPE = 12; - - /** - * @param int $type The type of the token - * @param string $value The token value - * @param int $lineno The line position in the source - */ - public function __construct($type, $value, $lineno) - { - $this->type = $type; - $this->value = $value; - $this->lineno = $lineno; - } - - public function __toString() - { - return sprintf('%s(%s)', self::typeToString($this->type, true), $this->value); - } - - /** - * Tests the current token for a type and/or a value. - * - * Parameters may be: - * * just type - * * type and value (or array of possible values) - * * just value (or array of possible values) (NAME_TYPE is used as type) - * - * @param array|string|int $type The type to test - * @param array|string|null $values The token value - * - * @return bool - */ - public function test($type, $values = null) - { - if (null === $values && !\is_int($type)) { - $values = $type; - $type = self::NAME_TYPE; - } - - return ($this->type === $type) && ( - null === $values || - (\is_array($values) && \in_array($this->value, $values)) || - $this->value == $values - ); - } - - /** - * @return int - */ - public function getLine() - { - return $this->lineno; - } - - /** - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * Returns the constant representation (internal) of a given type. - * - * @param int $type The type as an integer - * @param bool $short Whether to return a short representation or not - * - * @return string The string representation - */ - public static function typeToString($type, $short = false) - { - switch ($type) { - case self::EOF_TYPE: - $name = 'EOF_TYPE'; - break; - case self::TEXT_TYPE: - $name = 'TEXT_TYPE'; - break; - case self::BLOCK_START_TYPE: - $name = 'BLOCK_START_TYPE'; - break; - case self::VAR_START_TYPE: - $name = 'VAR_START_TYPE'; - break; - case self::BLOCK_END_TYPE: - $name = 'BLOCK_END_TYPE'; - break; - case self::VAR_END_TYPE: - $name = 'VAR_END_TYPE'; - break; - case self::NAME_TYPE: - $name = 'NAME_TYPE'; - break; - case self::NUMBER_TYPE: - $name = 'NUMBER_TYPE'; - break; - case self::STRING_TYPE: - $name = 'STRING_TYPE'; - break; - case self::OPERATOR_TYPE: - $name = 'OPERATOR_TYPE'; - break; - case self::PUNCTUATION_TYPE: - $name = 'PUNCTUATION_TYPE'; - break; - case self::INTERPOLATION_START_TYPE: - $name = 'INTERPOLATION_START_TYPE'; - break; - case self::INTERPOLATION_END_TYPE: - $name = 'INTERPOLATION_END_TYPE'; - break; - case self::ARROW_TYPE: - $name = 'ARROW_TYPE'; - break; - default: - throw new \LogicException(sprintf('Token of type "%s" does not exist.', $type)); - } - - return $short ? $name : 'Twig\Token::'.$name; - } - - /** - * Returns the English representation of a given type. - * - * @param int $type The type as an integer - * - * @return string The string representation - */ - public static function typeToEnglish($type) - { - switch ($type) { - case self::EOF_TYPE: - return 'end of template'; - case self::TEXT_TYPE: - return 'text'; - case self::BLOCK_START_TYPE: - return 'begin of statement block'; - case self::VAR_START_TYPE: - return 'begin of print statement'; - case self::BLOCK_END_TYPE: - return 'end of statement block'; - case self::VAR_END_TYPE: - return 'end of print statement'; - case self::NAME_TYPE: - return 'name'; - case self::NUMBER_TYPE: - return 'number'; - case self::STRING_TYPE: - return 'string'; - case self::OPERATOR_TYPE: - return 'operator'; - case self::PUNCTUATION_TYPE: - return 'punctuation'; - case self::INTERPOLATION_START_TYPE: - return 'begin of string interpolation'; - case self::INTERPOLATION_END_TYPE: - return 'end of string interpolation'; - case self::ARROW_TYPE: - return 'arrow function'; - default: - throw new \LogicException(sprintf('Token of type "%s" does not exist.', $type)); - } - } -} - -class_alias('Twig\Token', 'Twig_Token'); diff --git a/source/vendor/twig/twig/src/TokenParser/AbstractTokenParser.php b/source/vendor/twig/twig/src/TokenParser/AbstractTokenParser.php deleted file mode 100644 index 2c2f90b..0000000 --- a/source/vendor/twig/twig/src/TokenParser/AbstractTokenParser.php +++ /dev/null @@ -1,34 +0,0 @@ - - */ -abstract class AbstractTokenParser implements TokenParserInterface -{ - /** - * @var Parser - */ - protected $parser; - - public function setParser(Parser $parser) - { - $this->parser = $parser; - } -} - -class_alias('Twig\TokenParser\AbstractTokenParser', 'Twig_TokenParser'); diff --git a/source/vendor/twig/twig/src/TokenParser/ApplyTokenParser.php b/source/vendor/twig/twig/src/TokenParser/ApplyTokenParser.php deleted file mode 100644 index c75e5ef..0000000 --- a/source/vendor/twig/twig/src/TokenParser/ApplyTokenParser.php +++ /dev/null @@ -1,58 +0,0 @@ -getLine(); - $name = $this->parser->getVarName(); - - $ref = new TempNameExpression($name, $lineno); - $ref->setAttribute('always_defined', true); - - $filter = $this->parser->getExpressionParser()->parseFilterExpressionRaw($ref, $this->getTag()); - - $this->parser->getStream()->expect(Token::BLOCK_END_TYPE); - $body = $this->parser->subparse([$this, 'decideApplyEnd'], true); - $this->parser->getStream()->expect(Token::BLOCK_END_TYPE); - - return new Node([ - new SetNode(true, $ref, $body, $lineno, $this->getTag()), - new PrintNode($filter, $lineno, $this->getTag()), - ]); - } - - public function decideApplyEnd(Token $token) - { - return $token->test('endapply'); - } - - public function getTag() - { - return 'apply'; - } -} diff --git a/source/vendor/twig/twig/src/TokenParser/AutoEscapeTokenParser.php b/source/vendor/twig/twig/src/TokenParser/AutoEscapeTokenParser.php deleted file mode 100644 index 6dda37b..0000000 --- a/source/vendor/twig/twig/src/TokenParser/AutoEscapeTokenParser.php +++ /dev/null @@ -1,88 +0,0 @@ -getLine(); - $stream = $this->parser->getStream(); - - if ($stream->test(Token::BLOCK_END_TYPE)) { - $value = 'html'; - } else { - $expr = $this->parser->getExpressionParser()->parseExpression(); - if (!$expr instanceof ConstantExpression) { - throw new SyntaxError('An escaping strategy must be a string or a bool.', $stream->getCurrent()->getLine(), $stream->getSourceContext()); - } - $value = $expr->getAttribute('value'); - - $compat = true === $value || false === $value; - - if (true === $value) { - $value = 'html'; - } - - if ($compat && $stream->test(Token::NAME_TYPE)) { - @trigger_error('Using the autoescape tag with "true" or "false" before the strategy name is deprecated since version 1.21.', \E_USER_DEPRECATED); - - if (false === $value) { - throw new SyntaxError('Unexpected escaping strategy as you set autoescaping to false.', $stream->getCurrent()->getLine(), $stream->getSourceContext()); - } - - $value = $stream->next()->getValue(); - } - } - - $stream->expect(Token::BLOCK_END_TYPE); - $body = $this->parser->subparse([$this, 'decideBlockEnd'], true); - $stream->expect(Token::BLOCK_END_TYPE); - - return new AutoEscapeNode($value, $body, $lineno, $this->getTag()); - } - - public function decideBlockEnd(Token $token) - { - return $token->test('endautoescape'); - } - - public function getTag() - { - return 'autoescape'; - } -} - -class_alias('Twig\TokenParser\AutoEscapeTokenParser', 'Twig_TokenParser_AutoEscape'); diff --git a/source/vendor/twig/twig/src/TokenParser/BlockTokenParser.php b/source/vendor/twig/twig/src/TokenParser/BlockTokenParser.php deleted file mode 100644 index caf11f0..0000000 --- a/source/vendor/twig/twig/src/TokenParser/BlockTokenParser.php +++ /dev/null @@ -1,80 +0,0 @@ - - * {% block title %}{% endblock %} - My Webpage - * {% endblock %} - * - * @final - */ -class BlockTokenParser extends AbstractTokenParser -{ - public function parse(Token $token) - { - $lineno = $token->getLine(); - $stream = $this->parser->getStream(); - $name = $stream->expect(Token::NAME_TYPE)->getValue(); - if ($this->parser->hasBlock($name)) { - throw new SyntaxError(sprintf("The block '%s' has already been defined line %d.", $name, $this->parser->getBlock($name)->getTemplateLine()), $stream->getCurrent()->getLine(), $stream->getSourceContext()); - } - $this->parser->setBlock($name, $block = new BlockNode($name, new Node([]), $lineno)); - $this->parser->pushLocalScope(); - $this->parser->pushBlockStack($name); - - if ($stream->nextIf(Token::BLOCK_END_TYPE)) { - $body = $this->parser->subparse([$this, 'decideBlockEnd'], true); - if ($token = $stream->nextIf(Token::NAME_TYPE)) { - $value = $token->getValue(); - - if ($value != $name) { - throw new SyntaxError(sprintf('Expected endblock for block "%s" (but "%s" given).', $name, $value), $stream->getCurrent()->getLine(), $stream->getSourceContext()); - } - } - } else { - $body = new Node([ - new PrintNode($this->parser->getExpressionParser()->parseExpression(), $lineno), - ]); - } - $stream->expect(Token::BLOCK_END_TYPE); - - $block->setNode('body', $body); - $this->parser->popBlockStack(); - $this->parser->popLocalScope(); - - return new BlockReferenceNode($name, $lineno, $this->getTag()); - } - - public function decideBlockEnd(Token $token) - { - return $token->test('endblock'); - } - - public function getTag() - { - return 'block'; - } -} - -class_alias('Twig\TokenParser\BlockTokenParser', 'Twig_TokenParser_Block'); diff --git a/source/vendor/twig/twig/src/TokenParser/DeprecatedTokenParser.php b/source/vendor/twig/twig/src/TokenParser/DeprecatedTokenParser.php deleted file mode 100644 index 6575cff..0000000 --- a/source/vendor/twig/twig/src/TokenParser/DeprecatedTokenParser.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * @final - */ -class DeprecatedTokenParser extends AbstractTokenParser -{ - public function parse(Token $token) - { - $expr = $this->parser->getExpressionParser()->parseExpression(); - - $this->parser->getStream()->expect(Token::BLOCK_END_TYPE); - - return new DeprecatedNode($expr, $token->getLine(), $this->getTag()); - } - - public function getTag() - { - return 'deprecated'; - } -} - -class_alias('Twig\TokenParser\DeprecatedTokenParser', 'Twig_TokenParser_Deprecated'); diff --git a/source/vendor/twig/twig/src/TokenParser/DoTokenParser.php b/source/vendor/twig/twig/src/TokenParser/DoTokenParser.php deleted file mode 100644 index e1eae10..0000000 --- a/source/vendor/twig/twig/src/TokenParser/DoTokenParser.php +++ /dev/null @@ -1,39 +0,0 @@ -parser->getExpressionParser()->parseExpression(); - - $this->parser->getStream()->expect(Token::BLOCK_END_TYPE); - - return new DoNode($expr, $token->getLine(), $this->getTag()); - } - - public function getTag() - { - return 'do'; - } -} - -class_alias('Twig\TokenParser\DoTokenParser', 'Twig_TokenParser_Do'); diff --git a/source/vendor/twig/twig/src/TokenParser/EmbedTokenParser.php b/source/vendor/twig/twig/src/TokenParser/EmbedTokenParser.php deleted file mode 100644 index 973ff2e..0000000 --- a/source/vendor/twig/twig/src/TokenParser/EmbedTokenParser.php +++ /dev/null @@ -1,74 +0,0 @@ -parser->getStream(); - - $parent = $this->parser->getExpressionParser()->parseExpression(); - - list($variables, $only, $ignoreMissing) = $this->parseArguments(); - - $parentToken = $fakeParentToken = new Token(Token::STRING_TYPE, '__parent__', $token->getLine()); - if ($parent instanceof ConstantExpression) { - $parentToken = new Token(Token::STRING_TYPE, $parent->getAttribute('value'), $token->getLine()); - } elseif ($parent instanceof NameExpression) { - $parentToken = new Token(Token::NAME_TYPE, $parent->getAttribute('name'), $token->getLine()); - } - - // inject a fake parent to make the parent() function work - $stream->injectTokens([ - new Token(Token::BLOCK_START_TYPE, '', $token->getLine()), - new Token(Token::NAME_TYPE, 'extends', $token->getLine()), - $parentToken, - new Token(Token::BLOCK_END_TYPE, '', $token->getLine()), - ]); - - $module = $this->parser->parse($stream, [$this, 'decideBlockEnd'], true); - - // override the parent with the correct one - if ($fakeParentToken === $parentToken) { - $module->setNode('parent', $parent); - } - - $this->parser->embedTemplate($module); - - $stream->expect(Token::BLOCK_END_TYPE); - - return new EmbedNode($module->getTemplateName(), $module->getAttribute('index'), $variables, $only, $ignoreMissing, $token->getLine(), $this->getTag()); - } - - public function decideBlockEnd(Token $token) - { - return $token->test('endembed'); - } - - public function getTag() - { - return 'embed'; - } -} - -class_alias('Twig\TokenParser\EmbedTokenParser', 'Twig_TokenParser_Embed'); diff --git a/source/vendor/twig/twig/src/TokenParser/ExtendsTokenParser.php b/source/vendor/twig/twig/src/TokenParser/ExtendsTokenParser.php deleted file mode 100644 index e66789a..0000000 --- a/source/vendor/twig/twig/src/TokenParser/ExtendsTokenParser.php +++ /dev/null @@ -1,54 +0,0 @@ -parser->getStream(); - - if ($this->parser->peekBlockStack()) { - throw new SyntaxError('Cannot use "extend" in a block.', $token->getLine(), $stream->getSourceContext()); - } elseif (!$this->parser->isMainScope()) { - throw new SyntaxError('Cannot use "extend" in a macro.', $token->getLine(), $stream->getSourceContext()); - } - - if (null !== $this->parser->getParent()) { - throw new SyntaxError('Multiple extends tags are forbidden.', $token->getLine(), $stream->getSourceContext()); - } - $this->parser->setParent($this->parser->getExpressionParser()->parseExpression()); - - $stream->expect(Token::BLOCK_END_TYPE); - - return new Node(); - } - - public function getTag() - { - return 'extends'; - } -} - -class_alias('Twig\TokenParser\ExtendsTokenParser', 'Twig_TokenParser_Extends'); diff --git a/source/vendor/twig/twig/src/TokenParser/FilterTokenParser.php b/source/vendor/twig/twig/src/TokenParser/FilterTokenParser.php deleted file mode 100644 index dc07dcf..0000000 --- a/source/vendor/twig/twig/src/TokenParser/FilterTokenParser.php +++ /dev/null @@ -1,59 +0,0 @@ -parser->getVarName(); - $ref = new BlockReferenceExpression(new ConstantExpression($name, $token->getLine()), null, $token->getLine(), $this->getTag()); - - $filter = $this->parser->getExpressionParser()->parseFilterExpressionRaw($ref, $this->getTag()); - $this->parser->getStream()->expect(Token::BLOCK_END_TYPE); - - $body = $this->parser->subparse([$this, 'decideBlockEnd'], true); - $this->parser->getStream()->expect(Token::BLOCK_END_TYPE); - - $block = new BlockNode($name, $body, $token->getLine()); - $this->parser->setBlock($name, $block); - - return new PrintNode($filter, $token->getLine(), $this->getTag()); - } - - public function decideBlockEnd(Token $token) - { - return $token->test('endfilter'); - } - - public function getTag() - { - return 'filter'; - } -} - -class_alias('Twig\TokenParser\FilterTokenParser', 'Twig_TokenParser_Filter'); diff --git a/source/vendor/twig/twig/src/TokenParser/FlushTokenParser.php b/source/vendor/twig/twig/src/TokenParser/FlushTokenParser.php deleted file mode 100644 index b25524f..0000000 --- a/source/vendor/twig/twig/src/TokenParser/FlushTokenParser.php +++ /dev/null @@ -1,39 +0,0 @@ -parser->getStream()->expect(Token::BLOCK_END_TYPE); - - return new FlushNode($token->getLine(), $this->getTag()); - } - - public function getTag() - { - return 'flush'; - } -} - -class_alias('Twig\TokenParser\FlushTokenParser', 'Twig_TokenParser_Flush'); diff --git a/source/vendor/twig/twig/src/TokenParser/ForTokenParser.php b/source/vendor/twig/twig/src/TokenParser/ForTokenParser.php deleted file mode 100644 index 69278d9..0000000 --- a/source/vendor/twig/twig/src/TokenParser/ForTokenParser.php +++ /dev/null @@ -1,136 +0,0 @@ - - * {% for user in users %} - *
      • {{ user.username|e }}
      • - * {% endfor %} - *
      - * - * @final - */ -class ForTokenParser extends AbstractTokenParser -{ - public function parse(Token $token) - { - $lineno = $token->getLine(); - $stream = $this->parser->getStream(); - $targets = $this->parser->getExpressionParser()->parseAssignmentExpression(); - $stream->expect(Token::OPERATOR_TYPE, 'in'); - $seq = $this->parser->getExpressionParser()->parseExpression(); - - $ifexpr = null; - if ($stream->nextIf(Token::NAME_TYPE, 'if')) { - $ifexpr = $this->parser->getExpressionParser()->parseExpression(); - } - - $stream->expect(Token::BLOCK_END_TYPE); - $body = $this->parser->subparse([$this, 'decideForFork']); - if ('else' == $stream->next()->getValue()) { - $stream->expect(Token::BLOCK_END_TYPE); - $else = $this->parser->subparse([$this, 'decideForEnd'], true); - } else { - $else = null; - } - $stream->expect(Token::BLOCK_END_TYPE); - - if (\count($targets) > 1) { - $keyTarget = $targets->getNode(0); - $keyTarget = new AssignNameExpression($keyTarget->getAttribute('name'), $keyTarget->getTemplateLine()); - $valueTarget = $targets->getNode(1); - $valueTarget = new AssignNameExpression($valueTarget->getAttribute('name'), $valueTarget->getTemplateLine()); - } else { - $keyTarget = new AssignNameExpression('_key', $lineno); - $valueTarget = $targets->getNode(0); - $valueTarget = new AssignNameExpression($valueTarget->getAttribute('name'), $valueTarget->getTemplateLine()); - } - - if ($ifexpr) { - $this->checkLoopUsageCondition($stream, $ifexpr); - $this->checkLoopUsageBody($stream, $body); - } - - return new ForNode($keyTarget, $valueTarget, $seq, $ifexpr, $body, $else, $lineno, $this->getTag()); - } - - public function decideForFork(Token $token) - { - return $token->test(['else', 'endfor']); - } - - public function decideForEnd(Token $token) - { - return $token->test('endfor'); - } - - // the loop variable cannot be used in the condition - protected function checkLoopUsageCondition(TokenStream $stream, \Twig_NodeInterface $node) - { - if ($node instanceof GetAttrExpression && $node->getNode('node') instanceof NameExpression && 'loop' == $node->getNode('node')->getAttribute('name')) { - throw new SyntaxError('The "loop" variable cannot be used in a looping condition.', $node->getTemplateLine(), $stream->getSourceContext()); - } - - foreach ($node as $n) { - if (!$n) { - continue; - } - - $this->checkLoopUsageCondition($stream, $n); - } - } - - // check usage of non-defined loop-items - // it does not catch all problems (for instance when a for is included into another or when the variable is used in an include) - protected function checkLoopUsageBody(TokenStream $stream, \Twig_NodeInterface $node) - { - if ($node instanceof GetAttrExpression && $node->getNode('node') instanceof NameExpression && 'loop' == $node->getNode('node')->getAttribute('name')) { - $attribute = $node->getNode('attribute'); - if ($attribute instanceof ConstantExpression && \in_array($attribute->getAttribute('value'), ['length', 'revindex0', 'revindex', 'last'])) { - throw new SyntaxError(sprintf('The "loop.%s" variable is not defined when looping with a condition.', $attribute->getAttribute('value')), $node->getTemplateLine(), $stream->getSourceContext()); - } - } - - // should check for parent.loop.XXX usage - if ($node instanceof ForNode) { - return; - } - - foreach ($node as $n) { - if (!$n) { - continue; - } - - $this->checkLoopUsageBody($stream, $n); - } - } - - public function getTag() - { - return 'for'; - } -} - -class_alias('Twig\TokenParser\ForTokenParser', 'Twig_TokenParser_For'); diff --git a/source/vendor/twig/twig/src/TokenParser/FromTokenParser.php b/source/vendor/twig/twig/src/TokenParser/FromTokenParser.php deleted file mode 100644 index 4cce650..0000000 --- a/source/vendor/twig/twig/src/TokenParser/FromTokenParser.php +++ /dev/null @@ -1,72 +0,0 @@ -parser->getExpressionParser()->parseExpression(); - $stream = $this->parser->getStream(); - $stream->expect(Token::NAME_TYPE, 'import'); - - $targets = []; - do { - $name = $stream->expect(Token::NAME_TYPE)->getValue(); - - $alias = $name; - if ($stream->nextIf('as')) { - $alias = $stream->expect(Token::NAME_TYPE)->getValue(); - } - - $targets[$name] = $alias; - - if (!$stream->nextIf(Token::PUNCTUATION_TYPE, ',')) { - break; - } - } while (true); - - $stream->expect(Token::BLOCK_END_TYPE); - - $var = new AssignNameExpression($this->parser->getVarName(), $token->getLine()); - $node = new ImportNode($macro, $var, $token->getLine(), $this->getTag()); - - foreach ($targets as $name => $alias) { - if ($this->parser->isReservedMacroName($name)) { - throw new SyntaxError(sprintf('"%s" cannot be an imported macro as it is a reserved keyword.', $name), $token->getLine(), $stream->getSourceContext()); - } - - $this->parser->addImportedSymbol('function', $alias, 'get'.$name, $var); - } - - return $node; - } - - public function getTag() - { - return 'from'; - } -} - -class_alias('Twig\TokenParser\FromTokenParser', 'Twig_TokenParser_From'); diff --git a/source/vendor/twig/twig/src/TokenParser/IfTokenParser.php b/source/vendor/twig/twig/src/TokenParser/IfTokenParser.php deleted file mode 100644 index 2631a20..0000000 --- a/source/vendor/twig/twig/src/TokenParser/IfTokenParser.php +++ /dev/null @@ -1,91 +0,0 @@ - - * {% for user in users %} - *
    • {{ user.username|e }}
    • - * {% endfor %} - *
    - * {% endif %} - * - * @final - */ -class IfTokenParser extends AbstractTokenParser -{ - public function parse(Token $token) - { - $lineno = $token->getLine(); - $expr = $this->parser->getExpressionParser()->parseExpression(); - $stream = $this->parser->getStream(); - $stream->expect(Token::BLOCK_END_TYPE); - $body = $this->parser->subparse([$this, 'decideIfFork']); - $tests = [$expr, $body]; - $else = null; - - $end = false; - while (!$end) { - switch ($stream->next()->getValue()) { - case 'else': - $stream->expect(Token::BLOCK_END_TYPE); - $else = $this->parser->subparse([$this, 'decideIfEnd']); - break; - - case 'elseif': - $expr = $this->parser->getExpressionParser()->parseExpression(); - $stream->expect(Token::BLOCK_END_TYPE); - $body = $this->parser->subparse([$this, 'decideIfFork']); - $tests[] = $expr; - $tests[] = $body; - break; - - case 'endif': - $end = true; - break; - - default: - throw new SyntaxError(sprintf('Unexpected end of template. Twig was looking for the following tags "else", "elseif", or "endif" to close the "if" block started at line %d).', $lineno), $stream->getCurrent()->getLine(), $stream->getSourceContext()); - } - } - - $stream->expect(Token::BLOCK_END_TYPE); - - return new IfNode(new Node($tests), $else, $lineno, $this->getTag()); - } - - public function decideIfFork(Token $token) - { - return $token->test(['elseif', 'else', 'endif']); - } - - public function decideIfEnd(Token $token) - { - return $token->test(['endif']); - } - - public function getTag() - { - return 'if'; - } -} - -class_alias('Twig\TokenParser\IfTokenParser', 'Twig_TokenParser_If'); diff --git a/source/vendor/twig/twig/src/TokenParser/ImportTokenParser.php b/source/vendor/twig/twig/src/TokenParser/ImportTokenParser.php deleted file mode 100644 index 88395b9..0000000 --- a/source/vendor/twig/twig/src/TokenParser/ImportTokenParser.php +++ /dev/null @@ -1,45 +0,0 @@ -parser->getExpressionParser()->parseExpression(); - $this->parser->getStream()->expect(Token::NAME_TYPE, 'as'); - $var = new AssignNameExpression($this->parser->getStream()->expect(Token::NAME_TYPE)->getValue(), $token->getLine()); - $this->parser->getStream()->expect(Token::BLOCK_END_TYPE); - - $this->parser->addImportedSymbol('template', $var->getAttribute('name')); - - return new ImportNode($macro, $var, $token->getLine(), $this->getTag()); - } - - public function getTag() - { - return 'import'; - } -} - -class_alias('Twig\TokenParser\ImportTokenParser', 'Twig_TokenParser_Import'); diff --git a/source/vendor/twig/twig/src/TokenParser/IncludeTokenParser.php b/source/vendor/twig/twig/src/TokenParser/IncludeTokenParser.php deleted file mode 100644 index 57aa4cf..0000000 --- a/source/vendor/twig/twig/src/TokenParser/IncludeTokenParser.php +++ /dev/null @@ -1,68 +0,0 @@ -parser->getExpressionParser()->parseExpression(); - - list($variables, $only, $ignoreMissing) = $this->parseArguments(); - - return new IncludeNode($expr, $variables, $only, $ignoreMissing, $token->getLine(), $this->getTag()); - } - - protected function parseArguments() - { - $stream = $this->parser->getStream(); - - $ignoreMissing = false; - if ($stream->nextIf(Token::NAME_TYPE, 'ignore')) { - $stream->expect(Token::NAME_TYPE, 'missing'); - - $ignoreMissing = true; - } - - $variables = null; - if ($stream->nextIf(Token::NAME_TYPE, 'with')) { - $variables = $this->parser->getExpressionParser()->parseExpression(); - } - - $only = false; - if ($stream->nextIf(Token::NAME_TYPE, 'only')) { - $only = true; - } - - $stream->expect(Token::BLOCK_END_TYPE); - - return [$variables, $only, $ignoreMissing]; - } - - public function getTag() - { - return 'include'; - } -} - -class_alias('Twig\TokenParser\IncludeTokenParser', 'Twig_TokenParser_Include'); diff --git a/source/vendor/twig/twig/src/TokenParser/MacroTokenParser.php b/source/vendor/twig/twig/src/TokenParser/MacroTokenParser.php deleted file mode 100644 index a0d66e7..0000000 --- a/source/vendor/twig/twig/src/TokenParser/MacroTokenParser.php +++ /dev/null @@ -1,68 +0,0 @@ - - * {% endmacro %} - * - * @final - */ -class MacroTokenParser extends AbstractTokenParser -{ - public function parse(Token $token) - { - $lineno = $token->getLine(); - $stream = $this->parser->getStream(); - $name = $stream->expect(Token::NAME_TYPE)->getValue(); - - $arguments = $this->parser->getExpressionParser()->parseArguments(true, true); - - $stream->expect(Token::BLOCK_END_TYPE); - $this->parser->pushLocalScope(); - $body = $this->parser->subparse([$this, 'decideBlockEnd'], true); - if ($token = $stream->nextIf(Token::NAME_TYPE)) { - $value = $token->getValue(); - - if ($value != $name) { - throw new SyntaxError(sprintf('Expected endmacro for macro "%s" (but "%s" given).', $name, $value), $stream->getCurrent()->getLine(), $stream->getSourceContext()); - } - } - $this->parser->popLocalScope(); - $stream->expect(Token::BLOCK_END_TYPE); - - $this->parser->setMacro($name, new MacroNode($name, new BodyNode([$body]), $arguments, $lineno, $this->getTag())); - - return new Node(); - } - - public function decideBlockEnd(Token $token) - { - return $token->test('endmacro'); - } - - public function getTag() - { - return 'macro'; - } -} - -class_alias('Twig\TokenParser\MacroTokenParser', 'Twig_TokenParser_Macro'); diff --git a/source/vendor/twig/twig/src/TokenParser/SandboxTokenParser.php b/source/vendor/twig/twig/src/TokenParser/SandboxTokenParser.php deleted file mode 100644 index 0f3ad9e..0000000 --- a/source/vendor/twig/twig/src/TokenParser/SandboxTokenParser.php +++ /dev/null @@ -1,67 +0,0 @@ -parser->getStream(); - $stream->expect(Token::BLOCK_END_TYPE); - $body = $this->parser->subparse([$this, 'decideBlockEnd'], true); - $stream->expect(Token::BLOCK_END_TYPE); - - // in a sandbox tag, only include tags are allowed - if (!$body instanceof IncludeNode) { - foreach ($body as $node) { - if ($node instanceof TextNode && ctype_space($node->getAttribute('data'))) { - continue; - } - - if (!$node instanceof IncludeNode) { - throw new SyntaxError('Only "include" tags are allowed within a "sandbox" section.', $node->getTemplateLine(), $stream->getSourceContext()); - } - } - } - - return new SandboxNode($body, $token->getLine(), $this->getTag()); - } - - public function decideBlockEnd(Token $token) - { - return $token->test('endsandbox'); - } - - public function getTag() - { - return 'sandbox'; - } -} - -class_alias('Twig\TokenParser\SandboxTokenParser', 'Twig_TokenParser_Sandbox'); diff --git a/source/vendor/twig/twig/src/TokenParser/SetTokenParser.php b/source/vendor/twig/twig/src/TokenParser/SetTokenParser.php deleted file mode 100644 index eebebc6..0000000 --- a/source/vendor/twig/twig/src/TokenParser/SetTokenParser.php +++ /dev/null @@ -1,74 +0,0 @@ -getLine(); - $stream = $this->parser->getStream(); - $names = $this->parser->getExpressionParser()->parseAssignmentExpression(); - - $capture = false; - if ($stream->nextIf(Token::OPERATOR_TYPE, '=')) { - $values = $this->parser->getExpressionParser()->parseMultitargetExpression(); - - $stream->expect(Token::BLOCK_END_TYPE); - - if (\count($names) !== \count($values)) { - throw new SyntaxError('When using set, you must have the same number of variables and assignments.', $stream->getCurrent()->getLine(), $stream->getSourceContext()); - } - } else { - $capture = true; - - if (\count($names) > 1) { - throw new SyntaxError('When using set with a block, you cannot have a multi-target.', $stream->getCurrent()->getLine(), $stream->getSourceContext()); - } - - $stream->expect(Token::BLOCK_END_TYPE); - - $values = $this->parser->subparse([$this, 'decideBlockEnd'], true); - $stream->expect(Token::BLOCK_END_TYPE); - } - - return new SetNode($capture, $names, $values, $lineno, $this->getTag()); - } - - public function decideBlockEnd(Token $token) - { - return $token->test('endset'); - } - - public function getTag() - { - return 'set'; - } -} - -class_alias('Twig\TokenParser\SetTokenParser', 'Twig_TokenParser_Set'); diff --git a/source/vendor/twig/twig/src/TokenParser/SpacelessTokenParser.php b/source/vendor/twig/twig/src/TokenParser/SpacelessTokenParser.php deleted file mode 100644 index 5b5656b..0000000 --- a/source/vendor/twig/twig/src/TokenParser/SpacelessTokenParser.php +++ /dev/null @@ -1,53 +0,0 @@ - - * foo - *
    - * {% endspaceless %} - * {# output will be
    foo
    #} - * - * @final - */ -class SpacelessTokenParser extends AbstractTokenParser -{ - public function parse(Token $token) - { - $lineno = $token->getLine(); - - $this->parser->getStream()->expect(Token::BLOCK_END_TYPE); - $body = $this->parser->subparse([$this, 'decideSpacelessEnd'], true); - $this->parser->getStream()->expect(Token::BLOCK_END_TYPE); - - return new SpacelessNode($body, $lineno, $this->getTag()); - } - - public function decideSpacelessEnd(Token $token) - { - return $token->test('endspaceless'); - } - - public function getTag() - { - return 'spaceless'; - } -} - -class_alias('Twig\TokenParser\SpacelessTokenParser', 'Twig_TokenParser_Spaceless'); diff --git a/source/vendor/twig/twig/src/TokenParser/TokenParserInterface.php b/source/vendor/twig/twig/src/TokenParser/TokenParserInterface.php deleted file mode 100644 index 4b603b2..0000000 --- a/source/vendor/twig/twig/src/TokenParser/TokenParserInterface.php +++ /dev/null @@ -1,51 +0,0 @@ - - */ -interface TokenParserInterface -{ - /** - * Sets the parser associated with this token parser. - */ - public function setParser(Parser $parser); - - /** - * Parses a token and returns a node. - * - * @return \Twig_NodeInterface - * - * @throws SyntaxError - */ - public function parse(Token $token); - - /** - * Gets the tag name associated with this token parser. - * - * @return string The tag name - */ - public function getTag(); -} - -class_alias('Twig\TokenParser\TokenParserInterface', 'Twig_TokenParserInterface'); - -// Ensure that the aliased name is loaded to keep BC for classes implementing the typehint with the old aliased name. -class_exists('Twig\Token'); -class_exists('Twig\Parser'); diff --git a/source/vendor/twig/twig/src/TokenParser/UseTokenParser.php b/source/vendor/twig/twig/src/TokenParser/UseTokenParser.php deleted file mode 100644 index d2e39aa..0000000 --- a/source/vendor/twig/twig/src/TokenParser/UseTokenParser.php +++ /dev/null @@ -1,75 +0,0 @@ -parser->getExpressionParser()->parseExpression(); - $stream = $this->parser->getStream(); - - if (!$template instanceof ConstantExpression) { - throw new SyntaxError('The template references in a "use" statement must be a string.', $stream->getCurrent()->getLine(), $stream->getSourceContext()); - } - - $targets = []; - if ($stream->nextIf('with')) { - do { - $name = $stream->expect(Token::NAME_TYPE)->getValue(); - - $alias = $name; - if ($stream->nextIf('as')) { - $alias = $stream->expect(Token::NAME_TYPE)->getValue(); - } - - $targets[$name] = new ConstantExpression($alias, -1); - - if (!$stream->nextIf(Token::PUNCTUATION_TYPE, ',')) { - break; - } - } while (true); - } - - $stream->expect(Token::BLOCK_END_TYPE); - - $this->parser->addTrait(new Node(['template' => $template, 'targets' => new Node($targets)])); - - return new Node(); - } - - public function getTag() - { - return 'use'; - } -} - -class_alias('Twig\TokenParser\UseTokenParser', 'Twig_TokenParser_Use'); diff --git a/source/vendor/twig/twig/src/TokenParser/WithTokenParser.php b/source/vendor/twig/twig/src/TokenParser/WithTokenParser.php deleted file mode 100644 index 411e2b4..0000000 --- a/source/vendor/twig/twig/src/TokenParser/WithTokenParser.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * @final - */ -class WithTokenParser extends AbstractTokenParser -{ - public function parse(Token $token) - { - $stream = $this->parser->getStream(); - - $variables = null; - $only = false; - if (!$stream->test(Token::BLOCK_END_TYPE)) { - $variables = $this->parser->getExpressionParser()->parseExpression(); - $only = $stream->nextIf(Token::NAME_TYPE, 'only'); - } - - $stream->expect(Token::BLOCK_END_TYPE); - - $body = $this->parser->subparse([$this, 'decideWithEnd'], true); - - $stream->expect(Token::BLOCK_END_TYPE); - - return new WithNode($body, $variables, $only, $token->getLine(), $this->getTag()); - } - - public function decideWithEnd(Token $token) - { - return $token->test('endwith'); - } - - public function getTag() - { - return 'with'; - } -} - -class_alias('Twig\TokenParser\WithTokenParser', 'Twig_TokenParser_With'); diff --git a/source/vendor/twig/twig/src/TokenStream.php b/source/vendor/twig/twig/src/TokenStream.php deleted file mode 100644 index d4a4846..0000000 --- a/source/vendor/twig/twig/src/TokenStream.php +++ /dev/null @@ -1,201 +0,0 @@ - - */ -class TokenStream -{ - protected $tokens; - protected $current = 0; - protected $filename; - - private $source; - - /** - * @param array $tokens An array of tokens - * @param string|null $name The name of the template which tokens are associated with - * @param string|null $source The source code associated with the tokens - */ - public function __construct(array $tokens, $name = null, $source = null) - { - if (!$name instanceof Source) { - if (null !== $name || null !== $source) { - @trigger_error(sprintf('Passing a string as the $name argument of %s() is deprecated since version 1.27. Pass a \Twig\Source instance instead.', __METHOD__), \E_USER_DEPRECATED); - } - $this->source = new Source($source, $name); - } else { - $this->source = $name; - } - - $this->tokens = $tokens; - - // deprecated, not used anymore, to be removed in 2.0 - $this->filename = $this->source->getName(); - } - - public function __toString() - { - return implode("\n", $this->tokens); - } - - public function injectTokens(array $tokens) - { - $this->tokens = array_merge(\array_slice($this->tokens, 0, $this->current), $tokens, \array_slice($this->tokens, $this->current)); - } - - /** - * Sets the pointer to the next token and returns the old one. - * - * @return Token - */ - public function next() - { - if (!isset($this->tokens[++$this->current])) { - throw new SyntaxError('Unexpected end of template.', $this->tokens[$this->current - 1]->getLine(), $this->source); - } - - return $this->tokens[$this->current - 1]; - } - - /** - * Tests a token, sets the pointer to the next one and returns it or throws a syntax error. - * - * @return Token|null The next token if the condition is true, null otherwise - */ - public function nextIf($primary, $secondary = null) - { - if ($this->tokens[$this->current]->test($primary, $secondary)) { - return $this->next(); - } - } - - /** - * Tests a token and returns it or throws a syntax error. - * - * @return Token - */ - public function expect($type, $value = null, $message = null) - { - $token = $this->tokens[$this->current]; - if (!$token->test($type, $value)) { - $line = $token->getLine(); - throw new SyntaxError(sprintf('%sUnexpected token "%s"%s ("%s" expected%s).', - $message ? $message.'. ' : '', - Token::typeToEnglish($token->getType()), - $token->getValue() ? sprintf(' of value "%s"', $token->getValue()) : '', - Token::typeToEnglish($type), $value ? sprintf(' with value "%s"', $value) : ''), - $line, - $this->source - ); - } - $this->next(); - - return $token; - } - - /** - * Looks at the next token. - * - * @param int $number - * - * @return Token - */ - public function look($number = 1) - { - if (!isset($this->tokens[$this->current + $number])) { - throw new SyntaxError('Unexpected end of template.', $this->tokens[$this->current + $number - 1]->getLine(), $this->source); - } - - return $this->tokens[$this->current + $number]; - } - - /** - * Tests the current token. - * - * @return bool - */ - public function test($primary, $secondary = null) - { - return $this->tokens[$this->current]->test($primary, $secondary); - } - - /** - * Checks if end of stream was reached. - * - * @return bool - */ - public function isEOF() - { - return Token::EOF_TYPE === $this->tokens[$this->current]->getType(); - } - - /** - * @return Token - */ - public function getCurrent() - { - return $this->tokens[$this->current]; - } - - /** - * Gets the name associated with this stream (null if not defined). - * - * @return string|null - * - * @deprecated since 1.27 (to be removed in 2.0) - */ - public function getFilename() - { - @trigger_error(sprintf('The %s() method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', __METHOD__), \E_USER_DEPRECATED); - - return $this->source->getName(); - } - - /** - * Gets the source code associated with this stream. - * - * @return string - * - * @internal Don't use this as it might be empty depending on the environment configuration - * - * @deprecated since 1.27 (to be removed in 2.0) - */ - public function getSource() - { - @trigger_error(sprintf('The %s() method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', __METHOD__), \E_USER_DEPRECATED); - - return $this->source->getCode(); - } - - /** - * Gets the source associated with this stream. - * - * @return Source - * - * @internal - */ - public function getSourceContext() - { - return $this->source; - } -} - -class_alias('Twig\TokenStream', 'Twig_TokenStream'); diff --git a/source/vendor/twig/twig/src/TwigFilter.php b/source/vendor/twig/twig/src/TwigFilter.php deleted file mode 100644 index 089a6d1..0000000 --- a/source/vendor/twig/twig/src/TwigFilter.php +++ /dev/null @@ -1,128 +0,0 @@ - - */ -class TwigFilter -{ - protected $name; - protected $callable; - protected $options; - protected $arguments = []; - - public function __construct($name, $callable, array $options = []) - { - $this->name = $name; - $this->callable = $callable; - $this->options = array_merge([ - 'needs_environment' => false, - 'needs_context' => false, - 'is_variadic' => false, - 'is_safe' => null, - 'is_safe_callback' => null, - 'pre_escape' => null, - 'preserves_safety' => null, - 'node_class' => '\Twig\Node\Expression\FilterExpression', - 'deprecated' => false, - 'alternative' => null, - ], $options); - } - - public function getName() - { - return $this->name; - } - - public function getCallable() - { - return $this->callable; - } - - public function getNodeClass() - { - return $this->options['node_class']; - } - - public function setArguments($arguments) - { - $this->arguments = $arguments; - } - - public function getArguments() - { - return $this->arguments; - } - - public function needsEnvironment() - { - return $this->options['needs_environment']; - } - - public function needsContext() - { - return $this->options['needs_context']; - } - - public function getSafe(Node $filterArgs) - { - if (null !== $this->options['is_safe']) { - return $this->options['is_safe']; - } - - if (null !== $this->options['is_safe_callback']) { - return \call_user_func($this->options['is_safe_callback'], $filterArgs); - } - } - - public function getPreservesSafety() - { - return $this->options['preserves_safety']; - } - - public function getPreEscape() - { - return $this->options['pre_escape']; - } - - public function isVariadic() - { - return $this->options['is_variadic']; - } - - public function isDeprecated() - { - return (bool) $this->options['deprecated']; - } - - public function getDeprecatedVersion() - { - return $this->options['deprecated']; - } - - public function getAlternative() - { - return $this->options['alternative']; - } -} - -class_alias('Twig\TwigFilter', 'Twig_SimpleFilter'); - -// Ensure that the aliased name is loaded to keep BC for classes implementing the typehint with the old aliased name. -class_exists('Twig\Node\Node'); diff --git a/source/vendor/twig/twig/src/TwigFunction.php b/source/vendor/twig/twig/src/TwigFunction.php deleted file mode 100644 index 374f070..0000000 --- a/source/vendor/twig/twig/src/TwigFunction.php +++ /dev/null @@ -1,118 +0,0 @@ - - */ -class TwigFunction -{ - protected $name; - protected $callable; - protected $options; - protected $arguments = []; - - public function __construct($name, $callable, array $options = []) - { - $this->name = $name; - $this->callable = $callable; - $this->options = array_merge([ - 'needs_environment' => false, - 'needs_context' => false, - 'is_variadic' => false, - 'is_safe' => null, - 'is_safe_callback' => null, - 'node_class' => '\Twig\Node\Expression\FunctionExpression', - 'deprecated' => false, - 'alternative' => null, - ], $options); - } - - public function getName() - { - return $this->name; - } - - public function getCallable() - { - return $this->callable; - } - - public function getNodeClass() - { - return $this->options['node_class']; - } - - public function setArguments($arguments) - { - $this->arguments = $arguments; - } - - public function getArguments() - { - return $this->arguments; - } - - public function needsEnvironment() - { - return $this->options['needs_environment']; - } - - public function needsContext() - { - return $this->options['needs_context']; - } - - public function getSafe(Node $functionArgs) - { - if (null !== $this->options['is_safe']) { - return $this->options['is_safe']; - } - - if (null !== $this->options['is_safe_callback']) { - return \call_user_func($this->options['is_safe_callback'], $functionArgs); - } - - return []; - } - - public function isVariadic() - { - return $this->options['is_variadic']; - } - - public function isDeprecated() - { - return (bool) $this->options['deprecated']; - } - - public function getDeprecatedVersion() - { - return $this->options['deprecated']; - } - - public function getAlternative() - { - return $this->options['alternative']; - } -} - -class_alias('Twig\TwigFunction', 'Twig_SimpleFunction'); - -// Ensure that the aliased name is loaded to keep BC for classes implementing the typehint with the old aliased name. -class_exists('Twig\Node\Node'); diff --git a/source/vendor/twig/twig/src/TwigTest.php b/source/vendor/twig/twig/src/TwigTest.php deleted file mode 100644 index 962872d..0000000 --- a/source/vendor/twig/twig/src/TwigTest.php +++ /dev/null @@ -1,93 +0,0 @@ - - */ -class TwigTest -{ - protected $name; - protected $callable; - protected $options; - - private $arguments = []; - - public function __construct($name, $callable, array $options = []) - { - $this->name = $name; - $this->callable = $callable; - $this->options = array_merge([ - 'is_variadic' => false, - 'node_class' => '\Twig\Node\Expression\TestExpression', - 'deprecated' => false, - 'alternative' => null, - 'one_mandatory_argument' => false, - ], $options); - } - - public function getName() - { - return $this->name; - } - - public function getCallable() - { - return $this->callable; - } - - public function getNodeClass() - { - return $this->options['node_class']; - } - - public function isVariadic() - { - return $this->options['is_variadic']; - } - - public function isDeprecated() - { - return (bool) $this->options['deprecated']; - } - - public function getDeprecatedVersion() - { - return $this->options['deprecated']; - } - - public function getAlternative() - { - return $this->options['alternative']; - } - - public function setArguments($arguments) - { - $this->arguments = $arguments; - } - - public function getArguments() - { - return $this->arguments; - } - - public function hasOneMandatoryArgument(): bool - { - return (bool) $this->options['one_mandatory_argument']; - } -} - -class_alias('Twig\TwigTest', 'Twig_SimpleTest'); diff --git a/source/vendor/twig/twig/src/Util/DeprecationCollector.php b/source/vendor/twig/twig/src/Util/DeprecationCollector.php deleted file mode 100644 index 4a8ff53..0000000 --- a/source/vendor/twig/twig/src/Util/DeprecationCollector.php +++ /dev/null @@ -1,92 +0,0 @@ - - * - * @final - */ -class DeprecationCollector -{ - private $twig; - private $deprecations; - - public function __construct(Environment $twig) - { - $this->twig = $twig; - } - - /** - * Returns deprecations for templates contained in a directory. - * - * @param string $dir A directory where templates are stored - * @param string $ext Limit the loaded templates by extension - * - * @return array An array of deprecations - */ - public function collectDir($dir, $ext = '.twig') - { - $iterator = new \RegexIterator( - new \RecursiveIteratorIterator( - new \RecursiveDirectoryIterator($dir), \RecursiveIteratorIterator::LEAVES_ONLY - ), '{'.preg_quote($ext).'$}' - ); - - return $this->collect(new TemplateDirIterator($iterator)); - } - - /** - * Returns deprecations for passed templates. - * - * @param \Traversable $iterator An iterator of templates (where keys are template names and values the contents of the template) - * - * @return array An array of deprecations - */ - public function collect(\Traversable $iterator) - { - $this->deprecations = []; - - set_error_handler([$this, 'errorHandler']); - - foreach ($iterator as $name => $contents) { - try { - $this->twig->parse($this->twig->tokenize(new Source($contents, $name))); - } catch (SyntaxError $e) { - // ignore templates containing syntax errors - } - } - - restore_error_handler(); - - $deprecations = $this->deprecations; - $this->deprecations = []; - - return $deprecations; - } - - /** - * @internal - */ - public function errorHandler($type, $msg) - { - if (\E_USER_DEPRECATED === $type) { - $this->deprecations[] = $msg; - } - } -} - -class_alias('Twig\Util\DeprecationCollector', 'Twig_Util_DeprecationCollector'); diff --git a/source/vendor/twig/twig/src/Util/TemplateDirIterator.php b/source/vendor/twig/twig/src/Util/TemplateDirIterator.php deleted file mode 100644 index 1ab0dac..0000000 --- a/source/vendor/twig/twig/src/Util/TemplateDirIterator.php +++ /dev/null @@ -1,30 +0,0 @@ - - */ -class TemplateDirIterator extends \IteratorIterator -{ - public function current() - { - return file_get_contents(parent::current()); - } - - public function key() - { - return (string) parent::key(); - } -} - -class_alias('Twig\Util\TemplateDirIterator', 'Twig_Util_TemplateDirIterator'); diff --git a/source/vendor/willdurand/negotiation/LICENSE b/source/vendor/willdurand/negotiation/LICENSE deleted file mode 100644 index 3546ac1..0000000 --- a/source/vendor/willdurand/negotiation/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) William Durand - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/source/vendor/willdurand/negotiation/README.md b/source/vendor/willdurand/negotiation/README.md deleted file mode 100644 index 1d85c12..0000000 --- a/source/vendor/willdurand/negotiation/README.md +++ /dev/null @@ -1,193 +0,0 @@ -Negotiation -=========== - -[![Build -Status](https://travis-ci.org/willdurand/Negotiation.svg?branch=master)](http://travis-ci.org/willdurand/Negotiation) -[![Build -status](https://ci.appveyor.com/api/projects/status/6tbe8j3gofdlfm4v?svg=true)](https://ci.appveyor.com/project/willdurand/negotiation) -[![Total -Downloads](https://poser.pugx.org/willdurand/Negotiation/downloads.png)](https://packagist.org/packages/willdurand/Negotiation) -[![Latest Stable -Version](https://poser.pugx.org/willdurand/Negotiation/v/stable.png)](https://packagist.org/packages/willdurand/Negotiation) - -**Negotiation** is a standalone library without any dependencies that allows you -to implement [content -negotiation](https://tools.ietf.org/html/rfc7231#section-5.3) in your -application, whatever framework you use. This library is based on [RFC -7231](https://tools.ietf.org/html/rfc7231). Negotiation is easy to use, and -extensively unit tested! - -> **Important:** You are browsing the documentation of Negotiation **2.x**+. -Documentation for version **1.x** is available here: [Negotiation 1.x -documentation](https://github.com/willdurand/Negotiation/blob/1.x/README.md#usage). -You might also be interested in this: [**What's new in Negotiation 2?**](https://github.com/willdurand/Negotiation/releases/tag/v2.0.0-alpha1) - - -Installation ------------- - -The recommended way to install Negotiation is through -[Composer](http://getcomposer.org/): - -```bash -$ composer require willdurand/negotiation -``` - - -Usage Examples --------------- - -### Media Type Negotiation - -``` php -$negotiator = new \Negotiation\Negotiator(); - -$acceptHeader = 'text/html, application/xhtml+xml, application/xml;q=0.9, */*;q=0.8'; -$priorities = array('text/html; charset=UTF-8', 'application/json', 'application/xml;q=0.5'); - -$mediaType = $negotiator->getBest($acceptHeader, $priorities); - -$value = $mediaType->getValue(); -// $value == 'text/html; charset=UTF-8' -``` - -The `Negotiator` returns an instance of `Accept`, or `null` if negotiating the -best media type has failed. - -### Language Negotiation - -``` php -getBest($acceptLanguageHeader, $priorities); - -$type = $bestLanguage->getType(); -// $type == 'fu'; - -$quality = $bestLanguage->getQuality(); -// $quality == 0.9 -``` - -The `LanguageNegotiator` returns an instance of `AcceptLanguage`. - -### Encoding Negotiation - -``` php -getBest($acceptHeader, $priorities); -``` - -The `EncodingNegotiator` returns an instance of `AcceptEncoding`. - -### Charset Negotiation - -``` php -getBest($acceptCharsetHeader, $priorities); - -$type = $bestCharset->getType(); -// $type == 'utf-8'; - -$quality = $bestCharset->getQuality(); -// $quality == 0.81 -``` - -The `CharsetNegotiator` returns an instance of `AcceptCharset`. - -### `Accept*` Classes - -`Accept` and `Accept*` classes share common methods such as: - -* `getValue()` returns the accept value (e.g. `text/html; z=y; a=b; c=d`) -* `getNormalizedValue()` returns the value with parameters sorted (e.g. - `text/html; a=b; c=d; z=y`) -* `getQuality()` returns the quality if available (`q` parameter) -* `getType()` returns the accept type (e.g. `text/html`) -* `getParameters()` returns the set of parameters (excluding the `q` parameter - if provided) -* `getParameter()` allows to retrieve a given parameter by its name. Fallback to - a `$default` (nullable) value otherwise. -* `hasParameter()` indicates whether a parameter exists. - - -Versioning ----------- - -Negotiation follows [Semantic Versioning](http://semver.org/). - -### End Of Life - -#### 1.x - -As of October 2016, [branch -`1.x`](https://github.com/willdurand/Negotiation/tree/1.x) is not supported -anymore, meaning major version `1` reached end of life. Last version is: -[1.5.0](https://github.com/willdurand/Negotiation/releases/tag/1.5.0). - -### Stable Version - -#### 2.x - -Negotiation [2.0](https://github.com/willdurand/Negotiation/releases/tag/v2.0.0) -has been released on October 1st, 2015. It is the **current stable version**. -The [`2.x` branch](https://github.com/willdurand/Negotiation/tree/2.x) is used -to maintain this version. - -### `dev-master` - -#### 3.x - -Version `3.x` is the next major version of Negotiation. This version lives in -the `master` branch, and should not be used in production yet (even if we try -to keep its state as stable as we can). - - -Unit Tests ----------- - -Setup the test suite using Composer: - - $ composer install --dev - -Run it using PHPUnit: - - $ phpunit - - -Contributing ------------- - -See [CONTRIBUTING](CONTRIBUTING.md) file. - - -Credits -------- - -* Some parts of this library are inspired by: - - * [Symfony](http://github.com/symfony/symfony) framework; - * [FOSRest](http://github.com/FriendsOfSymfony/FOSRest); - * [PEAR HTTP2](https://github.com/pear/HTTP2). - -* William Durand -* [@neural-wetware](https://github.com/neural-wetware) - - -License -------- - -Negotiation is released under the MIT License. See the bundled LICENSE file for -details. diff --git a/source/vendor/willdurand/negotiation/src/Negotiation/AbstractNegotiator.php b/source/vendor/willdurand/negotiation/src/Negotiation/AbstractNegotiator.php deleted file mode 100644 index db33824..0000000 --- a/source/vendor/willdurand/negotiation/src/Negotiation/AbstractNegotiator.php +++ /dev/null @@ -1,165 +0,0 @@ -parseHeader($header) as $h) { - try { - $acceptedHeaders[] = $this->acceptFactory($h); - } catch (Exception\Exception $e) { - if ($strict) { - throw $e; - } - } - } - $acceptedPriorities = array(); - foreach ($priorities as $p) { - $acceptedPriorities[] = $this->acceptFactory($p); - } - $matches = $this->findMatches($acceptedHeaders, $acceptedPriorities); - $specificMatches = array_reduce($matches, 'Negotiation\AcceptMatch::reduce', []); - - usort($specificMatches, 'Negotiation\AcceptMatch::compare'); - - $match = array_shift($specificMatches); - - return null === $match ? null : $acceptedPriorities[$match->index]; - } - - /** - * @param string $header A string containing an `Accept|Accept-*` header. - * - * @return [AcceptHeader] An ordered list of accept header elements - */ - public function getOrderedElements($header) - { - if (!$header) { - throw new InvalidArgument('The header string should not be empty.'); - } - - $elements = array(); - $orderKeys = array(); - foreach ($this->parseHeader($header) as $key => $h) { - try { - $element = $this->acceptFactory($h); - $elements[] = $element; - $orderKeys[] = [$element->getQuality(), $key, $element->getValue()]; - } catch (Exception\Exception $e) { - // silently skip in case of invalid headers coming in from a client - } - } - - // sort based on quality and then original order. This is necessary as - // to ensure that the first in the list for two items with the same - // quality stays in that order in both PHP5 and PHP7. - uasort($orderKeys, function ($a, $b) { - $qA = $a[0]; - $qB = $b[0]; - - if ($qA == $qB) { - return $a[1] <=> $b[1]; - } - - return ($qA > $qB) ? -1 : 1; - }); - - $orderedElements = []; - foreach ($orderKeys as $key) { - $orderedElements[] = $elements[$key[1]]; - } - - return $orderedElements; - } - - /** - * @param string $header accept header part or server priority - * - * @return AcceptHeader Parsed header object - */ - abstract protected function acceptFactory($header); - - /** - * @param AcceptHeader $header - * @param AcceptHeader $priority - * @param integer $index - * - * @return AcceptMatch|null Headers matched - */ - protected function match(AcceptHeader $header, AcceptHeader $priority, $index) - { - $ac = $header->getType(); - $pc = $priority->getType(); - - $equal = !strcasecmp($ac, $pc); - - if ($equal || $ac === '*') { - $score = 1 * $equal; - - return new AcceptMatch($header->getQuality() * $priority->getQuality(), $score, $index); - } - - return null; - } - - /** - * @param string $header A string that contains an `Accept*` header. - * - * @return AcceptHeader[] - */ - private function parseHeader($header) - { - $res = preg_match_all('/(?:[^,"]*+(?:"[^"]*+")?)+[^,"]*+/', $header, $matches); - - if (!$res) { - throw new InvalidHeader(sprintf('Failed to parse accept header: "%s"', $header)); - } - - return array_values(array_filter(array_map('trim', $matches[0]))); - } - - /** - * @param AcceptHeader[] $headerParts - * @param Priority[] $priorities Configured priorities - * - * @return AcceptMatch[] Headers matched - */ - private function findMatches(array $headerParts, array $priorities) - { - $matches = []; - foreach ($priorities as $index => $p) { - foreach ($headerParts as $h) { - if (null !== $match = $this->match($h, $p, $index)) { - $matches[] = $match; - } - } - } - - return $matches; - } -} diff --git a/source/vendor/willdurand/negotiation/src/Negotiation/Accept.php b/source/vendor/willdurand/negotiation/src/Negotiation/Accept.php deleted file mode 100644 index 281ae27..0000000 --- a/source/vendor/willdurand/negotiation/src/Negotiation/Accept.php +++ /dev/null @@ -1,46 +0,0 @@ -type === '*') { - $this->type = '*/*'; - } - - $parts = explode('/', $this->type); - - if (count($parts) !== 2 || !$parts[0] || !$parts[1]) { - throw new InvalidMediaType(); - } - - $this->basePart = $parts[0]; - $this->subPart = $parts[1]; - } - - /** - * @return string - */ - public function getSubPart() - { - return $this->subPart; - } - - /** - * @return string - */ - public function getBasePart() - { - return $this->basePart; - } -} diff --git a/source/vendor/willdurand/negotiation/src/Negotiation/AcceptCharset.php b/source/vendor/willdurand/negotiation/src/Negotiation/AcceptCharset.php deleted file mode 100644 index 7ce3490..0000000 --- a/source/vendor/willdurand/negotiation/src/Negotiation/AcceptCharset.php +++ /dev/null @@ -1,7 +0,0 @@ -type); - - if (2 === count($parts)) { - $this->language = $parts[0]; - $this->region = $parts[1]; - } elseif (1 === count($parts)) { - $this->language = $parts[0]; - } elseif (3 === count($parts)) { - $this->language = $parts[0]; - $this->script = $parts[1]; - $this->region = $parts[2]; - } else { - // TODO: this part is never reached... - throw new InvalidLanguage(); - } - } - - /** - * @return string - */ - public function getSubPart() - { - return $this->region; - } - - /** - * @return string - */ - public function getBasePart() - { - return $this->language; - } -} diff --git a/source/vendor/willdurand/negotiation/src/Negotiation/AcceptMatch.php b/source/vendor/willdurand/negotiation/src/Negotiation/AcceptMatch.php deleted file mode 100644 index 1300903..0000000 --- a/source/vendor/willdurand/negotiation/src/Negotiation/AcceptMatch.php +++ /dev/null @@ -1,62 +0,0 @@ -quality = $quality; - $this->score = $score; - $this->index = $index; - } - - /** - * @param AcceptMatch $a - * @param AcceptMatch $b - * - * @return int - */ - public static function compare(AcceptMatch $a, AcceptMatch $b) - { - if ($a->quality !== $b->quality) { - return $a->quality > $b->quality ? -1 : 1; - } - - if ($a->index !== $b->index) { - return $a->index > $b->index ? 1 : -1; - } - - return 0; - } - - /** - * @param array $carry reduced array - * @param AcceptMatch $match match to be reduced - * - * @return AcceptMatch[] - */ - public static function reduce(array $carry, AcceptMatch $match) - { - if (!isset($carry[$match->index]) || $carry[$match->index]->score < $match->score) { - $carry[$match->index] = $match; - } - - return $carry; - } -} diff --git a/source/vendor/willdurand/negotiation/src/Negotiation/BaseAccept.php b/source/vendor/willdurand/negotiation/src/Negotiation/BaseAccept.php deleted file mode 100644 index 3c58447..0000000 --- a/source/vendor/willdurand/negotiation/src/Negotiation/BaseAccept.php +++ /dev/null @@ -1,154 +0,0 @@ -parseParameters($value); - - if (isset($parameters['q'])) { - $this->quality = (float) $parameters['q']; - unset($parameters['q']); - } - - $type = trim(strtolower($type)); - - $this->value = $value; - $this->normalized = $type . ($parameters ? "; " . $this->buildParametersString($parameters) : ''); - $this->type = $type; - $this->parameters = $parameters; - } - - /** - * @return string - */ - public function getNormalizedValue() - { - return $this->normalized; - } - - /** - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * @return float - */ - public function getQuality() - { - return $this->quality; - } - - /** - * @return array - */ - public function getParameters() - { - return $this->parameters; - } - - /** - * @param string $key - * @param mixed $default - * - * @return string|null - */ - public function getParameter($key, $default = null) - { - return isset($this->parameters[$key]) ? $this->parameters[$key] : $default; - } - - /** - * @param string $key - * - * @return boolean - */ - public function hasParameter($key) - { - return isset($this->parameters[$key]); - } - - /** - * - * @param string $acceptPart - * @return array - */ - private function parseParameters($acceptPart) - { - $parts = explode(';', $acceptPart); - $type = array_shift($parts); - - $parameters = []; - foreach ($parts as $part) { - $part = explode('=', $part); - - if (2 !== count($part)) { - continue; // TODO: throw exception here? - } - - $key = strtolower(trim($part[0])); // TODO: technically not allowed space around "=". throw exception? - $parameters[$key] = trim($part[1], ' "'); - } - - return [ $type, $parameters ]; - } - - /** - * @param string $parameters - * - * @return string - */ - private function buildParametersString($parameters) - { - $parts = []; - - ksort($parameters); - foreach ($parameters as $key => $val) { - $parts[] = sprintf('%s=%s', $key, $val); - } - - return implode('; ', $parts); - } -} diff --git a/source/vendor/willdurand/negotiation/src/Negotiation/CharsetNegotiator.php b/source/vendor/willdurand/negotiation/src/Negotiation/CharsetNegotiator.php deleted file mode 100644 index c1f9a4b..0000000 --- a/source/vendor/willdurand/negotiation/src/Negotiation/CharsetNegotiator.php +++ /dev/null @@ -1,14 +0,0 @@ -getBasePart(); - $pb = $priority->getBasePart(); - - $as = $acceptLanguage->getSubPart(); - $ps = $priority->getSubPart(); - - $baseEqual = !strcasecmp($ab, $pb); - $subEqual = !strcasecmp($as, $ps); - - if (($ab == '*' || $baseEqual) && ($as === null || $subEqual)) { - $score = 10 * $baseEqual + $subEqual; - - return new AcceptMatch($acceptLanguage->getQuality() * $priority->getQuality(), $score, $index); - } - - return null; - } -} diff --git a/source/vendor/willdurand/negotiation/src/Negotiation/Negotiator.php b/source/vendor/willdurand/negotiation/src/Negotiation/Negotiator.php deleted file mode 100644 index 9b98a2e..0000000 --- a/source/vendor/willdurand/negotiation/src/Negotiation/Negotiator.php +++ /dev/null @@ -1,89 +0,0 @@ -getBasePart(); - $priorityBase = $priority->getBasePart(); - - $acceptSub = $accept->getSubPart(); - $prioritySub = $priority->getSubPart(); - - $intersection = array_intersect_assoc($accept->getParameters(), $priority->getParameters()); - - $baseEqual = !strcasecmp($acceptBase, $priorityBase); - $subEqual = !strcasecmp($acceptSub, $prioritySub); - - if (($acceptBase === '*' || $baseEqual) - && ($acceptSub === '*' || $subEqual) - && count($intersection) === count($accept->getParameters()) - ) { - $score = 100 * $baseEqual + 10 * $subEqual + count($intersection); - - return new AcceptMatch($accept->getQuality() * $priority->getQuality(), $score, $index); - } - - if (!strstr($acceptSub, '+') || !strstr($prioritySub, '+')) { - return null; - } - - // Handle "+" segment wildcards - list($acceptSub, $acceptPlus) = $this->splitSubPart($acceptSub); - list($prioritySub, $priorityPlus) = $this->splitSubPart($prioritySub); - - // If no wildcards in either the subtype or + segment, do nothing. - if (!($acceptBase === '*' || $baseEqual) - || !($acceptSub === '*' || $prioritySub === '*' || $acceptPlus === '*' || $priorityPlus === '*') - ) { - return null; - } - - $subEqual = !strcasecmp($acceptSub, $prioritySub); - $plusEqual = !strcasecmp($acceptPlus, $priorityPlus); - - if (($acceptSub === '*' || $prioritySub === '*' || $subEqual) - && ($acceptPlus === '*' || $priorityPlus === '*' || $plusEqual) - && count($intersection) === count($accept->getParameters()) - ) { - $score = 100 * $baseEqual + 10 * $subEqual + $plusEqual + count($intersection); - - return new AcceptMatch($accept->getQuality() * $priority->getQuality(), $score, $index); - } - - return null; - } - - /** - * Split a subpart into the subpart and "plus" part. - * - * For media-types of the form "application/vnd.example+json", matching - * should allow wildcards for either the portion before the "+" or - * after. This method splits the subpart to allow such matching. - */ - protected function splitSubPart($subPart) - { - if (!strstr($subPart, '+')) { - return [$subPart, '']; - } - - return explode('+', $subPart, 2); - } -} diff --git a/source/webserver-configs/Caddyfile b/source/webserver-configs/Caddyfile deleted file mode 100644 index 3464b5b..0000000 --- a/source/webserver-configs/Caddyfile +++ /dev/null @@ -1,31 +0,0 @@ -# To use this file simply install caddy and run the command below from the root of your Grav site -# Once running it will redirect http://localhost to https://localhost (new default for Caddy2) -# More infromation here: https://caddyserver.com/docs/ -# -# $ caddy run --config webserver-configs/Caddyfile - -localhost -encode gzip -root * . -file_server - -php_fastcgi 127.0.0.1:9000 - -# Begin - Security -# deny all direct access for these folders -rewrite /(\.git|cache|bin|logs|backups|tests)/.* /403 - -# deny running scripts inside core system folders -rewrite /(system|vendor)/.*\.(txt|xml|md|html|yaml|yml|php|pl|py|cgi|twig|sh|bat)$ /403 - -# deny running scripts inside user folder -rewrite /user/.*\.(txt|md|yaml|yml|php|pl|py|cgi|twig|sh|bat)$ /403 - -# deny access to specific files in the root folder -rewrite /(LICENSE\.txt|composer\.lock|composer\.json|nginx\.conf|web\.config|htaccess\.txt|\.htaccess) /403 - -respond /403 403 -## End - Security - -# global rewrite should come last. -try_files {path} {path}/ /index.php?_url={uri}&{query} diff --git a/source/webserver-configs/Caddyfile-0.8.x b/source/webserver-configs/Caddyfile-0.8.x deleted file mode 100644 index aaf92ce..0000000 --- a/source/webserver-configs/Caddyfile-0.8.x +++ /dev/null @@ -1,33 +0,0 @@ -# Caddyfile for Caddy 0.8.x and below - -:8080 -gzip -fastcgi / 127.0.0.1:9000 php - -# Begin - Security -# deny all direct access for these folders -rewrite { - r /(\.git|cache|bin|logs|backups|tests)/.*$ - status 403 -} -# deny running scripts inside core system folders -rewrite { - r /(system|vendor)/.*\.(txt|xml|md|html|yaml|yml|php|pl|py|cgi|twig|sh|bat)$ - status 403 -} -# deny running scripts inside user folder -rewrite { - r /user/.*\.(txt|md|yaml|yml|php|pl|py|cgi|twig|sh|bat)$ - status 403 -} -# deny access to specific files in the root folder -rewrite { - r /(LICENSE\.txt|composer\.lock|composer\.json|nginx\.conf|web\.config|htaccess\.txt|\.htaccess) - status 403 -} -## End - Security - -# global rewrite should come last. -rewrite { - to {path} {path}/ /index.php?_url={uri}&{query} -} diff --git a/source/webserver-configs/htaccess.txt b/source/webserver-configs/htaccess.txt deleted file mode 100644 index 83063ae..0000000 --- a/source/webserver-configs/htaccess.txt +++ /dev/null @@ -1,78 +0,0 @@ - - -RewriteEngine On - -## Begin RewriteBase -# If you are getting 500 or 404 errors on subpages, you may have to uncomment the RewriteBase entry -# You should change the '/' to your appropriate subfolder. For example if you have -# your Grav install at the root of your site '/' should work, else it might be something -# along the lines of: RewriteBase / -## - -# RewriteBase / - -## End - RewriteBase - -## Begin - X-Forwarded-Proto -# In some hosted or load balanced environments, SSL negotiation happens upstream. -# In order for Grav to recognize the connection as secure, you need to uncomment -# the following lines. -# -# RewriteCond %{HTTP:X-Forwarded-Proto} https -# RewriteRule .* - [E=HTTPS:on] -# -## End - X-Forwarded-Proto - -## Begin - Exploits -# If you experience problems on your site block out the operations listed below -# This attempts to block the most common type of exploit `attempts` to Grav -# -# Block out any script trying to use twig tags in URL. -RewriteCond %{REQUEST_URI} ({{|}}|{%|%}) [OR] -RewriteCond %{QUERY_STRING} ({{|}}|{%25|%25}) [OR] -# Block out any script trying to base64_encode data within the URL. -RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR] -# Block out any script that includes a